<reactiveui:ReactiveWindow
    x:Class="v2rayN.Views.AddServer2Window"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Views="clr-namespace:v2rayN.Views"
    xmlns:conv="clr-namespace:v2rayN.Converters"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="clr-namespace:v2rayN"
    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:v2rayN.Resx"
    xmlns:vms="clr-namespace:v2rayN.ViewModels"
    Title="v2rayN"
    Width="700"
    Height="500"
    x:TypeArguments="vms:AddServer2ViewModel"
    Background="{DynamicResource MaterialDesignPaper}"
    FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
    ResizeMode="NoResize"
    TextElement.FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
    TextElement.Foreground="{DynamicResource MaterialDesignBody}"
    TextOptions.TextFormattingMode="Display"
    TextOptions.TextRenderingMode="Auto"
    WindowStartupLocation="CenterScreen"
    mc:Ignorable="d">
    <ScrollViewer
        materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
        HorizontalScrollBarVisibility="Auto"
        VerticalScrollBarVisibility="Auto">
        <Grid Margin="8">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <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="0"
                    Grid.Column="0"
                    Margin="4"
                    Style="{StaticResource ModuleTitle}"
                    Text="{x:Static resx:ResUI.menuServers}" />

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

                <TextBox
                    x:Name="txtRemarks"
                    Grid.Row="1"
                    Grid.Column="1"
                    Width="400"
                    Margin="4"
                    VerticalAlignment="Top"
                    AcceptsReturn="True"
                    Style="{StaticResource MaterialDesignOutlinedTextBox}" />

                <TextBlock
                    Grid.Row="2"
                    Grid.Column="0"
                    Margin="4"
                    VerticalAlignment="Center"
                    Style="{StaticResource ToolbarTextBlock}"
                    Text="{x:Static resx:ResUI.TbAddress}" />
                <TextBox
                    x:Name="txtAddress"
                    Grid.Row="2"
                    Grid.Column="1"
                    Width="400"
                    Margin="4"
                    VerticalAlignment="Top"
                    AcceptsReturn="True"
                    IsReadOnly="True"
                    Style="{StaticResource MaterialDesignOutlinedTextBox}" />
                <StackPanel
                    Grid.Row="2"
                    Grid.Column="2"
                    VerticalAlignment="Center"
                    Orientation="Vertical">
                    <Button
                        x:Name="btnBrowse"
                        Width="100"
                        Margin="2,0,8,0"
                        Content="{x:Static resx:ResUI.TbBrowse}"
                        Style="{StaticResource DefButton}" />
                    <Button
                        x:Name="btnEdit"
                        Width="100"
                        Margin="2,2,8,0"
                        Content="{x:Static resx:ResUI.TbEdit}"
                        Style="{StaticResource DefButton}" />
                </StackPanel>

                <TextBlock
                    Grid.Row="3"
                    Grid.Column="0"
                    Margin="4"
                    VerticalAlignment="Center"
                    Style="{StaticResource ToolbarTextBlock}"
                    Text="{x:Static resx:ResUI.TbCoreType}" />
                <ComboBox
                    x:Name="cmbCoreType"
                    Grid.Row="3"
                    Grid.Column="1"
                    Width="200"
                    Margin="4"
                    HorizontalAlignment="Left"
                    MaxDropDownHeight="1000"
                    Style="{StaticResource MaterialDesignOutlinedComboBox}" />

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

                <TextBlock
                    Grid.Row="5"
                    Grid.Column="0"
                    Margin="4"
                    VerticalAlignment="Center"
                    Style="{StaticResource ToolbarTextBlock}"
                    Text="{x:Static resx:ResUI.TbPreSocksPort}" />
                <TextBox
                    x:Name="txtPreSocksPort"
                    Grid.Row="5"
                    Grid.Column="1"
                    Width="200"
                    Margin="4"
                    HorizontalAlignment="Left"
                    AcceptsReturn="True"
                    Style="{StaticResource MaterialDesignOutlinedTextBox}" />
                <StackPanel
                    Grid.Row="6"
                    Grid.Column="1"
                    Grid.ColumnSpan="2">
                    <TextBlock
                        Width="500"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="{x:Static resx:ResUI.TipPreSocksPort}"
                        TextWrapping="Wrap" />
                </StackPanel>

            </Grid>

            <Grid
                Grid.Row="1"
                Margin="16"
                HorizontalAlignment="Center">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200" />
                    <ColumnDefinition Width="200" />
                </Grid.ColumnDefinitions>
                <Button
                    x:Name="btnSave"
                    Grid.Column="0"
                    Margin="4"
                    Content="{x:Static resx:ResUI.TbConfirm}"
                    Style="{StaticResource DefButton}" />
                <Button
                    x:Name="btnCancel"
                    Grid.Column="1"
                    Margin="4"
                    Click="btnCancel_Click"
                    Content="{x:Static resx:ResUI.TbCancel}"
                    IsCancel="true"
                    Style="{StaticResource DefButton}" />
            </Grid>



        </Grid>
    </ScrollViewer>
</reactiveui:ReactiveWindow>