From dedcf4174c8540ee3a912daad2ff13e014e495b1 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期五, 28 三月 2025 16:28:30 +0800
Subject: [PATCH] 优化UI组件;
---
HMI.UI/MaskWindow.xaml.cs | 6 ++++++
HMI.UI/MaskWindow.xaml | 6 +++++-
Plugin.TestResult/Scanner.xaml | 23 +++++++++++------------
3 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/HMI.UI/MaskWindow.xaml b/HMI.UI/MaskWindow.xaml
index 3f3ba87..3364c0d 100644
--- a/HMI.UI/MaskWindow.xaml
+++ b/HMI.UI/MaskWindow.xaml
@@ -9,11 +9,16 @@
xmlns:pu="https://opensource.panuon.com/wpf-ui"
pu:WindowXCaption.Buttons="None"
pu:WindowXCaption.Height="0"
+ ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
Height="20"
CanClose="False"
+ WindowStyle="None"
x:Name="self"
WindowStartupLocation="CenterOwner">
+ <WindowChrome.WindowChrome>
+ <WindowChrome GlassFrameThickness="-1"/>
+ </WindowChrome.WindowChrome>
<Window.Style>
<Style TargetType="Window">
<Style.Triggers>
@@ -23,7 +28,6 @@
</Style.Triggers>
</Style>
</Window.Style>
-
<Grid>
<Label x:Name="label"
Margin="20"
diff --git a/HMI.UI/MaskWindow.xaml.cs b/HMI.UI/MaskWindow.xaml.cs
index f5d1231..56fd10e 100644
--- a/HMI.UI/MaskWindow.xaml.cs
+++ b/HMI.UI/MaskWindow.xaml.cs
@@ -42,6 +42,12 @@
private void MaskWindow_ContentRendered(object sender, EventArgs e)
{
+ //Dispatcher.InvokeAsync(new Action(() =>
+ //{
+ // 鏆傚仠绾跨▼浠I瀹屽叏灞曠ず
+ // if (delay > 0) Thread.Sleep(delay);
+ // action(this);
+ //}));
Task.Run(() =>
{
// 鏆傚仠绾跨▼浠I瀹屽叏灞曠ず
diff --git a/Plugin.TestResult/Scanner.xaml b/Plugin.TestResult/Scanner.xaml
index d9daae5..0f2e3df 100644
--- a/Plugin.TestResult/Scanner.xaml
+++ b/Plugin.TestResult/Scanner.xaml
@@ -6,19 +6,18 @@
xmlns:local="clr-namespace:Plugin.TestResult_WPF"
WindowStartupLocation="CenterScreen"
Closing="Window_Closing"
+ FontSize="20"
mc:Ignorable="d"
- Style="{StaticResource ModalWindow}"
-
- xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base"
- xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI"
- xmlns:pw="https://opensource.panuon.com/wpf"
- xmlns:pu="https://opensource.panuon.com/wpf-ui"
- xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
- xmlns:cc="clr-namespace:HMI.Core;assembly=HMI.Core"
- InteropOwnersMask="False"
- SizeToContent="Height"
-
- pu:WindowXModalDialog.Buttons="{x:Null}"
+ Style="{StaticResource ModalWindow}"
+ xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base"
+ xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI"
+ xmlns:pw="https://opensource.panuon.com/wpf"
+ xmlns:pu="https://opensource.panuon.com/wpf-ui"
+ xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
+ xmlns:cc="clr-namespace:HMI.Core;assembly=HMI.Core"
+ InteropOwnersMask="False"
+ SizeToContent="Height"
+ pu:WindowXModalDialog.Buttons="{x:Null}"
Title="{Binding title}" Width="600">
<Window.Resources>
<local:FontSizeConverter x:Key="FontSizeConverter"/>
--
Gitblit v1.9.1