Repository navigation
Expand file tree
/
Copy pathTabControlExample.xaml
More file actions
105 lines (105 loc) · 5.08 KB
/
Copy pathTabControlExample.xaml
File metadata and controls
105 lines (105 loc) · 5.08 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<UserControl x:Class="WPFDevelopers.Samples.ExampleViews.Basics.TabControlExample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
Background="{DynamicResource WD.BackgroundBrush}">
<controls:CodeViewer Header="TabControl">
<StackPanel Margin="20,10">
<TextBlock Margin="0,20,0,0" FontSize="20" Text="TabControl" />
<UniformGrid Margin="0,10" Columns="2" Rows="2">
<TabControl Margin="4" wd:ElementHelper.CornerRadius="3">
<TabItem Padding="10" Header="TabItem1">
<Rectangle Fill="{DynamicResource WD.DangerBrush}" />
</TabItem>
<TabItem
Padding="10"
wd:ElementHelper.IsClear="True"
Header="TabItem2">
<Rectangle Fill="{DynamicResource WD.InfoSolidColorBrush}" />
</TabItem>
<TabItem
Padding="10"
wd:ElementHelper.IsClear="True"
Header="TabItem3">
<Rectangle Fill="{DynamicResource WD.WarningBrush}" />
</TabItem>
</TabControl>
<TabControl Margin="4" TabStripPlacement="Bottom">
<TabItem Padding="10" Header="Home">
<Rectangle Fill="{DynamicResource WD.InfoSolidColorBrush}" />
</TabItem>
<TabItem
x:Name="MyTabItem"
MaxWidth="120"
Padding="10"
wd:ElementHelper.IsClear="True"
Header="TabItem2LongLongLongLongLongLongLongLong"
ToolTip="{Binding ElementName=MyTabItem, Path=Header}">
<Rectangle Fill="{DynamicResource WD.DangerBrush}" />
</TabItem>
<TabItem
MaxWidth="120"
Padding="10"
wd:ElementHelper.IsClear="True">
<TabItem.Header>
<TextBlock
VerticalAlignment="Center"
Text="TabItem3LongLongLongLongLongLongLongLong"
TextTrimming="CharacterEllipsis"
TextWrapping="NoWrap"
ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}" />
</TabItem.Header>
<Rectangle Fill="{DynamicResource WD.WarningBrush}" />
</TabItem>
</TabControl>
<TabControl Margin="4" TabStripPlacement="Left">
<TabItem
Padding="10"
wd:ElementHelper.IsClear="True"
Header="TabItem1">
<Rectangle Fill="{DynamicResource WD.WarningBrush}" />
</TabItem>
<TabItem
Padding="10"
wd:ElementHelper.IsClear="True"
Header="TabItem2">
<Rectangle Fill="{DynamicResource WD.InfoSolidColorBrush}" />
</TabItem>
<TabItem
Padding="10"
wd:ElementHelper.IsClear="True"
Header="TabItem3">
<Rectangle Fill="{DynamicResource WD.DangerBrush}" />
</TabItem>
</TabControl>
<TabControl
Margin="4"
IsEnabled="False"
TabStripPlacement="Right">
<TabItem
Padding="10"
wd:ElementHelper.IsClear="True"
Header="TabItem1">
<Rectangle Fill="{DynamicResource WD.SuccessBrush}" />
</TabItem>
<TabItem
Padding="10"
wd:ElementHelper.IsClear="True"
Header="TabItem2">
<Rectangle Fill="{DynamicResource WD.InfoSolidColorBrush}" />
</TabItem>
<TabItem
Padding="10"
wd:ElementHelper.IsClear="True"
Header="TabItem3">
<Rectangle Fill="{DynamicResource WD.WarningBrush}" />
</TabItem>
</TabControl>
</UniformGrid>
</StackPanel>
<controls:CodeViewer.SourceCodes>
<controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/Basics/TabControlExample.xaml" CodeType="Xaml" />
</controls:CodeViewer.SourceCodes>
</controls:CodeViewer>
</UserControl>