- modifiche a finestra e data
This commit is contained in:
@@ -1,36 +1,42 @@
|
||||
<EgwWPFBaseLib:EgtWindow x:Class="MultipleCopyWndV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:local="clr-namespace:Effector.Plugin.Lib"
|
||||
TitleBarHeight="30"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
ShowInTaskbar="False"
|
||||
SizeToContent="WidthAndHeight">
|
||||
<local:EffectorWindow x:Class="MultipleCopyWndV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:local="clr-namespace:Effector.Plugin.Lib"
|
||||
TitleBarHeight="40"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
ShowInTaskbar="False"
|
||||
SizeToContent="WidthAndHeight"
|
||||
IsResizable="False"
|
||||
IsMinimizable="False"
|
||||
Title="Copia multipla"
|
||||
MinWidth="300">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="{Binding TitleBarHeight, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgtWindow}}}"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--<local:TitleBar/>-->
|
||||
<Grid Grid.Row="1"
|
||||
Margin="5">
|
||||
Margin="30,10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="0,0,0,5">
|
||||
<Grid Margin="0,10,0,20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Numero di copie"
|
||||
Margin="0,0,2.5,0"/>
|
||||
Margin="0,0,5,0"
|
||||
Style="{StaticResource TextBlock.MultipleCopy}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding sCopyNumber}"
|
||||
Width="40"
|
||||
Margin="2.5,0,0,0"/>
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,0,0,0"
|
||||
Style="{StaticResource TextBox.MultipleCopy}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -39,13 +45,15 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="Ok"
|
||||
Command="{Binding Ok_Command}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
Margin="0,0,5,0"
|
||||
Style="{StaticResource Button.Confirm}"/>
|
||||
<Button Grid.Column="1"
|
||||
Content="Annulla"
|
||||
Command="{Binding Cancel_Command}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
Margin="5,0,0,0"
|
||||
Style="{StaticResource Button.Confirm}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</EgwWPFBaseLib:EgtWindow>
|
||||
</local:EffectorWindow>
|
||||
|
||||
@@ -62,101 +62,60 @@
|
||||
|
||||
<!--#endregion COLORS-->
|
||||
|
||||
<!--#region CUSTOMCONTROLS -->
|
||||
<!--#region USERCONTROL -->
|
||||
|
||||
<Style TargetType="{x:Type local:EffectorWindow}" BasedOn="{StaticResource {x:Type EgwWPFBaseLib:EgtWindow}}">
|
||||
<Setter Property="Background" Value="White"/>
|
||||
<Setter Property="TitleBarHeight" Value="40"/>
|
||||
<Setter Property="WindowChrome.WindowChrome">
|
||||
<Setter.Value>
|
||||
<WindowChrome CaptionHeight="{Binding TitleBarHeight, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgtWindow}}}"
|
||||
GlassFrameThickness="0"
|
||||
CornerRadius="0"
|
||||
ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<!--#region Button-->
|
||||
|
||||
<!--Colori default dei controlli-->
|
||||
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
|
||||
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
|
||||
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type EgwWPFBaseLib:EgtWindow}">
|
||||
<Border BorderThickness="0"
|
||||
BorderBrush="LightGray"
|
||||
Background="{TemplateBinding Background}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="{Binding TitleBarHeight, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgtWindow}}}"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--<Border Grid.ColumnSpan="6"
|
||||
Style="{StaticResource TitleBar_Border}"/>
|
||||
<Image MinWidth="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
|
||||
Source="/Resources/Effector.ico"/>
|
||||
<ContentControl Grid.Column="1"
|
||||
Content="{Binding ContentMenu}"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="{Binding sTitle}"
|
||||
Margin="20,0,20,0"
|
||||
Style="{StaticResource TitleBar_TextBlock}">
|
||||
</TextBlock>-->
|
||||
|
||||
<local:TitleBar Title="{TemplateBinding Title}"/>
|
||||
<ContentPresenter Grid.Row="1"
|
||||
Content="{TemplateBinding Content}"/>
|
||||
</Grid>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsDefaulted" Value="true">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
|
||||
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="WindowState" Value="Maximized">
|
||||
<Setter Property="WindowChrome.WindowChrome">
|
||||
<Setter.Value>
|
||||
<WindowChrome CaptionHeight="{Binding TitleBarHeight, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgtWindow}}, Converter={StaticResource CaptionHeightConverter}}"
|
||||
GlassFrameThickness="0"
|
||||
CornerRadius="0"
|
||||
ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Window}">
|
||||
<!--bordo necessario per evitare la parte che esce dallo schermo-->
|
||||
<Border BorderThickness="7"
|
||||
BorderBrush="LightGray"
|
||||
Background="{TemplateBinding Background}">
|
||||
<ContentPresenter Grid.Row="1"
|
||||
Content="{TemplateBinding Content}"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!--#endregion CUSTOMCONTROLS-->
|
||||
|
||||
<!--#region USERCONTROL -->
|
||||
<!--#endregion USERCONTROL-->
|
||||
|
||||
<!--#region STILES -->
|
||||
|
||||
<!--<Style x:Key="TitleBar_Border" TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Background" Value="{StaticResource Effector_Blue}" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TitleBar_TextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsActive, RelativeSource={RelativeSource AncestorType=Window}}" Value="False">
|
||||
<Setter Property="Foreground" Value="{DynamicResource WindowTitleBarInactiveText}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TitleBar_Button" TargetType="Button">
|
||||
<Style x:Key="Button.EffectorWindow.TitleBar" TargetType="{x:Type Button}">
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
|
||||
@@ -186,8 +145,281 @@
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>-->
|
||||
</Style>
|
||||
|
||||
<!--#endregion STILES-->
|
||||
<Style x:Key="Test_Button" TargetType="Button">
|
||||
<Setter Property="Background" Value="Red" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
<Setter Property="BorderBrush" Value="DarkRed" />
|
||||
<Setter Property="BorderThickness" Value="5" />
|
||||
<Setter Property="Height" Value="50" />
|
||||
<Setter Property="Width" Value="200" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Button.DoorList" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Padding" Value="2"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Button.Confirm" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="70"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="FontWeight" Value="Regular"/>
|
||||
<Setter Property="FontFamily" Value="/Resources/Fonts/#Roboto"/>
|
||||
<Setter Property="Background" Value="{StaticResource Effector_DarkBlue}"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Padding" Value="10,5,10,5"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion Button-->
|
||||
|
||||
<!--#region Image-->
|
||||
|
||||
<Style x:Key="Button.Image.DoorList" TargetType="{x:Type Image}">
|
||||
<Setter Property="Stretch" Value="Uniform" />
|
||||
</Style>
|
||||
|
||||
<!--#endregion Image-->
|
||||
|
||||
<!--#region TextBlock-->
|
||||
|
||||
<Style x:Key="TextBlock.DataGridTextColumn.DoorList" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TextBlock.MultipleCopy" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="FontWeight" Value="Regular"/>
|
||||
<Setter Property="FontFamily" Value="/Resources/Fonts/#Roboto"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion TextBlock-->
|
||||
|
||||
<!--#region TextBox-->
|
||||
|
||||
<Style x:Key="TextBox.DataGridTextColumn.DoorList" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TextBox.MultipleCopy" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="FontWeight" Value="Regular"/>
|
||||
<Setter Property="FontFamily" Value="/Resources/Fonts/#Roboto"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion TextBox-->
|
||||
|
||||
<!--#region ComboBox-->
|
||||
|
||||
<Style x:Key="ComboBox.DataGridTemplateColumn.DoorList" TargetType="{x:Type ComboBox}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="ItemContainerStyle">
|
||||
<Setter.Value>
|
||||
<Style TargetType="{x:Type ComboBoxItem}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
</Style>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--#endregion ComboBox-->
|
||||
|
||||
<!--#region DataGridRow-->
|
||||
|
||||
<Style x:Key="RowDataGrid_CustomHighLight" TargetType="{x:Type DataGridRow}">
|
||||
<Setter Property="BorderBrush" Value="LightGray" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="BorderThickness" Value="2,2,2,2" />
|
||||
<Setter Property="Padding" Value="0,0,0,0" />
|
||||
<Setter Property="Margin" Value="-2,0,-2,0" />
|
||||
<Setter Property="Foreground" Value="Blue" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
<Style.Resources>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="Black" />
|
||||
</Style.Resources>
|
||||
</Style>
|
||||
|
||||
<!--#endregion DataGridRow-->
|
||||
|
||||
<!--#endregion USERCONTROL-->
|
||||
|
||||
<!--#region CUSTOMCONTROLS -->
|
||||
|
||||
<Grid x:Key="EffectorWindow.Path.Maximize">
|
||||
<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="EffectorWindow.Path.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>
|
||||
|
||||
<ControlTemplate x:Key="EffectorWindow.ControlTemplate.WithTitleBar" TargetType="{x:Type EgwWPFBaseLib:EgtWindow}">
|
||||
<Border BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BorderBrush="LightGray"
|
||||
Background="{TemplateBinding Background}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="{Binding TitleBarHeight, RelativeSource={RelativeSource AncestorType={x:Type local:EffectorWindow}}}"/>
|
||||
<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="{TemplateBinding Icon}"/>
|
||||
<ContentControl Grid.Column="1"
|
||||
Content="{TemplateBinding TitlePanel}"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Margin="4 0 0 0"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="{TemplateBinding Title}">
|
||||
<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"
|
||||
Name="PART_MinimizeBtn"
|
||||
RenderOptions.EdgeMode="Aliased"
|
||||
Style="{StaticResource Button.EffectorWindow.TitleBar}">
|
||||
<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 Grid.Column="4"
|
||||
Name="PART_MaximizeRestoreBtn">
|
||||
<Button.Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource Button.EffectorWindow.TitleBar}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding WindowState, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:EffectorWindow}}}" Value="Maximized">
|
||||
<Setter Property="Content" Value="{StaticResource EffectorWindow.Path.Maximize}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding WindowState, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:EffectorWindow}}}" Value="Normal">
|
||||
<Setter Property="Content" Value="{StaticResource EffectorWindow.Path.Normal}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
<Button Grid.Column="5"
|
||||
Name="PART_CloseBtn"
|
||||
Style="{StaticResource Button.EffectorWindow.TitleBar}">
|
||||
<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>
|
||||
<ContentPresenter Grid.Row="1"
|
||||
Content="{TemplateBinding Content}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="EffectorWindow.ControlTemplate.WithoutTitleBar" TargetType="{x:Type EgwWPFBaseLib:EgtWindow}">
|
||||
<Border BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BorderBrush="LightGray"
|
||||
Background="Red">
|
||||
<ContentPresenter Grid.Row="1"
|
||||
Content="{TemplateBinding Content}"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style TargetType="{x:Type local:EffectorWindow}" BasedOn="{StaticResource {x:Type EgwWPFBaseLib:EgtWindow}}">
|
||||
<Setter Property="Background" Value="White"/>
|
||||
<Setter Property="TitleBarHeight" Value="45"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="IsMinimizable" Value="True"/>
|
||||
<Setter Property="Icon" Value="pack://application:,,,/Effector.Plugin.Lib;Component/Resources/Effector.ico"/>
|
||||
<Setter Property="WindowChrome.WindowChrome">
|
||||
<Setter.Value>
|
||||
<WindowChrome CaptionHeight="{Binding TitleBarHeight, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgtWindow}}}"
|
||||
GlassFrameThickness="0"
|
||||
CornerRadius="0"
|
||||
ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Template" Value="{StaticResource EffectorWindow.ControlTemplate.WithTitleBar}"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="WindowStyle" Value="None">
|
||||
<Setter Property="Template" Value="{StaticResource EffectorWindow.ControlTemplate.WithoutTitleBar}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="WindowState" Value="Maximized">
|
||||
<Setter Property="BorderThickness" Value="7"/>
|
||||
<!--da impostare perche' lo perde!-->
|
||||
<Setter Property="Template" Value="{StaticResource EffectorWindow.ControlTemplate.WithTitleBar}"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="WindowState" Value="Maximized"/>
|
||||
<Condition Property="WindowStyle" Value="None"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Template" Value="{StaticResource EffectorWindow.ControlTemplate.WithoutTitleBar}"/>
|
||||
</MultiTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="EffectorWindow.Dialog" TargetType="{x:Type local:EffectorWindow}">
|
||||
<Setter Property="IsMinimizable" Value="False"/>
|
||||
<Setter Property="IsResizable" Value="False"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="EffectorWindow.Dialog.NoClose" TargetType="{x:Type local:EffectorWindow}">
|
||||
<Setter Property="IsMinimizable" Value="False"/>
|
||||
<Setter Property="IsResizable" Value="False"/>
|
||||
<Setter Property="IsClosable" Value="False"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion CUSTOMCONTROLS-->
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
If dtValue < dtLuaMinValue.AddDays(1) Then
|
||||
Return ""
|
||||
ElseIf dtValue > DateTime.Today Then
|
||||
Dim d = dtValue.ToString("T")
|
||||
Return dtValue.ToString("T")
|
||||
Else
|
||||
Return dtValue.ToString("d T")
|
||||
Return dtValue.ToString("d") & " " & dtValue.ToString("T")
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
Reference in New Issue
Block a user