×

First time here?

You are looking at the most recent posts. You may also want to check out older archives. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS or email. Thank you for visiting!

At the Microsoft Professional Developer (PDC) conference, Scott Guthrie announced the availability of Silverlight 4 Beta.

UPDATE (March 2010): Silverlight 4 RC made available!  Go read my updated post on what has changed after you read below about the core features.

WHAT?!

That’s right, we’ve released an early beta of the next version of Silverlight.  It’s really amazing to think what the team is accomplishing at the pace they are accomplishing it!  Silverlight 3 released just over 3 months ago and here we are with yet another release full of features that our community has been asking for. 

This beta release is a developer release.  This means that this is a preview mostly for developers to understand the new features and continue to get feedback.  No “end-user” runtime is available for this release, nor is a “go-live” license for customers wishing to put their applications into production.  If you have questions on this, feel free to leave a comment here.

Enough blabbing, here’s the goods.  WARNING: Long post ahead…but filled with information.

Download Silverlight 4 and tools

To be successful in your evaluation of Silverlight 4 you are going to need some tools.  Here’s the link dump of everything:

These are the full set of tools to help you evaluate Silverlight 4.  At a bare minimum for a developer you’ll need/want Visual Studio 2010 and the Silverlight Tools for VS. 

NOTE: When you install the Silverlight Tools for VS, you get the Windows developer runtime, the Silverlight 4 SDK and the Visual Studio tools/templates.  It is NOT necessary to install the SDK and developer runtimes again if you are using the tools installer.  The developer runtimes are provided for you to put on other developer test machines to help test your applications.  Additionally, RIA Services is also included in the Silverlight Tools for Visual Studio 2010.  If you have a version of RIA Services already installed, you will need to uninstall it.

Go ahead and get the tools starting to download.  In the meantime, here’s some other helpful information for you.

Silverlight 4 Resources

There are a few places for you to go to learn some things:

You should bookmark and subscribe to the above sites for constant updated Silverlight information.

What’s new in Silverlight 4 – feature review

Okay, now on to the details.  Sit back, switch this post to your largest monitor, and grab a drink.  This is a long post intentionally to provide you with details to the framework.  In each area I’ll be sure to point out if there are existing resources (labs, videos, etc.) for that specific feature and be as concise as I can as to be “to the point” about what it provides, what are the requirements and some sample code, where appropriate.  Here we go with the feature dump…

Tooling

With Visual Studio 2010, we finally have our designer surface back for Silverlight!  Yes, you have an editable design surface for Silverlight…and actually this isn’t just limited to Silverlight 4…it is available for Silverlight 3.  What is great about the Silverlight tools in VS2010 is that the databinding support is pretty rich in the designer surface as well.

DataBinding window in VS2010

Additionally, for WCF RIA Services, we have improved designer/editor support for using DomainSource classes as a Data Source in Visual Studio.  Be sure to grab VS2010 for all your development needs.  VS2010 allows for multi-targeting of Silverlight 3 and 4 applications.

Video: RIA Services Support in Visual Studio 2010

^ back to top

Printing API

One of the top-most requested features in Silverlight has been to enable some printing support from the Silverlight application client-side versus always having the developer do things server-side.  In Silverlight 4 we’re providing a printing API that we believe to be extensible for the developer and provide you with a simple printing of a visual tree, or a highly extensible model to enable you to create a virtual visual tree to print for the end user directly from Silverlight.

Code sample:

   1: private void PrintAll_Click(object sender, RoutedEventArgs e)
   2: {
   3:     // instantiate a new PrintDocument
   4:     PrintDocument docToPrint = new PrintDocument();
   5:     
   6:     // set a friendly name for display in print queues
   7:     docToPrint.DocumentName = "Entire Screen Sample";
   8:  
   9:     // wire up any starting code pre-printing (i.e., UI activity display)
  10:     docToPrint.StartPrint += (s, args) =>
  11:         {
  12:             ActivityDisplay.IsActive = true;
  13:         };
  14:  
  15:     // tell the API what to print
  16:     docToPrint.PrintPage += (s, args) =>
  17:         {
  18:             args.PageVisual = this.StackOfStuff;
  19:         };
  20:  
  21:     // wire up any clean-up code pre-printing (i.e., UI activity display)
  22:     docToPrint.EndPrint += (s, args) =>
  23:         {
  24:             ActivityDisplay.IsActive = false;
  25:         };
  26:  
  27:     // execute the print job
  28:     docToPrint.Print();
  29: }

As you can see above, you can wire up pre- and post-print events for any type of preparation and clean-up code.  The PrintPage is the important area here where the developer would pass a UIElement to print.  This could be something that already exists in the visual tree, or something that is created virtually in-memory and not even added to the visual tree.

Video and Sample Code: Printing API Basics

^ back to top

Right-click event handling

Do you have an application that has a need for a context-style menu (aka ‘right click’ menus)?  Well, in addition to the MouseLeftButtonUp/Down events, we now enable the MouseRightButtonUp/Down events for you to attach to and handle.  This enables the developer to take control over what you’d like to do when those events occur.  This can be from handling simple commands for gaming (i.e., a right click is a different interaction in the game than the left click) or as well for providing context-style menus for additional functionality within the application.

Sample Code:

   1: public partial class MainPage : UserControl
   2: {
   3:     public MainPage()
   4:     {
   5:         InitializeComponent();
   6:  
   7:         // wire up the event handlers for the event on a particular UIElement
   8:         ChangingRectangle.MouseRightButtonDown += new MouseButtonEventHandler(RectangleContextDown);
   9:         ChangingRectangle.MouseRightButtonUp += new MouseButtonEventHandler(RectangleContextUp);
  10:     }
  11:  
  12:     void RectangleContextUp(object sender, MouseButtonEventArgs e)
  13:     {
  14:         // create custom context menu control and show it.
  15:         ColorChangeContextMenu contextMenu = new ColorChangeContextMenu(ChangingRectangle);
  16:         contextMenu.Show(e.GetPosition(LayoutRoot));
  17:     }
  18:  
  19:     void RectangleContextDown(object sender, MouseButtonEventArgs e)
  20:     {
  21:         // handle the event so the default context menu is hidden
  22:         e.Handled = true;
  23:     }
  24: }

The sample above shows a snippet from implementing a context menu within the application.  The result of the above code looks like this:

right click event sample

As you can see, the event handling is simple and the flexibility exists for you, the developer, to choose what you want to happen functionally and visually when the right-click events occur.

Video and Sample Code: Right-click Mouse Events

^ back to top

Webcam and micrphone access

Need access to your user’s attached (or integrated) web camera and/or microphone?  You got it.  With a few simple lines of code you can request permission to your users to leverage their capture devices and then capture both the audio and video.

Sample code for requesting permission:

   1: // request user permission and display the capture
   2: if (CaptureDeviceConfiguration.AllowedDeviceAccess || CaptureDeviceConfiguration.RequestDeviceAccess())
   3: {
   4:     _captureSource.Start();
   5: }

Sample code for capturing the video:

   1: if (_captureSource != null)
   2: {
   3:     _captureSource.Stop(); // stop whatever device may be capturing
   4:  
   5:     // set the devices for the capture source
   6:     _captureSource.VideoCaptureDevice = (VideoCaptureDevice)VideoSources.SelectedItem;
   7:     _captureSource.AudioCaptureDevice = (AudioCaptureDevice)AudioSources.SelectedItem;
   8:  
   9:     // create the brush
  10:     VideoBrush vidBrush = new VideoBrush();
  11:     vidBrush.SetSource(_captureSource);
  12:     WebcamCapture.Fill = vidBrush; // paint the brush on the rectangle
  13:  
  14:     // request user permission and display the capture
  15:     if (CaptureDeviceConfiguration.AllowedDeviceAccess || CaptureDeviceConfiguration.RequestDeviceAccess())
  16:     {
  17:         _captureSource.Start();
  18:     }
  19: }

We also provide a very simple API for enabling “snapshot” images from the webcam:

   1: private void TakeSnapshot_Click(object sender, RoutedEventArgs e)
   2: {
   3:     if (_captureSource != null)
   4:     {
   5:         // capture the current frame and add it to our observable collection
   6:         _captureSource.AsyncCaptureImage((snapImage) =>
   7:             {
   8:                 _images.Add(snapImage);
   9:             });
  10:     }
  11: }

I am interested to see how these webcam/microphone features are implemented in the wild by developers!

Video and Sample Code: Webcam and Microphone Support

^ back to top

Mouse wheel support

In previous versions of Silverlight, you had to rely on some helper classes from either DeepZoom or other sample sites to implement handling the mouse’s scroll wheel functionality on things like ListBox, etc.  We’re now providing APIs for you to handle MouseWheel events.  You can attach this event handler to other items as well (not just ListBox).

Sample Code:

   1: // wire up the event
   2: myRectangle.MouseWheel += new MouseWheelEventHandler(RectangleZoom);
   3:  
   4: void RectangleZoom(object sender, MouseWheelEventArgs e)
   5: {
   6:     // do something here like alter the scale
   7:     // MouseWheelEventArgs.Delta gives you an int
   8:     // of the amount changed in the scroll event
   9: }

So as you can see, you can easily wire-up the event handler for the MouseWheel event on a particular element and respond accordingly.

Video and Sample Code: Handling MouseWheel Events

^ back to top

RichTextArea control

One of the requested features has been to provide an editable text control that enabled rich text editing using common rich text changes like bold, italics, different sizes, etc.  Using the RichTextArea, you can now enable these types of editing areas in your application.

Here’s an example of implementing the RichTextArea control:

RichTextArea sample

Video and Sample Code: RichTextArea Control

^ back to top

ICommand support on ButtonBase and Hyperlink

To help support development patterns like the popular Model-View-ViewModel pattern, support for commanding infrastructures is now provided on ButtonBase and Hyperlink.  These exposed properties, Command and CommandParameter enable binding from a View to a ViewModel approach without the need for click event handlers in code behind files.  This helps aide the pattern of separation of concerns for the UI and code layers.

Sample Code:

   1: <UserControl.Resources> 
   2:     <local:ProductViewModel x:Key="ViewModelContext"/> 
   3: </UserControl.Resources> 
   4: <Grid DataContext="{StaticResource ViewModelContext}" Name="LayoutRoot"> 
   5: <TextBox x:Name="CostThresholdFilter"/> 
   6: <Button Content="Load Products" Width="120"  
   7:     Command="{Binding FindMatchingProducts}"  
   8:     CommandParameter="{Binding Path=Text, ElementName=CostThresholdFilter}"/>

In this example above, the XAML binds the Button to an event, FindMatchingProducts, from the DataContext (the “ViewModelContext” resource) as well as providing the parameter, CostThresholdFilter, from another UIElement on the page.  For those implementing solutions using the MVVM pattern (or other similar patterns), this added support for ICommand is a welcome addition!  Get those MVVM framework revisions working :-).

^ back to top

Clipboard API

Prior to now, having a reliable method for providing contents that can be temporarily held in the machine’s “clipboard” memory area involved an IE-only solution or introducing other platforms into your Silverlight application.

With the addition of the Clipboard API, you can now have a cross-platform mechanism in Silverlight to provide this facility for you.

Sample Code:

   1: Clipboard.SetText("Some text to save in the clipboard area");

This sample above shows setting some simple text to the Clipboard which could then be pasted to the Silverlight application, or to other applications the user is using as this is now in the machine’s clipboard memory.

Video and Sample Code: Accessing the Global Clipboard Programmatically

^ back to top

Host HTML content using WebBrowser control

When you are working in the web world, you likely are dealing with HTML content in some area.  Especially if you are creating content-managed systems, sometimes that content is stored as HTML.  Enabling hosting HTML content in Silverlight is now possible by providing a simple WebBrowser control that will enable you to provide string-based HTML contents or navigate to a fully interactive URL.

Sample Code (XAML):

   1: <WebBrowser x:Name="MyBrowserControl" Width="800" Height="600" />

Sample Code (C#):

   1: MyBrowserControl.NavigateToString("<div style='color:red;width:100;height:100'><b>Tim Heuer</b></div>");

As an example, here’s a Silverlight application hosting an embedded YouTube Flash video:

Hosting HTML YouTube video in Silverlight

Hopefully this will be helpful in developing your Silverlight applications.  Additionally, you can also use the HtmlBrush to fill elements using HTML content.

Video and Sample Code: Hosting HTML Content in Silverlight

^ back to top

Elevated trust applications

One thing users have been asking for is to enable Silverlight out-of-browser (OOB) applications to have more privileges.  You can now alter the OOB manifest to request more elevated permissions for your application.  Using Visual Studio you can look at the project properties and enable the checkbox to add this request:

Elevated trust manifest setting

The result is that the OOB install dialog now looks a little different and warns the user of these elevated privileges:

Trusted application install prompt

See the next sections for things that you can do in OOB mode now while in a trusted application (aka elevated mode).  It is important to note that this trusted application request still does not involve installing any additional runtime for the user…it is a part of the Silverlight 4 runtime – no additional download/framework would be required.

^ back to top

Access local files on user’s machine

In order to read/write data to the user’s machine, you normally have to do it through a mechanism like OpenFileDialog (read) and SaveFileDialog (write).  In Silverlight 4 you can now have direct local file access to the users’ "My” folders in their profile.  These are things like MyDocuments, MyVideos, MyMusic, etc.  On OSX platform these map to the same user-level profile folders like /users/timheuer/Videos. 

You use the Environment namespace to get the path locations for the operation you are wishing to do.

Sample Code:

   1: private void EnumerateFiles(object sender, RoutedEventArgs e)
   2: {
   3:     // create a collection to hold the file enumeration
   4:     List<string> videosInFolder = new List<string>();
   5:  
   6:     // using the file api to enumerate
   7:     // use the SpecialFolder API to get the users low trust "My Document" type folders
   8:     var videos = Directory.EnumerateFiles(Environment.GetFolderPath(Environment.SpecialFolder.MyVideos));
   9:     
  10:     // enumerate the folder
  11:     foreach (var item in videos)
  12:     {
  13:         videosInFolder.Add(item);
  14:     }
  15:  
  16:     // bind the data
  17:     VideoFileListing.ItemsSource = videosInFolder;
  18: }

This feature requires a trusted application (elevated permissions).

Video and Sample Code: Local File Access

^ back to top

COM interoperability

Have you had the need to interoperate with device peripherals that only expose a COM interface?  What about having your Silverlight application talk with Office applications?  Using the ComAutomationFactory API, you can now have your Silverlight application instantiate and interact with COM applications on the Windows client.

Sample Code (interacting with Excel):

   1: // create an instance of excel
   2: dynamic excel = ComAutomationFactory.CreateObject("Excel.Application");
   3:  
   4: excel.Visible = true;  // make it visible to the user.
   5:  
   6: // add a workbook to the instance 
   7: dynamic workbook = excel.workbooks;
   8: workbook.Add();
   9:  
  10: dynamic sheet = excel.ActiveSheet; // get the active sheet

This feature requires a trusted application (elevated permissions).  Notice that this is done via the dynamic keyword in C# 4.0.  One thing to also note that in the tooling you will not get IntelliSense support for your COM created objects.  Keep that documentation for that API handy!

Video and Sample Code: COM Object Access in Trusted Applications

^ back to top

Notification (aka “toast”) API

Ever want your application to provide a notification mechanism to the user?  This is often referred to as “toast” where a subtle notification temporarily displays in the user’s screen providing some information provided by the application.  Perhaps one of the more common uses of this is in mail applications, like Outlook, where new mail notifications pop-up message notification windows near the system tray in Windows.

By using the NotificationWindow in Silverlight, you can provide a simple or customized notification mechanism for your application.

Sample Code:

   1: private void CustomNotificationButton_Click(object sender, RoutedEventArgs e)
   2: {
   3:     // create the nofitication window API
   4:     NotificationWindow notify = new NotificationWindow();
   5:     notify.Height = 74;
   6:     notify.Width = 329;
   7:  
   8:     // creating the content to be in the window
   9:     CustomNotification custom = new CustomNotification();
  10:     custom.Header = "Sample Header";
  11:     custom.Text = "Hey this is a better looking notification!";
  12:     custom.Width = notify.Width;
  13:     custom.Height = notify.Height;
  14:  
  15:     // set the window content
  16:     notify.Content = custom;
  17:  
  18:     // displaying the notification
  19:     notify.Show(4000);
  20: }

Here’s an example of a styled NotificationWindow content:

Sample NotificationWindow

Notifications can only be done in Silverlight out-of-browser applications, and are simple to implement in few lines of code.

Video and Sample Code: Notification Window API

^ back to top

Network authentication in web requests

At times, you may be interacting with 3rd party (or perhaps your own) services that require authentication information to be passed into the service call.  This authentication information may be different than the logged-on user’s current information.

We have enabled providing NetworkCredential information via the ClientHttp networking stack that was introduced in Silverlight 3.  For example, to pass a username/password (basic auth) to a service call using this method would be something like this:

   1: // NetworkCredential passing is available in ClientHttp networking stack
   2: WebRequest.RegisterPrefix("http://", System.Net.Browser.WebRequestCreator.ClientHttp);
   3:  
   4: WebClient myService = new WebClient();
   5: myService.Credentials = new NetworkCredential("someusername", "somepassword");
   6: myService.UseDefaultCredentials = false; // must be set to false if providing your own credentials
   7: myService.DownloadStringCompleted += new DownloadStringCompletedEventHandler(OnResultCompleted);
   8: myService.DownloadStringAsync(new Uri(http://somewebsite.com/authenticatedservice));

Note that we first register the prefix to use the ClientHttp networking stack.  The second thing to note is that in WebClient, you still must specify UseDefaultCredentials=”false” even though you are providing new credentials.  If you don’t, the default credentials will still be used.

Video and Sample Code: Network Authentication in Web Requests

^ back to top

Cross-domain Networking changes

One of the more significant changes to cross-domain networking comes when you have a trusted application.  For services that have a closed cross-domain policy file (via clientaccesspolicy.xml or crossdomain.xml), if your application is a trusted application (elevated permissions), then the requirement for a cross-domain policy file is no longer required.

This only applies to trusted applications.

Video and Sample Code: Network Cross-domain Request in Trusted Application

^ back to top

Full keyboard access in full screen

If you are developing kiosk applications or other Silverlight applications that run in full-screen mode (IsFullScreen=”true”), you have noticed that only a limited set of keyboard input was enabled.  In Silverlight 4 trusted applications, any application in full-screen mode can have full keyboard input for things like TextBox or other input controls.

This only applies to trusted applications.

^ back to top

TextTrimming

The TextBlock control has a new property called TextTrimming that enables you to use the WordElipse trimming value.  When the property is set, any text exceeding the visible limit of the control will be truncated and an ellipsis will be displayed to the user indicating more content.

Sample Code:

   1: <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" 
   2:     Text="The quick brown fox jumped over the tall white fence"  
   3:     TextTrimming="WordEllipsis" Width="120" />

Sample Output:

TextTrimming output sample

^ back to top

ViewBox control

As items in the Silverlight Toolkit mature in the codebase, these controls move into the core for Silverlight.  In this release, ViewBox has reached that level and is now provided in the core.  A ViewBox is a container control that aims to help constrain the contents of the ViewBox to a specific size or area and automatically handle scaling, etc.

Video and Sample Code: Using the ViewBox Control

^ back to top

Bi-directional and complext text, Right-to-left support in controls

If you are writing an application that requires right-to-left (RTL) support in either text and/or controls, a new attribute for UIElement is now provided for you.  The FlowDirection attribute can be applied to represent the element in RTL format. 

Sample Code:

   1: <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="ControlSamples">
   2:     <TextBlock FlowDirection="LeftToRight" Foreground="White" Text="BiDi and RTL Sample" FontSize="20" Margin="20" />
   3:     <RichTextArea TextWrapping="Wrap" Width="600" Height="150"></RichTextArea>
   4:     <TextBlock FontSize="24" Foreground="White" Text="قفز الثعلب البني السريع فوق الكلب الكسول." />
   5:     <ListBox>
   6:         <ListBox.Items>
   7:             <ListBoxItem Content="قفز الثعلب البني السريع فوق الكلب الكسول." />
   8:             <ListBoxItem Content="Option 1" />
   9:             <ListBoxItem Content="Option 2" />
  10:             <ListBoxItem Content="Option 3" />
  11:             <ListBoxItem Content="Option 4" />
  12:         </ListBox.Items>
  13:     </ListBox>
  14: </StackPanel>

This can be applied to a higher level in the visual tree and gets automatically applied to child levels.

Video and Sample Code: BiDi and Right-to-left Support

^ back to top

Offline DRM for media playback

The next major wave of PlayReady innovation being built into Silverlight focuses on meeting the top media customer ask for the Silverlight DRM client – support for Offline scenarios.  The three key business models targeted for this release of the Silverlight DRM client are Rental, Subscription, and Purchase.  The Silverlight PlayReady ecosystem has several features that are valuable for these business models.

^ back to top

H.264 protected content via PlayReady

PlayReady content protection for Silverlight and VC-1 encoded media has already proven to be a reliable and seamless experience to the user.  With Silverlight 4, this content protection is extended to H.264 encoded media assets.

^ back to top

Using Silverlight application as a drop target from your desktop

For some scenarios, you may have wanted to be able to drag a file from your desktop or file explorer on to your Silverlight application.  By enabling the AllowDrop attribute on UIElement in this release, you can now accommodate those scenarios.

Sample Code:

   1: public MainPage()
   2: {
   3:     InitializeComponent();
   4:     Loaded += new RoutedEventHandler(MainPage_Loaded);
   5:     
   6:     // wire up the various Drop events
   7:     InstallButton.Drop += new DragEventHandler(InstallButton_Drop);
   8:     InstallButton.DragOver += new DragEventHandler(InstallButton_DragOver);
   9:     InstallButton.DragEnter += new DragEventHandler(InstallButton_DragEnter);
  10:     InstallButton.DragLeave += new DragEventHandler(InstallButton_DragLeave);
  11: }
  12:  
  13:  
  14: void InstallButton_Drop(object sender, DragEventArgs e)
  15: {
  16:     IDataObject foo = e.Data; // do something with data
  17: }

This will be most helpful in file upload applications.

Video and Sample Code: Using Silverlight as a Drop Target

^ back to top

IDataErrorInfo and asynchronous validation

Silverlight adds the IDataErrorInfo interface enables the reporting of validation errors that a user interface can bind to.  When an entity implements this interface and the entity is involved in a binding operation, it invokes the indexer to validate the properties.  The bound target properties in the UI will receive the error messages and display the validation states if the ValidatesOnDataErrors property is set to true.

IDataErrorInfo is limited to validating on a per property basis. However, Silverlight 4 also adds the INotifyDataErrorInfo interface that allows validation across properties of an entity. It also allows entity objects to enable notification of data errors in the UI. INotifyDataErrorInfo allows developers to provide custom, asynchronous validation support to access server-side validation logic.  It exposes a HasErrors property to indicate if there are any errors and has a GetErrors method to retrieve the errors.  The ErrorsChanged event is raised when new errors are added. If the binding property ValidatesOnNotifyDataErrors is set to true and the source object implements the interface, the binding engine in Silverlight will listen for the ErrorsChanged event.

Video and Sample Code: Data Validation

^ back to top

DependencyObject Binding

Silverlight introduces the ability to bind properties on a DependencyObject (DO) and not just on FrameworkElements.  For example, in Silverlight you can bind the rotation angle of a RotateTransform to a Slider control.

Sample Code:

   1: <Rectangle Width="100" Height="100"  
   2:         RenderTransformOrigin="0.5, 0.5" Background="#FF2B6092"> 
   3:     <Rectangle .RenderTransform> 
   4:         <RotateTransform Angle="{Binding ElementName=slider, Path=Value}" /> 
   5:     </Rectangle .RenderTransform> 
   6: </Rectangle > 
   7: <Slider x:Name="slider" Height="20" Margin="0,225,0,55" Minimum="0"  
   8:         Maximum="360" />

This is a highly requested data binding enhancement that should be useful to designers and developers.

^ back to top

StringFormat, TargetNullValue, FallbackValue

If you’ve ever done databinding in XAML using simple things like currency, dates, etc. then you have likely created a ValueConverter.  While for simple things it is not difficult, it was often a tedious and repetitive task.

StringFormat is now available to you for a simpler solution for XAML databinding and formatting the output.

Sample Code:

   1: <TextBox Text="{Binding Path=PublishedDate, Mode=OneWay, StringFormat='MM-dd-yyyy'}"/>

Additionally, you can also specify Fallback and TargetNull values in your binding syntax:

   1: <TextBox Text="{Binding Path=SomeBindingValue, Mode=TwoWay, FallbackValue=N/A}" /> 
   2: <TextBox Text="{Binding Path=QuantityOnHand, Mode=TwoWay, TargetNullValue=0}" />

The FallbackValue displays a value when the binding operation is unsuccessful, where the TargetNullValue helps provide a value when the result of the binding value is NULL.

^ back to top

Managed Extensibility Framework (MEF)

This release of Silverlight 4 brings support for the Managed Extensibility Framework (MEF) in the SDK.  This is far to important of a topic (and too broad of a topic) to cover in a simple paragraph.  Take a look at Glenn Block’s session at PDC (when available) for an in-depth look at this support for MEF in Silverlight.

^ back to top

DataGrid enhancements

DataGrid is a commonly used control for building line-of-business applications.  Over time, the DataGrid has continually undergone improvement and this release is no different.  Take a look at the video for the improvements in the DataGrid control.

Video and Sample Code: DataGrid Improvements

^ back to top

Fluid user interface support

In order to support more fluid user interface experiences, new states have been added to ItemsControl.  These new states: BeforeLoaded, Loaded and Unloaded help animate the transition of contents between states in an ItemsControl and provide a more interactive and “fluid” experience to the user.

^ back to top

Implicit theming for controls

Silverlight 4 introduces new styling features that allow you to create a style as a resource that can be used implicitly by all elements of a target type. This allows application developers to customize the look across multiple instances of a control and modify the appearance of these control instances by changing the implicit style.

Sample Code:

   1: <UserControl.Resources>
   2:     <Style TargetType="Button">
   3:         <Setter Property="Foreground" Value="Red" />
   4:         <Setter Property="FontSize" Value="24" />
   5:     </Style>
   6: </UserControl.Resources>

Would result in any <Button> element having a FontSize of 24 and red foreground text.

^ back to top

Google Chrome support

As browser markets evolve, so must we.  During this release cycle we will be officially providing support for the Google Chrome browser.  To date, Silverlight has generally worked in Chrome, but we’ll be adding Chrome to our official test/support matrix with this release.  We’ve had a working communication group with Chrome to ensure that any questions we’ve had to make sure Silverlight runs well within Chrome are answered.

^ back to top

Summary and Feedback

So there you have it.  Some new toys to play around with.  What do you think?  Please be sure that if you find any issues or compatibility with existing compiled Silverlight applications that you report them in the forum for Silverlight 4 beta.

There are a few other items in the build, so be sure to read the Silverlight 4 Beta information as well as the what’s new documentation and breaking changes documentation provided.

I’m very excited about this release and hope you are as well.  I can’t wait to see what you guys and gals do with these new features!


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


11/18/2009 11:22 AM | # re: Silverlight 4 Beta – A guide to the new features
Great post ! and congrats to you and team for yet another gr8 release :)
11/18/2009 11:28 AM | # re: Silverlight 4 Beta – A guide to the new features
Sweet! Props goes to the SL Team for the awesome new features!
11/18/2009 11:34 AM | # re: Silverlight 4 Beta – A guide to the new features
Many congrats to the team - amazing job in such a short space of time!
11/18/2009 11:35 AM | # re: Silverlight 4 Beta – A guide to the new features
Nice outline, Tim. Really looking forward to getting SL4 released as these features should increase our in-development SL game (but will be targeting SL3 for now).

However, at no time during the PDC keynote were the words "hardware acceleration". Going by all these flashy tech demos, is SL4 properly hardware accelerated yet (i.e. shaders on the graphics hardware not rendered on the CPU)?

11/18/2009 11:35 AM | # re: Silverlight 4 Beta – A guide to the new features
Tim,

This is an amazingly long list! However, a couple of my absolutely top features, RelativeSource Ancestor binding and MultiBinding aren't on your list. Are they not implemented in this release? Without these it is so much more difficult to develop applications in SL, compared with WPF.

...Stefan
11/18/2009 11:58 AM | # re: Silverlight 4 Beta – A guide to the new features
Never been this excited before as this new platform is blowing my mind. Congrats to the entire SL Team!

..Ben
11/18/2009 12:02 PM | # re: Silverlight 4 Beta – A guide to the new features
Tim,

Congratulations on the SL4 beta release. I watched Scott's keynote (via the excellent SL screencast) and came away very impressed! I'd like to get more details on a few topics if you have the answers...

1. trusted application... I assume a trusted SL app is trusted ONLY when it is running in OOB, right? If the same SL is running from the browser, even if the permission is elevated, it is not trusted?

2. Local file system access... if (1) is true, then there is still no way to access the local file system from the browser. Right?

3. JIT... Scott mentioned full WPF JIT, which is great news. Do you have more details about that? Is it automatically enabled? Some statistics as to how much faster?

4. Pixel shader... is there any enhancement to pixel shader, as in more GPU support, or better HLSL support?

5. Any news on SL mobile?

Thanks! Again, congrats to the SL teams!
11/18/2009 12:14 PM | # re: Silverlight 4 Beta – A guide to the new features
Thank you SO MUCH, I need nearly all of these features.
11/18/2009 12:20 PM | # re: Silverlight 4 Beta – A guide to the new features
Another excellent blog post. Thanks for pulling this all together for us, Tim.
11/18/2009 12:27 PM | # re: Silverlight 4 Beta – A guide to the new features
+1 for MultiBinding.
11/18/2009 12:30 PM | # re: Silverlight 4 Beta – A guide to the new features
Hi Tim,

I've also watched the Keynote via Smooth Streaming. Fantastic new Features. I'm glad to see all of these already in a beta version. Thanks for this great post.

11/18/2009 12:31 PM | # re: Silverlight 4 Beta – A guide to the new features
Amazing set of new features.
Finally RTL support!
11/18/2009 12:36 PM | # re: Silverlight 4 Beta – A guide to the new features
...COM interrop...
Silverlight dead!
11/18/2009 1:06 PM | # re: Silverlight 4 Beta – A guide to the new features
IE, Firefox, Safari, Chrome.... Where the **** is Opera??? :) I'm still waiting!

But I agree with others - nice long list! Thanks and congratulations!
11/18/2009 1:07 PM | # re: Silverlight 4 Beta – A guide to the new features
Just got done watching the keynote and reading this article. Silverlight 4 is looking really nice! Congrats to the team. I'm especially excited about improved performance, an even better OOB experience, proper right-click support(The little things are so nice!) UDP multicast, Webcam, and a handful of other things. Also, the Facebook demo given during the keynote looked absolutely great. Nice polish and presentation. You guys are doing a great job and put on a nice show.

However, as games are my primary focus, the presentation left me wondering two things:

1. What is the state of getting SL working on other platforms? And which platforms are those? I've heard talk in the past of work being done on mobile during the 2.0 days and it was hinted that WinMo would be first. I've also heard talk of SL support on XBox, but the details were vague and only mentioned advertisements. Let me cut to the chase. I'd love to be able to develop SL games for facebook and have them work on as many platforms as possible. Any info at all on this would be great to hear, regardless of whether it's good or bad news.

2. Is there any development going on with regards to true 3D support? As in 3D models ala WPF/XNA. Less important to me, but somewhat related, is if there's support for HW accelerated use of pixel shader effects.

Once again, great work to you and the team! I'm looking forward to digging into all the new features :)
11/18/2009 1:15 PM | # re: Silverlight 4 Beta – A guide to the new features
Very very cool features! Thanks!
11/18/2009 1:38 PM | # re: Silverlight 4 Beta – A guide to the new features
This will be a nice release!
Congrats!
11/18/2009 1:40 PM | # re: Silverlight 4 Beta – A guide to the new features
Very impressive list, congrats to the team!

Please work on the OOB elevated privileges warning and wording. That looks very scary for users. It should be more along the lines "Site XYZ is requesting to have elevated privileges. It can access personal data. Only install if you trust this site."

Keywords there being "is requesting", which implies I want access, if you let me vs. hey this might be dangerous.
Gravatar
11/18/2009 2:07 PM | # re: Silverlight 4 Beta – A guide to the new features
Does this line of development mean that Silverlight is going to replace WPF in the future...?
11/18/2009 2:25 PM | # re: Silverlight 4 Beta – A guide to the new features
Very excited!!! Great work Tim and the Team....
11/18/2009 2:28 PM | # re: Silverlight 4 Beta – A guide to the new features
How could silverlight replace WPF? One is browser plugin runtime, second is normal win app, so I think they can't concurent or replace each other.
11/18/2009 2:36 PM | # re: Silverlight 4 Beta – A guide to the new features
Thanks for the great writeup Tim.

Quick question: Are sockets in Silverlight 4 still limited to the port range 4502-4534 when used in elevated trust apps?
11/18/2009 2:54 PM | # re: Silverlight 4 Beta – A guide to the new features
Very impressive list. There are so many items on that list I can't wait to try out. I must say, a big grin was plastered over my face while reading through the extensive list of improvements.
11/18/2009 2:54 PM | # re: Silverlight 4 Beta – A guide to the new features
Congratulations to the Microsoft team, I'm impressed.
Many concepts involve the usability with the User were added.

The NotificationWindow, was footnote 10
Integration with Webcam and Microphone perfect
PrintAPI was something that many were waiting!

But I have to be sincere support for COM, it was fantastic!! very cool!

Again my congratulations, you are doing a fantastic job

Robson Fernandes
11/18/2009 4:58 PM | # re: Silverlight 4 Beta – A guide to the new features
Sweet, sweet, congratulation, this is more than what I was excepting. Thanks for this article. Rachida
11/18/2009 5:05 PM | # re: Silverlight 4 Beta – A guide to the new features
Hi Tim, a small correction: The Silverlight Media Framework does not have an Open Source license:

(F) Silverlight Platform - The licenses granted in sections 2(A) & 2(B) extend only to the software or derivative works that you create that run on Microsoft Silverlight or Novell’s Moonlight

http://opensource.org/docs/osd:

10. License Must Be Technology-Neutral
No provision of the license may be predicated on any individual technology or style of interface.
11/18/2009 5:27 PM | # re: Silverlight 4 Beta – A guide to the new features
Wow, awesome stuff! It's like Xmas, oh wait .....

Your work rate is phenomenal! Maybe the team should give the Windows Mobile guys a hand ;)
11/18/2009 6:15 PM | # re: Silverlight 4 Beta – A guide to the new features
How about 64-bit support. Any words on that?
11/18/2009 6:48 PM | # re: Silverlight 4 Beta – A guide to the new features
A great need for DataTable;
11/18/2009 7:48 PM | # re: Silverlight 4 Beta – A guide to the new features
Great work! Y'all really addressed the wish list well. the mike and video support will enable some very nice apps.
11/18/2009 8:05 PM | # re: Silverlight 4 Beta – A guide to the new features
Congratulations to the Silverlight Team
Gravatar
11/18/2009 8:17 PM | # re: Silverlight 4 Beta – A guide to the new features
Congratulations to the Silverlight team and to Tim for always being on time with latest news and updates! Silverlight has been one of the best Microsoft products in recent times.

Now, for the next task Tim - invest heavily into the mobile space with Silverlight 4! More videos on that please! :)

fyi - Your latest videos on Silverlight 4 are very good.
11/18/2009 11:18 PM | # re: Silverlight 4 Beta – A guide to the new features
WOW!!!!!!!! This is awesome. Thanks Tim. Silverlight team is doing great job. Finally we can compete Flash guys. Print and Webcam + Mic support is killer app.

Now if Office 2010 can make it popular and increase install base, we are all set to kill flash!
11/18/2009 11:53 PM | # re: Silverlight 4 Beta – A guide to the new features
Very impressive. No more reasons not to choose Silverlight for your next big LOB application.

By the way, when will we get the go live license for SL4?
11/19/2009 1:41 AM | # re: Silverlight 4 Beta – A guide to the new features
Thanks guys, you implemented my whole wishlist. Great job.

11/19/2009 2:14 AM | # re: Silverlight 4 Beta – A guide to the new features
Hi Tim,

Great post. Love the printing support. Will it also be possible to print pdf files using this API?
11/19/2009 3:14 AM | # re: Silverlight 4 Beta – A guide to the new features
Wow, that's a big list. It's all great stuff, the only trouble is that I feel like I'm running constantly into the wind trying to keep up with the rapid pace of advancement :(
11/19/2009 3:39 AM | # re: Silverlight 4 Beta – A guide to the new features
Great Work by SL team.
Thanks To Tim for this graet post.I think this will boost silverlight market.
Realy Helpful.
11/19/2009 6:02 AM | # re: Silverlight 4 Beta – A guide to the new features
1. Mobile
2. Still no masked textbox ?
11/19/2009 6:10 AM | # re: Silverlight 4 Beta – A guide to the new features
Great post with lots of resources. Great roadmap on how to develop with silverlight 4 from start to finish.
I'm a silverlight junkie. Do you have any openings for .net or silverlight?
11/19/2009 6:13 AM | # re: Silverlight 4 Beta – A guide to the new features
Where. The Hell. Is support for playing video back at 1.4x and faster speeds?
11/19/2009 6:13 AM | # re: Silverlight 4 Beta – A guide to the new features
Very nice. I can't wait for this.
11/19/2009 6:26 AM | # re: Silverlight 4 Beta – A guide to the new features
A very impressive list, great to see the SL team has implemented important features. Printing and webcam support are two especially important things IMO! Can't wait to see when SL4 will be rolled out to end users!
11/19/2009 6:27 AM | # re: Silverlight 4 Beta – A guide to the new features
All looks great, but one VERY IMPORTANT FEATURE IS MISSING. Missing feature is: TextOptions.TextFormattingMode="Display". Antialiased text is great at bigger sizes, but at smaller sizes looks very blurry and unreadable. WPF team realized this, and enabled GDI hinted fonts in WPF 4. Let us hope that, Sliverlight 4 enable this feature too.
11/19/2009 6:56 AM | # re: Silverlight 4 Beta – A guide to the new features
Great job Tim, can't wait to dive in and start using.The printing support is terrific everyone has been waiting for that one who developes business applications. So many cool features and needed items. Great job to everyone on the Silverlight team.
11/19/2009 7:02 AM | # re: Silverlight 4 Beta – A guide to the new features
Don't be so modest. You state at the top of the post that Silverlight 3 released a little more than a year ago. While that would be impressive too, the fact is Silverlight 2 released a year ago and Silverlight 3 was just released in July! And it's not even like these are little updates. I think there are officially more new features in SL 3 -> 4 than were in the last two versions of OSX!
11/19/2009 7:26 AM | # re: Silverlight 4 Beta – A guide to the new features
I'd like to know if any work was done to improve the memory footprint of Silverlight apps. With all the features added this is scary...
11/19/2009 8:31 AM | # re: Silverlight 4 Beta – A guide to the new features
First my congratulations,

But text rendering is a major issue, anything being done on that?

Thanks for ICommand support on ButtonBase, any plans extending it?

And RoutedEvents, where are RoutedEvents?

Imran Shaik
11/19/2009 9:29 AM | # re: Silverlight 4 Beta – A guide to the new features
WebBrowser is unfinished. We need this control, also when Sliverlight is placed on the html page (inside browser). For now, WebBrowser is available only when runnig by out-of-browser mode.
11/19/2009 9:33 AM | # re: Silverlight 4 Beta – A guide to the new features
with having the ability to interact with the local system resources (meaning the hd, COM, etc.)... does this mean that we will be looking at the potential of embedding the code objects needed to run Sql Compact via Silverlight? If so, that's going to be pretty sweet next year!!!!

Thx. for the update Tim.
11/19/2009 12:33 PM | # re: Silverlight 4 Beta – A guide to the new features
Great Work by SL team. It's amazing how fast you did this. I'm really glad to hear this, this gonna help a lot in my work.
Thanks for the great post Tim !!!

11/19/2009 1:07 PM | # re: Silverlight 4 Beta – A guide to the new features
Any word on a 64-bit client?? It is a major missing piece, and prevents Silverlight from being used for gadget use, among other things.

Also, that 64-bit IE browser would get a lot more use with better 64-bit plugin support.

PLEASE don't let another version of SL go by without 64-bit support! Any word if it is coming?
11/19/2009 4:10 PM | # re: Silverlight 4 Beta – A guide to the new features
Felix -- thanks for calling it out. I asked the team and there was a last minute change but they are looking to fix the licensing :-)
11/19/2009 4:11 PM | # re: Silverlight 4 Beta – A guide to the new features
Sven -- printing is the printing of a visual tree -- not the generation of a PDF or other type of file. If that is something you need, check out SmartPrint for Silverlight from a 3rd party.
11/19/2009 4:39 PM | # re: Silverlight 4 Beta – A guide to the new features
The idea that with one click, a silverlight app has access to read and write to MyDocuments, etc... ?

That is serious trouble. I hope this is not true.

11/19/2009 4:42 PM | # re: Silverlight 4 Beta – A guide to the new features
Steve -- it is not with one click and requires YOU, the user, to be fully aware that you are installing an application with elevated trust.
11/19/2009 5:28 PM | # re: Silverlight 4 Beta – A guide to the new features
Awesome stuff. I was losing interest, but I'm back! RichTextBox, clipboard API, COM Interop, WebBrowser control, and local file access add up to a good platform for corporate app UIs.
Gravatar
11/19/2009 6:15 PM | # re: Silverlight 4 Beta – A guide to the new features
Any idea whether the Expression Suite 3.0 will be upgradeable to support Silverlight 4? My company has purchased 2.0, then 3.0. Asking us to purchase 4.0 (instead of a free upgrade) would be a real kick in the teeth!

The rapid pace of development is great but it would be nice if Microsoft would spare us a third purchase in less than 2 years.
11/19/2009 11:56 PM | # re: Silverlight 4 Beta – A guide to the new features
What is the story with Active Directory integration? I am a LOB developer for a large construction engineering company. We think in terms of Single Sign On. I have it in WinForms, WPF, and ASP.NET, but not Silverlight.
11/20/2009 12:25 AM | # re: Silverlight 4 Beta – A guide to the new features
Thanks to the silverlight team for delivering great feature set with this release. Looking forward to get hands on with it. Silverlight is the FUTURE of application development.
11/20/2009 12:28 AM | # re: Silverlight 4 Beta – A guide to the new features
Hi, i'm confused with the current state of the framework
.net 4 vs silverlight 4

if i build .net application, can i use webCam and microphone that is exist on silverlight 4 ?

in other word, .net 4 can do all stuff silverlight 4 can do, but silverlight 4 can't do all .net 4 in term of its library support
11/20/2009 12:33 AM | # re: Silverlight 4 Beta – A guide to the new features
Hi,

really a great post!

Is there any way to run my development-computer with Silverlight 3 AND Silverlight 4 ?

Thanks,

Stone
11/20/2009 4:07 AM | # re: Silverlight 4 Beta – A guide to the new features
Wow! This is awesome. Finally mic and camera support. Great Job guys...
11/20/2009 4:40 AM | # re: Silverlight 4 Beta – A guide to the new features
Sockets still limited in 4.0? Anyone?
Gravatar
11/20/2009 7:22 AM | # re: Silverlight 4 Beta – A guide to the new features
Great new features! So let's talk about the SL5 feature list ;)
11/20/2009 8:01 AM | # re: Silverlight 4 Beta – A guide to the new features
Brian L - if your Silverlight applications is hosted in an ASPNET page that is using the AD authentication, then we use that authentication infromation.

Andrew -- you are correct. Silverlight is a subset of the full .NET Framework base class libraries (BCL). You do not have 100% of the BCLs available in Silverlight.

Stone -- yes, Visual Studio 2010 supports multi-targeting for SL3 and SL4

Pal - SL5?!!? We're not even done with SL4 yet :-)
11/20/2009 8:27 AM | # re: Silverlight 4 Beta – A guide to the new features
miafaszezazegeszbajed?
11/20/2009 8:28 AM | # re: Silverlight 4 Beta – A guide to the new features
kurvafasz
11/20/2009 10:10 AM | # re: Silverlight 4 Beta – A guide to the new features
I have to agree with the person above about the warning message for trusted apps. Instead of "This application can access your personal data and harm your computer", it might be better to state "this site is requesting access".

Microsoft might as well put "this application could go into your computer and steal all your financial information and then put you and your family out in the street. Use at your own risk!" :-)
11/20/2009 12:13 PM | # re: Silverlight 4 Beta – A guide to the new features
Thanks Tim. I appreciate it that you took the time to contact the Media Framework team.
11/20/2009 3:41 PM | # re: Silverlight 4 Beta – A guide to the new features
What about CLR support? Does 4 up the API to be closer to the full .Net framework? Or closer to CF? Closer to something that developers can actually test and build against? As a tool vendor I have to say that the lack of a tool to validate what API's are available makes all silverlight releases to date worthless. You can't build or validate against the API. We can test CF vs .Net builds. Give developers the tools to build reusable code against silverlight.
11/21/2009 10:34 AM | # re: Silverlight 4 Beta – A guide to the new features
Thank you so much, this is the most detailed outline I've seen so far! Great article and great job, thanks.
11/21/2009 1:19 PM | # re: Silverlight 4 Beta – A guide to the new features
Great future set Tim. I think font rendering also needs to be a priority. It would really helpful for develoment planning to know a more detailed estimate of final relase date for SL4. Is that possible this early on?
11/21/2009 1:39 PM | # re: Silverlight 4 Beta – A guide to the new features
Hi,

you speak about the new Silverlight 4 kiosk full-screen mode for trusted applications.
but, how do i turn a silverlight application to a trusted one ? (Full-trust ???)
i didn't find the information anywhere

thank you
11/21/2009 3:21 PM | # re: Silverlight 4 Beta – A guide to the new features
David -- the information is right above your comments in the post :-)
timheuer.com/.../...mplete-guide-new-features.aspx
11/22/2009 3:01 PM | # re: Silverlight 4 Beta – A guide to the new features
Mic support is great news! I currently have an app that is about to launch that is using a custom active-x control to provide mic support. I was planning on replacing the active-x control when SL4 came out, but I wasn't expecting SL4 this soon. Now I’m wondering if I should hold off on my products launch until SL4 has a go live license. Any hints at all about when that might be?
11/22/2009 3:24 PM | # re: Silverlight 4 Beta – A guide to the new features
Thanks for the RTL support. You are the best!
11/23/2009 9:44 AM | # re: Silverlight 4 Beta – A guide to the new features
Hi Tim,

Sorry, I saw the Project property used to enable the full trust just after i posted my question
Apart from my lack of reading, I'm literally a fan of this post

Thanks
11/23/2009 5:09 PM | # re: Silverlight 4 Beta – A guide to the new features

Great new features, it can't be under estimated how much these features will contribute to enterpise deployment. Right click and printing support is a great addition.
11/24/2009 11:25 AM | # re: Silverlight 4 Beta – A guide to the new features
Thanks, Tim! Been following this thread closely -- your work is much appreciated!

One question I have: Has the "XCP Hosting" model gotten any easier? I do a lot of Flash-control hosting in Windows apps, and Flash's ExternalInterface API, while it has its idiosyncrasies, is nice. I can't tell from the Silverlight 4 docs whether this has gotten any simpler. Any light you could shed?

Thanks again!
11/24/2009 11:42 AM | # re: Silverlight 4 Beta – A guide to the new features
Chris -- XCP (native SL hosting) is basically the same.
11/24/2009 6:28 PM | # Way to go!
These new features are almost the full set of the top requested features on the silverlight.net feature request thread for Silverlight 4!

Clearly you guys pay a lot of attention to what us developers want, and that does bring on the warm fuzzies.

A big thank you to the Silverlight team, and keep up the good work!
11/25/2009 1:54 PM | # re: Silverlight 4 Beta – A guide to the new features
It would be great to get some idea of font rendering improvements from SL3 to 4. I am still not happy with the rendering engine for smaller font sizes. In my case we can now consider hosting HTML inside of OOB which would provide us better readability for text-heavy portions of the app. However, I'd rather not go there, but it all just boils down to the quality of text rendering.
11/25/2009 3:45 PM | # re: Silverlight 4 Beta – A guide to the new features
Impressive! I'm amazed at the rate in which you all rolling out new features and updates to the silverlight platform.
11/25/2009 11:02 PM | # re: Silverlight 4 Beta – A guide to the new features

This is really a gr8 article. Why so many versions in too less time?
11/26/2009 6:32 AM | # re: Silverlight 4 Beta – A guide to the new features
That's kind!

But, when i could sign documents with certificates of my machine?

Now I'm forced to use applets, but mix technologies is ugly.

Regards.
11/28/2009 11:18 PM | # re: Silverlight 4 Beta – A guide to the new features
Hi Tim,

Congratulation with the new release!

I've been watching the progress of Silverlight development from the beginning (I remember it was a video post with a guy walking with the mac notebook inside Microsoft campus telling people that he has OSX installed on it...). It is a very cool technology which is now can be used in full by many developers to create real business applications. However, one very important thing is missing. And it is not about how many great controls are there, but about what would be the future trend for web applications:

Look at all the hype regarding Chrome OS and HTML5. Why is that??? The answer is simple - people need cool, but simple applications. There is only one way to see this kind of applications on Silverlight - enable direct "DirectCanvas/Surface" drawing, buy-passing the Visual Tree or even make an additional element (say DirectCanvas) that could be put anywhere in the Visual Tree. This element needs only a few drawing and text measuring methods (e.g SetFont, SetBrush, DrawLine, MeasureString, ets - similar to GDI+ but with less functionality.)

Combining this DirectCanvas with .NET Languages would be a real blast! People would be able to switch from HTML5 with "crippled" JavaScript (i'm not against Java Script and did a lot of projects on it, but would really prefer to code in a strict type language like C#) to Silverlight with .NET CLI.

The outcome would be very significant: one day you'll see Photoshop or CorelDraw or AutoCad in the web. I'm not saying how many modern and innovative application would rise from it. Just think a little bit out of the box and the main trend.

You can also make a simple support in XAML for that element, but it is not really necessary. I'm pretty sure that you already have everything that is required for this feature - just make it open for developers.

You can freely contact me if you have any questions.

Thank You,
Victor




11/30/2009 8:42 AM | # re: Silverlight 4 Beta – A guide to the new features
Hi Tim,

First of all, thanks so much, Microsoft! This release is great!

Now the question. I played with out-of-browser instalation and did not find anything to allow programatically "unistall" application (same as in SL3). But since now right-click menu can be customized there is probably a scenario than you cannot uninstall an OOB application otherwise than from Control Panel.

Is it true or I missed something?

Thank you, Oleg

11/30/2009 9:58 AM | # re: Silverlight 4 Beta – A guide to the new features
Update: I will post my question in SL forum. Sorry, I did not notice your feedback notion at the end of the article. Thank you, Oleg.
11/30/2009 9:58 AM | # re: Silverlight 4 Beta – A guide to the new features
Oleg -- correct, there is no API to Uninstall. Applications can be removed by right-clicking and choosing remove, or from Control Panel (on Windows)
12/1/2009 7:07 AM | # re: Silverlight 4 Beta – A guide to the new features
Thank you MS for fixing so many of the small but annoying limitations in Silverlight. You've actually made a lot of the work I recently did redundant, but its fantastic to see you are listening to the community. Great job! And a very big thanks for the Web Browser control, that could not have been trivial work in such a short time.
12/1/2009 10:59 AM | # re: Silverlight 4 Beta – A guide to the new features
WebCam support. The webcam/mic sample was great and it's good to see this functionality being included in SL. We are developing a client application and need further guidance on how to: 1) Save a video file (A&V) 2) Stream A&V directly over the net. There have been a number of questions relating to this on sl.net forums, but no answers. Can we possibly get some further examples and/or guidance so we can continue on this portion of the application.

Thanks in Advance...Steve
12/1/2009 9:41 PM | # re: Silverlight 4 Beta – A guide to the new features
Hi Tim,

With the addition of Silverlight applications being able to be drop targets, does Silverlight 4 have any other drag and drop behaviors built in to make dragging and dropping easier within a Silverlight application? I know this is possible with Silverlight 3, but I am just curious if anything has been added to the framework to make this easier.

Thanks
Bob
12/1/2009 10:27 PM | # re: Silverlight 4 Beta – A guide to the new features
Robert -- nothing specifically other than what the toolkit added in October release (which is in November as well)
12/8/2009 4:17 AM | # re: Silverlight 4 Beta – A guide to the new features
Hi,

I was trying to access LocalFile System using SL4.0 but still I am getting security error around this. I am trying to follow your video and blog for the same. so it have elavated permssion settings. as soon as I reach ' Directory.EnumerateFiles(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));' I get security error + I have two queries
Can I access only 'My' folder not all folders like c:\, d:\ etc?
can I excute this from silverlight web part?
Thanks
Ruchi
12/8/2009 6:57 AM | # re: Silverlight 4 Beta – A guide to the new features
Ruchi -- yes you can only access the "my" folder areas per the documentation.

no, this would not work in a web part because in order to access the local file system it needs to be a trusted application (elevated permissions and out-of-browser).
12/9/2009 9:25 PM | # re: Silverlight 4 Beta – A guide to the new features
Hi,
Nice post.
In the picture for rich text area control sample i think you provided option sub script,superscript.
Please let me know how we can achieve this(sample code)
Does rich text area supports bullets???
Please let me know
Thanks,
Ajai
12/11/2009 4:37 PM | # re: Silverlight 4 Beta – A guide to the new features
No report viewer?
12/12/2009 1:26 AM | # re: Silverlight 4 Beta – A guide to the new features
Thanks Tim,
I feel that yours is the only blog where I get all the information about new release of silverlight. Thanks for putting all the content at one place...
12/16/2009 12:18 AM | # re: Silverlight 4 Beta – A guide to the new features
Hi,
Great work.Congratulation.I have installed Microsoft visual web developer 2010 beta 2 with silverlight4.I also have already installed silverlight3 with vs2008.I created a silverlight4 business application project.It runs well but when i opened app.xaml or errorwindow.xaml , an error comes up which says - undefined clr- namespace. The 'clr-namespace' URI refers to a namespace 'myProject.Resources' that is not included in the assembly.I don't know how to solve the problem.Please help me.
Thanks
Gravatar
12/18/2009 7:37 AM | # re: Silverlight 4 Beta – A guide to the new features
Hi Tim,

To follow-up on a few of the other posts, any plans to improve text rendering in SL4?

Al
12/21/2009 11:58 PM | # re: Silverlight 4 Beta – A guide to the new features
the new release sounds exciting, but what I still find missing here is the built-in support for double click event. how about that?

best regards
Gravatar
1/2/2010 7:55 AM | # re: Silverlight 4 Beta – A guide to the new features
Is there a way to make the chrome transparent for the OOB Silverlight 4 applications? ie i want its to be chromeless that way I can have custome shapes? That will kick Adobe Air apps.
1/3/2010 3:34 AM | # re: Silverlight 4 Beta – A guide to the new features
Hi Tim,
The upgrade mechanism for silverlight is a cause of concern for me. I had an application written in SL2 which I was preparing to put live at the time that SL3 was officially believed. For whatever reason the backward compatibility in SL3 didn't like my app and I had to delay launch while I updated my app to be compiled properly for SL3. I didn't know the release date for SL3 and I didn't realise at the time that this was the approach that would be taken - that silverlight clients would be automatically updated to sl3.
I haven't seen a lot of whinging on the subject so I can only assume I was alone with that problem, maybe it was my fault for not looking in the right places for information, but I have another release of the product to do and I'm guessing its going to be around the time of the SL4 release (maybe!). Do you have any information or advice on what I can do to protect myself against such delays?
Thanks, and I enjoy your blog very much :)
Rob
1/10/2010 2:28 PM | # re: Silverlight 4 Beta – A guide to the new features
I recently installed VS2010 Beta2 and all the Silverlight 4 software (including the toolkit.) Only the basic tools appear in the tollbox. I have reinstalled the SL4 toolkit a couple of more times. The SL4 tools never appear.
When I try to add through right-click on the toolkit, I can't find the Systems.Controls.Toolkit.dll (have searched the entire drive and can't find.)
Do I have to install earlier versions of the toolkit first?
1/14/2010 11:42 PM | # re: Silverlight 4 Beta – A guide to the new features
excellent article!
Gravatar
1/18/2010 11:26 PM | # re: Silverlight 4 Beta – A guide to the new features
Hi sir,

I have to play Flash movie on the silverlight 4.How can i do this?
1/21/2010 6:30 PM | # re: Silverlight 4 Beta – A guide to the new features
Tim

I have a rather unorthodox problem. I need to create an agL:ight 4 out of browser application featuring multiple windows that can be moved independently within the real estate of my monitiors (between 1 and 4 not always rectangular construct) but outside of a single browser frame. Think of an OS desktop - I too need to create a toolbar, and a widget bar, and launch a calculator that I should be able to move outside the IE and live on my 4th monitor, while my second displays a grid. Currently I'm thinking mulptiple out of browser applications with a good cross-domain policy, that will allow for easy data interaction. Please let me know if this is at all doable, and if it is - what is the "best" way to do it. Any sample will be more than greately appreciated.

Thanks
Vadim
1/27/2010 2:24 AM | # re: Silverlight 4 Beta – A guide to the new features
excellent article! Great job & Congrats.

-Nag.
1/28/2010 3:35 AM | # re: Silverlight 4 Beta – A guide to the new features
Is there a way to make the chrome transparent for the OOB Silverlight 4 applications? ie i want its to be chromeless that way I can have custome shapes? That will kick Adobe Air apps.
1/28/2010 6:49 AM | # re: Silverlight 4 Beta – A guide to the new features
Chromeless won't be available until release.
1/28/2010 8:03 AM | # re: Silverlight 4 Beta – A guide to the new features
I created a datagrid using silverlight with a lot of records and I tried to print it but it only prints only upto certain level of data. The remaining records is missing in the print copy and the datagrid is detached from the visual tree even after I tried giving height max of 2000. Anyone knows how to resolve this issue?

Thanks
2/12/2010 3:10 AM | # re: Silverlight 4 Beta – A guide to the new features
Does Silverlight 4 support C#2010?
2/12/2010 7:10 AM | # re: Silverlight 4 Beta – A guide to the new features
Aprit -- yes, Silverlight 4 supports CLR 4 and everything it brings :-)
2/16/2010 1:51 AM | # re: Silverlight 4 Beta – A guide to the new features
Hi Tim,
I'm following the printing example but I'm struggling to print a TreeView control if it has not been added to the UI. Basically I instantiate a new TreeView and set it's DataContext but when it prints the nodes are collapsed. I've tried calling the ExpandAll() extension method but it seems that the Items are empty, is there something else I need to do before sending the Control to the printer?
2/16/2010 10:59 PM | # re: Silverlight 4 Beta – A guide to the new features
mmm, I think I solved the TreeView problem by inheriting the standard TreeView and doing a ExpandAll()in my LayoutUpdated event handler, is that the best way?

Another problem I have is trying to print a control that is already in the visual tree. First problem is I cannot add it to a border control (for decoration) as it is already contained by another control, and if it is broader than the Page width I cannot get it to stay within the bounds of the page. To try to limit the Width I do a 'printControl.MaxWidth = args.PrintableArea.Width * 0.95;' statement in the 'printDocument.PrintPage' event, but it seems to be fruitless, is there another way to achieve this?
2/18/2010 5:29 PM | # re: Silverlight 4 Beta – A guide to the new features
This is awesome! Love the new feature set!!!
2/19/2010 10:42 PM | # re: Silverlight 4 Beta – A guide to the new features
Excellent list. Keep up the good work!!!
Gravatar
2/25/2010 10:44 AM | # re: Silverlight 4 Beta – A guide to the new features
I do like all the neat features being added, but adding more and more will kind of defeat the purpose of it being a usable plugin as it gets larger and larger.. hmm - faster internet!
3/16/2010 1:24 PM | # re: Silverlight 4 Beta – A guide to the new features
Has anyone heard anything about accessibility in this release? Any pointers to articles/blog posts? (not the old one's in CODE magazine, please). Or, even better, examples in the wild--not code examples, but working examples of apps or even just basic UI elements that any old joe with a screen reader can test out....
3/23/2010 2:01 AM | # re: Silverlight 4 Beta – A guide to the new features
Tim,

Impressive list. Thank you for doing a great job keeping us all informed.

Quick feature question: Will binding text to a Run tag ever be supported? I find that quite often I need to bind to individually styled portions of a small block of text, and the only solution is through placing individual TextBlocks within a StackPanel. This prevents any TextWrapping, and so any stylized "Label: Value" scenarios can never have wrapping text.

Any thoughts? I'd love it if I could do this! Thank you.
3/23/2010 4:26 PM | # re: Silverlight 4 Beta – A guide to the new features
Ken (Accessibility) -- See Mark's presentation: http://live.visitmix.com/MIX10/Sessions/CL51
3/24/2010 9:28 PM | # re: Silverlight 4 Beta – A guide to the new features
Sambodh -- that message usually means a corrupt download.
3/26/2010 3:55 PM | # re: Silverlight 4 Beta – A guide to the new features
Will Printing be available in Out of Browser Silverlight 4 Apps?
4/8/2010 3:14 AM | # re: Silverlight 4 Beta – A guide to the new features
Hi..
I want to congratulate all the team of Silverlight of their SL V4 release..it was very hard job!
I wanted also to communicate my concerns about a development of an internship project graduation .. in fact, I am a new dev in Silverlight & .Net Community.
My project is to develop a Silverlight application allows persons to register a video with a webcam, personalize this video by adding logos, names.., and the most important is to make a cutting / editing to this video in fact to remove some sequences which one is not happy of them!
Finally, we must pass the video on a server by streaming.
Well, I do not know where can I achieve in this project, in dependency of Silverlight's services!
I have been able to visualize the flow emits by webcam in a Silverlight application, ansi to capture image from that stream, and now is the turn to record a video!
I would appreciate you give me directions,..links that can help me..I will be very grateful for your help!
Thank you,
4/23/2010 7:29 AM | # re: Silverlight 4 Beta – A guide to the new features
When a user does not have silverlight installed, it redirects to a microsoft page that invites you to download silverlight.
My question is... How can I redirect users to my own page with no silverlight controls if they do not have silverlight installed. I want something better than just a little box offering the silverlight download.

This way I dont deadend my users with no silverlight.

Thanks

Tony
4/23/2010 7:31 AM | # re: Silverlight 4 Beta – A guide to the new features
Tony -- it doesn't automatically direct users, you are in complete control of the alternate HTML -- in the <object> tag of your silverlight plugin simply put the alternate HTML you want (or the code to redirect to an alternate experience).
5/6/2010 10:45 AM | # re: Silverlight 4 Beta – A guide to the new features
awesome useful content. A great kick start to silverlight 4
5/15/2010 10:27 AM | # re: Silverlight 4 Beta – A guide to the new features
Althouht Silverlight has a lot of great features, sometimes I think is very hard for differents cultures to addopt it. For example, here in Brazil people just love Adobe flash and it´s adoption is very large, while silverlight has a little participation in the market. I tried to use it on my desentupidora site, but a lot of people don´t want to install the extenion for silverlight.

Do you have any idea or infos about it?
5/17/2010 2:14 PM | # re: Silverlight 4 Beta – A guide to the new features
Hi, we are re-doing our C++/Coco project with silverlight 4 now. It's pretty cool this beta has so many new features otherise we will have to use Flex because of some restriction.

We basically decide to go with Prism framework. I'm doing some investigation about z-order and wondering if it's possible to control z-order and transparency of overlap regions?

Thanks a lot

Vivi
6/20/2010 10:33 AM | # flow direction
Hello,
SL 4 right to left support is great. But it has problem with Popups which contain ComboBoxes. Plz check it.
Thanks a lot.
7/28/2010 12:16 PM | # 
Great article.. thanks (:
8/23/2010 2:37 PM | # re: Silverlight 4 Beta – A guide to the new features
No covariant interfaces distributed with this RC? Total fail imo.
9/18/2010 11:58 PM | # re: Silverlight 4 Beta – A guide to the new features
Okay, so now Adobe does 64 bitness (albeit in beta.) So, where is the 64 bitness of Silverlight?
9/21/2010 8:40 PM | # re: Silverlight 4 Beta – A guide to the new features
Great article. I will wait for another article from you. Thanks for sharing your information to us. I like silverlight very much. http://www.silverlighthostingnews.com/, this blog has many information about silverlight too.
10/9/2010 5:07 PM | # re: Silverlight 4 Beta – A guide to the new features
Has anyone figured it out how to work with this damn thing on IE7?
10/20/2010 7:50 PM | # re: Silverlight 4 Beta – A guide to the new features
Nice article. Very great and very interesting. Wait another great guide from you.

Regards,


Clark (http://www.asphostportal.com)
10/27/2010 7:36 AM | # re: Silverlight 4 Beta – A guide to the new features
You have covered almost everything under one roof.
No need to refer elsewhere.

Good Article...

Thx!!
11/10/2010 12:14 PM | # re: Silverlight 4 Beta – A guide to the new features
Hi Tim

I tried a new install of the silverlight 4.0 and ran into this problem:
http://forums.silverlight.net/forums/t/204591.aspx

I am not able to get past the issue and use my visual studio xaml designer... please see if you can throw some light on the discussion.

Thanks
11/12/2010 2:35 AM | # re: Silverlight 4 Beta – A guide to the new features
I am new to silverlight and learning it myself through blogs like yours and other tutorials. Thanks, you always seem to help. I hope to be someday as good as you. wholesale jewelry
11/22/2010 4:38 AM | # re: Silverlight 4 Beta – A guide to the new features
Wonderful and thanks a lot. Your work has always been helpful for me and my friends and we really like to hang around here to learn. My first ventures into SL development were here. I have SL4 and I love it. Much better release. URLdreamer affiliate
12/1/2010 7:25 AM | # re: Silverlight 4 Beta – A guide to the new features
Thanks really for wonderful little post. To the above I must say that I miss opera too, but they are lacking because of the development of these other cool browsers. Anyways, I'm new to this and have just installed SL 4. You really help me out by your posts and tutorials. Thanks really. website development
12/20/2010 5:08 AM | # re: Silverlight 4 Beta – A guide to the new features
I certainly enjoyed the way you explore your experience and knowledge of the subject! Keep up on it. Thanks for sharing the info
Great share...70-649 70-653 70-662 gave my ccna exam today..got vtp,acceslist n eigrp...had problems wen doing acc list, after configuring the commands correctly when opening the web browser frm all the hosts to cross check, it was giving access frm all the host, then again reconfigured the acl second time still facing the same issue...commands wer alrite ,thn saved config and quit...got
12/22/2010 12:00 AM | # re: Silverlight 4 Beta – A guide to the new features
I certainly enjoyed the way you explore your experience and knowledge of the subject! Keep up on it. Thanks for sharing the info
continue dude
testking 640-553
testking CISA
testking 1Y0-A05
testking 350-029
testking HP0-S27
testking 70-647
testking 642-873
2/19/2011 7:19 AM | # MarinaLia
In making a CV, the most important thing is you have to be honest in giving the information that you want to put in your CV. You absolutely cannot manipulate your CV. If the employer knew that you're giving false information in your CV, then probably you will not he the job you want. san jose domestic violence attorney
2/24/2011 9:29 PM | # re: Silverlight 4 Beta – A guide to the new features
One thing I'm really encouraged by in SL4 is MS's opening the door to calling native Windows through COM (only in elevated trust OOB-installed SL4 apps). They demoed talking to locally installed Office apps like Excel, but the possibilities are much wider than that. Provided you also create and install a helper ActiveX or program that exposes those services to your SL4 app through COM, you can apparently call any Windows API or talk to any device!

It seems SL4 has expanded from just a web-oriented UI technology to become a viable general-purpose UI technology.
=========================================
cheap hamilton watches
3/5/2011 12:50 PM | # re: Silverlight 4 Beta – A guide to the new features
BTW that full-screen pinning mode is a HUGE win for the application we are developing. värdera bostad
5/12/2011 10:53 PM | # RepsaLap
I saw that, you use the serial number to write the article. But what if, sequence number, it can no longer be in use, because it has run out? What you will do as a solution and way out of problems that will arise that? Criminal Defense Lawyers Santa Ana
6/28/2011 9:30 PM | # re: Silverlight 4 Beta – A guide to the new features
There are some criteria for which I think we should be more transparent that what we already do now. These should have been made into public so the audiences are clear on what based the winners picked up. afghan chat
7/21/2011 3:25 AM | # DopanLora
This will give us some required information from the other side of the story. This is going to be very informative in one way or another. I am sure we all would appreciate this as well. BragCafe: One stop to share read and comment on the incredulous absurdity of life. Reveal outrageous bragging of our idols.

7/27/2011 11:35 PM | # re: Silverlight 4 Beta – A guide to the new features
ohh man this is awesome post. you know this is great working by the writer.The writer has done a great job in speniding his time in1z0-050 dumps|research about this article. can i subscribe all his posts ?I am really happy to read this. i was searchi70-270 dumps|g this from last two months and atlast i got it. hurrah..!!
7/28/2011 10:07 AM | # re: Silverlight 4 Beta – A guide to the new features
There are many people who have been there using many earlier version of computer chess programs would surely be able to learn many thing related with the programs. I am sure this is something that is going to be done in many ways.
Abilene Roofing Contractors
8/25/2011 7:53 AM | # re: Silverlight 4 Beta – A guide to the new features
Looking for help from anyone here....

I installed SL4 a month ago and have had intermittent problems. Something recently caused my VS2010 to be unable to open up the xaml designer. I traced the culprit to 4.0.60531.0 system.windows.dll. I could roll back but I've used the TextTrimming to great effect and would like to keep using it.

Just to clarify: I can build and run, I just can't view xaml.
8/25/2011 7:58 AM | # re: Silverlight 4 Beta – A guide to the new features
Sorry, a correction and a solution (it would seem). 4.0.60531.0 is a version that doesn't crash. Somehow I had version 4.0.50826.0 in the GAC.
9/14/2011 5:33 AM | # re: Silverlight 4 Beta – A guide to the new features
I read all comments and i saw that timheuer is one of best site.
Cosmetica
10/11/2011 1:56 PM | # re: Silverlight 4 Beta – A guide to the new features
Couldn't agree with you more fare...

 
Please add 5 and 7 and type the answer here:

DISCLAIMER:

The opinions/content expressed on this blog are provided "ASIS" with no warranties and are my own personal opinions/content (unless otherwise noted) and do not represent my employer's view in any way.