<UserControl x:Class="JuliusSweetland.OptiKey.UI.Views.Management.VisualsView"
             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:controls="http://metro.mahapps.com/winfx/xaml/controls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
        
            <GroupBox Grid.Row="0" Header="Look">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" SharedSizeGroup="LabelColumn" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
            
                    <TextBlock Grid.Row="0" Grid.Column="0" Text="Theme:" 
                               VerticalAlignment="Center" Margin="5" />
                    <ComboBox Grid.Row="0" Grid.Column="1" 
                              ItemsSource="{Binding Themes}"
                              DisplayMemberPath="Key"
                              SelectedValuePath="Value"
                              SelectedValue="{Binding Theme, Mode=TwoWay}" />
                      
                    <TextBlock Grid.Row="1" Grid.Column="0" Text="Scratchpad # of lines:" 
                               VerticalAlignment="Center" Margin="5" />
                    <controls:NumericUpDown Grid.Row="1" Grid.Column="1" TextAlignment="Left"
                                            Minimum="1" Interval="1"
                                            Value="{Binding ScratchpadNumberOfLines, Mode=TwoWay}" />

                    <TextBlock Grid.Row="2" Grid.Column="0" Text="Cursor width (pixels):" 
                               VerticalAlignment="Center" Margin="5" />
                    <controls:NumericUpDown Grid.Row="2" Grid.Column="1" TextAlignment="Left"
                                            Minimum="10" Interval="10"
                                            Value="{Binding CursorWidthInPixels, Mode=TwoWay}" />

                    <TextBlock Grid.Row="3" Grid.Column="0" Text="Cursor height (pixels):" 
                               VerticalAlignment="Center" Margin="5" />
                    <controls:NumericUpDown Grid.Row="3" Grid.Column="1" TextAlignment="Left"
                                            Minimum="10" Interval="10"
                                            Value="{Binding CursorHeightInPixels, Mode=TwoWay}" />

                    <TextBlock Grid.Row="4" Grid.Column="0" Text="Magnify source (percentage of screen):" 
                               VerticalAlignment="Center" Margin="5" />
                    <controls:NumericUpDown Grid.Row="4" Grid.Column="1" TextAlignment="Left"
                                            Minimum="10" Interval="10"
                                            Value="{Binding MagnifySourcePercentageOfScreen, Mode=TwoWay}" />

                    <TextBlock Grid.Row="5" Grid.Column="0" Text="Magnify destination (percentage of screen):" 
                               VerticalAlignment="Center" Margin="5" />
                    <controls:NumericUpDown Grid.Row="5" Grid.Column="1" TextAlignment="Left"
                                            Minimum="10" Interval="10"
                                            Value="{Binding MagnifyDestinationPercentageOfScreen, Mode=TwoWay}" />

                    <TextBlock Grid.Row="6" Grid.Column="0" Text="Conversation only mode:" 
                               VerticalAlignment="Center" Margin="5" />
                    <CheckBox Grid.Row="6" Grid.Column="1" 
                              VerticalAlignment="Center"
                              IsChecked="{Binding ConversationOnlyMode, Mode=TwoWay}" />

                    <TextBlock Grid.Row="7" Grid.Column="0" Text="Startup keyboard:" 
                               VerticalAlignment="Center" Margin="5">
                        <TextBlock.Style>
                            <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
                                <Setter Property="Visibility" Value="Visible" />
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding ConversationOnlyMode}" Value="True">
                                        <Setter Property="Visibility" Value="Collapsed" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </TextBlock.Style>    
                    </TextBlock>
                    <ComboBox Grid.Row="7" Grid.Column="1" 
                              ItemsSource="{Binding StartupKeyboards}"
                              DisplayMemberPath="Key"
                              SelectedValuePath="Value"
                              SelectedValue="{Binding StartupKeyboard, Mode=TwoWay}">
                        <ComboBox.Style>
                            <Style TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
                                <Setter Property="Visibility" Value="Visible" />
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding ConversationOnlyMode}" Value="True">
                                        <Setter Property="Visibility" Value="Collapsed" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </ComboBox.Style>
                    </ComboBox>

                    <TextBlock Grid.Row="8" Grid.Column="0" Text="Minimised position:" 
                               VerticalAlignment="Center" Margin="5" />
                    <ComboBox Grid.Row="8" Grid.Column="1" 
                              ItemsSource="{Binding MinimisedPositions}"
                              DisplayMemberPath="Key"
                              SelectedValuePath="Value"
                              SelectedValue="{Binding MinimisedPosition, Mode=TwoWay}" />

                    <TextBlock Grid.Row="9" Grid.Column="0" Text="Full dock thickness (as % of screen):" 
                               VerticalAlignment="Center" Margin="5" />
                    <controls:NumericUpDown Grid.Row="9" Grid.Column="1" TextAlignment="Left"
                                            Minimum="10" Maximum="90" Interval="10"
                                            Value="{Binding MainWindowFullDockThicknessAsPercentageOfScreen, Mode=TwoWay}" />
                    
                    <TextBlock Grid.Row="10" Grid.Column="0" Text="Collapsed dock thickness (as % of full dock thickness):" 
                               VerticalAlignment="Center" Margin="5" />
                    <controls:NumericUpDown Grid.Row="10" Grid.Column="1" TextAlignment="Left"
                                            Minimum="10" Maximum="100" Interval="10"
                                            Value="{Binding MainWindowCollapsedDockThicknessAsPercentageOfFullDockThickness, Mode=TwoWay}" />
                </Grid>
            </GroupBox>
        
            <GroupBox Grid.Row="1" Header="Font">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" SharedSizeGroup="LabelColumn" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
            
                    <TextBlock Grid.Row="0" Grid.Column="0" Text="Font family:" 
                               VerticalAlignment="Center" Margin="5" />
                    <ComboBox Grid.Row="0" Grid.Column="1" 
                              ItemsSource="{Binding FontFamilies}"
                              DisplayMemberPath="Key"
                              SelectedValuePath="Value"
                              SelectedValue="{Binding FontFamily, Mode=TwoWay}" />
    
                    <TextBlock Grid.Row="1" Grid.Column="0" Text="Font stretch:" 
                               VerticalAlignment="Center" Margin="5" />
                    <ComboBox Grid.Row="1" Grid.Column="1" 
                              ItemsSource="{Binding FontStretches}"
                              SelectedValue="{Binding FontStretch, Mode=TwoWay}" />
    
                    <TextBlock Grid.Row="2" Grid.Column="0" Text="Font weight:" 
                               VerticalAlignment="Center" Margin="5" />
                    <ComboBox Grid.Row="2" Grid.Column="1" 
                              ItemsSource="{Binding FontWeights}"
                              SelectedValue="{Binding FontWeight, Mode=TwoWay}" />
                </Grid>
            </GroupBox>
    
            <GroupBox Grid.Row="2" Header="Notifications">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" SharedSizeGroup="LabelColumn" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
            
                    <TextBlock Grid.Row="0" Grid.Column="0" Text="Horizontal fill (percentage of OptiKey):" 
                               VerticalAlignment="Center" Margin="5" />
                    <controls:NumericUpDown Grid.Row="0" Grid.Column="1" TextAlignment="Left"
                                            Minimum="1" Interval="5"
                                            Value="{Binding ToastNotificationHorizontalFillPercentage, Mode=TwoWay}" />

                    <TextBlock Grid.Row="1" Grid.Column="0" Text="Vertical fill (percentage of OptiKey):" 
                               VerticalAlignment="Center" Margin="5" />
                    <controls:NumericUpDown Grid.Row="1" Grid.Column="1" TextAlignment="Left"
                                            Minimum="1" Interval="5"
                                            Value="{Binding ToastNotificationVerticalFillPercentage, Mode=TwoWay}" />

                    <TextBlock Grid.Row="2" Grid.Column="0" Text="Display for X seconds per message character:" 
                               VerticalAlignment="Center" Margin="5" />
                    <controls:NumericUpDown Grid.Row="2" Grid.Column="1" TextAlignment="Left"
                                            Minimum="0.001" Interval="0.001"
                                            Value="{Binding ToastNotificationSecondsPerCharacter, Mode=TwoWay}" />
                </Grid>
            </GroupBox>
        </Grid>
    </ScrollViewer>
</UserControl>
