first commit
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Controls.CustomWindowTitleControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="50" d:DesignWidth="800"
|
||||
DataContext="{Binding Mode=OneWay, RelativeSource={RelativeSource Self}}"
|
||||
Background="{DynamicResource ThemeWindowBackgroundBrush}">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../Resources/Icons.xaml" />
|
||||
<ResourceDictionary Source="../../Resources/ResourceDictionary.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:WindowMouseDownBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
<Grid Margin="5">
|
||||
<ContentPresenter Content="{Binding AdditionalContent}" DockPanel.Dock="Left" />
|
||||
<Label DockPanel.Dock="Left" Content="{Binding CustomTitle}" FontSize="16" Margin="5,0,5,0"
|
||||
Foreground="{DynamicResource ThemeForegroundBrush}" />
|
||||
<StackPanel DockPanel.Dock="Right" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Button Background="{DynamicResource ThemeWindowBackgroundBrush}" BorderBrush="Transparent" Height="24"
|
||||
Width="24" DockPanel.Dock="Right"
|
||||
IsEnabled="{Binding CanMinimize}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:WindowCommandBehaviour Command="Minimize" />
|
||||
</i:Interaction.Behaviors>
|
||||
<Image Source="{StaticResource minusIcon}" />
|
||||
</Button>
|
||||
<Button Background="{DynamicResource ThemeWindowBackgroundBrush}" BorderBrush="Transparent" Height="24"
|
||||
Width="24" DockPanel.Dock="Right"
|
||||
IsEnabled="{Binding CanMaximize}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:WindowCommandBehaviour Command="Maximize" />
|
||||
</i:Interaction.Behaviors>
|
||||
<Image Source="{StaticResource squareIcon}" />
|
||||
</Button>
|
||||
<Button Background="{DynamicResource ThemeWindowBackgroundBrush}" BorderBrush="Transparent" Height="24"
|
||||
Width="24" DockPanel.Dock="Right"
|
||||
IsEnabled="{Binding CanClose}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:WindowCommandBehaviour Command="Close" />
|
||||
</i:Interaction.Behaviors>
|
||||
<Image Source="{StaticResource closeIcon}" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user