From 7b64b8203216b6aa136d91c4fd227f20cdd453bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E7=BA=A2=E5=B8=BD?= <761716178@qq.com>
Date: Sat, 25 Nov 2023 16:21:34 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=91=E5=AE=9A=E5=86=99?=
=?UTF-8?q?=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CPF/AttachedProperties.cs | 100 +++++++++++++++++++++++++
CPF/BindingDescribe.cs | 51 ++++++++++++-
CPF/Controls/CodeTextBox/LineNumber.cs | 2 +
CPF/CpfObject.cs | 32 +++++++-
4 files changed, 179 insertions(+), 6 deletions(-)
diff --git a/CPF/AttachedProperties.cs b/CPF/AttachedProperties.cs
index 67715b5..a0e2988 100644
--- a/CPF/AttachedProperties.cs
+++ b/CPF/AttachedProperties.cs
@@ -212,4 +212,104 @@ namespace CPF
return false;
}
}
+ ///
+ /// 绑定附加属性
+ ///
+ public class AttachedDescribe : BindingDescribe
+ {
+ ///
+ /// 设置和绑定附加属性
+ ///
+ ///
+ ///
+ public AttachedDescribe(object value, string sourceProperty) : base(sourceProperty)
+ {
+ Value = value;
+ }
+ ///
+ /// 设置和绑定附加属性
+ ///
+ ///
+ ///
+ ///
+ public AttachedDescribe(object value, string sourceProperty, BindingMode binding) : base(sourceProperty, binding)
+ {
+ Value = value;
+ }
+ ///
+ /// 设置和绑定附加属性
+ ///
+ ///
+ ///
+ ///
+ ///
+ public AttachedDescribe(object value, object source, string sourceProperty, BindingMode binding) : base(source, sourceProperty, binding)
+ {
+ Value = value;
+ }
+ ///
+ /// 设置和绑定附加属性
+ ///
+ ///
+ ///
+ ///
+ public AttachedDescribe(object value, object source, string sourceProperty) : base(source, sourceProperty)
+ {
+ Value = value;
+ }
+ ///
+ /// 设置和绑定附加属性
+ ///
+ ///
+ ///
+ ///
+ ///
+ public AttachedDescribe(object value, object source, string sourceProperty, Func