<UserControl x:Class="VIZ.Framework.TimeSliceTool.MainView"
             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:local="clr-namespace:VIZ.Framework.TimeSliceTool"
             d:DataContext="{d:DesignInstance Type=local:MainViewModel}"
             mc:Ignorable="d" Background="White"
             d:DesignHeight="450" d:DesignWidth="800">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="60"></RowDefinition>
            <RowDefinition Height="60"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <!-- 路径选择 -->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="160"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Text="选择路径：" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
            <TextBox Grid.Column="1" Height="30" VerticalAlignment="Center" VerticalContentAlignment="Center" 
                     Margin="10,0,10,0" TextWrapping="NoWrap" AcceptsReturn="False" Padding="3,0,3,0"
                     Text="{Binding Path=DirPath,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
            <Button Grid.Column="2" Width="120" Height="30" Content="选择路径"
                    Command="{Binding Path=SelectDirPathCommand}"></Button>
        </Grid>
        <!-- UDP -->
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="100"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="160"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Text="发送目标IP:" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
            <TextBox Grid.Column="1" Height="30" VerticalAlignment="Center" VerticalContentAlignment="Center" 
                     Margin="10,0,10,0" TextWrapping="NoWrap" AcceptsReturn="False" Padding="3,0,3,0"
                     Text="{Binding Path=DirPath,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
            <TextBlock Text="发送目标端口:" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Column="2"></TextBlock>
            <TextBox Grid.Column="3" Height="30" VerticalAlignment="Center" VerticalContentAlignment="Center" 
                     Margin="10,0,10,0" TextWrapping="NoWrap" AcceptsReturn="False" Padding="3,0,3,0"
                     Text="{Binding Path=DirPath,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
            <Button Width="120" Height="30" Content="发送" Grid.Column="4"
                    Command="{Binding Path=SelectDirPathCommand}"></Button>
        </Grid>
        <!-- Json数据 -->
        <TextBox Grid.Row="2"
                 Margin="18" TextWrapping="Wrap" AcceptsReturn="True" Padding="3"
                 Text="{Binding Path=JsonString,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
    </Grid>
</UserControl>
