Jaime Rodriguez
On Windows Store apps, Windows Phone, HTML and XAML

  • Jaime Rodriguez

    Microsoft's "client" strategy for next few years became real at MIX08 ( and is incredibly exciting if you ask me) ..


    Below are my scribbles during my flight back from MIX.  
    I considered not publishing this because it feels 'too positive' (or too marketing-like)..  if you don't like those, please skip (no harm).
    I am sharing to see if any one has feedback.   I also want to share for people to understand my current thinking - it will explain future blog posts-. that said, don't unsubscribe to the RSS, I won't have many posts like this one.
    If you only have 3 mins, skip to the "Why I am excited section"..   


    As I fly back from MIX I am thinking of my daughter's upcoming second birthday ( she was born a few weeks after the very first MIX).
    Every day I am amazed at how fast she has developed in just two years. This week, I realized another amazing transformation that has happened in same timeframe: Microsoft's client technologies have evolved significantly. At MIX08, Microsoft communicated a very coherent vision for a comprehensive all-inclusive application platform. Microsoft backed up the vision with some pretty impressive customer applications.   

    The message after Day 1 keynote was:

    • From Ray Ozzie: Microsoft is looking strongly at a 'Connected' world ( Enterprise, Consumer, Devices, Entertainment). We are position quite well to address such broad challenge.
    • From Scott Guthrie: Microsoft has quickly become a very strong competitor in the RIA space; we are tackling it from all angles:
      • Continued innovation to maintain leadership on video quality and to to maintain lowest cost of ownership to video content providers. 
      • Innovation around other consumer technologies (e.g. DeepZoom) that are included in the Silverlight platform.
      • Tooling for developers and designers.
      • A comprehensive, extensible, performant platform to address the needs of most RIA scenarios and a client continuum for existing Windows desktop customers; if you need a desktop application you can leverage the same skills  (.NET, XAML) and same tools ( Blend, Visual Studio), etc.  You can even share the codebase with a few tweaks..
      • Strong commitment to cross platform and cross browser,  now emphasized by adding Windows mobile and Symbian OS into the equation (via the Nokia announcement).

    You could be thinking this is "blue koolaid", but  we backed it up with strong partner scenarios. Among the evidence:

    • NBC Olympics is trusting Microsoft Silverlight with a once every four years.  This is their most aggressive online broadcast project ever.
      • The app looked great too.  I don't think this was transparent, but the app was coded using Silverlight 2.  I am a virtual part of that team and can tell you the bits were real; it was working code and you should expect to see some of it
    • Hard Rock Cafe showed Memorabilia, an amazing showcase for Microsoft's DeepZoom technology.  I am a big fan of DeepZoom, I think is going to revolutionize how we navigate content and how we interact with displays ( screens, surface, phones). 
    • AOL showed their new email client written in Silverlight 2.  They showed impressive styling capabilities for personalization; they also showed seamless advertisement  integration and kept raging on the performance improvements they are seeing. I could be wrong because I am not intimate with this project but it sounded like some of the improvements are via caching on the isolated storage provided by Silverlight (so it goes beyond standards-based) web.
      • The client looked pretty good and I kept thinking if they have a Silverlight 2 client, why not make a WPF client and get out of the browser?
    • Aston Martin showed several amazing applications: a Silverlight application and a WPF application (interacting with XNA).  Beyond their cars being amazingly cool, the demos stood by themselves on the technical aspects clearly demonstrating the on-going need (in some scenarios) for desktop applications ( 3D, hardware acceleration, access to devices, etc.)
    • Cirque Du Soleil had a casual and entertaining demonstration of the very complex recruiting and staffing process they go through.  I think the biggest highlight of their application is the reuse of the XAML across channels; they used the same XAML and same business objects on their off-line desktop application and their web based application.  
      • I was a virtual contributor on the Cirque application so I am hoping to get to do another post with some of the details; it was a very interesting show case of "why smartclient".
    • There were some WPF demonstrations of their performance improvements around effects.  I was standing next to one of our marketing folks when they showcased it; she was not that impressed, looked at me with a "this is geeky stuff, is not it?"  and all I could say was "extensibility at this level is very complex and incredibly powerful, this is big for some ISVs and Enterprises".


    That was the executive message.. Why does this excite me so much?

    This new convergence on the client stack with XAML + .NET is incredibly powerful; this is one of those 1 + 1 = 3 catalysts.

    Here are just a few of my reasons ( in random order):

    • I spend my time in the Enterprise, where there is still a countless number of requirements that I think is ONLY addressed by smart client applications (which is different from off-line RIA), I think .NET and Visual Studio have a strong positioning in that space;  with all the new improvements to WPF ( you should see Rob Relyea's MIX talk) I think WPF adoption will continue to grow, and now we can extend or complement those smart clients with web applications with out compromising on performance, experience, or security.   
    • This possible reuse for cross platform is going to excite those ISVs that have been holding back in migrating from MFC or Windows Forms to WPF;  I think it is now confirmed that the future (for .net developers)  is in XAML.  This is going to lead to faster adoption of .NET 3.x, it will lead to a larger partner ecosystem ( aka component vendors), more trained developers, more books, more content, etc.  It is a good cycle that feeds itself.
    • I think the Silverlight platform has enough 'advantages' to continue bringing new customers/scenarios, we are making great progress on the media (video) space, with DeepZoom we are getting a niche on a 'large data navigation space', etc.  As Scott mentioned we are above > 1.5 million of Silverlight installs per day; that number will continue to go up with Silverlight 2.
      A case in point is the Move networks announcement from MIX, which I forgot to include on the highlights above.
    • Silverlight is also going to allow a lot of existing web developers to greatly improve their apps.  I know plenty of people who do asp .net development and have tried web technologies like Java, Flash, Flex, etc. and have not embraced these other technologies because they did not like the development environment, languages, performance, did not have the skills, etc.; with Silverlight we are giving .NET (server-side) web developers the option to embrace a richer (client-side) web experience with out having to learn new skills, we are also giving them a flexible sandbox ( e.g. isolated storage, x-domain calls, File Access, etc.) that helps them extend their reach to the desktop with out compromising on security.
    • I like the Microsoft offering because it has a solid foundation in .NET; you get best of breed tools, incredible flexibility around languages ( C#, VB, JScript, Ruby, IronPython, etc.),  comprehensive libraries ( e.g. Web services stack, or LINQ for data access,);  as I look at other platforms out there, I am not sure they have the raw power, developer flexibility, architecture, same performance, same language capabilities, etc. 
      I have to wonder, will competitors be able to keep up as a comprehensive platform? will they need a major re-design that is going to slow them down?
    • I like XAML and the WPF concepts as a declarative UI platform but I think there is more to these than it being mark-up; the platform was designed with markup in mind and the platform supports it well. I go back to my point above where I look at competing platforms and have to wonder about their foundations and ability to 'evolve' to a 100% declarative model. I think WPF has foundations (for example the property system) that you need to have in order to get to a pure and clean declarative model.  

    I know there are challenges to overcome, but I see no major blockers and I do think time is on our side.

    • Ubiquity is likely the current 'concern' people will raise; you will hear Flash has ~90% ubiquity and Silverlight is just getting started;  I respect that, but I am optimistic because Flash and Silverlight co-exist quite well (they are not mutually exclusive like Windows and Mac OS were); all it takes is for a user to go to a site that needs Silverlight for it to be installed.   These are tiny/free plug-ins we are installing so I expect the installs to continue moving fast.. 


    That sums up my excitement post MIX. In a few words, I think Silverlight's cross-platform opportunity is going to be the catalyst or accelerator for both RIA and Desktop applications written using .NET and XAML; I am excited about what will come in the next 12 to 18 months.

  • Jaime Rodriguez

    A carousel control in Silverlight 2...


    Check it out here...  Source is here!


    It is very little code so I did not do a write-up. The code does have comments.
    Ideas? or  Improvements I considered but did not implement (yet )...

    • I debated using the animation system; generate ( n storyboards, where n = number of items ).. You can generate an animation that simulates points in a motion path..   this should smooth it out alot .. for the tiny sample I needed it felt like overhead; also I wanted to use DispatchTimer (the manual animation) as a reference.
    • It assumes that items in the panel don't have a transform applied..  [easy to check and multiply transform if needed]

    Credits:  Every thing I know about carousel came from a Lee brimelow's flash carousel tutorial.   

    Bugs/feedback, leave comments or email.

  • Jaime Rodriguez

    A sample on referencing URIs..


    Ashish did a great job with his demystifying URIs..  post. 

    I spent a bit of time discussing this topic with him last month due to a regression bug ( fixed before beta1 shipped)..   During my 'discovery' I wrote a little test application that summarized it (and tested it all content resolving mechanisms ) ..

    What this application does is include 3 images, packaged all possible ways (resource,content,embedded), and shows you how to load them from XAML.

    You can see the application here, and the source code is here.

    If you pay attention, you will see the sample also loads "external" assemblies NOT in the XAP and it shows you how to cross reference content using the /assembly;component  syntax .. which Ashish forgot to mention.. 

    I am going to leave that topic of loading external assemblies for a later post (in hopes ashish tackles it in detail like he has been doing); if you are itching to try it, the  source is very small and very easy to follow...

    Sorry that my test apps are so ugly.  If you can recommend a book (or web reference) on how not to offend the world with ugly colors but at the same time do it with zero overhead to my coding, please send me a link.

  • Jaime Rodriguez

    Silverlight in Financials Demonstrator



    Yesterday at the Financial Services Developers Conference in NY,   Marley Gray & Joe Cleaver showed  the "Silverlight in Financials Demonstrator".

    The demonstrator is a 'mock-up' website that shows the interactions and experience you could get from a silverlight enabled site. Features like interactive video that drives charts, client-side charting, drag & drop, client-side calculations (for responsiveness), cross-domain web services calling, etc. come together seamlessly to create a slightly different banking experience from what we see today.    

    If you have Silverlight 2, you can play with the demonstrator at this site

    You can also see an internal (=not polished) recording of  a walk through of the demonstrator from this silverlight streaming video.

    If you want a script that helps you walk through the interactions, you can find one here.



    The plan and the source:

    Our goal from the beginning has been to release the source code at devcon; since that was yesterday, the source is available today from here.

    Warning: the demonstrator grew quickly from a Silverlight 1.1 app with three scenarios to a SL 2.0 application with  six or seven scenarios; so we are a bit behind on cleaning up the code. The plan is to do a bit more clean up over the next few days ( or say all of next week)  and then put it out at Silverlight.net gallery when the code cleanup churn decreases.  Please check the SL gallery or check this blog in a week or so for an updated source.  [It takes that long because we do it one hour at a time on evenings or when I have free time at work (which is not much)].

    Known issues:
    Apologies in advance to those outside the US or not running an en english locale. We are aware some of the ' banking concepts' might not apply but we hope some of the interactions are generic enough that are useful to show.  We have also not localized the site.  Please do report bugs around localization. 

    Infusion development did most of the coding. Joe Cleaver, Marley Gray, Joe Rubino and a few others in the MS financials team helped define the scenarios.   

  • Jaime Rodriguez

    MIME Types


    I often know I need a mime-type ( e.g. .deploy or .xaml ).. Extensions are easy, but the types are hard to remember ( application/octet-stream is my favorite guess ).. 


    Now, courtesy of  Chris Knowlton, Windows Media Server PM, I don't have to guess...















































































































































































































































































































































































































































































































































































































































































































  • Jaime Rodriguez

    browser navigation and RIAs..


    bear w/ some early (and wishful) thinking ...

    I have a great RIA, with navigation inside of it (i.e. its own menus and scene transitions in the RIA).

    My challenge is that I took advantage of the RIA's stateful model to optimize the experience; in other words, I avoided request-response; I do load new scenes, but of course it is all inside the RIA ...

    The problem is that I often find myself clicking "Back" button... and there fore losing the state in the RIA... AAARGHHHH!!

    What are the best practices for this type of app? I would love to see an app that handles this gracefully...   If you wrote one, please feel free to email me or leave a URL in the comments.. 

    My best answer so far is save state often so I can come back to it.. but I have a lot of challenges (like trying to differentiate between new requests, desired reloads, etc. quite messy )

    -- --------------- ----------------

    In the mean time, here is a quick (not thoroughly fleshed) wish list for all browsers... 

    1) Can browsers expose a "Confirm back/forward"  event for user to confirm this is what they wanted to do...

    What I want is when my HTML page is loaded, and before it loads my plug-in, the browser gets told, please ask user to Confirm if they click (go back/ go forward)..

    I am not saying 'ignore the users command, but allow the plug-in to let the browser know it is a RIA and ask user to Confirm when mixing navigation.. The browser can handle the confirmation, to prevent annoying session hi-jacking, which btw I see on plain standards-based sites, so I assume is doable regardless of a Confirm.  

    Yes, I know some people will find it confirmation annoying, but I think it would be up to the application provider to decide..  The user or consumer is still in control - when I go to a website that annoys me, I just don't go back-.  Confirm is an 'opt-in' behavior.

    2) While I am dreaming, could the browser allow "Trusted sites" to manipulate the history? Maybe an extra journal and Back button for within the RIA?  This way I can enter entries into the Journal and users follow their known paradigm ...  but with in the context of the app they are running.. {which I believe is what customers would want a large % of the time}

    [ I am not saying replace Back button, I am saying offer more options; user still in control, we have this w/ active documents merging menus with their hosts ]

    Thoughts??  I am sure lots a people will laugh and think I am naive about browser session hijacking, etc..  I am cool with that.. I leave it to smarter people ( e.g. IE team or w3c ) to figure how to nail the details; I still think the functionality is a nice to have and I am thinking the problem is solvable elegantly if the browsers or w3 define a standard approach..   

    Does what I need exist already??  
    I know smart client gets around this.. but I am trying to stay web (plus a small plug-in like Silverlight ) so bear with me...

    Thanks & sorry for rambling or rant... it was in my head today and I did not seem to crack it..

  • Jaime Rodriguez

    Just added Mole to my .NET toolbox..


    Mole is a very handy visualizer for Visual Studio (.NET) developers.   I am late to try it, because it felt similar to snoop, but I installed Mole recently to see what the hype was about and now I find myself using it all the time..  It is incredibly convenient to have all this information available inside Visual Studio...

    If you have not downloaded it yet, Karl Shifflett just released a sweeeettt v4. I highly recommend it..

    A few extra Mole thoughts:

    1. Congratulations to the whole Mole Team; it is pretty impressive what you have accomplished in such short time...  WOW!!
    2. If you are a snoop user, don't miss out on mole.. They do look alike and overlap, but I found them quite complimentary...

      Mole is incredibly convenient since it integrates with VS; Mole also has nice features to ease navigation, finding and editing properties; mole can visualize also WCF, Windows Forms, ASPX, etc. so its scope is way broader than snoop's. 

      On the other side,  every now and then (but now much less) you will still need the 'injection' features of snoop (for me it is change notifications on DPs, and a little the convenience of navigating the visual tree by mousing over items) ...

      The good news is you can have both since they are both free..

    Happy mole'ng...

  • Jaime Rodriguez

    Explaining the Firefox Warning: Unresponsive script for Silverlight 1.0 apps..


    I posted before on the "firefox unresponsive script warning" but enough people have asked off-line to warrant this attempt to explain the issue (since it is not what people expect, and can be tricky to track).

    The explanation:
    The warning is prompted by Mozilla's heuristics to check on long running scripts (details on these heuristics way below).  The problem is that for silverlight or any plug-in that makes Javascript calls, Firefox some times does not reset the timer for the scripts called from plug-ins: If you fire multiple events from a plug-in the events are obviously handled sequentially, if a new event happens while an event handler is executing, then Firefox does not reset its counter for the script time out; it measures the time from these two events as a single script. 

    What does this mean (by example)? :

    • If you run a script that is 11 seconds long, you will get the warning -- this one I understand and expect, this is what Firefox designed for; I do agree it is a good safety measure.
    • If you run 500 event handlers that take 200 milliseconds(each) to run, but are fired continuously and each new event is fired before the previous event handler has completed, then Firefox looks at it as being one very long script and fires their warning...
      • An explicit example:   If you are handling MouseMove in silverlight for an app that is pretty busy, you will likely run into this warning because Firefox will count most of your events as one long script...
    • You can imagine combinations from there... ( for example: 20 scripts that take 0.5 second but are fired continuously, can trigger the warning).. it is this type of random combination that makes the "Warning: Unresponsive script.. " hard to track since most people look for long running scripts and that is not often the case..

    How to get around it?
    So far window.setTimeout  () seems to work best (though I can't say it works 100% of the time). Your mileage may vary, but here is what I do:

    • For my long running event handlers ( > 2 seconds) , I just call window.setTimeout ( <longrunningCallback>, 0) -- this unfortunately means in some cases the events are slightly delayed as setTimeout will get queued (if there are events ahead this means I might handle them out of order). In most of my scenarios this has been acceptable for long running events; if it is not for you, you could write a pseudo dispatcher that queues all other events so things are always in order but of course you have higher overhead).
    • For short, continuous event handlers (e.g. MouseMove) I don't do setTimeout for all events fired; that seemed like too much overhead..   What I do is:
      • First make sure I narrow the scope of the MouseMove event as much as possible ( so no MouseMove on root element, but as low as I can on the pole).. this way less events get fired
      • then keep a timer and do setTimeout every few seconds ( on a MouseMove, doing it every move can be 10s more times than doing it every two seconds)

    Overall, setTimeout is not a perfect workaround, but best I come up with so far.


    Does the explanation above make sense???  If not, here is a practical repro of the problem, it might make it easier for people to understand..


    • To see the problem you must be running Firefox .. for this repro if you try IE you will see a different problem, since the heuristics for rogue scripts are very differing in IE.. (IE counts statements and my repro loops mindlessly, so creates too many instructions).
    • Also, my repro below assumes you have the default timeouts in Firefox ( 10 seconds).. If yours is longer then tweak timeouts as needed.  See details below on how to find out if your timeouts were tweaked.

    Steps to repro:

    1. Open repro page in Firefox.
    2. Click twice quickly on the button that says "run from HTML event" ..  This will run two seven seconds loops from HTML... Technically this is 14 secs of continuous scripts, but since each script is < 10 seconds, firefox works fine..
    3. Click on "Clear status"  HTML button  [optional but helps keep repro readable] ..
    4. Now click twice quickly (same than you did before) in the "run from Silverlight event" button in silverlight..   This event handler is the exact same than we used in Step2..  but you will see that half way through second handler, the "Unresponsive script" warning will get triggered.. Why?? because Firefox considered the two user clicks as one  :(
    5. Now that you have seen the error, check the "use setTimeout workaround" that is on the "Repro via long script" table..
    6. Repeat step 4. My hope is you don't see the error this time around..

    To reproduce the problem using a short MouseMove handler ,

    1. Open repro page in firefox
    2. check the "Listen to MouseMove event"
    3. Move the mouse inside the silverlight window continuously (and vigorously) for 13ish seconds..  You should see the warning... If not, continue moving mouse feverishly for long periods of time ..   [if you just can't repro it, try increasing the "handler duration" from 500 milliseconds to 1000]
    4. Once you have seen the error in 3 ...  Check the "useSetTimeout on MouseMove" checkbox;
    5. Repeat the moving of the mouse in Step 3.. My hope is that you don't see the error any more...


    A few more details or references on Firefox and their timeout heuristics .

    Firefox controls its time out based on the dom.max_script_run_time setting, which you can tweak via the about://config moniker; the default timeout in most recent versions is 10 seconds.

    • The setting can not be controlled programmatically (so your script can't tweak it), nor per site ( meaning Firefox chooses to 'trust' your site)..  it is all or nothing, which seems a high ask to the visitors on most sites..
    •  FYI, the issue has been reported to Mozilla and they seem to be on it, but of course given ship cycles, priorities, etc.. we might not see a change for a while.  { I do thank the Mozilla folks as they were quite responsive to confirm that I was not crazy when I was seeing the timeouts on short running scripts)
  • Jaime Rodriguez

    dr. wpf rocks..


    Today, Karsten mentioned Dr. WPF....   I am embarrassed to admit I did not know about this phenomenon..  but I just spend the last two hours looking at his/her blog ...  not only is it full of WPF goodies but also funny ...

    Dr. WPF, thanks for being so generous in sharing via posts and forums ....   I really enjoyed a the posts I read so far.. I created a tag just for you on my blog....  

    hats off..

  • Jaime Rodriguez

    too much System.Runtime.InteropServices.ComException ?? :(


    Lately, I have been seeing System.Runtime.InteropServices.COMException quite often when I launch Visual Studio 2008 to work on Silverlight projects..    

    Here is what I know causes the error..

    • Error happens when I have wrong templates installed (e.g. running old versions of the Silverlight tools for 1.1), in particular versions that were meant for VS 2008 beta2..  
      1. Uninstall the old tools,
      2. install new tools
      3. from an administrator command prompt, run
        C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE>devenv /REsetSkipPkgs
    • Error also happens when I am trying to open a "Web Application project" in Windows Vista and I have not launched Visual Studio with elevaged privileges..
      1. Run VS with elevated privileges ....  OR
      2. Open project as a web site...  ( File -> Open -> Website and navigate to directory)
    • There is one more scenario, but that one should not be happening to most people.. if you install a later or internal build of the VS tools for Silverlight...  and then end up rolling back to old tools.

    If you are seeing the error, my reccomendation is to at least try
    C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE>devenv /REsetSkipPkgs
    That seems to help a lot of things.. 

    Want to know which one gets me?? I forget to elevate, and I need Web App projects (instead of Open As website) because I need 'post-build steps' ... 


  • Jaime Rodriguez

    WPF in Line of business applications ( aka "WPF DID GO to work")


    In a recent family trip, my brother-in-law hooked me up w/ a magazine for the long plane ride; it was Visual Studio Magazine with a "WPF Goes To Work" article in the cover. The article begins with a "Windows Presentation Foundation has been greatly underserved by Microsoft’s emphasis on glitz and glamour; learn how to take advantage of WPF in your everyday Windows business apps" ...

    Picture me sitting on a 4 hour plane ride, with that opener, I went through all the emotions ( in order):

    1. "Kathleen is right" ...  
    2. "should blame it on marketing (sorry guys), WPF was a Vista feature and Vista had a very strong consumer focus" ...
    3. ".. I am part of the problem since we could have shared our success stories, given that the internal perception is that WPF has been more successful in Line Of Business than we initially predicted ( given it shipped before the tools, etc.)
    4. "Well,  the story is not as simple.. there are choices to be made, and this new platform despite all its goodness needs to be explained" -- it is like a hybrid car, we all agree it is good, it is the future, yet it is not cost effective or practical for every one to get one..

    Eventually,  I decided all of these answers are partially right...  so I scribbled my opinions on these topics 

    1. Not much I can say about Kathleen been right; but I do recommend the article. Kathleen shares her personal experiences, uses concise examples and features to illustrate her points and it it obvious she gets client application development.

    2. Evidence --  there are some great case studies that show what enterprises are doing with WPF; I kept it pure, with just URLs so you can hear it from the customers.

    3. The why and where distills a few of the reasons I heard over and over from real customers when they were asking to be early adopters for the technologies;  back then it was risky, we had no books, we had no tools, fortunately for most of them the bets paid off... 

    4. My version on "do I need WPF?" ...  which I hoped would help people with the highest level guidance on choosing a technology (in particular the Windows Forms vs. WPF dilemma).   

    On all of the above, I need to disclaim a couple things:

    1. The list is not all inclusive; I do feel bad about that.. there are many more I can't talk about since we don't have PR agreements or I did not have a URL handy, but I do think the list is representative.
    2. The opinions and experiences you are reading are MINE and not all of Microsoft's; the good news is I was there for most of these; I was lucky to be involved on a lot of these projects so the insights come from my interpretations on working with Microsoft field, customers ( business and devs) and partners..  
    3. I tried to be fair and accurate on the project's results, but on the advise I did extrapolate to today { meaning I did take into account that the platform and most importantly the tools have evolved and improved, so it is less painful today with Blend2 than 2 years ago when some of these projects started} ..
  • Jaime Rodriguez

    Expression Media Encoder video player template debug code posted...


    Creating a Silverlight 1.0 video player using Expression encoder is incredibly easy ( 3 clicks and done).. Debugging it or tweaking it was not as easy... Until now..

    Jim Thill posted the debug ( read:uncrunched, unoptimized ) version of the media encoder templates.. so now you can read and tweak the code..  It also comes with a document on how to document the player skins..

    The template & docs are here. Enjoy!


  • Jaime Rodriguez

    Lotsa tools goodies released recently...


    Lots of tools released recently..  here are my lessons learned after not reading the manual :(

    • Expression Blend 2.0  December CTP was released last week..    I posted on Blend 2.0 before because the last CTP was full of new great features..  
      As far as I have seen from this 2.0 December CTP the big new feature is support for Visual Studio 2008 RTM {as well as a few bug minor fixes} ...  
      The one thing to note is that  Blend 2 December Preview requires the .NET Framework 3.5 and creates solutions for VS 2008...    [not for VS2005] ..   

    A friend asked me if I would recommend installing 3.5 Framework on his box and Blend 2 (so he can  build prototypes using Blend 2 and then cut & paste to his Blend 1.0 projects)?   I have not tried running it side-by-side and I explained to him that there is implications of installing 3.5 on his box, this effectively upgrades your 3.0 framework so if you need to stick with a 3.0 framework for testing or debugging of existing apps -which was his case- I recommend using Blend2 on a VPC or a secondary box ... he is now happy getting the best of both worlds that way.

    • For those people that are developing .NET 3.0  applications, Expression Blend 1.0 SP1 was released last week too.. 
      Unfortunately you don't see all the Blend 2 goodness in the Service pack. From the release notes, it seem the big feature is support for VS 2008 as well as bug fixes..  The big difference here is that Blend 1.0 SP1 does open VS 2008 and VS 2005 projects...  
    • Another 'tools' update released last week was the ASP .NET 3.5 Extensions Preview..  ScottGu has the details on the extensions;  though there is lots of goodies, to me the most exciting feature is the ASP .NET MVC  implementation [which you can learn about via Scott's blog again] ..  
      The one thing to add [to my surprise] is that despite the similar name, the extensions are different from ASP .NET futures, so don't download it to get updates to the Managed JScript  my guess is that updates to managed JScript will come when Microsoft releases the CTP for Silverlight 2.0. ..
    • A belated note on Expression Design SP1, which was released last month...   
      The complete release notes are here; and Joanna has a good description of the new features at the expression team's blog; her post is a must read because some of the features she lists were missing from the release notes but are very important ( like gradient mid-points can now be exported).. 

    That is it ... my machines are up-to-date on tools for now ...   I hope  this helps u decide what to download ..

  • Jaime Rodriguez

    "The New iteration" a paper on designer/developer collaboration using XAML...


    Karl (of mole fame) emails me about "The new iteration" article that Karsten and I wrote a while ago... 

    The paper attempts to do a lot in a few pages:  

    1. Introduce XAML ( in the context of HTML, SVG and the likes) for those not familiar with WPF.
    2. Introduce the workflow you can get when developers and designers create UI using XAML: You get a common language that stream lines collaboration between these two roles. This reduces duplicate work and allows each role to use tools optimized for their specific tasks ( Blend for designers, VS 2008 for developers)..
    3. Provide high level advise on roles and skills when you collaborate to this extent..
    4. Share a few of our lessons learned from many WPF early adopter projects..  
    5. Provide tactical advise for those who already took the journey to WPF and XAML..

    Please do send us your feedback .. there were a lot of topics we know we did not get to,  I am hoping I can tackle some of these via blog posts or screencasts..

    Going back to my old notes on every thing we did not get to I had:
    Controls, Styles, Templates FAQ
    Tips & Tricks on Blend..   way Beyond this very old article..
    Tips & tricks on Blend + Cider, way beyond this intro old intro stuff..
    Expression Designer (there was a lot we just did not get into)
    Tips & trickcs on creating data-driven apps..( I guess this overlaps w/ tips & tricks above)..

    What else do you want to hear about?? Let us know; I am keeping a list and even if I move really, really slow...   I will eventually get to it..






  • Jaime Rodriguez

    reusing animations in Silverlight 1.0


    I have seen a few people create lots of animations to animate different objects instead of reusing existing storyboards..  When asked why they did that, they explain "I tried to reuse it but I got an "AG_E_RUNTIME_SETVALUE" when setting the property... 

    Here are the details on how animations/storyboards work so you can reuse them:

    1. You will get AG_E_RUNTIME_SETVALUE if you try to set a value when storyboard is running:

      var sb = this.control.content.findName("reusable");
      sb.begin ();
      var animation = sb.Children.GetItem(0);        
      // This below will fail because the animation is running...  because the FillBehavior = HoldEnd
      animation["Storyboard.TargetName"] = 'rect2' ;
    2. To get around the error, you must either explicitly call storyboard.stop()  before trying to alter the storyboard, or use the FillBehavior="Stop"
      The problem w/ Stop is that the property you updated using the storyboard will go back to its original value ...  :(
    3. var sb = this.control.content.findName("reusable");
      sb.begin ();
      var animation = sb.Children.GetItem(0);        
      sb.stop ()   /// This makes line below no longer fail...   :)  but it undoes the work that previous ran animation had done..
      animation["Storyboard.TargetName"] = 'rect2' ;

    4. A way to 'hold' the value of the property you animated even after storyboard.stop () is to set it explicitly after you stopped it (duh jaime)... 
      There are fairly generic ways to do this..  (if running <Type>Animation,  then look at To value ... if running <Type>AnimationUsingKeyFrames  then look at last keyframe for that property and set property to that value...
    var sb = this.control.content.findName("reusable");
    // we wire completed...  so we know when to set the value.. 
    sb.addEventListener("Completed", Silverlight.createDelegate ( this, this.onCompleted )); sb.begin ();
    onCompleted : function ( sender , args ) 
            var animation = sender.Children.getItem(0); 
            var ctl = this.control.content.findName ( animation["Storyboard.TargetName"]) ; 
            if ( ctl != null ) 
                var keyframe = animation.KeyFrames.GetItem(animation.KeyFrames.Count-1); 
                ctl["Canvas.Left"] = keyframe.value ; 
        } , 
    Now the value is maintained...   storyboard is stopped so it is reusable..

    A sample (including source) for these snippets is here...  
    for instructions:

    1. Click on any rectangle to see it animate..
    2. The demo begins with "Hold" checked because that is default behavior ( FillBehavior=HoldEnd)
    3. Click on the "stop animation before starting new one" to get around the AG_E_RUNTIME_SETVALUE
    4. Click on the "HoldEnd" to see the differences between  FillBehavior = HoldEnd  and FillBehavior = Stop
    5. Click on the "subscribe to event .. to set the value after animation has stopped"
  • Jaime Rodriguez

    world aids day is today...


    Most of the time I live in a 'shoe box' not knowing what is going on outside of my family and work; today is one of these days: I totally missed World AIDS Day concert.

    Beyond the concert, to me the day is a reminder of AIDS realities:

    • There are millions of people suffering from it; a lot of these are innocent children born with the disease to an already troubled family and troubled socioeconomic crisis.
    • This is a fast growing epidemic; I have been lucky to not know any one directly affected but that is likely to change if we don't get it under control (prevention, treatment and hopefully a cure). 

    Any way, it is AIDS day.. no matter when you are reading this .. it is good to think about that reality once a year (at least)
    [For those expecting usual techno ramble, will be back to scheduling programming tomorrow. Apologies in advance for the personal detour]


  • Jaime Rodriguez

    Requiring the Silverlight 1.0 Service Release..



    Mike Harsh announced recently the first Service release for 1.0.
    The release includes perf improvements, a few fixes (e.g. streaming over proxies not using port 80), and a few "new'' features for SL 1.0 like allowing media redirects. 
    Most users will be getting this release via the auto-updater and no changes are required for most websites that have gone live with 1.0... 
    For a very few websites that must require their users have the Service Release installed to take advantage of the new features, here are some interesting (low-level details:

    • The version of the Service Release is 1.0.21115 .  
    • To require the user to upgrade, all you have to do is specify your minimum version to 1.0.2115 in the call to Silverlight.createObject<>...

    source: "Page.xaml",
    parentElement: document.getElementById("SilverlightControlHost"),
    id: "SilverlightControl",
    properties: {
    width: "100%", height: "100%",
    version: "1.0.21115"

    events: { /*...*/ }

    Silverlight.js does all the work to make sure this version is installed and if not, it will show the "Get Silverlight" or what ever your install experience displays..

    • There is one small wrinkle with this. Tim Sneath has explained in previous posts that the 1.1 alpha is not being serviced or auto-updated (yet)..  and since 1.1 is a 'greater version' than 1.0.21115,  then any users who have 1.1 will go to a site that requires 1.0.21115 and not be prompted to install.. 
      • To be very low-level,  calling Silverlight.isInstalled ( "1.0.21115" ) or  <slplugin>.IsVersionSupported( "1.0.21115" )   on a machine that has 1.1 will return true (makes sense since 1.1 > 1.0.x  and MS is always backwards compatible for example 1.1 already has the changes, we just have not released an update) 
      • For a workaround, you can of course use Silverlight.isInstalled ( "1.1" );   to detect if 1.1 is installed and if so possibly prompt advise to your users recommending they uninstall 1.1 and install 1.0  SR1....

    If you are reading this and thinking it is confusing, rest assured you are likely OK. All of these details apply to a tiny subset of users ( that disabled auto-update.. or installed 1.1and are visiting one of the few sites requiring 1.0.21115. For the other 99.9995% of the users, there is no action item.

    If you are curious to know what version of Silverlight you are running,  here is a trivial html site that can tell you; and it gives you my advise on what to do..
    View Source will work since it is only 3 lines to check.

  • Jaime Rodriguez

    Silverlight templates for VS 2008...


    If you  are running VS 2008 "Orcas" RTM .. you will need the "Silverlight Tools refresh for Vsisual studio 2008"..   released today...
    1) Website and item templates for SL 1.0
    2) templates for Silverlight 1.1 alpha ( shipped in August)..




  • Jaime Rodriguez

    Javascript controls for Silverlight 1.0


    I have been involved in a handful of Silverlight projects where we ended up reinventing buttons, sliders, etc. I have been telling myself I would eventually merge these controls and last week I finally started;  I chose to do it from scratch taking the 'lessons learned' from each project so that along the way I would create a reference for others..

    You can see an early sample showing the controls here

    It includes button, label, hyperlink, checkbox, togglebutton, repeatbutton, slider, radio, checkbox, stackpanel. dockpanel, expander, scrollbars, scrollviewer and a few other primitives needed.. 

    You can also see a long ramblign of the design and implementations decisions here

    If you have done some thing similar or are thinking about it, please do send me your feedback. I created a new codeplex project where i am going to try to clean up the current prototype and  package into a reusable library. Of course if you want to join the codeplex project there is lots of room to contribute ..  



    Again, the library still needs a lot of clean-up, bug fixes, packaging, etc. expect I will be working on it a few hours a day all of next week.
    Look for updates here and via codeplex (where the source is).


    I leveraged lessons learned from my projects and external projects I have contributed to so I should give credit to Frog Design (MLB, CBS), AARF(Netflix), Metaliq(Terra), StepChange ( Silverlight.net showcase),  Tafiti ( DPE peers that encouraged me to reuse their code, will reuse more as we go), the expression encoder templates, and from discussions or even newsgroups.  I also reused and butchered heavily existing WPF concepts,names, etc. apologies for not keeping the concepts accurate; they morphed as needed to accommodate for what ever I was needing each time.

  • Jaime Rodriguez

    Tangerine, a WPF Exemplar...


    Infagistics has created this WPF application called Tangerine  and they have documented a bit of the process ( requirements, architecture, lessons learned, etc.) ...  

    I only peeked high level through the documents, but they seem quite fair and insightful ...  

    I wonder if people find these references more helpful  than smaller articles ala code project ...  { I keep dreaming I will soon make time to write one of these ... if only I was more organized  or effective with my time :( }



  • Jaime Rodriguez

    Expression Blend2 Sept Preview released.. a must 'upgrade' for WPF and silverlighters .


    Blend2  Sept Preview was released last friday to the public...   An overview of the new features is in the Expression team's blog...  

    Please do not miss the link to the videos that showcase the new features; watching all the videos takes approx 20 mins and you will get a lot out of them.

    My experience so far after a week of internal use:

    • The new vertex animation stuff just rocks...  it makes things so much easier.. 
    • I have been using the ability to create reverse storyboards for triggers quite a bit; that was a must do... 
    • The ability to edit KeyFrames is much better explained in the video than in the blog post;  the blog description is accurate, but you don't get the part of "graphically modifying the splines"..   (or was it just me that did not get it the first time? Splines are above my level any way :( )
    • On object manipulation, the "Ctrl-drag" to copy is very handy too.. and the multi-object transform is useful too ..
    • Splitview is very handy...  love it since Cider beta2..
    • BreadCrumbBar is handy -- but if you are looking for it in Silverlight, I don't think it is there.. it seems to be WPF only...

    Overall the release rocks.. It feels solid; I did not get crashes or instability... 
    For you WPFers, there is just too much goodness to pass; I would say even if you had RTM of 1.0 you should give this a try.. 
    For you silverlighters, you should continue to pick CTPs as there will continue to be improvements to the alpha ..

    My immediate wishlist is for next CTP is "Selection sync" in the splitview like Cider does ....   Christmas is coming.. cross your fingers  or send my buddy unni some cash emai..

    PS -- { I did not know there were videos in the external post,  so I had just created a few lame 5 min samples of what I can do now with vertex animations in silverlight . Since I ftped them, might as well link to them ...  ChartArrow, Circle ...  ... this is your chance to show off... create some thing cooler, that should not be hard, and email me a 'you oughta take a design class dude' email...  

    Happy blending

  • Jaime Rodriguez

    silverlight stretching to 100% in Firefox...


    An FAQ:

    Setting the Silverlight plugin to width = 100% and height = 100%  and then accessing plugin.content.ActualWidth works in IE, but doesn’t in Firefox.  (ActualWidth/Height is always 0). 
    Using a fixed size (600,600) in firefox works fine however.


     I had worked around it before, but not researched in-depth... 


    Here is a solid answer from Peter Blois:


    Firefox does not default the height to fill the page, IE does. To fix this I use the CSS:

    html, body {

    height: 100%;

          overflow: auto;


    body {

          padding: 0;

          margin: 0;



    By the way, if you follow the link to his blog, check out his code sample on handling the Mouse Wheel in Javascript for Silverlight..






  • Jaime Rodriguez

    Halo3 HD videos on silverlight


    The new high definition live action videos for Halo3 are  available in Silverlight at http://halo3.msn.com/videoshd.aspx

    My observations:

    • Check the video playback quality ...  wow!! 
    • The player (transports, chapters, closed captions, etc).. looks like a straight up customization from the skins shipping with Expression Media Encoder; kudos to that team on a highly reusable template ...  
    • The videos are stored and delivered via Silverlight Streaming services...  very nice!!

    Congrats to those who built the site and the teams that deliver the technologies that made it possible!
    Want to see more HD cinematic experiences in silverlight?? Check http://www.silverlight.net/fox ...      


  • Jaime Rodriguez

    firefox 'Warning: Unresponsive Script' and Silverlight 1.0 ..


    A few customers developing in 1.0 have seldomly seen the 'unresponsive script' warning   in firefox...

    They see it less often in IE,  but if you create a run-away thread it can be reproduced in IE and it shows it as "Stop running this Script" .. .. "your computer may become unresponsive" ... blah..

    The error is not new, a simple search online for 'unresponsive script firefox' or for dom.max_script_run_time  yields plenty of posts and a few tips...  but since Silverlight is new, first thing that customers are wondering is whether this is caused by silverlight -people ask about the animation engine in particular-..  Every time a customer asked I wrote one or more very different tests to make sure it is not thrown with long running animations or a lot of drawing time in silverlight. My experiece so far has been that the warning was not triggered due to silverlight's time (animation or drawing);  the warning also does not repro with long-running .net code in Silverlight 1.1  so if you are running into it check into your script ... i think the warning is really referring to the script time..  

    To get around the error,
    1) The posts on the web suggest you change  the value for dom.max_script_run_time  ..  [which works for devs but is a little harder/impractical to get customers to agree to] or you can
    2) Get down with your Javascript do some profiling and optimize it .. .

    So far, I have been choosing the latter... basic profiling using firebug has yielded the needed places to tweak code and get over the warning; hopefully that will work for any one else running into it.. 

    The other follow-up question I have been hearing is 'can this be enabled/disabled programmatically from my website or my script' ? I believe (with confidence, but not fact since it is firefox) the answer to that is No -- that would lead to an exploit-.   If there is so much work that the warning is stil firing after you have optimized your script then partition your code into several execution script blocks ( use window.setTimeout to schedule the blocks)..

     Hope this saves some one some research time...  :) 

  • Jaime Rodriguez

    VS Tip of the day blog...


    Am I the last one to find this really useful blog with lotsa good VS tips? 

    Try your VS knowledge on it.. How many of the tips did you know??   I knew about 60% ... but did not know of some really juicy ones (like swapping words via Ctrl-Shift-T .. .

    if you go there and you knew every single tip let me know...  that would be worthy of a prize --  like a T-shirt that said "I BSed jaime" ...


Page 6 of 9 (222 items) «45678»