<reactiveui:ReactiveWindow
    x:Class="v2rayN.Views.SubSettingWindow"
    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="600"
    x:TypeArguments="vms:SubSettingViewModel"
    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">
    <materialDesign:DialogHost Identifier="SubDialog" Style="{StaticResource MaterialDesignEmbeddedDialogHost}">
        <DockPanel>
            <ToolBarTray DockPanel.Dock="Top">
                <ToolBar
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    ClipToBounds="True"
                    Style="{StaticResource MaterialDesignToolBar}">
                    <Button x:Name="menuSubAdd">
                        <StackPanel Orientation="Horizontal">
                            <materialDesign:PackIcon Margin="0,0,8,0" Kind="Plus" />
                            <TextBlock Style="{StaticResource ToolbarTextBlock}" Text="{x:Static resx:ResUI.menuSubAdd}" />
                        </StackPanel>
                    </Button>
                    <Separator />
                    <Button x:Name="menuSubDelete">
                        <StackPanel Orientation="Horizontal">
                            <materialDesign:PackIcon Margin="0,0,8,0" Kind="Delete" />
                            <TextBlock Style="{StaticResource ToolbarTextBlock}" Text="{x:Static resx:ResUI.menuSubDelete}" />
                        </StackPanel>
                    </Button>
                    <Separator />
                    <Button x:Name="menuSubEdit">
                        <StackPanel Orientation="Horizontal">
                            <materialDesign:PackIcon Margin="0,0,8,0" Kind="Edit" />
                            <TextBlock Style="{StaticResource ToolbarTextBlock}" Text="{x:Static resx:ResUI.menuSubEdit}" />
                        </StackPanel>
                    </Button>
                    <Separator />
                    <Button x:Name="menuSubShare">
                        <StackPanel Orientation="Horizontal">
                            <materialDesign:PackIcon Margin="0,0,8,0" Kind="QrcodePlus" />
                            <TextBlock Style="{StaticResource ToolbarTextBlock}" Text="{x:Static resx:ResUI.menuSubShare}" />
                        </StackPanel>
                    </Button>
                    <Button
                        x:Name="menuClose"
                        Click="menuClose_Click"
                        IsCancel="True">
                        <StackPanel Orientation="Horizontal">
                            <materialDesign:PackIcon Margin="0,0,8,0" Kind="Close" />
                            <TextBlock Style="{StaticResource ToolbarTextBlock}" Text="{x:Static resx:ResUI.menuClose}" />
                        </StackPanel>
                    </Button>

                </ToolBar>
            </ToolBarTray>

            <DataGrid
                x:Name="lstSubscription"
                AutoGenerateColumns="False"
                BorderThickness="1"
                CanUserAddRows="False"
                CanUserResizeRows="False"
                CanUserSortColumns="False"
                EnableRowVirtualization="True"
                GridLinesVisibility="All"
                HeadersVisibility="Column"
                IsReadOnly="True"
                Style="{StaticResource DefDataGrid}">
                <DataGrid.Columns>
                    <DataGridTextColumn
                        Width="120"
                        Binding="{Binding remarks}"
                        Header="{x:Static resx:ResUI.LvRemarks}" />
                    <DataGridTextColumn
                        Width="200"
                        Binding="{Binding url}"
                        Header="{x:Static resx:ResUI.LvUrl}" />
                    <DataGridTextColumn
                        Width="80"
                        Binding="{Binding enabled}"
                        Header="{x:Static resx:ResUI.LvEnabled}" />
                    <DataGridTextColumn
                        Width="200"
                        Binding="{Binding userAgent}"
                        Header="{x:Static resx:ResUI.LvUserAgent}" />
                    <DataGridTextColumn
                        Width="80"
                        Binding="{Binding sort}"
                        Header="{x:Static resx:ResUI.LvSort}" />

                </DataGrid.Columns>
            </DataGrid>
        </DockPanel>
    </materialDesign:DialogHost>
</reactiveui:ReactiveWindow>
