Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <controls:MetroWindow x:Class="Margo.UI.View.MainWindowView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:views="clr-namespace:Margo.UI.View"
- xmlns:vm="clr-namespace:Margo.UI.ViewModel"
- xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
- mc:Ignorable="d"
- Title="MainWindowView" Height="300" Width="500"
- GlowBrush="{DynamicResource AccentColorBrush}">
- <Window.DataContext>
- <vm:MainWindowViewModel />
- </Window.DataContext>
- <Window.Resources>
- <DataTemplate DataType="{x:Type vm:ShoppingListViewModel}">
- <views:ShoppingListView />
- </DataTemplate>
- <DataTemplate DataType="{x:Type vm:ProductsViewModel}">
- <views:ProductsView />
- </DataTemplate>
- <DataTemplate DataType="{x:Type vm:AddProductViewModel}">
- <views:AddProductView/>
- </DataTemplate>
- </Window.Resources>
- <Grid Background="White">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="150" />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <StackPanel x:Name="NavPanel"
- Grid.Row="0"
- Grid.Column="0"
- Margin="10,10"
- Background="DarkGray">
- <Button Content="Shopping List"
- Command="{Binding NavCommand}"
- CommandParameter="shoppingList" />
- <Button Content="Products"
- Command="{Binding NavCommand}"
- CommandParameter="products" />
- </StackPanel>
- <ContentControl Grid.Column="1"
- Grid.Row="0"
- Grid.ColumnSpan="2"
- Grid.RowSpan="3"
- Content="{Binding CurrentViewModel}" />
- </Grid>
- </controls:MetroWindow>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement