HOW CAN STYLE ELEMENTS BE APPLIED? (SIMILAR TO A CSS FILE/SKINS)

Amit Singh

Total Post:0

Points:0
Posted by  Amit Singh
 1557  View(s)
Ratings:
Rate this:
  1. Amit Singh

    Post:562

    Points:2810
    How can style elements be applied? (similar to a CSS file/skins)

    Styles elements are supported in the form of application resources. An app.xaml file can be created containing an application resource Xml construct. The target type for each style is set to the control on which the style needs to be applied.

    App.xaml:

    <Application.Resource> 
    <Style x:Key="MyBorder" TargetType="Border">
    <setter property="width" value="5">
    </style>

    Page.xaml:
    <Border Style="{StaticResource MyBorder}"> 
    ...
    </Border>

      Modified On Mar-26-2018 06:28:09 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!