<UserControl x:Class="_1RM.View.Settings.SettingsPageView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:attachProperty="clr-namespace:Shawn.Utils.WpfResources.Theme.AttachProperty;assembly=Shawn.Utils.WpfResources"
             xmlns:settings="clr-namespace:_1RM.View.Settings"
             xmlns:s="https://github.com/canton7/Stylet"
             xmlns:view="clr-namespace:_1RM.View"
             mc:Ignorable="d"
             d:DataContext="{d:DesignInstance settings:SettingsPageViewModel}"
             Background="White"
             d:DesignHeight="2450" d:DesignWidth="1000">

    <Grid Background="{DynamicResource BackgroundBrush}" Grid.IsSharedSizeScope="True">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>

        <StackPanel Background="{DynamicResource PrimaryMidBrush}">
            <StackPanel.Resources>
                <Style x:Key="TabButtonStyle" TargetType="Button" BasedOn="{StaticResource ButtonBarPrimaryStyle}">
                    <Setter Property="Cursor" Value="Hand"></Setter>
                    <Setter Property="Width" Value="200"></Setter>
                    <Setter Property="Height" Value="40"></Setter>
                    <Setter Property="BorderThickness" Value="0 0 0 1"></Setter>
                    <Setter Property="BorderBrush" Value="Transparent"></Setter>
                    <Setter Property="attachProperty:VisionElement.BorderBrushOnMouseOver" Value="Transparent"></Setter>
                    <Setter Property="attachProperty:VisionElement.BorderBrushOnMouseDown" Value="Transparent"></Setter>
                    <Setter Property="attachProperty:VisionElement.Opacity" Value="1"></Setter>
                    <Setter Property="attachProperty:VisionElement.OpacityOnMouseDown" Value="1"></Setter>
                    <Setter Property="attachProperty:VisionElement.OpacityOnMouseDown" Value="1"></Setter>
                    <Setter Property="attachProperty:VisionElement.BorderOpacity" Value="1"></Setter>
                    <Setter Property="attachProperty:VisionElement.BorderOpacityOnMouseDown" Value="1"></Setter>
                    <Setter Property="attachProperty:VisionElement.BorderOpacityOnMouseDown" Value="1"></Setter>
                </Style>
            </StackPanel.Resources>


            <Button Width="200" Height="40"
                    Command="{Binding CmdShowPage}"
                    CommandParameter="{x:Static view:EnumMainWindowPage.SettingsGeneral}"
                    Content="{DynamicResource system_options_general_title}">
                <Button.Style>
                    <Style TargetType="Button" BasedOn="{StaticResource TabButtonStyle}">
                        <Style.Triggers>
                            <DataTrigger Value="{x:Static view:EnumMainWindowPage.SettingsGeneral}" Binding="{Binding CurrentPage}">
                                <Setter Property="Background" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BackgroundAccent" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BackgroundOnMouseDown" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="Foreground" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.ForegroundAccent" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.ForegroundOnMouseDown" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="BorderBrush" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BorderBrushOnMouseOver" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BorderBrushOnMouseDown" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="Cursor" Value="Arrow"></Setter>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>
            </Button>


            <Button Width="200" Height="40"
                    Command="{Binding CmdShowPage}"
                    CommandParameter="{x:Static view:EnumMainWindowPage.SettingsLauncher}"
                    Content="{DynamicResource Launcher}">
                <Button.Style>
                    <Style TargetType="Button" BasedOn="{StaticResource TabButtonStyle}">
                        <Style.Triggers>
                            <DataTrigger Value="{x:Static view:EnumMainWindowPage.SettingsLauncher}" Binding="{Binding CurrentPage}">
                                <Setter Property="Background" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BackgroundAccent" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BackgroundOnMouseDown" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="Foreground" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.ForegroundAccent" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.ForegroundOnMouseDown" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="BorderBrush" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BorderBrushOnMouseOver" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BorderBrushOnMouseDown" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="Cursor" Value="Arrow"></Setter>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>
            </Button>


            <Button Width="200" Height="40"
                    Command="{Binding CmdShowPage}"
                    CommandParameter="{x:Static view:EnumMainWindowPage.SettingsData}"
                    Content="{DynamicResource system_options_data_security_database}">
                <Button.Style>
                    <Style TargetType="Button" BasedOn="{StaticResource TabButtonStyle}">
                        <Style.Triggers>
                            <DataTrigger Value="{x:Static view:EnumMainWindowPage.SettingsData}" Binding="{Binding CurrentPage}">
                                <Setter Property="Background" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BackgroundAccent" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BackgroundOnMouseDown" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="Foreground" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.ForegroundAccent" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.ForegroundOnMouseDown" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="BorderBrush" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BorderBrushOnMouseOver" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BorderBrushOnMouseDown" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="Cursor" Value="Arrow"></Setter>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>
            </Button>


            <Button Width="200" Height="40"
                    Command="{Binding CmdShowPage}"
                    CommandParameter="{x:Static view:EnumMainWindowPage.SettingsTheme}"
                    Content="{DynamicResource Theme}">
                <Button.Style>
                    <Style TargetType="Button" BasedOn="{StaticResource TabButtonStyle}">
                        <Style.Triggers>
                            <DataTrigger Value="{x:Static view:EnumMainWindowPage.SettingsTheme}" Binding="{Binding CurrentPage}">
                                <Setter Property="Background" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BackgroundAccent" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BackgroundOnMouseDown" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="Foreground" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.ForegroundAccent" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.ForegroundOnMouseDown" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="BorderBrush" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BorderBrushOnMouseOver" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BorderBrushOnMouseDown" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="Cursor" Value="Arrow"></Setter>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>
            </Button>


            <Button Width="200" Height="40"
                    Command="{Binding CmdShowPage}"
                    CommandParameter="{x:Static view:EnumMainWindowPage.SettingsRunners}"
                    Content="{DynamicResource Protocol}">
                <Button.Style>
                    <Style TargetType="Button" BasedOn="{StaticResource TabButtonStyle}">
                        <Style.Triggers>
                            <DataTrigger Value="{x:Static view:EnumMainWindowPage.SettingsRunners}" Binding="{Binding CurrentPage}">
                                <Setter Property="Background" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BackgroundAccent" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BackgroundOnMouseDown" Value="{DynamicResource BackgroundBrush}"></Setter>
                                <Setter Property="Foreground" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.ForegroundAccent" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.ForegroundOnMouseDown" Value="{DynamicResource BackgroundTextBrush}"></Setter>
                                <Setter Property="BorderBrush" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BorderBrushOnMouseOver" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="attachProperty:VisionElement.BorderBrushOnMouseDown" Value="{DynamicResource AccentMidBrush}"></Setter>
                                <Setter Property="Cursor" Value="Arrow"></Setter>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>
            </Button>


        </StackPanel>



        <Button Grid.Column="0"
                VerticalAlignment="Bottom"
                Width="200" Height="40"
                Foreground="{DynamicResource PrimaryTextBrush}"
                Background="{DynamicResource PrimaryDarkBrush}"
                Style="{StaticResource ButtonBarAccentStyle}"
                attachProperty:VisionElement.BackgroundAccent="{DynamicResource AccentMidBrush}"
                Command="{Binding CmdSaveAndGoBack}"
                Content="{DynamicResource Back}">
        </Button>

        <ContentControl Grid.Column="1" s:View.Model="{Binding SelectedViewModel}"></ContentControl>
    </Grid>
</UserControl>