forked from yatli/fvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTitleBar.xaml
55 lines (55 loc) · 2.47 KB
/
TitleBar.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
<UserControl
xmlns = "https://github.com/avaloniaui"
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:fvim = "clr-namespace:FVim;assembly=FVim"
Focusable = "False"
Design.Width="400"
FontFamily="{Binding FontFamily}"
FontSize="{Binding FontSize}"
Foreground="{Binding NormalForeground}"
Background="{Binding NormalBackground}"
x:Class = "FVim.TitleBar">
<Design.DataContext>
<fvim:TitleBarSampleData />
</Design.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="32" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="32" />
<ColumnDefinition Width="32" />
<ColumnDefinition Width="32" />
</Grid.ColumnDefinitions>
<Grid.Styles>
<Style Selector="Button">
<Setter Property="Background" Value="{Binding NormalBackground}" />
<Setter Property="Foreground" Value="{Binding NormalForeground}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="Button[IsPointerOver=True]">
<Setter Property="Background" Value="{Binding SelectBackground}" />
<Setter Property="Foreground" Value="{Binding SelectForeground}" />
</Style>
<Style Selector="Button[IsPressed=True]">
<Setter Property="Background" Value="{Binding HoverBackground}" />
<Setter Property="Foreground" Value="{Binding HoverForeground}" />
</Style>
<Style Selector="Button.inactive">
<Setter Property="Foreground" Value="{Binding InactiveForeground}" />
</Style>
<Style Selector="TextBlock.inactive">
<Setter Property="Foreground" Value="{Binding InactiveForeground}" />
</Style>
</Grid.Styles>
<Image Source="/Assets/fvim.png" Grid.Column="0" Margin="3,3,3,3" Stretch="Uniform" Height="16" />
<TextBlock Name="Title" Classes="inactive" Text="{Binding $parent[fvim:TitleBar].Title}" Grid.Column="1" VerticalAlignment="Center" />
<Button Name="MinimizeButton" Classes="inactive" Content="__" Grid.Column="2" Focusable="False" />
<Button Name="MaximizeButton" Classes="inactive" Content="O" Grid.Column="3" Focusable="False" />
<Button Name="CloseButton" Classes="inactive" Content="X" Grid.Column="4" Focusable="False" />
</Grid>
</UserControl>