122 lines
5.5 KiB
XML
122 lines
5.5 KiB
XML
<Lib:EffectorWindow x:Class="MainWindowV"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:Effector.Main"
|
|
xmlns:Lib="clr-namespace:Effector.Plugin.Lib;assembly=Effector.Plugin.Lib"
|
|
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
|
TitleBarHeight="40"
|
|
Title="{Binding sTitle}"
|
|
TitlePanel="{Binding ContentMenu}">
|
|
<Window.OpacityMask>
|
|
<SolidColorBrush Color="White" Opacity="{Binding Window_Opacity}"/>
|
|
</Window.OpacityMask>
|
|
<!--<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="{Binding TitleBarHeight, RelativeSource={RelativeSource AncestorType={x:Type local:MainWindowV}}}"/>
|
|
<RowDefinition Height="1*"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Border Grid.Column="0"
|
|
Grid.ColumnSpan="6"
|
|
BorderThickness="0"
|
|
BorderBrush="{StaticResource Effector_Blue}"
|
|
Background="{StaticResource Effector_Blue}"/>
|
|
<Image Grid.Column="0"
|
|
MinWidth="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
|
|
Source="/Resources/Effector.ico"/>
|
|
<ContentControl Grid.Column="1"
|
|
Content="{Binding ContentMenu}"/>
|
|
<TextBlock Grid.Column="2"
|
|
Margin="4 0 0 0"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
FontSize="14"
|
|
Text="{Binding sTitle}">
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsActive, RelativeSource={RelativeSource AncestorType=Window}}" Value="False">
|
|
<Setter Property="Foreground" Value="{DynamicResource WindowTitleBarInactiveText}" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
|
|
<Button Grid.Column="3"
|
|
Click="OnMinimizeButtonClick"
|
|
RenderOptions.EdgeMode="Aliased"
|
|
Style="{StaticResource TitleBar_Button}">
|
|
<Path Width="46"
|
|
Height="32"
|
|
Data="M 18,15 H 28"
|
|
Stroke="{Binding Path=Foreground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1" />
|
|
</Button>
|
|
|
|
<Button Name="MaximizeBtn"
|
|
Grid.Column="4"
|
|
Click="OnMaximizeRestoreButtonClick">
|
|
<Button.Style>
|
|
<Style TargetType="Button" BasedOn="{StaticResource TitleBar_Button}">
|
|
<Style.Resources>
|
|
<Grid x:Key="max">
|
|
<Path Width="46"
|
|
Height="32"
|
|
Data="M 18.5,12.5 H 25.5 V 19.5 H 18.5 Z M 20.5,12.5 V 10.5 H 27.5 V 17.5 H 25.5"
|
|
Stroke="{Binding Path=Foreground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1" />
|
|
</Grid>
|
|
<Grid x:Key="normal">
|
|
<Path Width="46"
|
|
Height="32"
|
|
Data="M 18.5,10.5 H 27.5 V 19.5 H 18.5 Z"
|
|
Stroke="{Binding Path=Foreground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1" />
|
|
</Grid>
|
|
</Style.Resources>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding WindowState, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindowV}}}" Value="Maximized">
|
|
<Setter Property="Content" Value="{StaticResource max}" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding WindowState, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindowV}}}" Value="Normal">
|
|
<Setter Property="Content" Value="{StaticResource normal}" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Button.Style>
|
|
|
|
</Button>
|
|
|
|
<Button Grid.Column="5"
|
|
Click="OnCloseButtonClick"
|
|
Style="{StaticResource TitleBar_Button}">
|
|
<Path Width="46"
|
|
Height="32"
|
|
Data="M 18,11 27,20 M 18,20 27,11"
|
|
Stroke="{Binding Path=Foreground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1" />
|
|
</Button>
|
|
|
|
</Grid>
|
|
<ContentControl Grid.Row="1"
|
|
Content="{Binding ContentPanel}"
|
|
BorderThickness="0"/>
|
|
</Grid>-->
|
|
<ContentControl Grid.Row="1"
|
|
Content="{Binding ContentPanel}"
|
|
BorderThickness="0"/>
|
|
</Lib:EffectorWindow>
|