(X) Hide this Upcoming webinar by Brian Noyes: Querying and Updating Data From Silverlight Clients with WCF RIA Services. February 2nd, 10 am PST (see your local time)
Full webinar info | Register | Read WCF RIA Services Article series by Brian Noyes
Become a member to receive all webinar news by email, or follow all webinar news on Twitter | Facebook | LinkedIn
Skip Navigation LinksHome / Tips


Items Resolution

  • 10 comments  /  posted by  sam  on  Mar 24, 2010 (10 months ago)

     Sample RSS Feed application using Windows Phone 7 Series SDK.

    Shows RSS feed title list from http://www.visitmix.com/RSS 

    Article details showed in WebBrowser control based on user selection in the list.

     RSS app code 


  • 5 comments  /  posted by  Nikolay Raychev  on  Apr 02, 2009 (more than a year ago)
    Silverlight 3 comes with two built in Pixel Shaders:

    We have the following image:

    We want to blur it:

    <Image Width="300"   
            <BlurEffect Radius="8"></BlurEffect>

    We have the following result:

    Note the Radius parameter.
  • 4 comments  /  posted by  Nikolay Raychev  on  Apr 02, 2009 (more than a year ago)
    In Silverlight 3 you can make multiple selections in a ListBox. You just need to set the SelectionMode parameter:

    <ListBox Margin="5" x:Name="lbTasks"   
        ItemsSource="{Binding Tasks, ElementName=MainPageView}"   
                <StackPanel Orientation="Horizontal" Margin="2">  
                    <TextBlock FontWeight="Bold" FontSize="13"   
                        Foreground="#ff006882" Text="{Binding Text}">  

    You have 3 options for the SelectionMode:
    • Single - you can select only one item.
  • 2 comments  /  posted by  Nikolay Raychev  on  Mar 25, 2009 (more than a year ago)
    It's very easy to style the caret in Silverlight 3. Look at that huge TextBox with a caret in the rainbow colors:

    You just need to set the CaretBrush property:

    <TextBox FontSize="50" Width="100" Height="80">  
            <ScaleTransform ScaleX="6" ScaleY="1"/>  
            <LinearGradientBrush x:Name="backgroundLinearGradientBrush"
                    StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Color="Red" Offset="0" />
                    <GradientStop Color="Orange" Offset="0.167" />
                    <GradientStop Color="Yellow" Offset="0.333" />
                    <GradientStop Color="Green" Offset="0.5"/>
                    <GradientStop Color="Blue" Offset="0.667" />
                    <GradientStop Color="Indigo" Offset="0.833" />
                    <GradientStop Color="Violet" Offset="1" />

    You can use any Silverlight supported Brush.
  • 3 comments  /  posted by  Emil Stoychev  on  Mar 23, 2009 (more than a year ago)

    Silverlight 3 enables property binding to CLR objects and other UI components via XAML – UI to UI binding. It is useful in a lot of scenarios and saves time for both developers and designers.


    Download source code


    {Binding Value, ElementName=MySlider}

    where Value is property of a CLR object and MySlider is the name of this object

    Hope that helps!

  • 11 comments  /  posted by  Emil Stoychev  on  Mar 23, 2009 (more than a year ago)

    Like in CSS you can now cascade styles in Silverlight 3 too. You can append and/or override values by basing one style on another. In this way you can built a powerful and reusable set of styles to apply in your Silverlight applications.


    Style cascading is accomplished by using the new BasedOn attribute of the Style class.

       1: <Style x:Name="Headline" TargetType="TextBlock">
       2:     <Setter Property="FontFamily" Value="Verdana" />
       3:     <Setter Property="FontSize" Value="14" />
       4: </Style>
       5: <Style x:Name="ImportantHeadline" TargetType="TextBlock" 
       6:     BasedOn="{StaticResource Headline}">
       7:     <Setter Property="Foreground" Value="Red" />
       8: </Style>        
       9: <Style x:Name="HomePageHeadline" TargetType="TextBlock" 
      10:     BasedOn="{StaticResource Headline}">
      11:     <Setter Property="FontSize" Value="18" />
      12: </Style>

    Here we have a base style Headline that targets TextBlock elements and defines values for FontFamily and FontSize.

  • 6 comments  /  posted by  Nikolay Raychev  on  Mar 19, 2009 (more than a year ago)

    In Silverlight 3 you are able to check if an internet connection is present. You can also detect network changes.

    See also:
    Silverlight 3 as a Desktop Application (Out-of-Browser Applications)

    Network availability checking:

    if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable())  

    Network change detection:

    NetworkChange.NetworkAddressChanged += new 


    private void NetworkChangedCallback(object sender, EventArgs e)  
        if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable())  


  • 6 comments  /  posted by  Martin Mihaylov  on  Nov 28, 2008 (more than a year ago)

    Have you ever noticed that the MouseLeftButtonDown and MouseLeftButtonUp events are not fired when a Silverlight button is clicked? The reason for this is that the button handles these two events itself by overriding the OnMouseLeftButtonDown  and the OnMouseLeftButtonUp  handlers. In the OnMouseLeftButtonDown  override the Click event is raised and the MouseLeftButtonDown event is marked as handled so it couldn't bubble in the visual tree. The OnMouseLeftButtonUp  override also marks the MouseLeftButtonUp  as handled.

  • 0 comments  /  posted by  Martin Mihaylov  on  Nov 28, 2008 (more than a year ago)

    When using the object element to display our Silverlight application, we can use parameters to configure it (source, onerror, background, minRuntimeVersion and etc.):

    <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
        <param name="source" value="ClientBin/Issues.xap"/>
        <param name="onerror" value="onSilverlightError" />
        <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"/>

    Some of them are predefined in the automatically created TestPages, but we can also add additional parameters like initParams, onload and etc.

  • Tip: What is the difference between styling and skinning

    0 comments  /  posted by  Ivan Dragoev  on  Nov 14, 2008 (more than a year ago)
    Styling control means to apply to the control's properties predefined in the style values. Styling deals mainly with properties like Foreground, BackgroundFontStyle and FontSize, etc.
    Skinning, on the other hand, allows you to build your own presentation for that control by defining control template. Thus, you are able to completely replace the standard presentation with another, which includes more visual elements, animations and other effects.
    That's it!