<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:SdbS.CustomControls">


    <Style TargetType="{x:Type local:NavButton}">

        <Setter Property="Margin" Value="2"/>

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:NavButton}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">

                        <Grid>
                            
                            <Grid.RowDefinitions>
                                <RowDefinition Height="70"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>


                            <Image Grid.Row="0"
                                   Source="{TemplateBinding ImageSource}"
                                   Stretch="Uniform"
                                   Margin="5 5 5 0"/>

                            <TextBlock Grid.Row="1"
                                       Text="{TemplateBinding Text}"
                                       TextAlignment="Center"
                                       TextWrapping="Wrap"
                                       Margin="0 0 0 10"/>

                            <Rectangle Name="Line"
                                       Grid.RowSpan="2"
                                       Fill="Transparent"
                                       Stroke="Gray"
                                       Margin="3"
                                       StrokeThickness="0"
                                       RadiusX="5"
                                       RadiusY="5"/>
                        </Grid>

                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Setter Property="StrokeThickness"
                                    TargetName="Line"
                                    Value="1"/>
                        </Trigger>
                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style TargetType="{x:Type local:ButtonGuest}">

        <Setter Property="Margin" Value="2"/>

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:ButtonGuest}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">

                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="45"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>


                            <Image Grid.Row="0"
                                   Margin="5 5 5 0"
                                   Source="{TemplateBinding ImageSource}"
                                   Stretch="Uniform"/>

                            <TextBlock Grid.Row="1"
                                       Text="{TemplateBinding Text}"
                                       TextAlignment="Center"
                                       TextWrapping="Wrap"
                                       Margin="0 0 0 5"/>

                            <Rectangle Name="Line"
                                       Grid.RowSpan="2" 
                                       Fill="Transparent"
                                       Stroke="Gray"
                                       StrokeThickness="0"
                                       RadiusX="5"
                                       RadiusY="5"/>
                        </Grid>

                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Setter Property="StrokeThickness"
                                    TargetName="Line"
                                    Value="1"/>
                        </Trigger>
                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>



</ResourceDictionary>
