Welcome to MSDN Blogs Sign in | Join | Help

Silverlight 3 Out Of Browser Chess Application

The final sample from my Mix 09 talk is an Out Of Browser version of the Silverlight 2 Chess Application.  You can find the source for this sample here.

Posted by jstegman | 1 Comments

Local Messaging Samples

I posted the Local Messaging samples I showed at Mix 2009 including the Bouncing Balls sample and the Chess Wars application.  Click here to run the Bouncing Balls application (you’ll need to temporarily allow pop-ups).  To start a ball, click on anyone of the 4 HTML pages that pop-up.  You can find source for the bouncing balls application here.

 

To run Chess Wars, Click on the image below.  To have browsers compete JavaScript engine to JavaScript engine, start two versions in two different browsers and have one be “Local” and one be “Remote” (both with JavaScript for the other player).  You can find the Chess Wars source here.

 

Chess Wars

Posted by jstegman | 3 Comments

Chroma Key Pixel Shader Sample

Here’s the source to the WriteableBitmap and Pixel Shader sample I showed at Mix 2009.   Click on the image below to run the sample (and have the Silverlight 3 Beta installed – you can get that here).  Drag one of the images (or video) from the left and drop into the center area to see where WriteableBitmap is used.  Drag the video on the right into the center to see the Pixel Shader in action.  This sample will use a “shader” to mask out a chroma key (in this sample, the chroma key is black but the shader supports any color as a chroma key).

 

 More Effects

 

The demo shows the following new Silverlight 3 features:

  • WriteableBitmap
  • Pixel Shaders (chroma key shader)
  • Drop Shadow Effect
Posted by jstegman | 2 Comments

WriteableBitmap Sample

Here's the source to the WriteableBitmap sample I showed at Mix.  The sample uses WriteableBitmap to take a "snapshot" of the running video to make a thumbnail.  Click on the image below to run the sample.  When running the sample, click on the running video to create a thumbnail.  You can find the video for this sample here.

 

 

WriteableBitmap Image

 

 

The demo shows the following new Silverlight 3 features:

 

·         WriteableBitmap

·         WrapPanel (new SDK control)

Posted by jstegman | 3 Comments

Perspective 3D Sample

Finally getting around to posting the Mix demos, and the first I’ve posted is the Perspective3D demo.  I've posted the source here and you can click on the image below to run the sample.

 

MediaFlow Image

 

 

The demo shows the following new Silverlight 3 features:

 

·         Perspective 3D

·         ElementName binding

·         FileSaveDialog (to CSV which is consumable by Excel)

·         Animation Easing

Posted by jstegman | 7 Comments

Mix09 Presentation and Deck

I did a packed “What’s new in Silverlight 3” session at Mix 2009 and had a blast.  I’m working on posting the samples but for now, you can find a video of the session here and my deck here.  Samples and walkthroughs should all be posted by Monday…

Posted by jstegman | 2 Comments

Source Code for Silverlight 2 Runtime and SDK Controls Published


Seema’s blog post has more details, but the source code for the Silverlight 2 controls, both runtime and SDK, was just released.  This source code includes control source, source for support types (e.g. EventsArgs), Visual Studio project files and unit tests (unit test are only for the SDK controls).

 

Source is provided for the following controls:

 

Silverlight Runtime Controls

  • ButtonBase
  • Button
  • HyperlinkButton
  • CheckBox
  • RadioButton
  • ToggleButton
  • RangeBase
  • ProgressBar
  • Slider
  • ScrollBar
  • Thumb

Silverlight SDK Controls

  • Calendar
  • DatePicker
  • DataGrid
  • TabControl
  • GridSplitter
Posted by jstegman | 1 Comments

Update on Feature Requests


I am continuing to aggregate the requests and have the updated and abbreviated list below (removed items with less than 1 or 2 requests).  A couple of comments based on some of the requests:

 

I am tracking 3D even though ScottGu announced Silverlight 3 will support 3D.  For Silverlight 3, we are introducing the ability to treat 2D objects as if they are in 3D space.  You can view this support as being able to draw content (XAML) onto a postcard and then position that postcard in 3D space (this is also called perspective transformations or non-affine transformations).  What I am tracking for “3D” is the ability to do full 3D – which is the ability to have full 3D objects/models (e.g. a 3D box vs. a postcard) and rotate/shade/light that object.

 

I have not included an item for bitmap effects as we have announced plans to support a pixel shader model in Silverlight 3 and Silverlight will include a few stock shader effects.

 

There are some things we are continually focused on and one is performance.  For performance, we are scenario focused – meaning we pick the most important scenarios and then optimize those end to end.  For general performance requests, including requests for hardware acceleration, it would be helpful to understand what scenarios you feel do not meet performance expectations.

 

There are numerous requests for mouse wheel and there was a comment that suggested the reason we do not support this is due to a security concern.  To clarify, the reason we do not support this in Silverlight 2 is that mouse wheel events are not exposed to Silverlight in all browsers (see this post for more details).  We continue to look for a consistent way to work around this issue.

Feature Count Comments
Web camera and/or microphone input 33 Includes requests for just microphone as well
Bitmap APIs 28 Support get/set pixels and/or rendering a XAML scene to a bitmap.
Full 3D 26 Full 3D support (full 3D models)
Printing 22 Printing APIs
Offline and/or out of browser support 17 Support running Silverlight when not online (or completely out of the browser)
Rich text support 13 Editing and display (and flow, multi-column, inline hyperlink)
Text quality 12 Includes requests for knobs on anti-aliasing
Bi-directional text and/or complex script 10  
Right mouse button 9 Ability to configure the right click
UDP/P2P 9 UDP APIs generally for Peer to Peer support
Interactive designer 8 Support an interactive designer in Visual Studio
HTML Integration 8 Support HTML hosting (live HTML documents) and/or HTML translation
Support more than BasicHttpBinding 8 Most common request is for WSHttpBinding (session support)
Clipboard support 7  
Improve Silverlight/WPF compatibility 7 Mostly feature requests for either Silverlight and/or WPF
More controls 8 Including navigation tree, multihandle slider
Selectable text 7  
Improved DataGrid 6 Several different requests including support for Virtualization
Mouse wheel 6 API and support in existing controls
SaveFileDialog 6  
Data and/or property triggers 5  
Reporting services 5  
Synchronous web service calls 5  
ADO.NET DataSet/DataTable 4  
Alpha video 4 Chroma key support
Custom markup extensions 4  
Drawing APIs (immediate mode) 4  
Element name binding 4  
Local relational database (SQL) 4  
Modal dialog 4  
Assembly caching 3 Want a framework for downloading/managing assemblies
Binding support to anonymous types 3  
Credentials/auth 3 Requests for networking stack and ASP.NET type integration
Multi-target DLLs for .NET/SL 3 Build a business object DLL once for both .NET and Silvelright
Multi-touch support 3  
Path Animation 3  
Speech and better audio decoder 3  
VisualBrush 3  
Posted by jstegman | 15 Comments

Silverlight Feature Requests


Currently, there is not a general location to log Silverlight feature requests (we’re considering adding something on Silverlight.net for this).  Given the lack of a central spot, I’ve taken a few threads on the Silverlight forums related to a Silverlight wish list as well as some comments from ScottGu’s Silverlight 2 blog post and Scott Barnes’ blog and aggregated the requests into a single list with frequency counts.  I left off things that have already been announced in Silverlight 3 but left on others that have not yet been announced.  There are numerous reasons why something will or will not appear in the next version of Silverlight including customer demand, time to implement, business need, security concerns, performance concerns, ability to implement consistently cross browser and cross platform, etc.  Therefore, items at the top of the list below won’t necessarily appear in the next version of Silverlight – however, it’s likely we’re engaged in solving those problems in one way or another.  Net result is the Silverlight product team does look at these requests and they do have some impact on shaping future Silverlight platforms.

 

Feel free to continue to make requests and I’ll try and update the counts every month or so.  One thing that would help for requests is some insight into the scenario for the request (if it’s not obvious).  For example, if you need UDP, include details on your scenario for UDP (e.g. P2P game and if so, we may be able to solve that with a more targeted API).  One area to call out specifically for scenarios is requests for WPF and Silverlight compatibility.  In general, if you want a WPF feature in Silverlight, call that out as a Silverlight feature request vs. a compatibility request (e.g. want triggers in Silverlight).  If you have a need to share resources between Silverlight and WPF, call that out as compatibility and let us know what you’re doing that requires shared resources (to better help us determine how to focus our work in this area).  

 

Feature Count Comments
Web camera and/or microphone input 33 Includes requests for just microphone as well
Bitmap APIs 26 Support get/set pixels and/or rendering a XAML scene to a bitmap.
Full 3D 24 Full 3D support (full 3D models)
Printing 20 Printing APIs
Offline and/or out of browser support 16 Support running Silverlight when not online (or completely out of the browser)
Bi-directional text and/or complex script 9
UDP/P2P 9 UDP APIs generally for Peer to Peer support
Rich text support 8 Editing and display
Right mouse button 8 Ability to configure the right click
Text quality 8 Improved text quality
HTML Integration 7 Support HTML hosting (live HTML documents) and/or HTML translation
Interactive designer 7 Support an interactive designer in Visual Studio
Support more than BasicHttpBinding 7 Most common request is for WSHttpBinding
Improve Silverlight/WPF compatibility 6 Mostly feature requests for either Silverlight and/or WPF
More controls 6 Random/general requests
SaveFileDialog 6
Data and/or property triggers 5
Reporting services 5
Synchronous web service calls 5
ADO.NET DataSet/DataTable 4
Alpha video 4 Chroma key support
Clipboard support 4
Drawing APIs (immediate mode) 4
Element name binding 4
Improved DataGrid 4 Several different requests
Local relational database (SQL) 4
Modal dialog 4
Mouse wheel 4 API and support in existing controls
Selectable text 4
Assembly caching 3 Want a framework for downloading/managing assemblies
Credentials/auth 3 Requests for networking stack and ASP.NET type integration
Custom markup extensions 3
Multi-target DLLs for .NET/SL 3 Build a business object DLL once for both .NET and Silverlight
Multi-touch support 3
Path Animation 3
Speech and better audio decoder 3
VisualBrush 3
9 Grid 2
Better keyboard APIs 2 Platform independent keycode
Better SEO 2
Binding support to anonymous types 2
Direct database access 2 OLEDB/ODBC equivalent
Flow panel 2
GIF support 2
Global/dynamic styles (skinning) 2
Integrated CTRL+F (in page search) 2
Sound APIs (equalizer) 2 Includes looping
TileBrush (Image Tiling) 2
XPS Support 2
64-bit platform support 1
Android support 1
Better N-tier support 1 Improved data access
Better SharePoint integration 1
Block style text 1 Bulleted lists, paragraphs
Cell based animation 1
CollectionView 1
Color management 1
Digital/XAP signing 1
Double Click event 1
Drag and Drop 1 Between the desktop and Silverlight
Full 5.1 sound 1 Currently fold down to stereo
IDataErrorInfo 1
Inverse kinematics (bones) 1 Flash 10 feature
MediaTimeline 1
Multi-binding 1
Navigation model 1 Includes browser history integration
Validation controls 1
XPATH support for data binding 1
Posted by jstegman | 33 Comments

Update on Silverlight and Opera


After my previous post, I had a few folks email me to look at some of their sites that don’t run correctly in Opera even after the below fix.  After more investigation and trolling through our bug database to extract all known Silverlight and Opera issues, there are 3 issues folks should be aware of related to Silverlight and Opera:

 

1.       The MS AJAX issue described in my previous post.

2.       Silverlight does not work in Opera when using windowless mode (<param name="windowless" value="true" />).  This will show a blank page with the Opera status area saying “Click to activate and use this control”.  This is being investigated by the Silverlight team and has also been reported to the Opera development team.  The only work-around is to not use windowless mode.

3.       The Silverlight TextBox cannot receive focus (and therefore you cannot select/change text in the TextBox).  There is no current workaround to this issue.

Posted by jstegman | 6 Comments

Silverlight and Opera


Although Opera is not an officially supported browser (see my previous post for more details), we do want a good Silverlight experience for Opera users (and a good Opera experience for Silverlight developers).  As such, we do some level of Opera testing and look at customer reported Silverlight/Opera issues.  In general, the Silverlight experience in Opera works OK, with a few exceptions and one that's easy to correct: when hosting Silverlight in Opera via the MS AJAX Silverlight control.   When doing this, the Silverlight control will correctly instantiate in Opera but the Silverlight content won’t load and you’ll see a blank page.  The good news is this is reasonably easy to work-around and we are investigating the root cause of this issue (a bug has been logged to Opera on this issue and the Silverlight product team will look at it as well).

The bug is manifested in Opera when loading dynamic source when there is a dynamically set onload handler:

 

  <head>

    <script type="text/javascript">

      function pageLoaded() {

        var obj = document.getElementById('obj1');

        obj.OnLoad = xamlLoaded;  // Remove and this works in Opera

        obj.Source = "source.xaml";

      }

      function xamlLoaded() {}

    </script>

  </head>

  <body onload="pageLoaded()">

    <object id="obj1" type="application/x-silverlight-2"/>

  </body>

 

This is the way the MS AJAX control needs to load Silverlight in order to integrate into the MS AJAX framework.  The best way to work-around this issue is to replace the MS AJAX hosting with plain object tag hosting:

 

<body>

    <!-- Runtime errors from Silverlight will be displayed here.

    This will contain debugging information and should be removed or hidden when debugging is completed -->

    <div id="silverlightControlHost">

      <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">

        <param name="source" value="PATH_TO_YOUR_XAP.xap"/>

        <param name="background" value="white" />

        <param name="minRuntimeVersion" value="2.0.31005.0" />

        <param name="autoUpgrade" value="true" />

        <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">

          <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>

        </a>

      </object>

      <iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe>

    </div>

  </body>

 

Posted by jstegman | 5 Comments

Silverlight Browser Support


I occasionally get asked about why we don’t support browser X on platform Y and wanted to share a little background on Silverlight browser support.  This post will provide a bit of details what it means to be an officially supported Silverlight browser and what experience you should expect from not officially supported browsers.  One thing to clarify up front is that independent of being “officially supported”, Silverlight should generally run in all common browsers that support either the Netscape Plug-in API or ActiveX plug-ins.

 

Browser Plug-Ins

 

Silverlight plugs into browsers using standard browser plug-in APIs.  The browser plug-in APIs are effectively the base platform for all plug-ins (including Silverlight).  For example, when Silverlight makes a networking request, it’s really calling through to the underlying browser provided plug-in API to make the network request.  In this way, plug-ins are generally subjected to the same sandbox and security restrictions as the containing browser as well as automatically pick up browser based configuration settings (e.g. proxy settings, security, caching).   On the negative side though, these APIs are limited in areas such as networking which prevents the plug-in from doing some things developers generally want to do (e.g. limited HTTP verbs).

 

Silverlight Support Plug-in Models

 

There are numerous combinations of browsers and platforms.  In an ideal world, all browsers would support the same plug-in model and have a consistent implementation of their plug-in APIs.  Unfortunately, there are two main plug-in models, ActiveX for Internet Explorer and the Netscape Plug-in API (NPAPI) for most other browsers.  Given that, ideally Silverlight would just need to support these two APIs and would then work consistently across browsers/platforms.  Unfortunately, browsers don’t provide 100% consistent implementations of the NPAPI and therefore Silverlight generally needs to work around these inconsistencies (e.g. Safari doesn’t support byte range requests through their implementation of the NPAPI).   In addition, as with any software, the browser provided plug-in APIs occasionally have bugs.  What this means is that even if Silverlight provides a consistent plug-in implementation, it will still not work consistently across all browsers and plug-ins.

 

Silverlight Supported Browsers

 

One of the key value-propositions of Silverlight is that it works consistently across all browsers and platforms.  As such, for Silverlight “supported browsers and platforms”, the Silverlight team works around plug-in API inconsistencies/bugs to ensure general Silverlight platform consistency (as well as does performance and stress testing on these browsers).   Note that even though a browser is not an officially supported browser, we’ll often do some level of testing on the most popular non supported browsers as this will occasionally either turn up a product issue or will turn up a browser issue that we can then report to the browser manufacturer.   One general question we get asked is why don’t we just support browser X on platform Y and the reason is that there is a real cost to this supporting any browser/platform due to the issues just described.  From a Silverlight product team perspective, we have to trade off the cost/impact of supporting new browsers with the cost/impact of supporting new product features.  In addition, each supported browser/platform has a slight impact on overall product agility – meaning the more browsers/platforms officially supported with each release, the longer it takes to release the product.   As such, we try to balance the need for new browser/platform support against the need for more features and agility.

 

Adding New Officially Supported Browsers

 

There are a couple of factors that contribute to Silverlight adding new officially supported browsers/platforms:  new version/update to an officially supported browser,  expected or measured up-tick in a browser’s penetration (here’s one site that measures share but this data varies on region and by polling method) or, as described above, based on customer demand when balanced against other requested features.  Note that “demand” is typically directly related to “expected or measured up-tick” in browser penetration.

Posted by jstegman | 7 Comments

Added BMP Decoder

I updated the Image Source samples to include the BMP Decoder (missing from my previous post).

Posted by jstegman | 1 Comments

Kitchen Updates

I updated my Kitchen PhotoZoom gallery with a few photos to show some progress I made over the last few weekends.  Updates include adding crown to the cabinets some casing updates and we put in the backsplash (not grouted yet).   The backsplash, shown below, is white ceramic subway tiles (3x6) with glass tile accents.

 

 

PhotoZoom sample

 

 

Posted by jstegman | 1 Comments

Updated Source for Image Samples

Updated on 11/10 to fix the ZIP archives and add dependent projects.

In addition to updating the image samples to the final version of Silverlight V2, I've also updated the source:

For each of these samples, you'll need the following project:

Posted by jstegman | 6 Comments
More Posts Next page »
 
Page view tracker