-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract custom title bar from MainWindow to separate user control. Us…
…e the control in ConfigWindow and WizardWindow
- Loading branch information
1 parent
b640c6f
commit 3aed2dc
Showing
7 changed files
with
355 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<UserControl x:Class="Soloplan.WhatsON.GUI.CustomTitleBar" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:gui="clr-namespace:Soloplan.WhatsON.GUI" | ||
d:DesignHeight="60" | ||
d:DesignWidth="300" | ||
mc:Ignorable="d"> | ||
<materialDesign:ColorZone Margin="0" | ||
Padding="6" | ||
materialDesign:ShadowAssist.ShadowDepth="Depth2" | ||
DockPanel.Dock="Top" | ||
Mode="PrimaryMid" | ||
MouseDown="MainWindowBarMouseDown"> | ||
<DockPanel DockPanel.Dock="Top"> | ||
|
||
<materialDesign:PackIcon Width="30" | ||
Height="30" | ||
HorizontalAlignment="Center" | ||
VerticalAlignment="Center" | ||
Background="Transparent" | ||
Cursor="Hand" | ||
DockPanel.Dock="Left" | ||
Kind="{Binding CustomButtonIcon}" | ||
Visibility="{Binding CustomButtonVisible, Converter={StaticResource BoolToVis}}" | ||
MouseDown="OnButtonClicked" /> | ||
|
||
<Button Width="30" | ||
Height="30" | ||
Margin="1" | ||
Padding="0" | ||
Click="CloseButtonClick" | ||
Cursor="Hand" | ||
DockPanel.Dock="Right" | ||
IsTabStop="False"> | ||
<materialDesign:PackIcon Width="30" | ||
Height="30" | ||
Kind="WindowClose" /> | ||
</Button> | ||
|
||
<Button x:Name="MinimizeButton" | ||
Width="30" | ||
Height="30" | ||
Margin="1" | ||
Padding="0,6,0,0" | ||
Click="MinimizeButonClick" | ||
Cursor="Hand" | ||
DockPanel.Dock="Right" | ||
IsTabStop="False" | ||
Visibility="{Binding Path=ShowMinimizeButton, Converter={StaticResource BoolToVis}}"> | ||
<materialDesign:PackIcon Width="30" | ||
Height="30" | ||
Kind="WindowMinimize" /> | ||
</Button> | ||
|
||
<TextBlock Name="appName" | ||
HorizontalAlignment="Center" | ||
VerticalAlignment="Center" | ||
DockPanel.Dock="Right" | ||
FontSize="18" | ||
Text="{Binding Path=Text}" /> | ||
|
||
</DockPanel> | ||
</materialDesign:ColorZone> | ||
</UserControl> |
Oops, something went wrong.