Learning UWP XAML

UWP XAML

Formatting text:

<Run> is an inline TextBlock Property and it can be used to format plain texts within the textblock like so:

<TextBlock Name="myText" TextWrapping="Wrap">
    This plain text is
    <Run FontStyle="Italic" Text="now formatted"/>
</TextBlock>

Resources:

Resources limited to a specific page should go just before defining the main Grid/StackPanel like so:

<Page.Resources>
    <Style TargetType="ControlName">
        <Setter Property="PropertyName" Value="PropertyValue" />
        <Setter Property="AnotherPropertyName" Value="AnotherPropertyValue" />
    </Style>
</Page.Resources>

Resources can also be created inside certain context like a StackPanel/Grid by using Grid.Resources. Resources can be created for XAML elements as well as any other control that needs to be reused.