<ui:Page xmlns:props="clr-namespace:Ink_Canvas.Properties" x:Class="Ink_Canvas.Windows.SettingsViews.Pages.BoardAppearancePage"
      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:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
      xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
      xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
      xmlns:sys="clr-namespace:System;assembly=mscorlib"
      xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
      mc:Ignorable="d"
      Title="{x:Static props:NavStrings.Nav_BoardAppearance}">

    <ScrollViewer PanningMode="VerticalFirst">
        <Grid Margin="59,0,59,0">
            <FrameworkElement.Resources>
                <sys:Double x:Key="SettingsCardSpacing">4</sys:Double>
                <Style x:Key="SettingsSectionHeaderTextBlockStyle"
                    BasedOn="{StaticResource BodyStrongTextBlockStyle}"
                    TargetType="TextBlock">
                    <Style.Setters>
                        <Setter Property="Margin" Value="1,30,0,6" />
                    </Style.Setters>
                </Style>
            </FrameworkElement.Resources>
            <Grid>
                <ikw:SimpleStackPanel MaxWidth="1000"
                    HorizontalAlignment="Stretch"
                    Spacing="{StaticResource SettingsCardSpacing}">

                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                        Text="{x:Static props:ThemeStrings.Theme_ShowTimeInWhiteboard}" />

                    <controls:LabeledSettingsCard x:Name="CardEnableTimeDisplayInWhiteboardMode"
                            Header="{x:Static props:ThemeStrings.Theme_ShowTimeInWhiteboard}"
                            Icon="{x:Static ui:SegoeFluentIcons.Pinned}"
                            SwitchName="ToggleSwitchEnableTimeDisplayInWhiteboardMode"
                            Toggled="ToggleSwitchEnableTimeDisplayInWhiteboardMode_Toggled" />

                    <controls:LabeledSettingsCard x:Name="CardShowPenColorOnBoardToolbarIcon"
                            Header="{x:Static props:ThemeStrings.Theme_ShowPenColorOnBoardToolbarIcon}"
                            Icon="{x:Static ui:SegoeFluentIcons.Draw}"
                            SwitchName="ToggleSwitchShowPenColorOnBoardToolbarIcon"
                            Toggled="ToggleSwitchShowPenColorOnBoardToolbarIcon_Toggled" />

                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                        Text="{x:Static props:ThemeStrings.Theme_Tips_Title}" />

                    <ui:SettingsCard Click="QuickNavCard_Click" Tag="WhiteboardTipsPage" IsEnabled="True"
                                     Header="{x:Static props:ThemeStrings.Theme_Tips_Title}" IsClickEnabled="True">
                        <ui:SettingsCard.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Message}" />
                        </ui:SettingsCard.HeaderIcon>

                    </ui:SettingsCard>

                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                        Text="{x:Static props:ThemeStrings.Theme_BoardToolbarOpacity}" />

                    <ui:SettingsExpander Header="{x:Static props:ThemeStrings.Theme_BoardToolbarOpacity}"
                                         IsExpanded="True">
                        <ui:SettingsExpander.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.EaseOfAccess}" />
                        </ui:SettingsExpander.HeaderIcon>
                        <ui:SettingsExpander.Items>
                            <ui:SettingsCard Header="{x:Static props:ThemeStrings.Theme_BoardToolbarOpacityLeft}">
                                <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
                                    <TextBlock x:Name="BoardToolbarLeftOpacityText"
                                               VerticalAlignment="Center" FontFamily="Consolas" TextAlignment="Right"/>
                                    <Slider x:Name="BoardToolbarLeftOpacitySlider" Minimum="0.3"
                                            Maximum="1" Width="200"
                                            IsSnapToTickEnabled="True" Value="1" TickFrequency="0.05"
                                            TickPlacement="None" AutoToolTipPlacement="None"
                                            ValueChanged="BoardToolbarLeftOpacitySlider_ValueChanged" />
                                </ikw:SimpleStackPanel>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:ThemeStrings.Theme_BoardToolbarOpacityCenter}">
                                <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
                                    <TextBlock x:Name="BoardToolbarCenterOpacityText"
                                               VerticalAlignment="Center" FontFamily="Consolas" TextAlignment="Right"/>
                                    <Slider x:Name="BoardToolbarCenterOpacitySlider" Minimum="0.3"
                                            Maximum="1" Width="200"
                                            IsSnapToTickEnabled="True" Value="1" TickFrequency="0.05"
                                            TickPlacement="None" AutoToolTipPlacement="None"
                                            ValueChanged="BoardToolbarCenterOpacitySlider_ValueChanged" />
                                </ikw:SimpleStackPanel>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:ThemeStrings.Theme_BoardToolbarOpacityRight}">
                                <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
                                    <TextBlock x:Name="BoardToolbarRightOpacityText"
                                               VerticalAlignment="Center" FontFamily="Consolas" TextAlignment="Right"/>
                                    <Slider x:Name="BoardToolbarRightOpacitySlider" Minimum="0.3"
                                            Maximum="1" Width="200"
                                            IsSnapToTickEnabled="True" Value="1" TickFrequency="0.05"
                                            TickPlacement="None" AutoToolTipPlacement="None"
                                            ValueChanged="BoardToolbarRightOpacitySlider_ValueChanged" />
                                </ikw:SimpleStackPanel>
                            </ui:SettingsCard>
                        </ui:SettingsExpander.Items>
                    </ui:SettingsExpander>

                    <Rectangle Height="16" />
                    <ui:SettingsCard Header="{x:Static props:ThemeStrings.Theme_BoardMenuOpacity}">
                        <ui:SettingsCard.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.PreviewLink}" />
                        </ui:SettingsCard.HeaderIcon>
                        <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
                            <TextBlock x:Name="BoardMenuOpacityText"
                                       VerticalAlignment="Center" FontFamily="Consolas" TextAlignment="Right"/>
                            <Slider x:Name="BoardMenuOpacitySlider" Minimum="0.3"
                                    Maximum="1" Width="200"
                                    IsSnapToTickEnabled="True" Value="1" TickFrequency="0.05"
                                    TickPlacement="None" AutoToolTipPlacement="None"
                                    ValueChanged="BoardMenuOpacitySlider_ValueChanged" />
                        </ikw:SimpleStackPanel>
                    </ui:SettingsCard>

                    <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
                        Text="{x:Static props:ThemeStrings.Theme_BlackboardScale80}" />

                    <ui:SettingsExpander Header="{x:Static props:ThemeStrings.Theme_BlackboardScale80}"
                                         IsExpanded="True">
                        <ui:SettingsExpander.HeaderIcon>
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.BackToWindow}" />
                        </ui:SettingsExpander.HeaderIcon>
                        <ui:SettingsExpander.Items>
                            <ui:SettingsCard Header="{x:Static props:ThemeStrings.Theme_BoardScaleLeft}">
                                <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
                                    <TextBlock x:Name="ViewboxBlackBoardLeftScaleText"
                                               VerticalAlignment="Center" FontFamily="Consolas" TextAlignment="Right"/>
                                    <Slider x:Name="ViewboxBlackBoardLeftScaleTransformValueSlider" Minimum="0.5"
                                            Maximum="1.5" Width="200"
                                            IsSnapToTickEnabled="True" Value="1" TickFrequency="0.05"
                                            TickPlacement="None" AutoToolTipPlacement="None"
                                            ValueChanged="ViewboxBlackBoardLeftScaleTransformValueSlider_ValueChanged" />
                                </ikw:SimpleStackPanel>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:ThemeStrings.Theme_BoardScaleCenter}">
                                <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
                                    <TextBlock x:Name="ViewboxBlackBoardCenterScaleText"
                                               VerticalAlignment="Center" FontFamily="Consolas" TextAlignment="Right"/>
                                    <Slider x:Name="ViewboxBlackBoardCenterScaleTransformValueSlider" Minimum="0.5"
                                            Maximum="1.5" Width="200"
                                            IsSnapToTickEnabled="True" Value="1" TickFrequency="0.05"
                                            TickPlacement="None" AutoToolTipPlacement="None"
                                            ValueChanged="ViewboxBlackBoardCenterScaleTransformValueSlider_ValueChanged" />
                                </ikw:SimpleStackPanel>
                            </ui:SettingsCard>
                            <ui:SettingsCard Header="{x:Static props:ThemeStrings.Theme_BoardScaleRight}">
                                <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="8">
                                    <TextBlock x:Name="ViewboxBlackBoardRightScaleText"
                                               VerticalAlignment="Center" FontFamily="Consolas" TextAlignment="Right"/>
                                    <Slider x:Name="ViewboxBlackBoardRightScaleTransformValueSlider" Minimum="0.5"
                                            Maximum="1.5" Width="200"
                                            IsSnapToTickEnabled="True" Value="1" TickFrequency="0.05"
                                            TickPlacement="None" AutoToolTipPlacement="None"
                                            ValueChanged="ViewboxBlackBoardRightScaleTransformValueSlider_ValueChanged" />
                                </ikw:SimpleStackPanel>
                            </ui:SettingsCard>
                        </ui:SettingsExpander.Items>
                    </ui:SettingsExpander>

                    <Rectangle Height="48" />
                </ikw:SimpleStackPanel>
            </Grid>
        </Grid>
    </ScrollViewer>
</ui:Page>
