|
1 | | -<UserControl xmlns="https://github.com/avaloniaui" |
| 1 | +<UserControl xmlns="https://github.com/avaloniaui" |
2 | 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
3 | 3 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|
12 | 12 |
|
13 | 13 | <Grid x:Name="RootGrid" RowDefinitions="Auto,*"> |
14 | 14 | <Grid Name="TitleBarHost" ZIndex="1" |
15 | | - ColumnDefinitions="Auto,Auto,*,Auto" |
16 | | - Background="Transparent"> |
| 15 | + ColumnDefinitions="Auto,Auto,*,Auto,Auto" |
| 16 | + Background="Transparent" |
| 17 | + PointerPressed="TitleBarHost_OnPointerPressed"> |
17 | 18 | <Image Margin="16,4,12,4" |
18 | 19 | IsHitTestVisible="False" |
19 | 20 | Source="/Assets/ktvr.ico" |
20 | 21 | Width="18" Height="18" |
21 | 22 | DockPanel.Dock="Left" |
22 | 23 | Name="MainWindowIcon" |
23 | | - RenderOptions.BitmapInterpolationMode="HighQuality"> |
24 | | - <Image.IsVisible> |
25 | | - <OnPlatform Default="False"> |
26 | | - <On Options="Windows" Content="True" /> |
27 | | - </OnPlatform> |
28 | | - </Image.IsVisible> |
29 | | - </Image> |
| 24 | + RenderOptions.BitmapInterpolationMode="HighQuality" /> |
30 | 25 |
|
31 | 26 | <TextBlock Text="{Binding Title, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" |
32 | 27 | x:Name="AppTitleLabel" FontSize="12" |
33 | 28 | IsHitTestVisible="False" |
34 | 29 | VerticalAlignment="Center" |
35 | | - Grid.Column="1"> |
36 | | - <TextBlock.IsVisible> |
37 | | - <OnPlatform Default="False"> |
38 | | - <On Options="Windows" Content="True" /> |
39 | | - </OnPlatform> |
40 | | - </TextBlock.IsVisible> |
41 | | - </TextBlock> |
| 30 | + Grid.Column="1" /> |
42 | 31 |
|
43 | 32 | <Border Grid.Column="2" Padding="6" Margin="0,-2,0,0"> |
44 | 33 | <AutoCompleteBox ZIndex="1" Name="SearchBox" MaxHeight="40" MaxWidth="500" Watermark="Search" /> |
45 | 34 | </Border> |
| 35 | + |
| 36 | + <StackPanel Grid.Column="4" VerticalAlignment="Center" |
| 37 | + Orientation="Horizontal" Spacing="4" Margin="0,0,4,0"> |
| 38 | + <Button Height="34" Width="34" BorderThickness="0" Background="Transparent" |
| 39 | + Click="MinimizeButton_OnClick"> |
| 40 | + <Button.Content> |
| 41 | + <controls:FontIcon Glyph="" FontSize="13" /> |
| 42 | + </Button.Content> |
| 43 | + </Button> |
| 44 | + <Button Height="34" Width="34" BorderThickness="0" Background="Transparent" |
| 45 | + Click="MaximizeButton_OnClick"> |
| 46 | + <Button.Content> |
| 47 | + <controls:FontIcon Glyph="" FontSize="13" /> |
| 48 | + </Button.Content> |
| 49 | + </Button> |
| 50 | + <Button Height="34" Width="34" BorderThickness="0" Background="Transparent" |
| 51 | + Click="CloseButton_OnClick"> |
| 52 | + <Button.Content> |
| 53 | + <controls:FontIcon Glyph="" FontSize="13" /> |
| 54 | + </Button.Content> |
| 55 | + </Button> |
| 56 | + </StackPanel> |
46 | 57 | </Grid> |
47 | 58 |
|
48 | 59 | <!-- ~1~ ReSharper disable once Xaml.MissingGridIndex @1@ --> |
|
85 | 96 | <!-- </TextBlock> --> |
86 | 97 | <!-- </Grid> --> |
87 | 98 |
|
88 | | - <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent"> |
89 | | - <Grid.ColumnDefinitions> |
90 | | - <ColumnDefinition Width="62" /> |
91 | | - <ColumnDefinition Width="*" /> |
92 | | - </Grid.ColumnDefinitions> |
93 | | - |
94 | | - <Grid.RowDefinitions> |
95 | | - <RowDefinition Height="40" /> |
96 | | - <RowDefinition Height="*" /> |
97 | | - </Grid.RowDefinitions> |
98 | | - |
99 | | - <Grid Background="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" |
100 | | - Grid.Column="1" x:Name="DragElement" ZIndex="1" /> |
101 | | - </Grid> |
102 | | - |
103 | 99 | <Grid VerticalAlignment="Top" HorizontalAlignment="Left" |
104 | 100 | Width="70" Height="300" Margin="0,40,0,0" |
105 | 101 | x:Name="NavigationBlockerGrid" Background="Transparent" |
|
0 commit comments