-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMainWindow.xaml
70 lines (69 loc) · 3.16 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<Window x:Class="interfacebased.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:Nulltovisconverter="clr-namespace:nulltovisconverter;assembly=nulltovisconverter"
xmlns:Interfacebased="clr-namespace:interfacebased"
mc:Ignorable="d"
Title="MainWindow"
Width="1024"
Height="768"
WindowStartupLocation="CenterScreen"
d:DataContext="{d:DesignInstance Interfacebased:MainViewModel}" >
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- Other resource dictionaries -->
<ResourceDictionary Source="HairColorCounting/HairColorCountingView.xaml" />
<ResourceDictionary Source="FriendsList/FriendsListView.xaml" />
<ResourceDictionary Source="FriendDetail/FriendDetailView.xaml" />
<!-- This resource dictionary -->
<ResourceDictionary>
<!-- The border brush -->
<Brush x:Key="BorderBrush" >Gray</Brush>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- Hair counting part -->
<Border Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
Padding="5"
BorderBrush="{StaticResource BorderBrush}"
BorderThickness="2" >
<ContentControl Content="{Binding HairCountingViewModel}"
ContentTemplate="{StaticResource HairCountingDataTemplate}" />
</Border>
<!-- Friends Master View -->
<Border Grid.Row="1"
Grid.Column="0"
Padding="5"
BorderBrush="{StaticResource BorderBrush}"
BorderThickness="2,0,2,2" >
<ContentControl Content="{Binding FriendsViewModel}"
ContentTemplate="{StaticResource FriendsListDataTemplate}" />
</Border>
<!-- Friend Detail View -->
<Border Grid.Row="1"
Grid.Column="1"
Padding="5"
BorderBrush="{StaticResource BorderBrush}"
BorderThickness="0,0,2,2" >
<ContentControl Content="{Binding FriendsViewModel.SelectedFriend}"
Visibility="{Binding FriendsViewModel.SelectedFriend,
Converter={Nulltovisconverter:NullToVisibilityConverter Inverted=True}}"
ContentTemplate="{StaticResource FriendDetailViewDataTemplate}" />
</Border>
</Grid>
</Window>