<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:Sonex.Client.Controls">

    <Style x:Key="PropertyBoxStyle" TargetType="controls:PropertyBox">
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Padding" Value="16" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:PropertyBox">
                    <Border
                        Padding="18 0 9 0"
                        Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
                        BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
                        BorderThickness="1"
                        MaxWidth="1000"
                        HorizontalAlignment="Stretch"
                        Margin="6,6,6,6"
                        CornerRadius="4">

                        <Grid Margin="0,0,0,0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>

                            <ContentPresenter
                                Grid.Column="0"
                                Content="{TemplateBinding Icon}"
                                VerticalAlignment="Center"
                                Margin="0, 0, 18, 0" />

                            <StackPanel Grid.Column="1" Spacing="2" VerticalAlignment="Center">
                                <TextBlock
                                    VerticalAlignment="Center"
                                    Margin="0 10 0 0"
                                    Text="{TemplateBinding Title}"
                                    Style="{ThemeResource BodyTextBlockStyle}"
                                    Foreground="{ThemeResource TextFillColorPrimaryBrush}" />

                                <TextBlock
                                    VerticalAlignment="Center"
                                    Margin="0 0 0 9"
                                    Text="{TemplateBinding Description}"
                                    Style="{ThemeResource CaptionTextBlockStyle}"
                                    Foreground="{ThemeResource TextFillColorSecondaryBrush}"
                                    TextWrapping="Wrap" />
                            </StackPanel>

                            <ContentPresenter
                                Grid.Column="2"
                                Content="{TemplateBinding Content}"
                                Margin="8 0 0 0" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
