silverlight background


  •  Hi Experts,

             I want to do shaded background ,same like website.Whether it is possible in xaml or not ?

              If possible , please give me some example......Thanks in advance


    Wednesday, November 04, 2009 4:40 AM

All replies

  • I am using a Gradient effect.  This is in my MainPage.XAML:


    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

    <GradientStop Color="LightGray" Offset="0"/>

    <GradientStop Color="White" Offset="1"/>



    Wednesday, November 04, 2009 4:51 AM
  • I dont want ordinary background........I want below like background in xaml
    Wednesday, November 04, 2009 5:07 AM
  • <!-- Logo Icon Style -->

    <Style x:Key="LogoIcon" TargetType="ContentControl">

    <Setter Property="Height" Value="24"/>

    <Setter Property="Width" Value="24"/>

    <Setter Property="Margin" Value="0,1,10,0"/>

    <Setter Property="Template">


    <ControlTemplate TargetType="ContentControl">


    <Image Margin="2.475,-1.815,2.475,8" Source="/YourImage.png" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto">





    <RotateTransform />










    In your XAML, add a ContentControl:

    <ContentControl Style="{StaticResource LogoIcon}" Height="705.987" Margin="630,0,10,-734.345" Width="276.15" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" VerticalAlignment="Bottom">





    <RotateTransform />





    Obviously the Height, widths etc. will need to change.  I originally used Expression Blend 3 to load this image.

    Wednesday, November 04, 2009 5:11 AM
  • sorry ardman, 

         I want that kind of shades in pure xaml , i dont want image as background.Plz any  samples or examples  .....

    Wednesday, November 04, 2009 5:32 AM
  • Hi,

    Just a thought. I usually make use of Microsoft Expression Design Tool for design purpose and then export that design in Silverlight XAML. Check if this helps you or not.



    "Please mark as answered, if this answers your question"

    Wednesday, November 04, 2009 6:03 AM