From 4e23e93d9dff9f7401818f2fdcee644e3dbaf533 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E7=BA=A2=E5=B8=BD?= <761716178@qq.com>
Date: Thu, 30 Nov 2023 15:12:23 +0800
Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E8=A7=A6=E5=8F=91=E5=99=A8?=
=?UTF-8?q?=E5=86=99=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CPF.Skia/GlView.cs | 4 ++
CPF/BindingDescribe.cs | 53 +++++++++++++-
CPF/Controls/ContentTemplate.cs | 53 +++++++++++++-
CPF/Controls/ListBoxItem.cs | 7 +-
CPF/CpfObject.cs | 23 +++++-
CPF/Styling/Trigger.cs | 112 +++++++++++++++++++++++++++++-
CPF/UIElement.cs | 17 +++++
ConsoleApp1/Program.cs | 2 +-
ConsoleApp1/Window1.cs | 119 +++++++++++++++++++++++++++-----
9 files changed, 362 insertions(+), 28 deletions(-)
diff --git a/CPF.Skia/GlView.cs b/CPF.Skia/GlView.cs
index 4038d16..f2431c6 100644
--- a/CPF.Skia/GlView.cs
+++ b/CPF.Skia/GlView.cs
@@ -20,6 +20,10 @@ namespace CPF.Skia
SKImage image;
SKPaint paint;
GRBackendTexture backendTexture;
+ ///
+ /// 支持OpenGL绘制的控件,在GLRender事件里绘制,开启GPU硬件加速才能使用 new SkiaDrawingFactory { UseGPU = true }
+ ///
+ public GLView() { }
//IGlContext context;
protected unsafe override void OnRender(DrawingContext dc)
diff --git a/CPF/BindingDescribe.cs b/CPF/BindingDescribe.cs
index 8bae5ac..ec0f1ce 100644
--- a/CPF/BindingDescribe.cs
+++ b/CPF/BindingDescribe.cs
@@ -17,29 +17,54 @@ namespace CPF
{
PropertyName = sourceProperty;
}
-
+
public BindingDescribe(string sourceProperty, BindingMode binding)
{
PropertyName = sourceProperty;
BindingMode = binding;
}
+ ///
+ /// 设置绑定
+ ///
+ /// 如果是int或者byte,0是自己,1是Parent,2是Parent.Parent....
+ ///
+ ///
public BindingDescribe(object source, string sourceProperty, BindingMode binding)
{
PropertyName = sourceProperty;
BindingMode = binding;
Source = source;
}
+ ///
+ /// 设置绑定
+ ///
+ /// 如果是int或者byte,0是自己,1是Parent,2是Parent.Parent....
+ ///
+ ///
public BindingDescribe(object source, string sourceProperty)
{
PropertyName = sourceProperty;
Source = source;
}
+ ///
+ /// 设置绑定
+ ///
+ /// 如果是int或者byte,0是自己,1是Parent,2是Parent.Parent....
+ ///
+ ///
public BindingDescribe(object source, string sourceProperty, Func