implementing silverlight controls in 1.0| Comments
i just put up my latest screencast featuring a sample on how to create your own user control in silverlight version 1.0. this is about a 24 minute screencast that walks through creating the XAML as a user control (not the primary focus) quickly, and then consuming this user control in a silverlight 1.0 application, creating the control dynamically using createFromXaml.
i also realized that in the screencast i mentioned that i was using the 'open as web site' feature in visual studio 2008 instead of just right-clicking the project in blend and choosing 'edit in visual studio' -- but then didn't remember to explain why :-). here's the skinny. in my sample i'm using the downloader object in silverlight. in the release candidate of silverlight there was a change to the downloader disallowing the use of the file:/// schema for downloads for security reasons. unfortunately in visual studio 2008 (beta 2), the default project type for silverlight is a file-based project instead of a web site project. this will work fine most of the time, but not when you are using a downloader object (you'll get an AG_CONTROL_NETWORK_ERROR). so because of this i simply opened the same project as a web site and all is well (because it then uses the built-in asp.net development web server for rednering).
this is a part 1 screencast, which part 2 will demonstrate consuming the same user control in silverlight 1.1 which provides us an added benefit in the user control model. you can view the screencast by subscribing to the feed (located on the left as well -- the all option has ipod format as well). additionally i posted it on channel 9.
part 2 will be hopefully posted later on monday. the code for part 1 is associated on this blog post at the bottom.
Screencast source code: GlassButtonControl.zip
Please enjoy some of these other recent posts...