<reactiveui:ReactiveWindow
    x:Class="v2rayN.Views.SubEditWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:conv="clr-namespace:v2rayN.Converters"
    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:v2rayN.Resx"
    xmlns:vms="clr-namespace:v2rayN.ViewModels"
    Title="{x:Static resx:ResUI.menuSubSetting}"
    Width="700"
    Height="550"
    x:TypeArguments="vms:SubEditViewModel"
    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" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <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.menuSubscription}" />

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

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

                <TextBlock
                    Grid.Row="2"
                    Grid.Column="0"
                    Margin="4"
                    VerticalAlignment="Center"
                    Style="{StaticResource ToolbarTextBlock}"
                    Text="{x:Static resx:ResUI.LvUrl}" />
                <TextBox
                    x:Name="txtUrl"
                    Grid.Row="2"
                    Grid.Column="1"
                    Width="400"
                    Margin="4"
                    VerticalAlignment="Top"
                    materialDesign:HintAssist.Hint="{x:Static resx:ResUI.SubUrlTips}"
                    AcceptsReturn="True"
                    Style="{StaticResource MaterialDesignOutlinedTextBox}"
                    TextWrapping="Wrap" />

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

                <TextBlock
                    Grid.Row="4"
                    Grid.Column="0"
                    Margin="4"
                    VerticalAlignment="Center"
                    Text="{x:Static resx:ResUI.LvUserAgent}" />
                <TextBox
                    x:Name="txtUserAgent"
                    Grid.Row="4"
                    Grid.Column="1"
                    Width="400"
                    Margin="4"
                    VerticalAlignment="Top"
                    materialDesign:HintAssist.Hint="{x:Static resx:ResUI.SubUrlTips}"
                    AcceptsReturn="True"
                    Style="{StaticResource MaterialDesignOutlinedTextBox}"
                    TextWrapping="Wrap" />

                <TextBlock
                    Grid.Row="5"
                    Grid.Column="0"
                    Margin="4"
                    VerticalAlignment="Center"
                    Style="{StaticResource ToolbarTextBlock}"
                    Text="{x:Static resx:ResUI.LvFilter}" />
                <TextBox
                    x:Name="txtFilter"
                    Grid.Row="5"
                    Grid.Column="1"
                    Width="400"
                    Margin="4"
                    VerticalAlignment="Top"
                    materialDesign:HintAssist.Hint="{x:Static resx:ResUI.SubUrlTips}"
                    AcceptsReturn="True"
                    Style="{StaticResource MaterialDesignOutlinedTextBox}" />

                <TextBlock
                    Grid.Row="6"
                    Grid.Column="0"
                    Margin="4"
                    VerticalAlignment="Center"
                    Style="{StaticResource ToolbarTextBlock}"
                    Text="{x:Static resx:ResUI.LvSort}" />
                <TextBox
                    x:Name="txtSort"
                    Grid.Row="6"
                    Grid.Column="1"
                    Width="400"
                    Margin="4"
                    VerticalAlignment="Top"
                    AcceptsReturn="True"
                    Style="{StaticResource MaterialDesignOutlinedTextBox}" />

            </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}"
                    Cursor="Hand"
                    Style="{StaticResource DefButton}" />
                <Button
                    x:Name="btnCancel"
                    Grid.Column="1"
                    Margin="4"
                    Click="btnCancel_Click"
                    Content="{x:Static resx:ResUI.TbCancel}"
                    Cursor="Hand"
                    IsCancel="true"
                    Style="{StaticResource DefButton}" />
            </Grid>
        </Grid>
    </ScrollViewer>
</reactiveui:ReactiveWindow>
