更新
This commit is contained in:
@@ -48,8 +48,8 @@
|
|||||||
<Border Margin="0,0,0,12" Style="{StaticResource CardBorderStyle}">
|
<Border Margin="0,0,0,12" Style="{StaticResource CardBorderStyle}">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Style="{StaticResource SectionTitleStyle}" Text="8 泵默认配置" />
|
<TextBlock Style="{StaticResource SectionTitleStyle}" Text="8 泵默认配置" />
|
||||||
<DataGrid Margin="0,12,0,0"
|
<DataGrid x:Name="Rs485PumpConfigurationGrid"
|
||||||
ItemsSource="{Binding Rs485FlowPumpControls}"
|
Margin="0,12,0,0"
|
||||||
AutoGenerateColumns="False"
|
AutoGenerateColumns="False"
|
||||||
CanUserAddRows="False"
|
CanUserAddRows="False"
|
||||||
CanUserDeleteRows="False"
|
CanUserDeleteRows="False"
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
FontWeight="SemiBold"
|
FontWeight="SemiBold"
|
||||||
Text="{Binding EngineeringRegisterStatus}"
|
Text="{Binding EngineeringRegisterStatus}"
|
||||||
TextWrapping="Wrap" />
|
TextWrapping="Wrap" />
|
||||||
<DataGrid ItemsSource="{Binding EngineeringRegisters}"
|
<DataGrid x:Name="EngineeringRegistersGrid"
|
||||||
AutoGenerateColumns="False"
|
AutoGenerateColumns="False"
|
||||||
CanUserAddRows="False"
|
CanUserAddRows="False"
|
||||||
CanUserDeleteRows="False"
|
CanUserDeleteRows="False"
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
using Cardiopulmonarybypasssystems.ViewModels;
|
using Cardiopulmonarybypasssystems.ViewModels;
|
||||||
@@ -14,19 +17,11 @@ public partial class EngineeringRegistersWindow : Window
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
DataContext = viewModel;
|
DataContext = viewModel;
|
||||||
Loaded += OnLoaded;
|
Rs485PumpConfigurationGrid.ItemsSource = new ListCollectionView(viewModel.Rs485FlowPumpControls);
|
||||||
|
EngineeringRegistersGrid.ItemsSource = new ListCollectionView(viewModel.EngineeringRegisters);
|
||||||
_closeHoldTimer.Tick += CloseHoldTimer_OnTick;
|
_closeHoldTimer.Tick += CloseHoldTimer_OnTick;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnLoaded(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (DataContext is MainViewModel viewModel
|
|
||||||
&& viewModel.RefreshEngineeringRegistersCommand.CanExecute(null))
|
|
||||||
{
|
|
||||||
viewModel.RefreshEngineeringRegistersCommand.Execute(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CloseHotspot_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
private void CloseHotspot_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
_closeHoldTimer.Stop();
|
_closeHoldTimer.Stop();
|
||||||
@@ -43,10 +38,28 @@ public partial class EngineeringRegistersWindow : Window
|
|||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnClosing(CancelEventArgs e)
|
||||||
|
{
|
||||||
|
CommitGridEdits();
|
||||||
|
base.OnClosing(e);
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnClosed(EventArgs e)
|
protected override void OnClosed(EventArgs e)
|
||||||
{
|
{
|
||||||
_closeHoldTimer.Stop();
|
_closeHoldTimer.Stop();
|
||||||
_closeHoldTimer.Tick -= CloseHoldTimer_OnTick;
|
_closeHoldTimer.Tick -= CloseHoldTimer_OnTick;
|
||||||
base.OnClosed(e);
|
base.OnClosed(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CommitGridEdits()
|
||||||
|
{
|
||||||
|
CommitGridEdit(Rs485PumpConfigurationGrid);
|
||||||
|
CommitGridEdit(EngineeringRegistersGrid);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void CommitGridEdit(DataGrid dataGrid)
|
||||||
|
{
|
||||||
|
dataGrid.CommitEdit(DataGridEditingUnit.Cell, true);
|
||||||
|
dataGrid.CommitEdit(DataGridEditingUnit.Row, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -589,6 +589,7 @@ public partial class MainWindow : Window
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CommitOpenDataGridEdits(this);
|
||||||
OpenEngineeringWindow(viewModel);
|
OpenEngineeringWindow(viewModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -672,4 +673,33 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void CommitOpenDataGridEdits(DependencyObject root)
|
||||||
|
{
|
||||||
|
Keyboard.ClearFocus();
|
||||||
|
|
||||||
|
foreach (var dataGrid in FindVisualChildren<DataGrid>(root))
|
||||||
|
{
|
||||||
|
dataGrid.CommitEdit(DataGridEditingUnit.Cell, true);
|
||||||
|
dataGrid.CommitEdit(DataGridEditingUnit.Row, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IEnumerable<T> FindVisualChildren<T>(DependencyObject root) where T : DependencyObject
|
||||||
|
{
|
||||||
|
var childCount = VisualTreeHelper.GetChildrenCount(root);
|
||||||
|
for (var index = 0; index < childCount; index++)
|
||||||
|
{
|
||||||
|
var child = VisualTreeHelper.GetChild(root, index);
|
||||||
|
if (child is T typedChild)
|
||||||
|
{
|
||||||
|
yield return typedChild;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var descendant in FindVisualChildren<T>(child))
|
||||||
|
{
|
||||||
|
yield return descendant;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
<Color x:Key="ShellBgColor">#FFF0F4F6</Color>
|
<Color x:Key="ShellBgColor">#FFF1F5F6</Color>
|
||||||
<Color x:Key="PanelBgColor">#FFFBFDFC</Color>
|
<Color x:Key="PanelBgColor">#FFFCFEFE</Color>
|
||||||
<Color x:Key="CardBorderColor">#FFD4E1E6</Color>
|
<Color x:Key="CardBorderColor">#FFC8D8DE</Color>
|
||||||
<Color x:Key="HeaderColor">#FF123744</Color>
|
<Color x:Key="HeaderColor">#FF123744</Color>
|
||||||
<Color x:Key="AccentColor">#FF007A76</Color>
|
<Color x:Key="AccentColor">#FF007A76</Color>
|
||||||
<Color x:Key="WarningColor">#FFD38A16</Color>
|
<Color x:Key="WarningColor">#FFD38A16</Color>
|
||||||
@@ -10,8 +10,12 @@
|
|||||||
<Color x:Key="SuccessColor">#FF2B8F6A</Color>
|
<Color x:Key="SuccessColor">#FF2B8F6A</Color>
|
||||||
<Color x:Key="TextColor">#FF16323D</Color>
|
<Color x:Key="TextColor">#FF16323D</Color>
|
||||||
<Color x:Key="MutedTextColor">#FF60737E</Color>
|
<Color x:Key="MutedTextColor">#FF60737E</Color>
|
||||||
<Color x:Key="FieldSurfaceColor">#FFF6FAFB</Color>
|
<Color x:Key="FieldSurfaceColor">#FFF8FBFC</Color>
|
||||||
<Color x:Key="FieldAccentColor">#FFE0ECEF</Color>
|
<Color x:Key="FieldAccentColor">#FFDDE9ED</Color>
|
||||||
|
<Color x:Key="ControlHoverColor">#FFEAF4F5</Color>
|
||||||
|
<Color x:Key="ControlFocusColor">#FF2A928B</Color>
|
||||||
|
<Color x:Key="DisabledSurfaceColor">#FFE8EEF1</Color>
|
||||||
|
<Color x:Key="DisabledTextColor">#FF8B9BA3</Color>
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ShellBg" Color="{StaticResource ShellBgColor}" />
|
<SolidColorBrush x:Key="ShellBg" Color="{StaticResource ShellBgColor}" />
|
||||||
<SolidColorBrush x:Key="PanelBg" Color="{StaticResource PanelBgColor}" />
|
<SolidColorBrush x:Key="PanelBg" Color="{StaticResource PanelBgColor}" />
|
||||||
@@ -25,19 +29,27 @@
|
|||||||
<SolidColorBrush x:Key="MutedTextBrush" Color="{StaticResource MutedTextColor}" />
|
<SolidColorBrush x:Key="MutedTextBrush" Color="{StaticResource MutedTextColor}" />
|
||||||
<SolidColorBrush x:Key="FieldSurfaceBrush" Color="{StaticResource FieldSurfaceColor}" />
|
<SolidColorBrush x:Key="FieldSurfaceBrush" Color="{StaticResource FieldSurfaceColor}" />
|
||||||
<SolidColorBrush x:Key="FieldAccentBrush" Color="{StaticResource FieldAccentColor}" />
|
<SolidColorBrush x:Key="FieldAccentBrush" Color="{StaticResource FieldAccentColor}" />
|
||||||
|
<SolidColorBrush x:Key="ControlHoverBrush" Color="{StaticResource ControlHoverColor}" />
|
||||||
|
<SolidColorBrush x:Key="ControlFocusBrush" Color="{StaticResource ControlFocusColor}" />
|
||||||
|
<SolidColorBrush x:Key="DisabledSurfaceBrush" Color="{StaticResource DisabledSurfaceColor}" />
|
||||||
|
<SolidColorBrush x:Key="DisabledTextBrush" Color="{StaticResource DisabledTextColor}" />
|
||||||
|
|
||||||
<Style TargetType="Window">
|
<Style TargetType="Window">
|
||||||
<Setter Property="Background" Value="{StaticResource ShellBg}" />
|
<Setter Property="Background" Value="{StaticResource ShellBg}" />
|
||||||
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
||||||
<Setter Property="FontFamily" Value="Microsoft YaHei UI" />
|
<Setter Property="FontFamily" Value="Microsoft YaHei UI" />
|
||||||
<Setter Property="FontSize" Value="15" />
|
<Setter Property="FontSize" Value="15" />
|
||||||
|
<Setter Property="UseLayoutRounding" Value="True" />
|
||||||
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||||
|
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
|
||||||
|
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="CardBorderStyle" TargetType="Border">
|
<Style x:Key="CardBorderStyle" TargetType="Border">
|
||||||
<Setter Property="Background" Value="{StaticResource PanelBg}" />
|
<Setter Property="Background" Value="{StaticResource PanelBg}" />
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource CardBorder}" />
|
<Setter Property="BorderBrush" Value="{StaticResource CardBorder}" />
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
<Setter Property="CornerRadius" Value="10" />
|
<Setter Property="CornerRadius" Value="8" />
|
||||||
<Setter Property="Padding" Value="18" />
|
<Setter Property="Padding" Value="18" />
|
||||||
<Setter Property="Margin" Value="0,0,0,12" />
|
<Setter Property="Margin" Value="0,0,0,12" />
|
||||||
</Style>
|
</Style>
|
||||||
@@ -51,7 +63,7 @@
|
|||||||
<Setter Property="Background" Value="{StaticResource FieldSurfaceBrush}" />
|
<Setter Property="Background" Value="{StaticResource FieldSurfaceBrush}" />
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource FieldAccentBrush}" />
|
<Setter Property="BorderBrush" Value="{StaticResource FieldAccentBrush}" />
|
||||||
<Setter Property="Padding" Value="12" />
|
<Setter Property="Padding" Value="12" />
|
||||||
<Setter Property="CornerRadius" Value="8" />
|
<Setter Property="CornerRadius" Value="6" />
|
||||||
<Setter Property="Margin" Value="0,0,0,10" />
|
<Setter Property="Margin" Value="0,0,0,10" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@@ -88,6 +100,7 @@
|
|||||||
<Setter Property="MinWidth" Value="118" />
|
<Setter Property="MinWidth" Value="118" />
|
||||||
<Setter Property="MinHeight" Value="42" />
|
<Setter Property="MinHeight" Value="42" />
|
||||||
<Setter Property="Margin" Value="0,0,10,8" />
|
<Setter Property="Margin" Value="0,0,10,8" />
|
||||||
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="Button">
|
<ControlTemplate TargetType="Button">
|
||||||
@@ -95,18 +108,30 @@
|
|||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="6">
|
CornerRadius="6"
|
||||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Margin="2" />
|
SnapsToDevicePixels="True">
|
||||||
|
<ContentPresenter HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="2"
|
||||||
|
RecognizesAccessKey="True"
|
||||||
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
</Border>
|
</Border>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
<Setter TargetName="Bd" Property="Background" Value="#FF0B8883" />
|
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource ControlFocusBrush}" />
|
||||||
|
<Setter TargetName="Bd" Property="Opacity" Value="0.96" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsKeyboardFocused" Value="True">
|
||||||
|
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource ControlFocusBrush}" />
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsPressed" Value="True">
|
<Trigger Property="IsPressed" Value="True">
|
||||||
<Setter TargetName="Bd" Property="Opacity" Value="0.9" />
|
<Setter TargetName="Bd" Property="Opacity" Value="0.88" />
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsEnabled" Value="False">
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
<Setter TargetName="Bd" Property="Opacity" Value="0.5" />
|
<Setter Property="Foreground" Value="{StaticResource DisabledTextBrush}" />
|
||||||
|
<Setter TargetName="Bd" Property="Background" Value="{StaticResource DisabledSurfaceBrush}" />
|
||||||
|
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource CardBorder}" />
|
||||||
|
<Setter TargetName="Bd" Property="Opacity" Value="0.72" />
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
@@ -123,6 +148,48 @@
|
|||||||
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
<Setter Property="Background" Value="White" />
|
<Setter Property="Background" Value="White" />
|
||||||
<Setter Property="MinHeight" Value="38" />
|
<Setter Property="MinHeight" Value="38" />
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
||||||
|
<Setter Property="CaretBrush" Value="{StaticResource AccentBrush}" />
|
||||||
|
<Setter Property="SelectionBrush" Value="{StaticResource AccentBrush}" />
|
||||||
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="TextBox">
|
||||||
|
<Border x:Name="Bd"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="6"
|
||||||
|
SnapsToDevicePixels="True">
|
||||||
|
<ScrollViewer x:Name="PART_ContentHost"
|
||||||
|
Margin="{TemplateBinding Padding}"
|
||||||
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter TargetName="Bd" Property="BorderBrush" Value="#FFAACBD1" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsKeyboardFocusWithin" Value="True">
|
||||||
|
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource ControlFocusBrush}" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsReadOnly" Value="True">
|
||||||
|
<Setter TargetName="Bd" Property="Background" Value="#FFF9FBFC" />
|
||||||
|
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource FieldAccentBrush}" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource DisabledTextBrush}" />
|
||||||
|
<Setter TargetName="Bd" Property="Background" Value="{StaticResource DisabledSurfaceBrush}" />
|
||||||
|
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource FieldAccentBrush}" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="AcceptsReturn" Value="True">
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Top" />
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="ComboBox">
|
<Style TargetType="ComboBox">
|
||||||
@@ -134,11 +201,42 @@
|
|||||||
<Setter Property="Background" Value="White" />
|
<Setter Property="Background" Value="White" />
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource CardBorder}" />
|
<Setter Property="BorderBrush" Value="{StaticResource CardBorder}" />
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="ComboBoxItem">
|
<Style TargetType="ComboBoxItem">
|
||||||
<Setter Property="Padding" Value="10,6" />
|
<Setter Property="Padding" Value="10,6" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ComboBoxItem">
|
||||||
|
<Border x:Name="Bd"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
CornerRadius="4"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
SnapsToDevicePixels="True">
|
||||||
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsHighlighted" Value="True">
|
||||||
|
<Setter TargetName="Bd" Property="Background" Value="{StaticResource ControlHoverBrush}" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsSelected" Value="True">
|
||||||
|
<Setter TargetName="Bd" Property="Background" Value="#FFDCEFEB" />
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource HeaderBrush}" />
|
||||||
|
<Setter Property="FontWeight" Value="SemiBold" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource DisabledTextBrush}" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="DatePicker">
|
<Style TargetType="DatePicker">
|
||||||
@@ -160,10 +258,14 @@
|
|||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="ListBoxItem">
|
<ControlTemplate TargetType="ListBoxItem">
|
||||||
<Border x:Name="Bd" Background="#FFF4F8FA" BorderBrush="#FFD8E3E7" BorderThickness="1" CornerRadius="14" Padding="14">
|
<Border x:Name="Bd" Background="#FFF6FAFB" BorderBrush="#FFD8E3E7" BorderThickness="1" CornerRadius="8" Padding="14">
|
||||||
<ContentPresenter />
|
<ContentPresenter />
|
||||||
</Border>
|
</Border>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter TargetName="Bd" Property="Background" Value="{StaticResource ControlHoverBrush}" />
|
||||||
|
<Setter TargetName="Bd" Property="BorderBrush" Value="#FFBFD1D7" />
|
||||||
|
</Trigger>
|
||||||
<Trigger Property="IsSelected" Value="True">
|
<Trigger Property="IsSelected" Value="True">
|
||||||
<Setter TargetName="Bd" Property="Background" Value="#FFE4F3F0" />
|
<Setter TargetName="Bd" Property="Background" Value="#FFE4F3F0" />
|
||||||
<Setter TargetName="Bd" Property="BorderBrush" Value="#FF6EB2A9" />
|
<Setter TargetName="Bd" Property="BorderBrush" Value="#FF6EB2A9" />
|
||||||
@@ -207,6 +309,10 @@
|
|||||||
</DockPanel>
|
</DockPanel>
|
||||||
</Border>
|
</Border>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter TargetName="Bd" Property="Background" Value="#FFEAF2F4" />
|
||||||
|
<Setter TargetName="Bd" Property="BorderBrush" Value="#FFC5D6DC" />
|
||||||
|
</Trigger>
|
||||||
<Trigger Property="IsSelected" Value="True">
|
<Trigger Property="IsSelected" Value="True">
|
||||||
<Setter TargetName="Bd" Property="Background" Value="{StaticResource PanelBg}" />
|
<Setter TargetName="Bd" Property="Background" Value="{StaticResource PanelBg}" />
|
||||||
<Setter TargetName="Bd" Property="BorderBrush" Value="#FFB8CCD2" />
|
<Setter TargetName="Bd" Property="BorderBrush" Value="#FFB8CCD2" />
|
||||||
@@ -223,8 +329,10 @@
|
|||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
<Setter Property="GridLinesVisibility" Value="Horizontal" />
|
<Setter Property="GridLinesVisibility" Value="Horizontal" />
|
||||||
|
<Setter Property="HorizontalGridLinesBrush" Value="#FFE3ECEF" />
|
||||||
|
<Setter Property="VerticalGridLinesBrush" Value="#FFE9F0F2" />
|
||||||
<Setter Property="RowBackground" Value="#00FFFFFF" />
|
<Setter Property="RowBackground" Value="#00FFFFFF" />
|
||||||
<Setter Property="AlternatingRowBackground" Value="#FFF3F8FA" />
|
<Setter Property="AlternatingRowBackground" Value="#FFF6FAFB" />
|
||||||
<Setter Property="HeadersVisibility" Value="Column" />
|
<Setter Property="HeadersVisibility" Value="Column" />
|
||||||
<Setter Property="CanUserAddRows" Value="False" />
|
<Setter Property="CanUserAddRows" Value="False" />
|
||||||
<Setter Property="CanUserDeleteRows" Value="False" />
|
<Setter Property="CanUserDeleteRows" Value="False" />
|
||||||
@@ -239,19 +347,30 @@
|
|||||||
<Setter Property="RowHeight" Value="42" />
|
<Setter Property="RowHeight" Value="42" />
|
||||||
<Setter Property="ColumnHeaderHeight" Value="40" />
|
<Setter Property="ColumnHeaderHeight" Value="40" />
|
||||||
<Setter Property="FontSize" Value="14" />
|
<Setter Property="FontSize" Value="14" />
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
||||||
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="DataGridColumnHeader">
|
<Style TargetType="DataGridColumnHeader">
|
||||||
<Setter Property="Background" Value="#FFDCE8EC" />
|
<Setter Property="Background" Value="#FFE5EEF1" />
|
||||||
<Setter Property="Foreground" Value="{StaticResource HeaderBrush}" />
|
<Setter Property="Foreground" Value="{StaticResource HeaderBrush}" />
|
||||||
<Setter Property="FontWeight" Value="Bold" />
|
<Setter Property="FontWeight" Value="Bold" />
|
||||||
<Setter Property="Padding" Value="12,8" />
|
<Setter Property="Padding" Value="12,8" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||||
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="DataGridCell">
|
<Style TargetType="DataGridCell">
|
||||||
<Setter Property="Padding" Value="12,8" />
|
<Setter Property="Padding" Value="12,8" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsSelected" Value="True">
|
||||||
|
<Setter Property="Background" Value="#FFDCEFEB" />
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource HeaderBrush}" />
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="DataGridRow">
|
<Style TargetType="DataGridRow">
|
||||||
@@ -259,7 +378,7 @@
|
|||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
<Setter Property="Background" Value="#FFEAF4F6" />
|
<Setter Property="Background" Value="{StaticResource ControlHoverBrush}" />
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsSelected" Value="True">
|
<Trigger Property="IsSelected" Value="True">
|
||||||
<Setter Property="Background" Value="#FFD7ECE7" />
|
<Setter Property="Background" Value="#FFD7ECE7" />
|
||||||
@@ -268,6 +387,30 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="ToolTip">
|
||||||
|
<Setter Property="MaxWidth" Value="420" />
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
||||||
|
<Setter Property="Background" Value="#F9FFFFFF" />
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource CardBorder}" />
|
||||||
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
|
<Setter Property="Padding" Value="10,7" />
|
||||||
|
<Setter Property="HasDropShadow" Value="False" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToolTip">
|
||||||
|
<Border Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="6"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
SnapsToDevicePixels="True">
|
||||||
|
<ContentPresenter />
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<LinearGradientBrush x:Key="HeroBrush" StartPoint="0,0" EndPoint="1,1">
|
<LinearGradientBrush x:Key="HeroBrush" StartPoint="0,0" EndPoint="1,1">
|
||||||
<GradientStop Offset="0" Color="#FF0F3946" />
|
<GradientStop Offset="0" Color="#FF0F3946" />
|
||||||
<GradientStop Offset="0.55" Color="#FF17616A" />
|
<GradientStop Offset="0.55" Color="#FF17616A" />
|
||||||
|
|||||||
Reference in New Issue
Block a user