Importing Styles
xml
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:control="using:AvaloniaApplication"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="AvaloniaApplication.MyUserControl">
<UserControl.Styles>
<StyleInclude Source="MyStyles.axaml"></StyleInclude>
</UserControl.Styles>
<TextBlock Text="Hello from template" TextAlignment="Center" Width="200" Height="20"/>
</UserControl>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15