Mesen2/UI/Controls/OptionSection.axaml

38 lines
No EOL
1.1 KiB
XML

<ItemsControl
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"
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="50"
xmlns:c="using:Mesen.Controls"
x:Name="root"
Margin="0 15 0 0"
x:Class="Mesen.Controls.OptionSection"
>
<ItemsControl.Template>
<ControlTemplate>
<StackPanel>
<StackPanel Orientation="Horizontal" Margin="0 0 0 5">
<Image
Margin="2 0 5 0"
Stretch="None"
IsVisible="{Binding Icon.Length, ElementName=root}"
Source="{Binding IconSource, ElementName=root}"
VerticalAlignment="Center"
/>
<TextBlock
Text="{Binding Header, ElementName=root}"
Foreground="{DynamicResource ThemeControlHighlightLowBrush}"
FontSize="13"
VerticalAlignment="Center"
/>
</StackPanel>
<StackPanel Margin="10 0 0 0">
<ItemsPresenter
ItemsPanel="{TemplateBinding ItemsPanel}"
/>
</StackPanel>
</StackPanel>
</ControlTemplate>
</ItemsControl.Template>
</ItemsControl>