<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"
	Title="PgCustomSections">
    <Page.Resources>
        <ResourceDictionary>

        </ResourceDictionary>
    </Page.Resources>
    <Grid x:Name="grid_root" Background="{StaticResource Brushes.Card.Background}">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition  />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal"  Background="{StaticResource Brushes.TitleBar.Background}" >
            <Button Style="{StaticResource Styles.TitleBar.BackButton2}" Command="BrowseBack" >
                <iconPacks:PackIconMaterial Kind="ArrowLeftThick" />
            </Button>
            <TextBlock Style="{StaticResource Styles.TitleBar.Text}" Text="{StaticResource str.PgAddress.Title}"/>
        </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="{StaticResource str.PgAddress.Server}"/>
                        </StackPanel>
                    </DataGridTextColumn.Header>
                </DataGridTextColumn>
                <DataGridTextColumn CanUserSort="False" CanUserReorder="False" Binding="{Binding Address}" >
                    <DataGridTextColumn.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" 
                                       Text="{StaticResource str.PgAddress.Address}"/>
                            <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" FontSize="15" 
                                       Text="ex:127.0.0.0:20006"/>
                        </StackPanel>
                    </DataGridTextColumn.Header>
                </DataGridTextColumn>
            </DataGrid.Columns>
        </DataGrid>
        <Button Style="{StaticResource Styles.Button.Apply}" VerticalAlignment="Bottom" Margin="0,0,20,-45" 
                Command="{Binding ApplyCmd}"/>
    </Grid>
</Page>
