<Page x:Class="FLY.Thick.Base.UI.PgAddress"
      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:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
      mc:Ignorable="d" 
      d:DesignHeight="800" d:DesignWidth="1024"
      Background="WhiteSmoke"
	Title="PgCustomSections">
    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Page.Resources>
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="496*" />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal"  Background="{StaticResource Brush_theme_bar}" >
            <Button Style="{StaticResource Styles.TitleBar.BackButton2}" Command="BrowseBack"/>
            <TextBlock Style="{StaticResource TextBlockStyle_Title}" Text="服务器地址"/>
        </StackPanel>
        <DataGrid AlternationCount ="2" AlternatingRowBackground="LightGray"  AutoGenerateColumns="False" CanUserAddRows="False" Margin="{StaticResource ControlMargin}" 
                  Grid.Row="1" ItemsSource="{Binding ConnAddrs}" >
            <DataGrid.CellStyle>
                <Style TargetType="DataGridCell">
                    <Setter Property="FontSize" Value="20"/>
                </Style>
            </DataGrid.CellStyle>
            <DataGrid.Columns>
                <DataGridTextColumn CanUserSort="False" CanUserReorder="False" Binding="{Binding ConnName}" IsReadOnly="True">
                    <DataGridTextColumn.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" 
                                       Text="服务器"/>
                        </StackPanel>
                    </DataGridTextColumn.Header>
                </DataGridTextColumn>
                <DataGridTextColumn CanUserSort="False" CanUserReorder="False" Binding="{Binding Address}" >
                    <DataGridTextColumn.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" 
                                       Text="地址"/>
                            <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" FontSize="15" 
                                       Text="如:127.0.0.0:20006"/>
                        </StackPanel>
                    </DataGridTextColumn.Header>
                </DataGridTextColumn>
            </DataGrid.Columns>
        </DataGrid>
        <Button Style="{StaticResource ButtonStyle_apply}" VerticalAlignment="Bottom" Margin="0,0,20,-45" 
                Command="{Binding ApplyCmd}"/>
    </Grid>
</Page>
