How style works with Silverlight?

 Posted by Sumank on 5/10/2013 | Category: Silverlight Interview questions | Views: 1231 | Points: 40
Answer:

Style is collection of property value that apply to an element. First define the style in

App.xaml.

<Application.Resource>
<Style x:key="MyButton" TargetType="Button">
<Setter Property="FontFamily" Value="Verdana" />
<Setter Property="FontSize" Value="36" />
</Style>
</Application.Resource>

Apply style to Button.
<Button Style="{StaticResource MyButton}" Content="My Button" ></Button>


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response