Creating styles in Silverlight


A simple example for setting styles in silverlight.
In silverlight we create styles in app.xaml

<Application.Resources>
        <Style x:Key="TitleBorder" TargetType="Border">
            <Setter Property="CornerRadius" Value="10"/>
            <Setter Property="Background" Value="#FFDEDEDE"/>
            <Setter Property="Margin" Value="0,0,5,0"/>
        </Style>
</Application.Resources>


In xaml where you want to apply the style,

<Border Style="{StaticResource TitleBorder}">
<TextBlock Text="SEARCH"/>
</Border>