Derive nav/content shades from background and make config dialog frameless
This commit is contained in:
@@ -12,9 +12,12 @@
|
||||
MinHeight="540"
|
||||
MinWidth="840"
|
||||
ResizeMode="NoResize"
|
||||
WindowStyle="None"
|
||||
AllowsTransparency="True"
|
||||
UseLayoutRounding="True"
|
||||
SnapsToDevicePixels="True"
|
||||
Background="{DynamicResource backgroundColor}"
|
||||
KeyDown="ConfigInfo_KeyDown"
|
||||
Background="Transparent"
|
||||
Icon="/Customer Panel;component/Resources/icons/logo_CustomerPanel.ico">
|
||||
<Window.Resources>
|
||||
<Style x:Key="ConfigLabelStyle"
|
||||
@@ -103,6 +106,54 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ConfigHeaderButtonStyle"
|
||||
TargetType="Button">
|
||||
<Setter Property="Foreground"
|
||||
Value="{DynamicResource navForeground}" />
|
||||
<Setter Property="Background"
|
||||
Value="Transparent" />
|
||||
<Setter Property="BorderBrush"
|
||||
Value="{DynamicResource inputBorderColor}" />
|
||||
<Setter Property="BorderThickness"
|
||||
Value="1" />
|
||||
<Setter Property="Width"
|
||||
Value="30" />
|
||||
<Setter Property="Height"
|
||||
Value="30" />
|
||||
<Setter Property="Cursor"
|
||||
Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border x:Name="ControlBorder"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="9">
|
||||
<ContentPresenter HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver"
|
||||
Value="True">
|
||||
<Setter TargetName="ControlBorder"
|
||||
Property="Background"
|
||||
Value="{DynamicResource inactiveButtonColor}" />
|
||||
<Setter TargetName="ControlBorder"
|
||||
Property="BorderBrush"
|
||||
Value="{DynamicResource itemHoverBorderColor}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed"
|
||||
Value="True">
|
||||
<Setter TargetName="ControlBorder"
|
||||
Property="Opacity"
|
||||
Value="0.92" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
<Grid Margin="14">
|
||||
@@ -119,10 +170,11 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid MouseLeftButtonDown="Header_MouseLeftButtonDown">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Orientation="Vertical"
|
||||
VerticalAlignment="Center">
|
||||
@@ -138,10 +190,17 @@
|
||||
<Image Grid.Column="1"
|
||||
Width="150"
|
||||
Height="40"
|
||||
Margin="16,0,0,0"
|
||||
Margin="16,0,10,0"
|
||||
VerticalAlignment="Center"
|
||||
Stretch="Uniform"
|
||||
Source="/Customer Panel;component/Resources/consulting4it-header1.png" />
|
||||
<Button Grid.Column="2"
|
||||
Content="X"
|
||||
FontSize="14"
|
||||
FontWeight="Bold"
|
||||
Style="{StaticResource ConfigHeaderButtonStyle}"
|
||||
Click="OnCloseButtonClick"
|
||||
ToolTip="{x:Static resx:Resources.close}" />
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2"
|
||||
|
||||
@@ -53,6 +53,23 @@ namespace C4IT_CustomerPanel.forms
|
||||
MessageBox.Show(cc,"Additional Copyrights");
|
||||
}
|
||||
|
||||
private void Header_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
if (e.LeftButton == System.Windows.Input.MouseButtonState.Pressed)
|
||||
DragMove();
|
||||
}
|
||||
|
||||
private void OnCloseButtonClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void ConfigInfo_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == System.Windows.Input.Key.Escape)
|
||||
Close();
|
||||
}
|
||||
|
||||
private void Button_PreviewMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user