-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMainWindow.xaml
47 lines (44 loc) · 1.89 KB
/
MainWindow.xaml
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
<Window
x:Class="GameLib.Demo.Wpf.MainWindow"
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:local="clr-namespace:GameLib.Demo.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewmodels="clr-namespace:GameLib.Demo.Wpf.ViewModels"
xmlns:views="clr-namespace:GameLib.Demo.Wpf.Views"
Title="GameLib.NET"
Width="1200"
Height="700"
d:DataContext="{d:DesignInstance Type=viewmodels:MainViewModel}"
Background="{StaticResource PrimaryBackgroundColor}"
Icon="/Resources/icon.ico"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ContentControl Grid.Row="0" Content="{Binding NavigationBarViewModel}">
<ContentControl.Resources>
<DataTemplate DataType="{x:Type viewmodels:NavigationBarViewModel}">
<views:NavigationBarView />
</DataTemplate>
</ContentControl.Resources>
</ContentControl>
<ContentControl Grid.Row="1" Content="{Binding CurrentViewModel}">
<ContentControl.Resources>
<DataTemplate DataType="{x:Type viewmodels:HomeViewModel}">
<views:HomeView />
</DataTemplate>
<DataTemplate DataType="{x:Type viewmodels:LauncherViewModel}">
<views:LauncherView />
</DataTemplate>
<DataTemplate DataType="{x:Type viewmodels:GameViewModel}">
<views:GameView />
</DataTemplate>
</ContentControl.Resources>
</ContentControl>
</Grid>
</Window>