From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点

---
 WPFProject/Controls/WinFormHolder.xaml.cs |   63 +++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/WPFProject/Controls/WinFormHolder.xaml.cs b/WPFProject/Controls/WinFormHolder.xaml.cs
new file mode 100644
index 0000000..5dff207
--- /dev/null
+++ b/WPFProject/Controls/WinFormHolder.xaml.cs
@@ -0,0 +1,63 @@
+锘縰sing System.Windows;
+using System.Windows.Controls;
+
+namespace WPFProject.Controls
+{
+    /// <summary>
+    /// WinFormHolder.xaml 鐨勪氦浜掗�昏緫
+    /// </summary>
+    public partial class WinFormHolder : UserControl
+    {
+
+        private HolderForm holderForm;
+        public WinFormHolder()
+        {
+            holderForm = new HolderForm();
+            InitializeComponent();
+            holderForm.TopLevel = false;
+            holderForm.Dock = System.Windows.Forms.DockStyle.Fill;
+            host.Child = holderForm;
+        }
+
+        public object Content
+        {
+            get => holderForm?.Content;
+            set => holderForm?.UpdateChild(value);
+        }
+
+        public bool MaskVisiable
+        {
+            get => GetMaskVisiable(this);
+            set => SetMaskVisiable(this, value);
+        }
+
+        public static bool GetMaskVisiable(WinFormHolder obj)
+        {
+            return (bool)obj.GetValue(MaskVisiableProperty);
+        }
+
+        public static void SetMaskVisiable(WinFormHolder obj, bool? value)
+        {
+            obj.SetValue(MaskVisiableProperty, value);
+        }
+
+        public static readonly DependencyProperty MaskVisiableProperty =
+            DependencyProperty.RegisterAttached("MaskVisiable", typeof(bool?), typeof(WinFormHolder)
+                , new PropertyMetadata(null, OnSpaceChanged));
+
+        private static void OnSpaceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+        {
+            if (d is WinFormHolder obj)
+            {
+                if (e.NewValue is bool flag && flag == true)
+                {
+                    obj.holderForm.ShowMask();
+                }
+                else
+                {
+                    obj.holderForm.HideMask();
+                }
+            }
+        }
+    }
+}

--
Gitblit v1.9.1