Jaime Rodriguez On Windows Phone, Windows Presentation Foundation, Silverlight and Windows 7
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:
Silverlight.createObjectEx({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..
Silverlight.createObjectEx({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..
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.
If you are running VS 2008 "Orcas" RTM .. you will need the "Silverlight Tools refresh for Vsisual studio 2008".. released today... http://www.microsoft.com/downloads/details.aspx?FamilyId=25144C27-6514-4AD4-8BCB-E2E051416E03&displaylang=enIncludes:1) Website and item templates for SL 1.0 2) templates for Silverlight 1.1 alpha ( shipped in August)..
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).
Acknowledgement/credits: 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.