1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
| <Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="3*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="3*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Label Content="Name" Grid.Row="0" Grid.Column="0" Name="NameLabel" VerticalAlignment="Center" />
<Label Content="Type" Grid.Row="1" Grid.Column="0" Name="TypeLabel" VerticalAlignment="Center" />
<Label Content="Sub-type" Grid.Row="2" Grid.Column="0" Name="SubTypeLabel" VerticalAlignment="Center" />
<TextBox Name="NameTextBox" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Text="{Binding Name, Mode=TwoWay}"/>
<ComboBox Name="TypeComboBox" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" ItemsSource="{StaticResource NDTypes}" SelectedValue="{Binding Type, Mode=TwoWay}"/>
<ComboBox Name="SubTypeComboBox" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" ItemsSource="{StaticResource NESubTypes}" SelectedValue="{Binding SubType, Mode=TwoWay}"/>
<Label Content="Loopback addresses" Grid.Row="3" Grid.Column="0" Name="LoopbackLabel" VerticalAlignment="Center" />
<DataGrid Name="HostsDataGrid"
Grid.Row="4"
Grid.ColumnSpan="4"
CanUserAddRows="True"
ItemsSource="{Binding LoopbackAddresses, Mode=TwoWay}"
AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="IP Address" Binding="{Binding IPAddress, Converter={StaticResource IPATSConverter}}"/>
<DataGridTextColumn Header="IP Mask" Binding="{Binding IPMask, Converter={StaticResource IPATSConverter}}"/>
</DataGrid.Columns>
</DataGrid>
<Label Content="Ports" Grid.Row="5" Grid.Column="0" Name="PortsLabel" VerticalAlignment="Center" />
<!--<DataGrid Name="PortsDataGrid"
Grid.Row="6"
Grid.ColumnSpan="4"
CanUserAddRows="True"
ItemsSource="{Binding Ports, Mode=TwoWay}"
AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Port" Binding="{Binding Port}"/>
<DataGridComboBoxColumn Header="Port type" ItemsSource="{StaticResource PortTypes}" SelectedItemBinding="{Binding PortType}"/>
</DataGrid.Columns>
</DataGrid>-->
<DataGrid Name="PortsDataGrid"
Grid.Row="6"
Grid.ColumnSpan="4"
CanUserAddRows="True"
ItemsSource="{Binding Ports, Mode=TwoWay}"
AutoGenerateColumns="False">
<DataGridTextColumn Header="Port" Binding="{Binding Port}"/>
<DataGridTemplateColumn Header="Port type">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ComboBox ItemsSource="{StaticResource PortTypes}" SelectedItem="{Binding PortType}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid>
<ComboBox Name="NEChoiceComboBox" Grid.Row="7" Grid.Column="0" VerticalAlignment="Center"/>
<Button Name="CancelButton" Width="80" IsCancel="True" Content="Cancel" Grid.Row="7" Grid.Column="2" VerticalAlignment="Center"/>
<Button Name="OkButton" Width="80" IsDefault="True" Content="OK" Grid.Row="7" Grid.Column="3" VerticalAlignment="Center"/>
</Grid> |