-
Notifications
You must be signed in to change notification settings - Fork 0
/
TemplateControl.xaml
90 lines (77 loc) · 3.8 KB
/
TemplateControl.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<UserControl x:Class="BD_oneLove.TemplateControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BD_oneLove"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="1300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" Grid.RowSpan="8" Grid.Column="0" Grid.ColumnSpan="3" Background="AliceBlue">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Ellipse Grid.Row="1" Grid.Column="1" >
<Ellipse.Fill>
<ImageBrush ImageSource="{Binding Photo, RelativeSource={RelativeSource FindAncestor, AncestorType=local:TemplateControl}, UpdateSourceTrigger=PropertyChanged}"/>
</Ellipse.Fill>
</Ellipse>
<Label HorizontalAlignment="Center" Name="Name" Grid.Row="2" Grid.Column="1" FontWeight="Bold" FontSize="10"
Content="{Binding Caption, RelativeSource={RelativeSource FindAncestor, AncestorType=local:TemplateControl}, UpdateSourceTrigger=PropertyChanged}"></Label>
</Grid>
<TabControl ItemsSource="{Binding Tabs}" Grid.Column="3" Grid.ColumnSpan="12" Grid.Row="0" Grid.RowSpan="7" SelectionChanged="TabControl_SelectionChanged">
<TabControl.ItemTemplate>
<DataTemplate >
<TextBlock Text="{Binding Header}"/>
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate >
<TextBlock Text="{Binding Content}"/>
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
<Button Margin="10,25" Grid.Column="13" Grid.ColumnSpan="2" Grid.Row="7" Content="Save"></Button>
<Button Margin="10,25" Grid.Column="11" Grid.ColumnSpan="2" Grid.Row="7" Content="Cancel"></Button>
</Grid>
</UserControl>