1
0
mirror of synced 2024-11-15 01:33:51 +00:00
PettingZoo/View/MainWindow.xaml

79 lines
4.1 KiB
Plaintext
Raw Normal View History

2016-06-18 14:50:32 +00:00
<Window x:Class="PettingZoo.View.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2016-06-18 18:30:12 +00:00
xmlns:res="clr-namespace:PettingZoo.Properties"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:viewModel="clr-namespace:PettingZoo.ViewModel"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance viewModel:MainViewModel}"
Width="800"
Height="600"
ResizeMode="CanResizeWithGrip"
Style="{StaticResource WindowStyle}"
Title="{x:Static res:Resources.MainWindowTitle}">
2016-06-18 14:50:32 +00:00
<DockPanel>
2016-06-18 18:30:12 +00:00
<ToolBar DockPanel.Dock="Top" ToolBarTray.IsLocked="True">
<Button Command="{Binding ConnectCommand}" Content="Connect"></Button>
<Button Command="{Binding DisconnectCommand}" Content="Disconnect"></Button>
<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
<Button Command="{Binding ClearCommand}" Content="Clear messages"></Button>
</ToolBar>
<StatusBar DockPanel.Dock="Bottom">
<StatusBarItem>
<TextBlock />
</StatusBarItem>
</StatusBar>
2016-06-20 10:30:03 +00:00
<Grid Margin="4">
2016-06-18 14:50:32 +00:00
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
2016-06-20 10:30:03 +00:00
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="300" />
2016-06-18 14:50:32 +00:00
</Grid.ColumnDefinitions>
2016-06-20 10:30:03 +00:00
<ListBox Grid.Column="0" Grid.Row="0"
HorizontalAlignment="Stretch"
ItemsSource="{Binding Messages}"
SelectedItem="{Binding Path=SelectedMessage, Mode=TwoWay}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<TextBlock Text="{Binding RoutingKey}"></TextBlock>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<GridSplitter Width="5" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch"/>
<Grid Grid.Column="2" Grid.Row="0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="200"/>
</Grid.RowDefinitions>
<Border Grid.Column="0" Grid.Row="0" Style="{StaticResource SidePanel}">
<DockPanel>
<Label DockPanel.Dock="Top" Style="{StaticResource HeaderLabel}" Content="{x:Static res:Resources.PanelTitleBody}"/>
<TextBox
Text="{Binding SelectedMessageBody, Mode=OneWay}"
BorderThickness="0"
IsReadOnly="True"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"/>
</DockPanel>
</Border>
<GridSplitter HorizontalAlignment="Stretch" Grid.Column="0" Grid.Row="1" Height="5" ResizeDirection="Rows"/>
<Border Grid.Column="0" Grid.Row="2" Style="{StaticResource SidePanel}">
<DockPanel>
<Label DockPanel.Dock="Top" Style="{StaticResource HeaderLabel}" Content="{x:Static res:Resources.PanelTitleProperties}"/>
<DataGrid ItemsSource="{Binding SelectedMessageProperties}" AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource Properties}">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Key}" Header="{x:Static res:Resources.PropertyName}" Width="100"/>
<DataGridTextColumn Binding="{Binding Value}" Header="{x:Static res:Resources.PropertyValue}" Width="*"/>
</DataGrid.Columns>
</DataGrid>
</DockPanel>
</Border>
</Grid>
2016-06-18 14:50:32 +00:00
</Grid>
</DockPanel>
</Window>