<Window x:Class="YoseenPTZ.ViewDef.ConfigSystemView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:mdix="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mvvm="clr-namespace:MVVM;assembly=MVVM"
xmlns:mvvmhelpers="clr-namespace:MVVM.Helpers;assembly=MVVM"
             
xmlns:local="clr-namespace:YoseenPTZ.ViewDef"
        
        WindowStartupLocation="CenterOwner"
        Background="{StaticResource MaterialDesignPaper}"
        TextElement.Foreground="{StaticResource MaterialDesignBody}"
        Style="{StaticResource MaterialDesignWindow}"
        mvvmhelpers:WindowHelper.ShowMinimizeButton="False"
        mvvmhelpers:WindowHelper.ShowMaximizeButton="False"
        Title="系统配置" Width="400" Height="600">

    <Grid>
        <Grid.Resources>
            <Style TargetType="Button" BasedOn="{StaticResource MaterialDesignOutlinedButton}">
                <Setter Property="Margin"  Value="3"/>
                <Setter Property="Width" Value="100"></Setter>
                <Setter Property="Height" Value="30"></Setter>
                <Setter Property="HorizontalAlignment" Value="Center"></Setter>
                <Setter Property="VerticalAlignment" Value="Center"></Setter>
            </Style>

            <Style TargetType="xctk:PropertyGrid">
                <Setter Property="Margin" Value="4"></Setter>
                <Setter Property="Foreground" Value="Black"></Setter>
                <Setter Property="ShowTitle" Value="False"></Setter>
                <Setter Property="ShowSearchBox" Value="False"></Setter>
                <Setter Property="ShowSortOptions" Value="False"></Setter>
                <Setter Property="ShowSummary" Value="True"></Setter>
            </Style>
        </Grid.Resources>

        <Grid.RowDefinitions>
            <RowDefinition Height="40"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>

        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <RadioButton Grid.Column="0" Margin="3" Style="{StaticResource MaterialDesignToolRadioButton}" x:Name="rbTab0" IsChecked="True">
                <TextBlock Text="常规"></TextBlock>
            </RadioButton>
            <RadioButton Grid.Column="1" Margin="3" Style="{StaticResource MaterialDesignToolRadioButton}" x:Name="rbTab1" >
                <TextBlock Text="设备"></TextBlock>
            </RadioButton>
            <RadioButton Grid.Column="2" Margin="3" Style="{StaticResource MaterialDesignToolRadioButton}" x:Name="rbTab2" >
                <TextBlock Text="图像"></TextBlock>
            </RadioButton>
        </Grid>

        <xctk:PropertyGrid x:Name="pgHead" Grid.Row="1" Visibility="{Binding IsChecked, ElementName=rbTab0, Converter={StaticResource booleanToVisibilityConverter}}">
            <xctk:PropertyGrid.Resources>
                <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
                    <Setter Property="Foreground" Value="Black"></Setter>
                </Style>
            </xctk:PropertyGrid.Resources>
        </xctk:PropertyGrid>

        <xctk:PropertyGrid x:Name="pgDeviceConfig" Grid.Row="1" Visibility="{Binding IsChecked, ElementName=rbTab1, Converter={StaticResource booleanToVisibilityConverter}}">
            <xctk:PropertyGrid.Resources>
                <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
                    <Setter Property="Foreground" Value="Black"></Setter>
                </Style>
            </xctk:PropertyGrid.Resources>
        </xctk:PropertyGrid>

        <xctk:PropertyGrid x:Name="pgImageConfig" Grid.Row="1" Visibility="{Binding IsChecked, ElementName=rbTab2, Converter={StaticResource booleanToVisibilityConverter}}">
            <xctk:PropertyGrid.Resources>
                <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
                    <Setter Property="Foreground" Value="Black"></Setter>
                </Style>
            </xctk:PropertyGrid.Resources>
        </xctk:PropertyGrid>

    </Grid>
</Window>
