<reactiveui:ReactiveUserControl
    x:Class="v2rayN.Views.CheckUpdateView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:converters="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:ServiceLib.Resx;assembly=ServiceLib"
    xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
    d:DesignHeight="450"
    d:DesignWidth="800"
    x:TypeArguments="vms:CheckUpdateViewModel"
    Style="{StaticResource ViewGlobal}"
    mc:Ignorable="d">

    <DockPanel Margin="{StaticResource Margin8}">
        <StackPanel
            Margin="{StaticResource Margin8}"
            HorizontalAlignment="Right"
            DockPanel.Dock="Bottom"
            Orientation="Horizontal">

            <TextBlock
                Margin="{StaticResource Margin8}"
                VerticalAlignment="Center"
                Style="{StaticResource ToolbarTextBlock}"
                Text="{x:Static resx:ResUI.TbSettingsEnableCheckPreReleaseUpdate}" />
            <ToggleButton
                x:Name="togEnableCheckPreReleaseUpdate"
                Margin="{StaticResource Margin8}"
                HorizontalAlignment="Left" />

            <Button
                x:Name="btnCheckUpdate"
                Width="100"
                Margin="{StaticResource Margin8}"
                Content="{x:Static resx:ResUI.menuCheckUpdate}"
                IsDefault="True"
                Style="{StaticResource DefButton}" />
        </StackPanel>

        <StackPanel>
            <ListView
                x:Name="lstCheckUpdates"
                BorderThickness="1"
                ItemContainerStyle="{StaticResource lvItemSelected}">
                <ListView.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Vertical" />
                    </ItemsPanelTemplate>
                </ListView.ItemsPanel>
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <Border
                            Width="500"
                            Margin="{StaticResource Margin8}"
                            Padding="0"
                            VerticalAlignment="Center">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="1*" />
                                    <ColumnDefinition Width="1*" />
                                    <ColumnDefinition Width="3*" />
                                </Grid.ColumnDefinitions>
                                <ToggleButton
                                    x:Name="togAutoRefresh"
                                    Grid.Column="0"
                                    Margin="{StaticResource Margin8}"
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Center"
                                    IsChecked="{Binding IsSelected}" />
                                <TextBlock
                                    Grid.Column="1"
                                    Style="{StaticResource ListItemTitle}"
                                    Text="{Binding CoreType}" />
                                <TextBlock
                                    Grid.Column="2"
                                    Style="{StaticResource ListItemSubTitle}"
                                    Text="{Binding Remarks}"
                                    TextWrapping="WrapWithOverflow" />
                            </Grid>
                        </Border>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </StackPanel>
    </DockPanel>
</reactiveui:ReactiveUserControl>
