Intersoft ClientUI 8 > ClientUI Controls > Control Library > UI Controls Overview > StylishLabel > How-to: Customize Label Appearance in StylishLabel |
This example shows how to customize label appearance in StylishLabel using Style.
Style could be considered as a convenient way to apply a set of property values to more than one element. For example, if you want your StylishLabel elements to share some properties, you can create a Style in the Resources section of your XAML file as demonstrated in the code below.
For more information about Style, see Styles and Templates Overview.
XAML |
Copy Code
|
---|---|
<Intersoft:UXPage.Resources> <Style TargetType="Intersoft:StylishLabel"> <Setter Property="ImageSource" Value="/ClientUIApp1;component/images/Home.png" /> <Setter Property="ContentType" Value="ContentAndImage" /> <Setter Property="CornerRadius" Value="4" /> <Setter Property="Background" Value="Black" /> <Setter Property="Foreground" Value="White" /> </Style> </Intersoft:UXPage.Resources> <StackPanel x:Name="LayoutRoot"> <Intersoft:StylishLabel Content="Custom Stylish Label"/> <Intersoft:StylishLabel Content="Custom Stylish Label 1"/> </StackPanel> |