<base:WindowBase
    x:Class="v2rayN.Views.OptionSettingWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:base="clr-namespace:v2rayN.Base"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:reactiveui="http://reactiveui.net"
    xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
    xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
    Title="{x:Static resx:ResUI.menuSetting}"
    Width="1000"
    Height="700"
    x:TypeArguments="vms:OptionSettingViewModel"
    ShowInTaskbar="False"
    Style="{StaticResource WindowGlobal}"
    WindowStartupLocation="CenterScreen"
    mc:Ignorable="d">
    <DockPanel Margin="{StaticResource Margin8}">
        <StackPanel
            Margin="{StaticResource Margin4}"
            HorizontalAlignment="Center"
            DockPanel.Dock="Bottom"
            Orientation="Horizontal">
            <Button
                x:Name="btnSave"
                Width="100"
                Content="{x:Static resx:ResUI.TbConfirm}"
                IsDefault="True"
                Style="{StaticResource DefButton}" />
            <Button
                x:Name="btnCancel"
                Width="100"
                Margin="{StaticResource MarginLeftRight8}"
                Content="{x:Static resx:ResUI.TbCancel}"
                IsCancel="true"
                Style="{StaticResource DefButton}" />
        </StackPanel>

        <TabControl HorizontalContentAlignment="Left">
            <TabItem Header="{x:Static resx:ResUI.TbSettingsCore}">
                <ScrollViewer VerticalScrollBarVisibility="Visible">
                    <Grid Margin="{StaticResource Margin8}">
                        <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" />
                            <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>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <TextBlock
                            Grid.Row="0"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsSocksPort}" />
                        <TextBox
                            x:Name="txtlocalPort"
                            Grid.Row="0"
                            Grid.Column="1"
                            Width="200"
                            Margin="{StaticResource Margin8}"
                            Style="{StaticResource DefTextBox}" />
                        <TextBlock
                            Grid.Row="0"
                            Grid.Column="2"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsSocksPortTip}"
                            TextWrapping="Wrap" />

                        <TextBlock
                            Grid.Row="2"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsSecondLocalPortEnabled}" />
                        <ToggleButton
                            x:Name="togSecondLocalPortEnabled"
                            Grid.Row="2"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="3"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsUdpEnabled}" />
                        <ToggleButton
                            x:Name="togudpEnabled"
                            Grid.Row="3"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="4"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsSniffingEnabled}" />
                        <ToggleButton
                            x:Name="togsniffingEnabled"
                            Grid.Row="4"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="5"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsDestOverride}" />
                        <ListBox
                            x:Name="clbdestOverride"
                            Grid.Row="5"
                            Grid.Column="1"
                            Grid.ColumnSpan="2"
                            Margin="{StaticResource Margin4}"
                            HorizontalAlignment="Left"
                            FontSize="{DynamicResource StdFontSize}"
                            Style="{StaticResource MaterialDesignFilterChipPrimaryListBox}" />

                        <TextBlock
                            Grid.Row="6"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsRouteOnly}" />
                        <ToggleButton
                            x:Name="togrouteOnly"
                            Grid.Row="6"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="7"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsAllowLAN}" />
                        <ToggleButton
                            x:Name="togAllowLANConn"
                            Grid.Row="7"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="8"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsNewPort4LAN}" />
                        <ToggleButton
                            x:Name="togNewPort4LAN"
                            Grid.Row="8"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="9"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsUser}" />
                        <TextBox
                            x:Name="txtuser"
                            Grid.Row="9"
                            Grid.Column="1"
                            Width="200"
                            Margin="{StaticResource Margin8}"
                            Style="{StaticResource DefTextBox}" />

                        <TextBlock
                            Grid.Row="10"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsPass}" />
                        <TextBox
                            x:Name="txtpass"
                            Grid.Row="10"
                            Grid.Column="1"
                            Width="200"
                            Margin="{StaticResource Margin8}"
                            Style="{StaticResource DefTextBox}" />

                        <TextBlock
                            Grid.Row="11"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsMuxEnabled}" />
                        <ToggleButton
                            x:Name="togmuxEnabled"
                            Grid.Row="11"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="12"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsLogEnabledToFile}" />
                        <ToggleButton
                            x:Name="toglogEnabled"
                            Grid.Row="12"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="13"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsLogLevel}" />
                        <ComboBox
                            x:Name="cmbloglevel"
                            Grid.Row="13"
                            Grid.Column="1"
                            Width="200"
                            Margin="{StaticResource Margin8}"
                            materialDesign:HintAssist.Hint="Level"
                            Style="{StaticResource DefComboBox}" />

                        <TextBlock
                            Grid.Row="14"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsDefAllowInsecure}" />
                        <ToggleButton
                            x:Name="togdefAllowInsecure"
                            Grid.Row="14"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="15"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsDefFingerprint}" />
                        <ComboBox
                            x:Name="cmbdefFingerprint"
                            Grid.Row="15"
                            Grid.Column="1"
                            Width="200"
                            Margin="{StaticResource Margin8}"
                            IsEditable="True"
                            Style="{StaticResource DefComboBox}" />

                        <TextBlock
                            Grid.Row="16"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsDefUserAgent}" />
                        <ComboBox
                            x:Name="cmbdefUserAgent"
                            Grid.Row="16"
                            Grid.Column="1"
                            Width="200"
                            Margin="{StaticResource Margin8}"
                            IsEditable="True"
                            Style="{StaticResource DefComboBox}" />
                        <TextBlock
                            Grid.Row="16"
                            Grid.Column="3"
                            Margin="{StaticResource Margin8}"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsDefUserAgentTips}" />

                        <TextBlock
                            Grid.Row="17"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsMux4SboxProtocol}" />
                        <ComboBox
                            x:Name="cmbmux4SboxProtocol"
                            Grid.Row="17"
                            Grid.Column="1"
                            Width="200"
                            Margin="{StaticResource Margin8}"
                            Style="{StaticResource DefComboBox}" />

                        <TextBlock
                            Grid.Row="18"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsEnableCacheFile4Sbox}" />
                        <ToggleButton
                            x:Name="togenableCacheFile4Sbox"
                            Grid.Row="18"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="19"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsHysteriaBandwidth}" />

                        <StackPanel
                            Grid.Row="19"
                            Grid.Column="1"
                            Orientation="Horizontal">

                            <TextBox
                                x:Name="txtUpMbps"
                                Width="90"
                                Margin="{StaticResource Margin8}"
                                materialDesign:HintAssist.Hint="Up"
                                Style="{StaticResource DefTextBox}" />
                            <TextBox
                                x:Name="txtDownMbps"
                                Width="90"
                                Margin="{StaticResource Margin8}"
                                materialDesign:HintAssist.Hint="Down"
                                Style="{StaticResource DefTextBox}" />
                        </StackPanel>

                        <TextBlock
                            Grid.Row="20"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsEnableFragment}" />
                        <ToggleButton
                            x:Name="togenableFragment"
                            Grid.Row="20"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />
                        <TextBlock
                            Grid.Row="20"
                            Grid.Column="2"
                            Margin="{StaticResource Margin8}"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsEnableFragmentTips}"
                            TextWrapping="Wrap" />
                    </Grid>
                </ScrollViewer>
            </TabItem>

            <!--<TabItem Header="{x:Static resx:ResUI.TbSettingsCoreKcp}">
                <Grid Margin="{StaticResource Margin8}">
                    <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>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>

                    <TextBlock
                        Grid.Row="1"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="{x:Static resx:ResUI.TbSettingsTunMtu}" />
                    <TextBox Style="{StaticResource DefTextBox}"
                        x:Name="txtKcpmtu"
                        Grid.Row="1"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}" />

                    <TextBlock
                        Grid.Row="2"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="tti" />
                    <TextBox Style="{StaticResource DefTextBox}"
                        x:Name="txtKcptti"
                        Grid.Row="2"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}" />

                    <TextBlock
                        Grid.Row="3"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="uplinkCapacity" />
                    <TextBox Style="{StaticResource DefTextBox}"
                        x:Name="txtKcpuplinkCapacity"
                        Grid.Row="3"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}" />

                    <TextBlock
                        Grid.Row="4"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="downlinkCapacity" />
                    <TextBox Style="{StaticResource DefTextBox}"
                        x:Name="txtKcpdownlinkCapacity"
                        Grid.Row="4"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}" />

                    <TextBlock
                        Grid.Row="5"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="readBufferSize" />
                    <TextBox Style="{StaticResource DefTextBox}"
                        x:Name="txtKcpreadBufferSize"
                        Grid.Row="5"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}" />

                    <TextBlock
                        Grid.Row="6"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="writeBufferSize" />
                    <TextBox Style="{StaticResource DefTextBox}"
                        x:Name="txtKcpwriteBufferSize"
                        Grid.Row="6"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}" />

                    <TextBlock
                        Grid.Row="7"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="congestion" />
                    <ToggleButton
                        x:Name="togKcpcongestion"
                        Grid.Row="7"
                        Grid.Column="1"
                        Margin="{StaticResource Margin8}"
                        HorizontalAlignment="Left" />
                </Grid>
            </TabItem>-->

            <TabItem Header="{x:Static resx:ResUI.TbSettingsN}">
                <ScrollViewer VerticalScrollBarVisibility="Visible">
                    <Grid Grid.Row="2" Margin="{StaticResource Margin8}">
                        <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" />
                            <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" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <TextBlock
                            Grid.Row="1"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsStartBoot}" />
                        <ToggleButton
                            x:Name="togAutoRun"
                            Grid.Row="1"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />
                        <TextBlock
                            Grid.Row="1"
                            Grid.Column="2"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsStartBootTip}"
                            TextWrapping="Wrap" />

                        <TextBlock
                            Grid.Row="2"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsStatistics}" />
                        <ToggleButton
                            x:Name="togEnableStatistics"
                            Grid.Row="2"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="3"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsDisplayRealTimeSpeed}" />
                        <ToggleButton
                            x:Name="togDisplayRealTimeSpeed"
                            Grid.Row="3"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="4"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsKeepOlderDedupl}" />
                        <ToggleButton
                            x:Name="togKeepOlderDedupl"
                            Grid.Row="4"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="5"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsEnableAutoAdjustMainLvColWidth}" />
                        <ToggleButton
                            x:Name="togEnableAutoAdjustMainLvColWidth"
                            Grid.Row="5"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="6"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsEnableUpdateSubOnlyRemarksExist}" />
                        <ToggleButton
                            x:Name="togEnableUpdateSubOnlyRemarksExist"
                            Grid.Row="6"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="8"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsAutoHideStartup}" />
                        <ToggleButton
                            x:Name="togAutoHideStartup"
                            Grid.Row="8"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="10"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsEnableDragDropSort}" />
                        <ToggleButton
                            x:Name="togEnableDragDropSort"
                            Grid.Row="10"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="11"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsDoubleClick2Activate}" />
                        <ToggleButton
                            x:Name="togDoubleClick2Activate"
                            Grid.Row="11"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="12"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsEnableHWA}" />
                        <ToggleButton
                            x:Name="togEnableHWA"
                            Grid.Row="12"
                            Grid.Column="1"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left" />

                        <TextBlock
                            Grid.Row="13"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsAutoUpdateInterval}" />
                        <TextBox
                            x:Name="txtautoUpdateInterval"
                            Grid.Row="13"
                            Grid.Column="1"
                            Width="200"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left"
                            Style="{StaticResource DefTextBox}" />

                        <TextBlock
                            Grid.Row="14"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsTrayMenuServersLimit}" />
                        <TextBox
                            x:Name="txttrayMenuServersLimit"
                            Grid.Row="14"
                            Grid.Column="1"
                            Width="200"
                            Margin="{StaticResource Margin8}"
                            HorizontalAlignment="Left"
                            Style="{StaticResource DefTextBox}" />

                        <TextBlock
                            Grid.Row="15"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsCurrentFontFamily}" />
                        <ComboBox
                            x:Name="cmbcurrentFontFamily"
                            Grid.Row="15"
                            Grid.Column="1"
                            Width="300"
                            Margin="{StaticResource Margin8}"
                            MaxDropDownHeight="1000"
                            Style="{StaticResource DefComboBox}" />
                        <TextBlock
                            Grid.Row="15"
                            Grid.Column="2"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsCurrentFontFamilyTip}"
                            TextWrapping="Wrap" />

                        <TextBlock
                            Grid.Row="16"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsMixedConcurrencyCount}" />
                        <ComboBox
                            x:Name="cmbMixedConcurrencyCount"
                            Grid.Row="16"
                            Grid.Column="1"
                            Width="200"
                            Margin="{StaticResource Margin8}"
                            Style="{StaticResource DefComboBox}" />

                        <TextBlock
                            Grid.Row="17"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsSpeedTestTimeout}" />
                        <ComboBox
                            x:Name="cmbSpeedTestTimeout"
                            Grid.Row="17"
                            Grid.Column="1"
                            Width="200"
                            Margin="{StaticResource Margin8}"
                            Style="{StaticResource DefComboBox}" />

                        <TextBlock
                            Grid.Row="18"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsSpeedTestUrl}" />
                        <ComboBox
                            x:Name="cmbSpeedTestUrl"
                            Grid.Row="18"
                            Grid.Column="1"
                            Width="300"
                            Margin="{StaticResource Margin8}"
                            IsEditable="True"
                            Style="{StaticResource DefComboBox}" />

                        <TextBlock
                            Grid.Row="19"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsSpeedPingTestUrl}" />
                        <ComboBox
                            x:Name="cmbSpeedPingTestUrl"
                            Grid.Row="19"
                            Grid.Column="1"
                            Width="300"
                            Margin="{StaticResource Margin8}"
                            IsEditable="True"
                            Style="{StaticResource DefComboBox}" />

                        <TextBlock
                            Grid.Row="20"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsIPAPIUrl}" />
                        <ComboBox
                            x:Name="cmbIPAPIUrl"
                            Grid.Row="20"
                            Grid.Column="1"
                            Width="300"
                            Margin="{StaticResource Margin8}"
                            IsEditable="True"
                            Style="{StaticResource DefComboBox}" />

                        <TextBlock
                            Grid.Row="21"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsSubConvert}" />
                        <ComboBox
                            x:Name="cmbSubConvertUrl"
                            Grid.Row="21"
                            Grid.Column="1"
                            Width="300"
                            Margin="{StaticResource Margin8}"
                            materialDesign:HintAssist.Hint="Convert Url"
                            IsEditable="True"
                            Style="{StaticResource DefComboBox}" />

                        <TextBlock
                            Grid.Row="22"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsMainGirdOrientation}" />
                        <ComboBox
                            x:Name="cmbMainGirdOrientation"
                            Grid.Row="22"
                            Grid.Column="1"
                            Width="200"
                            Margin="{StaticResource Margin8}"
                            Style="{StaticResource DefComboBox}" />

                        <TextBlock
                            Grid.Row="23"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsGeoFilesSource}" />
                        <ComboBox
                            x:Name="cmbGetFilesSourceUrl"
                            Grid.Row="23"
                            Grid.Column="1"
                            Width="300"
                            Margin="{StaticResource Margin8}"
                            IsEditable="True"
                            Style="{StaticResource DefComboBox}" />
                        <TextBlock
                            Grid.Row="23"
                            Grid.Column="2"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsChinaUserTip}"
                            TextWrapping="Wrap" />

                        <TextBlock
                            Grid.Row="24"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsSrsFilesSource}" />
                        <ComboBox
                            x:Name="cmbSrsFilesSourceUrl"
                            Grid.Row="24"
                            Grid.Column="1"
                            Width="300"
                            Margin="{StaticResource Margin8}"
                            IsEditable="True"
                            Style="{StaticResource DefComboBox}" />
                        <TextBlock
                            Grid.Row="24"
                            Grid.Column="2"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsChinaUserTip}"
                            TextWrapping="Wrap" />

                        <TextBlock
                            Grid.Row="25"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsRoutingRulesSource}" />
                        <ComboBox
                            x:Name="cmbRoutingRulesSourceUrl"
                            Grid.Row="25"
                            Grid.Column="1"
                            Width="300"
                            Margin="{StaticResource Margin8}"
                            IsEditable="True"
                            Style="{StaticResource DefComboBox}" />
                        <TextBlock
                            Grid.Row="25"
                            Grid.Column="2"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.TbSettingsChinaUserTip}"
                            TextWrapping="Wrap" />
                    </Grid>
                </ScrollViewer>
            </TabItem>

            <TabItem Header="{x:Static resx:ResUI.TbSettingsSystemproxy}">
                <DockPanel Margin="{StaticResource Margin8}">
                    <StackPanel DockPanel.Dock="Bottom" Orientation="Vertical">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock
                                Margin="{StaticResource Margin8}"
                                VerticalAlignment="Center"
                                Style="{StaticResource ToolbarTextBlock}"
                                Text="{x:Static resx:ResUI.TbSettingsNotProxyLocalAddress}" />
                            <ToggleButton
                                x:Name="tognotProxyLocalAddress"
                                Margin="{StaticResource Margin8}"
                                HorizontalAlignment="Left" />
                        </StackPanel>

                        <StackPanel Orientation="Horizontal">
                            <TextBlock
                                Margin="{StaticResource Margin8}"
                                VerticalAlignment="Center"
                                Style="{StaticResource ToolbarTextBlock}"
                                Text="{x:Static resx:ResUI.TbSettingsAdvancedProtocol}" />
                            <ComboBox
                                x:Name="cmbsystemProxyAdvancedProtocol"
                                MinWidth="400"
                                Margin="{StaticResource Margin8}"
                                materialDesign:HintAssist.Hint="Protocol"
                                Style="{StaticResource DefComboBox}" />
                        </StackPanel>
                    </StackPanel>

                    <TextBlock
                        Grid.Row="1"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        DockPanel.Dock="Top"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="{x:Static resx:ResUI.TbSettingsExceptionTip}" />
                    <TextBox
                        x:Name="txtsystemProxyExceptions"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Stretch"
                        AcceptsReturn="True"
                        BorderThickness="1"
                        Style="{StaticResource DefTextBox}"
                        TextWrapping="Wrap"
                        VerticalScrollBarVisibility="Auto" />
                </DockPanel>
            </TabItem>

            <TabItem Header="{x:Static resx:ResUI.TbSettingsTunMode}">
                <Grid Margin="{StaticResource Margin8}" DockPanel.Dock="Top">
                    <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" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>

                    <TextBlock
                        Grid.Row="2"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="{x:Static resx:ResUI.TbSettingsTunAutoRoute}" />
                    <ToggleButton
                        x:Name="togAutoRoute"
                        Grid.Row="2"
                        Grid.Column="1"
                        Margin="{StaticResource Margin8}"
                        HorizontalAlignment="Left" />

                    <TextBlock
                        Grid.Row="3"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="{x:Static resx:ResUI.TbSettingsTunStrictRoute}" />
                    <ToggleButton
                        x:Name="togStrictRoute"
                        Grid.Row="3"
                        Grid.Column="1"
                        Margin="{StaticResource Margin8}"
                        HorizontalAlignment="Left" />

                    <TextBlock
                        Grid.Row="4"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="{x:Static resx:ResUI.TbSettingsTunStack}" />
                    <ComboBox
                        x:Name="cmbStack"
                        Grid.Row="4"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}"
                        HorizontalAlignment="Left"
                        Style="{StaticResource DefComboBox}" />

                    <TextBlock
                        Grid.Row="5"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="{x:Static resx:ResUI.TbSettingsTunMtu}" />
                    <ComboBox
                        x:Name="cmbMtu"
                        Grid.Row="5"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}"
                        HorizontalAlignment="Left"
                        Style="{StaticResource DefComboBox}" />

                    <TextBlock
                        Grid.Row="6"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="{x:Static resx:ResUI.TbSettingsEnableExInbound}" />
                    <ToggleButton
                        x:Name="togEnableExInbound"
                        Grid.Row="6"
                        Grid.Column="1"
                        Margin="{StaticResource Margin8}"
                        HorizontalAlignment="Left" />

                    <TextBlock
                        Grid.Row="7"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="{x:Static resx:ResUI.TbSettingsEnableIPv6Address}" />
                    <ToggleButton
                        x:Name="togEnableIPv6Address"
                        Grid.Row="7"
                        Grid.Column="1"
                        Margin="{StaticResource Margin8}"
                        HorizontalAlignment="Left" />
                </Grid>
            </TabItem>

            <TabItem Header="{x:Static resx:ResUI.TbSettingsCoreType}">
                <Grid Margin="{StaticResource Margin8}">
                    <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" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <TextBlock
                        Grid.Row="1"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="VMess" />
                    <ComboBox
                        x:Name="cmbCoreType1"
                        Grid.Row="1"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}"
                        Style="{StaticResource DefComboBox}" />

                    <TextBlock
                        Grid.Row="2"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="Custom" />
                    <ComboBox
                        x:Name="cmbCoreType2"
                        Grid.Row="2"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}"
                        Style="{StaticResource DefComboBox}" />

                    <TextBlock
                        Grid.Row="3"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="Shadowsocks" />
                    <ComboBox
                        x:Name="cmbCoreType3"
                        Grid.Row="3"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}"
                        Style="{StaticResource DefComboBox}" />

                    <TextBlock
                        Grid.Row="4"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="Socks" />
                    <ComboBox
                        x:Name="cmbCoreType4"
                        Grid.Row="4"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}"
                        Style="{StaticResource DefComboBox}" />

                    <TextBlock
                        Grid.Row="5"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="VLESS" />
                    <ComboBox
                        x:Name="cmbCoreType5"
                        Grid.Row="5"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}"
                        Style="{StaticResource DefComboBox}" />

                    <TextBlock
                        Grid.Row="6"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="Trojan" />
                    <ComboBox
                        x:Name="cmbCoreType6"
                        Grid.Row="6"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}"
                        Style="{StaticResource DefComboBox}" />

                    <TextBlock
                        Grid.Row="7"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="Wireguard" />
                    <ComboBox
                        x:Name="cmbCoreType9"
                        Grid.Row="7"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin8}"
                        Style="{StaticResource DefComboBox}" />
                </Grid>
            </TabItem>
        </TabControl>
    </DockPanel>
</base:WindowBase>
