-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.xaml
116 lines (116 loc) · 7.2 KB
/
App.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<Application x:Class="KafkaSniffer.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:KafkaSniffer"
StartupUri="MainWindow.xaml">
<Application.Resources>
<Style TargetType="Label">
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="Margin" Value="0 0 5 0" />
</Style>
<Style TargetType="TextBox">
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Width" Value="120"/>
</Style>
<Style TargetType="{x:Type TextBox}" x:Key="MultiLine">
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="AcceptsReturn" Value="True"/>
<Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
</Style>
<Style TargetType="PasswordBox">
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<Style TargetType="Button">
<Setter Property="Margin" Value="10 0" />
<Setter Property="Padding" Value="10 0" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
<Style TargetType="CheckBox">
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style TargetType="GroupBox">
<Setter Property="Margin" Value="5" />
</Style>
<Style TargetType="TabControl">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Grid ClipToBounds="true" KeyboardNavigation.TabNavigation="Local" SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
<RowDefinition x:Name="RowDefinition1" Height="*"/>
</Grid.RowDefinitions>
<Button Grid.Column="2" Grid.Row="0" Margin="5,0,0,0" Name="AddButton">Add...</Button>
<TabPanel
x:Name="HeaderPanel"
Grid.Column="0"
Grid.Row="0"
Margin="2,2,2,0"
Panel.ZIndex="1"
IsItemsHost="true"
KeyboardNavigation.TabIndex="1"/>
<Border
x:Name="ContentPanel"
Grid.Column="0"
Grid.ColumnSpan="3"
Grid.Row="1"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
KeyboardNavigation.DirectionalNavigation="Contained"
KeyboardNavigation.TabIndex="2"
KeyboardNavigation.TabNavigation="Local">
<ContentPresenter
x:Name="PART_SelectedContentHost"
Margin="{TemplateBinding Padding}"
ContentSource="SelectedContent"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="TabStripPlacement" Value="Bottom">
<Setter TargetName="HeaderPanel" Property="Grid.Row" Value="1"/>
<Setter TargetName="ContentPanel" Property="Grid.Row" Value="0"/>
<Setter TargetName="RowDefinition0" Property="Height" Value="*"/>
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto"/>
<Setter TargetName="HeaderPanel" Property="Margin" Value="2,0,2,2"/>
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0"/>
<Setter TargetName="ContentPanel" Property="Grid.Row" Value="0"/>
<Setter TargetName="HeaderPanel" Property="Grid.Column" Value="0"/>
<Setter TargetName="ContentPanel" Property="Grid.Column" Value="1"/>
<Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto"/>
<Setter TargetName="ColumnDefinition1" Property="Width" Value="*"/>
<Setter TargetName="RowDefinition0" Property="Height" Value="*"/>
<Setter TargetName="RowDefinition1" Property="Height" Value="0"/>
<Setter TargetName="HeaderPanel" Property="Margin" Value="2,2,0,2"/>
</Trigger>
<Trigger Property="TabStripPlacement" Value="Right">
<Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0"/>
<Setter TargetName="ContentPanel" Property="Grid.Row" Value="0"/>
<Setter TargetName="HeaderPanel" Property="Grid.Column" Value="1"/>
<Setter TargetName="ContentPanel" Property="Grid.Column" Value="0"/>
<Setter TargetName="ColumnDefinition0" Property="Width" Value="*"/>
<Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto"/>
<Setter TargetName="RowDefinition0" Property="Height" Value="*"/>
<Setter TargetName="RowDefinition1" Property="Height" Value="0"/>
<Setter TargetName="HeaderPanel" Property="Margin" Value="0,2,2,2"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
</Application>