<UserControl
    x:Class="Bili.App.Controls.Danmaku.DanmakuDisplayOptions"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:converter="using:Bili.App.Resources.Converter"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:loc="using:Bili.App.Resources.Extension"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="300"
    d:DesignWidth="400"
    IsFocusEngagementEnabled="True"
    RequiresPointer="WhenEngaged"
    mc:Ignorable="d">

    <UserControl.Resources>
        <converter:DanmakuFontSizeConverter x:Key="FontSizeConverter" />
    </UserControl.Resources>

    <StackPanel
        Width="240"
        Padding="16,12"
        Spacing="12">
        <Slider
            x:Name="OpacitySlider"
            Header="{loc:Locale Name=DanmakuOpacity}"
            Maximum="1"
            Minimum="0"
            StepFrequency="0.1"
            Value="{x:Bind ViewModel.DanmakuOpacity, Mode=TwoWay}" />
        <Slider
            x:Name="SizeSlider"
            Header="{loc:Locale Name=DanmakuFontSize}"
            Maximum="2.5"
            Minimum="0.5"
            StepFrequency="0.5"
            ThumbToolTipValueConverter="{StaticResource FontSizeConverter}"
            Value="{x:Bind ViewModel.DanmakuFontSize, Mode=TwoWay}" />
        <Slider
            x:Name="AreaSlider"
            Header="{loc:Locale Name=DanmakuArea}"
            Maximum="1"
            Minimum="0.25"
            StepFrequency="0.25"
            Value="{x:Bind ViewModel.DanmakuArea, Mode=TwoWay}" />
        <Slider
            x:Name="SpeedSlider"
            Header="{loc:Locale Name=DanmakuSpeed}"
            Maximum="2"
            Minimum="0.2"
            StepFrequency="0.2"
            Value="{x:Bind ViewModel.DanmakuSpeed, Mode=TwoWay}" />
        <ComboBox
            x:Name="DanmakuFontComboBox"
            HorizontalAlignment="Stretch"
            Header="{loc:Locale Name=DanmakuFont}"
            ItemsSource="{x:Bind ViewModel.FontCollection, Mode=OneWay}"
            SelectedItem="{x:Bind ViewModel.DanmakuFont, Mode=TwoWay}" />
        <ToggleSwitch Header="{loc:Locale Name=DanmakuMerge}" IsOn="{x:Bind ViewModel.IsDanmakuMerge, Mode=TwoWay}" />
        <ToggleSwitch Header="{loc:Locale Name=DanmakuBold}" IsOn="{x:Bind ViewModel.IsDanmakuBold, Mode=TwoWay}" />
        <!--<ToggleSwitch Header="{loc:Locale Name=DanmakuAutoLimit}" IsOn="{x:Bind ViewModel.IsDanmakuLimit, Mode=TwoWay}" />-->
        <!--<ToggleSwitch Header="{loc:Locale Name=UseCloudShieldSettings}" IsOn="{x:Bind ViewModel.UseCloudShieldSettings, Mode=TwoWay}" />-->
    </StackPanel>
</UserControl>
