-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMainWindow.xaml
42 lines (38 loc) · 2.01 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
<Window x:Class="CompactNavigationMenu.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:local="clr-namespace:CompactNavigationMenu"
xmlns:views="clr-namespace:CompactNavigationMenu.Views"
mc:Ignorable="d"
Height="450" Width="700" Background="#FFEAEBEC"
Title="Nav" WindowStartupLocation="CenterScreen">
<Window.Resources>
<Style x:Key="NavigationContentStyle" TargetType="ContentControl">
<Setter Property="ContentTemplate" Value="{StaticResource HomeViewTemplate}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=NavigationMenuListBox, Path=SelectedItem}"
Value="Email">
<Setter Property="ContentTemplate" Value="{StaticResource EmailViewTemplate}"/>
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=NavigationMenuListBox, Path=SelectedItem}"
Value="Cloud">
<Setter Property="ContentTemplate" Value="{StaticResource CloudViewTemplate}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ListBox x:Name="NavigationMenuListBox"
Style="{StaticResource NavigationListBoxStyle}"
ItemContainerStyle="{DynamicResource NavigationListBoxItemStyle}"
ItemTemplate="{DynamicResource NavigationDataTemplate}"
ItemsSource="{StaticResource NavigationMenuItems}"/>
<ContentControl Grid.Column="1" Style="{StaticResource NavigationContentStyle}"/>
</Grid>
</Window>