-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
52 lines (52 loc) · 2.67 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
48
49
50
51
52
<Window x:Class="PasswordHoarder.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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewmodels="clr-namespace:PasswordHoarder.ViewModels"
xmlns:local="clr-namespace:PasswordHoarder"
xmlns:views="clr-namespace:PasswordHoarder.Views"
mc:Ignorable="d"
Title="Password Hoarder" Height="600" Width="750" MinWidth="600" MinHeight="600">
<DockPanel>
<Menu DockPanel.Dock="Top" ItemsSource="{Binding MenuItems}" Height="20">
<Menu.ItemContainerStyle>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="Command" Value="{Binding Command}" />
</Style>
</Menu.ItemContainerStyle>
<Menu.ItemTemplate>
<HierarchicalDataTemplate DataType="{x:Type viewmodels:MenuItemViewModel}" ItemsSource="{Binding Path=SubItems}">
<TextBlock Text="{Binding Header}"/>
</HierarchicalDataTemplate>
</Menu.ItemTemplate>
</Menu>
<Grid>
<ContentControl Content="{Binding CurrentViewModel}">
<ContentControl.Resources>
<DataTemplate DataType="{x:Type viewmodels:LoginViewModel}">
<views:LoginView/>
</DataTemplate>
<DataTemplate DataType="{x:Type viewmodels:AddPasswordViewModel}">
<views:AddPasswordView/>
</DataTemplate>
<DataTemplate DataType="{x:Type viewmodels:EditPasswordViewModel}">
<views:EditPasswordView/>
</DataTemplate>
<DataTemplate DataType="{x:Type viewmodels:BrowserViewModel}">
<views:BrowserView/>
</DataTemplate>
<DataTemplate DataType="{x:Type viewmodels:GeneratePasswordViewModel}">
<views:GeneratePasswordView/>
</DataTemplate>
<DataTemplate DataType="{x:Type viewmodels:HelpViewModel}">
<views:HelpView/>
</DataTemplate>
<DataTemplate DataType="{x:Type viewmodels:AboutViewModel}">
<views:AboutView/>
</DataTemplate>
</ContentControl.Resources>
</ContentControl>
</Grid>
</DockPanel>
</Window>