pa2.Testat/LoggingClient/LoggingClient/MainWindow.xaml

38 lines
1.7 KiB
XML

<Window x:Class="LoggingClient.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:views="clr-namespace:LoggingClient.Views"
xmlns:local="clr-namespace:LoggingClient.ViewModel"
Title="MainWindow" Height="470" Width="800" ResizeMode="NoResize">
<Window.Resources>
<DataTemplate DataType="{x:Type local:LogViewModel}">
<views:LogView/>
</DataTemplate>
<DataTemplate DataType="{x:Type local:LocationViewModel}">
<views:LocationView/>
</DataTemplate>
<DataTemplate DataType="{x:Type local:CustomerViewModel}">
<views:CustomerView/>
</DataTemplate>
</Window.Resources>
<DockPanel LastChildFill="True">
<Grid x:Name="Navigation" DockPanel.Dock="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Button HorizontalAlignment="Left" Width="268" Content="Log Reader" Command="{Binding LogsCommand}"/>
<Button HorizontalAlignment="Center" Width="265" Content="Locations" Command="{Binding LocationsCommand}" Margin="265,0,-235,0"/>
<Button HorizontalAlignment="Right" Width="264" Content="Customers" Command="{Binding CustomersCommand}" Margin="0,0,-498,0"/>
</Grid>
<ContentControl x:Name="Pages" DockPanel.Dock="Right" Content="{Binding SelectedViewModel}"/>
</DockPanel>
</Window>