<Window
    x:Class="v2rayN.Desktop.Views.OptionSettingWindow"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ctrls="clr-namespace:v2rayN.Desktop.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    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="600"
    x:DataType="vms:OptionSettingViewModel"
    ShowInTaskbar="False"
    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}"
                Cursor="Hand"
                IsDefault="True" />
            <Button
                x:Name="btnCancel"
                Width="100"
                Margin="{StaticResource MarginLr8}"
                Content="{x:Static resx:ResUI.TbCancel}"
                Cursor="Hand"
                IsCancel="True" />
        </StackPanel>

        <TabControl HorizontalContentAlignment="Stretch">
            <TabItem Header="{x:Static resx:ResUI.TbSettingsCore}">
                <ScrollViewer VerticalScrollBarVisibility="Visible">
                    <Grid
                        Margin="{StaticResource Margin4}"
                        ColumnDefinitions="Auto,Auto,Auto"
                        RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">

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

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

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

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

                        <TextBlock
                            Grid.Row="5"
                            Grid.Column="0"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Text="{x:Static resx:ResUI.TbSettingsDestOverride}" />
                        <ListBox
                            x:Name="clbdestOverride"
                            Grid.Row="5"
                            Grid.Column="1"
                            Grid.ColumnSpan="2"
                            Margin="{StaticResource Margin4}"
                            HorizontalAlignment="Left"
                            SelectionMode="Multiple,Toggle"
                            Theme="{DynamicResource CardCheckGroupListBox}" />

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

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

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

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

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

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

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

                        <TextBlock
                            Grid.Row="13"
                            Grid.Column="0"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Text="{x:Static resx:ResUI.TbSettingsLogLevel}" />
                        <ComboBox
                            x:Name="cmbloglevel"
                            Grid.Row="13"
                            Grid.Column="1"
                            Width="200"
                            Margin="{StaticResource Margin4}" />

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

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

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

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

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

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

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

                            <TextBox
                                x:Name="txtUpMbps"
                                Width="90"
                                Margin="{StaticResource Margin4}"
                                Watermark="Up" />
                            <TextBox
                                x:Name="txtDownMbps"
                                Width="90"
                                Margin="{StaticResource Margin4}"
                                Watermark="Down" />
                        </StackPanel>

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

            <TabItem Header="{x:Static resx:ResUI.TbSettingsN}">
                <ScrollViewer VerticalScrollBarVisibility="Visible">
                    <Grid
                        Margin="{StaticResource Margin4}"
                        ColumnDefinitions="Auto,Auto,*"
                        RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">

                        <TextBlock
                            x:Name="tbAutoRun"
                            Grid.Row="1"
                            Grid.Column="0"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Text="{x:Static resx:ResUI.TbSettingsStartBoot}" />
                        <ToggleSwitch
                            x:Name="togAutoRun"
                            Grid.Row="1"
                            Grid.Column="1"
                            Margin="{StaticResource Margin4}"
                            HorizontalAlignment="Left" />
                        <!--
						<TextBlock
                            Grid.Row="1"
                            Grid.Column="2"
                            VerticalAlignment="Center"
                            Margin="{StaticResource Margin4}"
                            Text="{x:Static resx:ResUI.TbSettingsStartBootTip}"
                            TextWrapping="Wrap" />-->
                        <TextBlock
                            Grid.Row="2"
                            Grid.Column="0"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Text="{x:Static resx:ResUI.TbSettingsStatistics}" />
                        <ToggleSwitch
                            x:Name="togEnableStatistics"
                            Grid.Row="2"
                            Grid.Column="1"
                            Margin="{StaticResource Margin4}"
                            HorizontalAlignment="Left" />

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

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

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

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

                        <TextBlock
                            Grid.Row="7"
                            Grid.Column="0"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Text="{x:Static resx:ResUI.TbSettingsTLS13}" />
                        <ToggleSwitch
                            x:Name="togEnableSecurityProtocolTls13"
                            Grid.Row="7"
                            Grid.Column="1"
                            Margin="{StaticResource Margin4}"
                            HorizontalAlignment="Left" />

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

                        <TextBlock
                            x:Name="labHide2TrayWhenClose"
                            Grid.Row="9"
                            Grid.Column="0"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Text="{x:Static resx:ResUI.TbSettingsHide2TrayWhenClose}" />
                        <ToggleSwitch
                            x:Name="togHide2TrayWhenClose"
                            Grid.Row="9"
                            Grid.Column="1"
                            Margin="{StaticResource Margin4}"
                            HorizontalAlignment="Left" />

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

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

                        <TextBlock
                            Grid.Row="15"
                            Grid.Column="0"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Text="{x:Static resx:ResUI.TbSettingsCurrentFontFamily}" />
                        <ctrls:AutoCompleteBox
                            x:Name="cmbcurrentFontFamily"
                            Grid.Row="15"
                            Grid.Column="1"
                            Width="300"
                            Margin="{StaticResource Margin4}" />
                        <TextBlock
                            Grid.Row="15"
                            Grid.Column="2"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Text="{x:Static resx:ResUI.TbSettingsCurrentFontFamilyLinuxTip}"
                            TextWrapping="Wrap" />

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

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

                        <TextBlock
                            Grid.Row="18"
                            Grid.Column="0"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Text="{x:Static resx:ResUI.TbSettingsSpeedTestUrl}" />
                        <ctrls:AutoCompleteBox
                            Name="cmbSpeedTestUrl"
                            Grid.Row="18"
                            Grid.Column="1"
                            Width="300"
                            Margin="{StaticResource Margin4}" />

                        <TextBlock
                            Grid.Row="19"
                            Grid.Column="0"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Text="{x:Static resx:ResUI.TbSettingsSpeedPingTestUrl}" />
                        <ctrls:AutoCompleteBox
                            x:Name="cmbSpeedPingTestUrl"
                            Grid.Row="19"
                            Grid.Column="1"
                            Width="300"
                            Margin="{StaticResource Margin4}" />

                        <TextBlock
                            Grid.Row="20"
                            Grid.Column="0"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Text="{x:Static resx:ResUI.TbSettingsSubConvert}" />
                        <ctrls:AutoCompleteBox
                            x:Name="cmbSubConvertUrl"
                            Grid.Row="20"
                            Grid.Column="1"
                            Width="300"
                            Margin="{StaticResource Margin4}" />

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

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

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

                        <TextBlock
                            Grid.Row="24"
                            Grid.Column="0"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Text="{x:Static resx:ResUI.TbSettingsRoutingRulesSource}" />
                        <ComboBox
                            x:Name="cmbRoutingRulesSourceUrl"
                            Grid.Row="24"
                            Grid.Column="1"
                            Width="300"
                            Margin="{StaticResource Margin4}" />
                        <TextBlock
                            Grid.Row="24"
                            Grid.Column="2"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Text="{x:Static resx:ResUI.TbSettingsChinaUserTip}"
                            TextWrapping="Wrap" />

                        <TextBlock
                            Grid.Row="25"
                            Grid.Column="0"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Text="{x:Static resx:ResUI.TbSettingsIPAPIUrl}" />
                        <ComboBox
                            x:Name="cmbIPAPIUrl"
                            Grid.Row="25"
                            Grid.Column="1"
                            Width="300"
                            Margin="{StaticResource Margin4}" />

                    </Grid>
                </ScrollViewer>
            </TabItem>

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

                        <StackPanel Orientation="Horizontal">
                            <TextBlock
                                Margin="{StaticResource Margin4}"
                                VerticalAlignment="Center"
                                Text="{x:Static resx:ResUI.TbSettingsAdvancedProtocol}" />
                            <ComboBox
                                x:Name="cmbsystemProxyAdvancedProtocol"
                                MinWidth="400"
                                Margin="{StaticResource Margin4}" />
                        </StackPanel>
                    </StackPanel>

                    <TextBlock
                        Name="txbSettingsExceptionTip"
                        Margin="{StaticResource Margin4}"
                        VerticalAlignment="Center"
                        DockPanel.Dock="Top"
                        Text="{x:Static resx:ResUI.TbSettingsExceptionTip}" />
                    <TextBlock
                        Name="txbSettingsExceptionTip2"
                        Margin="{StaticResource Margin4}"
                        VerticalAlignment="Center"
                        DockPanel.Dock="Top"
                        Text="{x:Static resx:ResUI.TbSettingsExceptionTip2}" />
                    <TextBox
                        x:Name="txtsystemProxyExceptions"
                        Margin="{StaticResource Margin4}"
                        VerticalAlignment="Stretch"
                        BorderThickness="1"
                        Classes="TextArea"
                        TextWrapping="Wrap" />
                </DockPanel>
            </TabItem>

            <TabItem Header="{x:Static resx:ResUI.TbSettingsTunMode}">
                <Grid
                    Margin="{StaticResource Margin4}"
                    ColumnDefinitions="Auto,Auto,Auto"
                    DockPanel.Dock="Top"
                    RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">

                    <TextBlock
                        Grid.Row="2"
                        Grid.Column="0"
                        Margin="{StaticResource Margin4}"
                        VerticalAlignment="Center"
                        Text="Strict Route" />
                    <ToggleSwitch
                        x:Name="togStrictRoute"
                        Grid.Row="2"
                        Grid.Column="1"
                        Margin="{StaticResource Margin4}"
                        HorizontalAlignment="Left" />

                    <TextBlock
                        Grid.Row="3"
                        Grid.Column="0"
                        Margin="{StaticResource Margin4}"
                        VerticalAlignment="Center"
                        Text="Stack" />
                    <ComboBox
                        x:Name="cmbStack"
                        Grid.Row="3"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin4}"
                        HorizontalAlignment="Left" />

                    <TextBlock
                        Grid.Row="4"
                        Grid.Column="0"
                        Margin="{StaticResource Margin4}"
                        VerticalAlignment="Center"
                        Text="Mtu" />
                    <ComboBox
                        x:Name="cmbMtu"
                        Grid.Row="4"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin4}"
                        HorizontalAlignment="Left" />

                    <TextBlock
                        Grid.Row="5"
                        Grid.Column="0"
                        Margin="{StaticResource Margin4}"
                        VerticalAlignment="Center"
                        Text="{x:Static resx:ResUI.TbSettingsEnableExInbound}" />
                    <ToggleSwitch
                        x:Name="togEnableExInbound"
                        Grid.Row="5"
                        Grid.Column="1"
                        Margin="{StaticResource Margin4}"
                        HorizontalAlignment="Left" />

                    <TextBlock
                        Grid.Row="6"
                        Grid.Column="0"
                        Margin="{StaticResource Margin4}"
                        VerticalAlignment="Center"
                        Text="{x:Static resx:ResUI.TbSettingsEnableIPv6Address}" />
                    <ToggleSwitch
                        x:Name="togEnableIPv6Address"
                        Grid.Row="6"
                        Grid.Column="1"
                        Margin="{StaticResource Margin4}"
                        HorizontalAlignment="Left" />

                </Grid>
            </TabItem>

            <TabItem Header="{x:Static resx:ResUI.TbSettingsCoreType}">
                <Grid
                    Margin="{StaticResource Margin4}"
                    ColumnDefinitions="Auto,Auto"
                    RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
                    <TextBlock
                        Grid.Row="1"
                        Grid.Column="0"
                        Margin="{StaticResource Margin4}"
                        VerticalAlignment="Center"
                        Text="VMess" />
                    <ComboBox
                        x:Name="cmbCoreType1"
                        Grid.Row="1"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin4}" />

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

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

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

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

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

                    <TextBlock
                        Grid.Row="7"
                        Grid.Column="0"
                        Margin="{StaticResource Margin4}"
                        VerticalAlignment="Center"
                        Text="Wireguard" />
                    <ComboBox
                        x:Name="cmbCoreType9"
                        Grid.Row="7"
                        Grid.Column="1"
                        Width="200"
                        Margin="{StaticResource Margin4}" />
                </Grid>
            </TabItem>
        </TabControl>
    </DockPanel>
</Window>
