| Comments

Well, MIX10 is over.  It was a great time to meet a lot of people and see friends from afar.  As anyone knows, the networking is a HUGE part of being in-person at any conference…that vibe, value and friendship cannot be matched online.

But the sessions – there were a TON of them.  It is quite impossible to be in 3 places at one time.  Thankfully the MIX team record all regular sessions and make them available for viewing online or offline.  For you Silverlight developers here are my picks to ensure you watch:

And there are many more…

Since OData was a big part of MIX10 this year, I thought I’d make this easier for you to get all the MIX10 Silverlight-specific videos (my pics above and all tagged with Silverlight). 

Yes, this is yet another way to get access to the MIX videos.

The site’s RSS feed will get you *all* of MIX sessions, but you may not want that.  Unfortunately they don’t expose tag-specific RSS feeds.  Fortunately though, they DO have an OData feed available for us.  I thought I’d have some fun and play around with that.

MIX10 Online Silverlight Viewer

If I were the visitmix.com team – I’m sure they love to hear that.  But look at the list above.  If you watched each one of these, you’d be clicking a lot and going from page to page.  Why not treat them like a video library?  Let me see the ‘guide’ in one place and choose which ‘channel’ I want to watch, allowing me to switch channels quickly.  This was my vision:

MIX10 Session Viewer

Since their OData feed was exposed I could create queries to get to the list of sessions, details and video URIs.  I could (and would like) to do a lot more as far as adding a filter by tags, creating a playlist and then just hitting play, etc.  But you know, I was just tinkering.

I will have to say that the OData querying got me frazzled in some places.  OData is SUPER easy for single entity stuff, but trying to understand building up a relational query got me messed up at times since ‘normal’ LINQ querying wasn’t always supported in a translation to a URI query.  Special thanks to Jonathan Carter (@lostintangent) and Chris Woodruff (@cwoodruff) for being my ears of frustration and helping me get the right queries (didn’t end up implementing them all).

The sample MIX Viewer can be seen here and supports multi-monitor full-screen pinning (requires Silverlight 4).  So you can start a video on your 2nd monitor and go to full-screen on that one while still working on the other.

Tag-specific podcast feeds for MIX10 videos

While the MIX team does have RSS feeds for the videos, they are all-inclusive.  I would really like to have tag-specific feeds…let me search on a tag, then generate a podcast feed based on the result. 

Well, I did just that.  Since they expose the feed, I could use Yahoo Pipes to do some quick manipulation in a ‘no-code’ sort of way (yes I could have used OData, etc. blah blah – look, this was no-code/tools…just a few clicks).

So I created a podcast feed for anyone who wants to use it.  Here’s the Silverlight feed links you can use to paste into your iTunes or Zune or whatever podcast software:

If you look at the URI:

   1: http://pipes.yahoo.com/pipes/pipe.run?MediaType=WMV&Tag=Silverlight&_id=2cf69ebc6e9c4f0a1ea4bc76cfd273df&_render=rss

You’ll notice that you can just substitute the format (WMV, WMVHigh, or MP4) and the tag.  This will give you your own custom feed for your topic.

Anyhow, I really enjoyed MIX and have been catching up on all the sessions I missed.  Hope this helps you get caught up as well!


This work is licensed under a Creative Commons Attribution By license.

| Comments

UPDATE: Silverlight 4 is RELEASED!  READ HERE!

Silverlight 4At MIX10, Silverlight 4 released an update, the Silverlight 4 RC (release candidate).  A few things have changed since the beta which was released in November.  If you haven’t read my guide to Silverlight 4 you may want to check that out.  The features still exist, but there are some changes to the implementations of some of the features as well as some new ones.  Please go read the previous post to familiarize yourself with the features.  This post will be complimentary to that and identify new/changed.

First let’s get you going with the tools:

And since sometimes people just want to get going with learning resources here’s my top suggestions:

So here we go, here’s my brain dump of some key areas of what you’ll be seeing in the Silverlight 4 RC.  This is not all-inclusive, but I think a list of some that most will want to know about.

ChangedNew

A quick note about Visual Studio 2010 RC

The Silverlight 4 tools linked above target the RC release of Visual Studio.  There have been 2 patches to Visual Studio 2010 RC since it’s release.  It is recommended that you have these two patches installed prior to installing the Silverlight tools.  Information about these patches (and links to them) is available here.

RichTextBox (the control formerly known as RichTextArea)

Silverlight 4 introduced a new control for enabling editing and display of rich text.  (See original details here for RichTextArea.)  A few things have changed here, one key one being the name: RichTextBox.  This was to be more consistent with WPF and also based on your feedback.  Additional improvements were also enabling the ability to get the XAML that makes up the underlying runs and paragraph of the rich text.  This is helpful for saving off the data and re-hydrating later if desired.  It’s a simple property on the RichTextBox control (assuming the control name is ‘MyRichContent’):

   1: string richText = MyRichContent.Xaml;

In addition to that, there are also some new text selection and position APIs to enable you programmatically select text and/or know where the current position of the text is located.  This is best demonstrated in the ‘Silverlight Notepad’ sample application in the hands-on-lab area where you can see examples of it being used.

^ back to top

WebBrowser control

The beta provided us with a mechanism for hosting HTML content within an out-of-browser application.  This is still available to us, however some APIs have changed.  The HtmlBrush is now called the WebBrowserBrush to be consistent in naming and what it actually does.

You can view a video on using the WebBrowser control here.

^ back to top

Printing API enhancements

The printing API was enhanced to help developers query for the printer page size and the printable area.  Another change was where the ‘document name’ is provided.  It is now required and a part of the Print() method.  Before:

   1: PrintDocument doc = new PrintDocument();
   2: doc.DocumentName = "Sample Document";
   3: doc.Print();

After:

   1: PrintDocument doc = new PrintDocument();
   2: doc.Print("Sample Document");

You can view a video on using the printing APIs here.

^ back to top

Native automation (COM interop)

API changes in the naming of the native integration (COM interop) feature for trusted applications.  Before:

   1: dynamic excel = ComAutomationFactory.CreateObject("Excel.Application");

After:

   1: dynamic excel = AutomationFactory.CreateObject("Excel.Application");

Simple, but will catch you in a recompile :-).  You can view a video on using native integration here.

^ back to top

Language/script support

Silverlight now has extended language support, including Thai and Vietnamese.  Additionally we added support for multiple Indic scripts.  The following Indic scripts are now supported:

ScriptLanguage
BengaliBengali, Assamese, Manipuri
OriyaOriya
MalayalamMalayalam
KannadaKannada
TamilTamil
TeluguTelugu
GujaratiGujarati
GurmukhiPunjabi
DevanagariHindi, Marathi, Sanskirt, Konkani, Kashmiri, Nepali, Sindhi

^ back to top

Networking

In the beta, socket ports were still being restricted in trusted applications.  In this release, the port restriction for socket ranges in trusted applications is removed.

Additionally, the client networking stack (ClientHttp) has been enhanced to enable UploadProgress reporting and caching support.

^ back to top

User consent dialogs (webcam/clipboard/etc.)

We call those dialogs that require user permissions ‘consent dialogs.’  Your users will see these whenever code requires things like requesting device access for webcam/microphone, clipboard access, or quota increase for IsolatedStorage.  In the beta we showed these dialogs always and didn’t have a mechanism for enabling the user to determine if they wanted their consent preference saved.  That has changed in this release.  Consent dialogs now give the user the option to remember the setting which is persisted to their preferences only for that application and is in their control.  Here’s the new consent dialog for clipboard, webcam and full-screen pinning:

Silverlight consent dialog

And if you look at the Silverlight configuration dialog you’ll notice a permissions tab now where these permissions are set for the user, which they can change or delete:

Silverlight permissions dialog

This consent dialog ‘remember my preference’ setting is not available for IsolatedStorage quote increase however.  It doesn’t make sense to enable that really for that scenario.

^ back to top

XAP Signing for trusted applications

We think trusted applications (or elevated privileges applications) will be a widely used feature for this release.  We changed the install prompt dialog for trusted applications.  These are different dialogs than the typical out-of-browser install prompt as we need the user to have more information provided about them.  One key feature of a trusted application is the ability to code-sign the XAP file.  Here’s a trusted application install prompt from an un-signed application:

Windows:

Unsigned trusted application on Windows

Mac OSX:

Unsigned trusted application on OSX

And here is one from a code-signed one:

Windows:

Signed trusted application on Windows

Mac OSX:

Signed trusted application on OSX

Which would you feel more comfortable installing?  Notice that in signed applications your custom icon will show as well (even if you have the icon settings set up, if the app is unsigned they will not show).  The process of code signing is very simple and although I expect the tooling for Silverlight to improve on this, it is as simple as adding a post-build event task (or a task for automated builds) that uses the signtool.exe (installed with Visual Studio) to sign the XAP.  Here’s my post-build event task:

   1: "%ProgramFiles%\Microsoft SDKs\Windows\v7.0A\Bin\signtool.exe" sign /v 
   2:     /f c:\users\timheuer\documents\authenticode\timheuer.pfx 
   3:     /p "MYPASSWORD" 
   4:     /t TIMESTAMP_URI_FROM_PROVIDER $(TargetName).xap

The PFX file is an exported certificate with my private key and password protected.  You can acquire code-signing certificates (normal Authenticode ones) from providers.  We were thankful to get assistance in testing this feature from the following providers who can provide you code-signing certificates for your organization:

All of the above provide Authenticode code-signing certificates and are trusted certificate authorities (CA) on Windows.  A trusted CA means that their root certificates are already a part of Windows verification.  The process of obtaining one is not instant so plan ahead.  There is a specific organizational verification process that occurs which may require documentation of proof of the organization and a few phone calls.  Once you have these certificates you will be on your way to providing even more trusted applications to your users.

NOTE: Thawte code-signing certificate requests should be made from a Windows XP machine as their current process does not support Windows Vista or Windows 7.  If you use Vista/7 you will not be able to export to a PFX file for automated build or to have your certificate stored on other machines.  Read each instructions carefully.

You can also sign your XAP using self-signed certificates.  If you do so, it is likely that you are not a trusted CA on machines and would have to instruct your users further.  In my opinion, it is better to acquire a trusted CA cert for external applications.  Take a look at Jeff Wilcox’s epic post on Code Signing 101.

A special note on trusted applications…please read!  If you want to take advantage of using the update features of Silverlight for your application (aka CheckAndDownloadUpdateAsync), then your application must be signedIf you do not sign your XAP for a trusted application it cannot auto-update.  Self-signed works here to, but don’t get your application in a state where it cannot be updated automatically!

You can view a video walk-through of XAP signing here.

^ back to top

Custom window chrome

One of the more requested features of trusted applications is the ability to customize the ‘chrome’ around the window.  The chrome area refers to the standard OS-specific border and title bar that a typical out-of-browser application will receive.  In this release we give you the ability to customize this for your users.  The Visual Studio tools also build in the capability to make this easier for you:

Window Style setting options

You can see there are a few options to choose from for window types.  Right now we do not support transparent windows or irregular shapes but are aware of the desire to have these.  Here’s an example of the Facebook client before:

Silverlight Facebook Client (beta)

and with custom window chrome:

Silverlight Facebook Client custom window

You’ll notice that in the custom window mode that since you don’t have the OS-specific title bar with minimize/maximize/close that you’ll be responsible for doing that.  That also includes handling the window moving and resizing events.  We enable APIs for you to do all of this easily. 

You can view a video on customizing window chrome and handling resizing and moving here.

^ back to top

Pinned full-screen mode

Are you a developer with multiple monitor setup?  I’m jealous.  If you’ve used silverlight you’ve no doubt run into a situation where you’ve put something in full-screen on one monitor and anticipated being able to work on other stuff in the other monitor.  Maybe you’re watching a Netflix movie while working?  You’ve likely experienced the issue that the full-screen mode goes back to regular when activity occurs in the second monitor.

We’ve changed that to enable the developer to prompt for permission to 'pin’ the Silverlight application to the monitor.  This will prompt the consent dialog option (with preference remembering) to get the user’s permission.  The code is extremely simple:

   1: App.Current.Host.Content.FullScreenOptions = System.Windows.Interop.FullScreenOptions.StaysFullScreenWhenUnfocused;

Once that is implemented, the full-screen application will remain pinned until the user hits ESC key or until you change the IsFullScreen mode in the code for them.

You can view a video on using the full-screen pinning mode here.

^ back to top

ContextMenu control

In the beta we introduced the right-click event handling capabilities.  In most cases this would be used by developers to implement context menus.  The Silverlight Toolkit for March 2010 release now provides a ContextMenu control for you to use and wire-up for this event.  It’s similar to the one Jesse Bishop created for the beta, so if you’ve used that it should be familiar.  It also supports ICommand too!

You can get the ContextMenu control and other great controls by ensuring you download and install the Silverlight Toolkit March 2010 release.

^ back to top

SLLauncher silent installs

One of the features we added in this release was using the sllauncher.exe (which is the program that assists in out-of-browser applications) to provide silent install capabilities for your applications.  The primary scenario here would be something like CD-based installation situations.  Using a command like this:

   1: "%ProgramFiles%\Microsoft Silverlight\sllauncher.exe"  
   2:     /install:"D:\deploy\demoapp.xap"  
   3:     /origin:"http://foocompany.com/apps/ClientBin/demoapp.xap"  
   4:     /shortcut:desktop+startmenu  
   5:     /overwrite 

would enable you to deploy an application in this type of a situation.  Setting the origin flag here enables the application to determine where it would get future updates from if CheckAndDownloadUpdateAsync methods are called within the application.

^ back to top

WCF RIA Services Toolkit

If you read above you’ll know that installing the Silverlight 4 Tools for Visual Studio also automatically installs the WCF RIA Services framework for you.  This release the RIA Services team also has a toolkit of their own.  After installing the RIA Services Toolkit you’ll get:

  • LinqToSql DomainService
  • SOAP endpoint – enabling exposing a SOAP endpoint for your DomainService
  • JSON endpoint – enabling exposing a JSON endpoint for your DomainService
  • ASP.NET DomainDataSource – enabling your ASP.NET application to talk to your DomainService

This is a separate install that you must complete.  For more details on this toolkit, visit Deepesh’s blog.

If you aren’t familiar with WCF RIA Services, you can view an introductory video here.

^ back to top

Summary

It’s been a fast pace since getting the Silverlight 4 beta in your hands in November.  We’ve had a lot of work to do to finish things up and implement some new key features.  We are very excited about this release of Silverlight 4 for developers and look forward to seeing the great applications you build with it!

Be sure to visit the MIX10 site for video recordings of various Silverlight-related presentations as the event is happening and as reference later on!  I really encourage you to view the keynote to see some new consumer-facing application experiences built on Silverlight, like eBay, Associated Press (Windows Phone 7)

Hope this helps!  Be sure to subscribe here via RSS or email and if you’re on Twitter you can follow me there as well for Silverlight updates/resources


This work is licensed under a Creative Commons Attribution By license.

| Comments

I’ll be joining Dan Wahlin and Rob Bagby on 18 May in Phoenix for a Best of MIX event.  I’ll be presenting Silverlight 3 and building data-driven line-of-business applications.  All demo, all tech, all Visual Studio as my presentation tool :-).

Come out and join us for the event!

Best of MIX Agenda

Monday, May 18, 2009
1:00 PM - 5:00 PM
Wells Fargo Conference Center
100 West Washington Street, MAC S4101-017
Phoenix Arizona 85003

What’s New in Silverlight 3?

Are you interested in building business-focused Rich Internet Applications (RIAs)?  Would you like to take advantage of 3D in the browser, but assume it is too hard?  Have you wanted to take a Silverlight application offline?  Then this session is for you.  We will explore and illustrate the new features of Silverlight 3, including the following:

· Support for perspective 3D

· Offline Support

· .NET RIA Services which simplifies the traditional n-tier application pattern by bringing together the ASP.NET and Silverlight platforms

Building Web Applications with Windows Azure

This session will begin with a brief overview of Azure and discuss some of the announcements made at MIX.  We will then illustrate through demo how to build a Windows Azure application from the ground up.  We will illustrate how to consume Azure Table Storage, how to host services, web pages and Silverlight components, as well as how to deploy your solution to the cloud.

MVC 1.0 vs ASP.Net Webforms

Have you heard about the new ASP.NET MVC  framework from Microsoft and wondered what it was all about? Are you curious whether this replaces ASP.Net Web Forms?  In this session you will learn how to use the model-view-controller (MVC) pattern to take advantage of your favorite .NET Framework language for writing business logic in a way that is de-coupled from the views of the data.  In addition, we will talk about the pros and cons of both MVC and Web Forms, how to determine the best choice for a specific project, various techniques and patterns used to build MVC applications vs. Web Forms applications, and the implications for using each approach.

Register for the Event

| Comments

I actually didn’t plan on “announcing” the winners, but I did want to give some credit to some great contributions and my appreciation for those that attempted given such short notice.

Last week I posted a simple quick request for you to be inspired and have some fun with Silverlight and win a chance at a free registration to MIX09.  The deadline has come and gone and here are the winners:

Winner #1: Matthias and Presidential newspaper timeline.  Seriously you have to check this out.  Inspired by the Descry demographics, Matthias used the NYTimes API to gather data about US Presidential candidates and put them on a timeline…each candidate’s representation changing on a timeline which covers 2006-2008.  I really liked this, it was creative.  Great job Matthias!

Matthias infographic

Winner #2: Jason went the Line Rider route (I was hoping someone would!) and created a map using the Las Vegas strip icons like the Paris tower, the MGM Grand lion, and the Stratosphere.  We’re working on figuring how how we can share his map and Bosch cruising down the strip, but here’s a screenshot of part of it:

Line Rider Vegas

Congratulations guys!  I hope to see you at MIX09 and hope you have a great time and continue to be inspired about what you see in Silverlight!

There were also others that heeded the call:

Thanks to you all for participating.  It was fun to see some different ideas from folks on such a short timeframe.  Congrats to Matthias and Jason as well and we’ll see you at MIX09 in Vegas!

If you are in the contest mood, you can also write a game using Silverlight and have a chance at winning $5,000! (sorry, US-only contest – don’t shoot the messenger).

| Comments

Did I mention I’m going to MIX?  Will I see you there?  I could imagine that some have tight travel budgets, training budgets shrunk, yada, yada.  I’m telling you…if you are a Microsoft developer in the web and WPF space, you need to be at MIX09.  In an effort to help there are a bunch of ways to reduce some costs…here’s some:

I figured, why can't I have some fun as well?  I asked on Twitter for some suggestions and god a few good ideas.  Here’s my ideas: play a game or draw some pictures.

Option 1 – design a Line Rider map for MIX

One of my favorite Silverlight game implementations that requires some artistic skills is Line Rider.  So here’s the skinny:

Create a Line Rider map for MIX.  The map must include elements of the MIX09 art work (logo or current art) as well as some Las Vegas bling.  You could do a Las Vegas strip scene with some famous landmarks, making Bosch (the Line Rider character) cruise around the New York, New York rollercoaster, up the Paris tower, etc., etc.  Get creative.  Here’s some inspiration: Jagged Peak Adventure.

Post a link to a video of your track as a comment on this blog post prepending the subject with [Line Rider].  I’ll pick the winner Monday, 23 Feb 2009.  This gives you a while to do it, but at the same time plan accordingly for a trip to Vegas if you win :-).  This free pass is ONLY for registration so you still have to get yourself to Las Vegas plus any lodging you’d require.

Option 2 – Visualize Some Data with Silverlight

One of the MIX lab projects is Descry.  This is a project in data visualization.  It isn’t a toolkit that you can automatically apply to any data, but a lab project to take an approach on developing infographics which represent different ways to look at data.  So your task would be to get inspiration from Descry and create a data visualization in Silverlight using public data of some sort.  This could be something depressing like the unemployment rates over time in correlation to Presidential administrations or housing market values across your region.  Or it could be something even more interesting like perhaps the visualization of a Porshce design since the automaker’s inception, something with stock data (not a stock chart), etc.  Whatever.  You define it.  But use real information, nothing made up and name the source of your information!

Post a link to your Silverlight project as a comment on this blog post prepending the subject with [Descry].  I’ll also pick the winner of this one on Monday, 23 Feb 2009 by end of day. 

Option 3 – Create a new preloader

Inspired by similar thoughts that Page wrote recently which I agree on, I’m adding another option.  Create a new default preloader for Silverlight apps.  Use some wicked vectors, create an interesting animation.  Get inspired by other designers.  The goal would be to make it generic enough for anyone to use, but also creative.  That’s only a guide though…get crazy on this one.

Post a link to your running preloader as a comment on this blog post prepending the subject with [Preloader].

For both all of these please be sure to use a REAL email address in the comment form – it isn’t made public but will get to me…I need a way to contact you.  If you have questions, leave them here or ping me on Twitter as well!

Have fun and good luck!