diff --git a/CPF.Razor/CPF.Razor.csproj b/CPF.Razor/CPF.Razor.csproj
new file mode 100644
index 0000000..449f4b6
--- /dev/null
+++ b/CPF.Razor/CPF.Razor.csproj
@@ -0,0 +1,37 @@
+
+
+
+ netstandard2.0
+ 9.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
diff --git a/CPF.Razor/Controls/Button.cs b/CPF.Razor/Controls/Button.cs
new file mode 100644
index 0000000..68aac6d
--- /dev/null
+++ b/CPF.Razor/Controls/Button.cs
@@ -0,0 +1,14 @@
+using Microsoft.AspNetCore.Components;
+//using Microsoft.MobileBlazorBindings.Core;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CPF.Razor.Controls
+{
+ public partial class Button
+ {
+ [Parameter] public RenderFragment ChildContent { get; set; }
+ protected override RenderFragment GetChild() => ChildContent;
+ }
+}
diff --git a/CPF.Razor/Controls/CheckBox.cs b/CPF.Razor/Controls/CheckBox.cs
new file mode 100644
index 0000000..5779cfa
--- /dev/null
+++ b/CPF.Razor/Controls/CheckBox.cs
@@ -0,0 +1,14 @@
+using Microsoft.AspNetCore.Components;
+//using Microsoft.MobileBlazorBindings.Core;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CPF.Razor.Controls
+{
+ public partial class CheckBox
+ {
+ [Parameter] public RenderFragment ChildContent { get; set; }
+ protected override RenderFragment GetChild() => ChildContent;
+ }
+}
diff --git a/CPF.Razor/Controls/DockPanel.cs b/CPF.Razor/Controls/DockPanel.cs
new file mode 100644
index 0000000..85db5ee
--- /dev/null
+++ b/CPF.Razor/Controls/DockPanel.cs
@@ -0,0 +1,14 @@
+using Microsoft.AspNetCore.Components;
+//using Microsoft.MobileBlazorBindings.Core;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CPF.Razor.Controls
+{
+ public partial class DockPanel
+ {
+ [Parameter] public RenderFragment ChildContent { get; set; }
+ protected override RenderFragment GetChild() => ChildContent;
+ }
+}
diff --git a/CPF.Razor/Controls/Element.cs b/CPF.Razor/Controls/Element.cs
new file mode 100644
index 0000000..2fc4c3b
--- /dev/null
+++ b/CPF.Razor/Controls/Element.cs
@@ -0,0 +1,115 @@
+using CPF.Input;
+using Microsoft.AspNetCore.Components;
+//using Microsoft.MobileBlazorBindings.Core;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CPF.Razor.Controls
+{
+ public abstract partial class Element : NativeControlComponentBase where T : UIElement, new()
+ {
+ protected override void RenderAttributes(AttributesBuilder builder)
+ {
+ base.RenderAttributes(builder);
+
+ var type = GetType();
+ var ps = type.GetProperties();
+ foreach (var item in ps)
+ {
+ var attr = item.GetCustomAttributes(typeof(ParameterAttribute), true);
+ if (attr != null && attr.Length > 0 && item.PropertyType != typeof(RenderFragment))
+ {
+ var v = item.GetValue(this);
+ if (v != null)
+ {
+ if (item.PropertyType == typeof(EventCallback) || (item.PropertyType.IsGenericType && item.PropertyType.GetGenericTypeDefinition() == typeof(EventCallback<>)))
+ {//事件注册还必须加小写的on
+ builder.AddAttribute("on" + item.Name, v);
+ }
+ else
+ {
+ builder.AddAttribute(item.Name, v);
+ }
+ }
+ }
+ }
+
+ //if (MarginLeft != null)
+ //{
+ // builder.AddAttribute(nameof(MarginLeft), MarginLeft);
+ //}
+ //if (MarginTop != null)
+ //{
+ // builder.AddAttribute(nameof(MarginTop), MarginTop);
+ //}
+ //if (Height != null)
+ //{
+ // builder.AddAttribute(nameof(Height), Height);
+ //}
+ //if (Width != null)
+ //{
+ // builder.AddAttribute(nameof(Width), Width);
+ //}
+ }
+ public override void ApplyAttribute(ulong attributeEventHandlerId, string attributeName, object attributeValue, string attributeEventUpdatesAttributeName)
+ {
+ var p = Element.GetPropertyMetadata(attributeName);
+ if (p != null)
+ {
+ Element.SetValue(attributeValue.ConvertTo(p.PropertyType), attributeName);
+ }
+ else
+ {
+ if (events.Contains(attributeName))
+ {
+ handlerIds[attributeName] = attributeEventHandlerId;
+ Renderer.RegisterEvent(attributeEventHandlerId, id => { if (id == attributeEventHandlerId) { handlerIds.Remove(attributeName); } });
+ }
+ }
+ }
+
+ Dictionary handlerIds = new Dictionary();
+ HashSet events = new HashSet();
+
+ protected override T CreateElement()
+ {
+ var r = base.CreateElement();
+ var type = typeof(T);
+ var ps = type.GetEvents();
+ foreach (var item in ps)
+ {
+ var name = "on" + item.Name;
+ events.Add(name);
+ r.Commands.Add(item.Name, (s, e) =>
+ {
+ if (handlerIds.TryGetValue(name, out var id))
+ {
+ Renderer.Dispatcher.InvokeAsync(() => Renderer.DispatchEventAsync(id, null, e as EventArgs));
+ }
+ });
+ }
+
+ return r;
+ }
+
+ public void HandleText(int index, string text)
+ {
+ if (Element is CPF.Controls.ContentControl control)
+ {
+ control.Content = text;
+ }
+ }
+
+ ////只要属性和事件自动生成就行
+ //[Parameter] public string Name { get; set; }
+ //[Parameter] public FloatField? MarginLeft { get; set; }
+ //[Parameter] public FloatField? MarginTop { get; set; }
+ //[Parameter] public FloatField? MarginBottom { get; set; }
+ //[Parameter] public FloatField? MarginRight { get; set; }
+ //[Parameter] public CPF.FloatField? Width { get; set; }
+ //[Parameter] public CPF.FloatField? Height { get; set; }
+ //[Parameter] public EventCallback MouseDown { get; set; }
+
+ }
+}
diff --git a/CPF.Razor/Controls/Grid.cs b/CPF.Razor/Controls/Grid.cs
new file mode 100644
index 0000000..a21e2f2
--- /dev/null
+++ b/CPF.Razor/Controls/Grid.cs
@@ -0,0 +1,13 @@
+using Microsoft.AspNetCore.Components;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CPF.Razor.Controls
+{
+ public partial class Grid
+ {
+ [Parameter] public RenderFragment ChildContent { get; set; }
+ protected override RenderFragment GetChild() => ChildContent;
+ }
+}
diff --git a/CPF.Razor/Controls/Panel.cs b/CPF.Razor/Controls/Panel.cs
new file mode 100644
index 0000000..7b2294e
--- /dev/null
+++ b/CPF.Razor/Controls/Panel.cs
@@ -0,0 +1,16 @@
+using Microsoft.AspNetCore.Components;
+//using Microsoft.MobileBlazorBindings.Core;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CPF.Razor.Controls
+{
+ public partial class Panel : Element
+ {
+ //[Parameter] public string Background { get; set; }
+
+ [Parameter] public RenderFragment ChildContent { get; set; }
+ protected override RenderFragment GetChild() => ChildContent;
+ }
+}
diff --git a/CPF.Razor/Controls/ResponsivePanel.cs b/CPF.Razor/Controls/ResponsivePanel.cs
new file mode 100644
index 0000000..7ef6b7b
--- /dev/null
+++ b/CPF.Razor/Controls/ResponsivePanel.cs
@@ -0,0 +1,13 @@
+using Microsoft.AspNetCore.Components;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CPF.Razor.Controls
+{
+ public partial class ResponsivePanel
+ {
+ [Parameter] public RenderFragment ChildContent { get; set; }
+ protected override RenderFragment GetChild() => ChildContent;
+ }
+}
diff --git a/CPF.Razor/Controls/StackPanel.cs b/CPF.Razor/Controls/StackPanel.cs
new file mode 100644
index 0000000..dc5d142
--- /dev/null
+++ b/CPF.Razor/Controls/StackPanel.cs
@@ -0,0 +1,13 @@
+using Microsoft.AspNetCore.Components;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CPF.Razor.Controls
+{
+ public partial class StackPanel
+ {
+ [Parameter] public RenderFragment ChildContent { get; set; }
+ protected override RenderFragment GetChild() => ChildContent;
+ }
+}
diff --git a/CPF.Razor/Controls/TestElement.cs b/CPF.Razor/Controls/TestElement.cs
new file mode 100644
index 0000000..c24aa36
--- /dev/null
+++ b/CPF.Razor/Controls/TestElement.cs
@@ -0,0 +1,153 @@
+using Microsoft.AspNetCore.Components;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CPF.Razor.Controls
+{
+ public class TestElement : Microsoft.AspNetCore.Components.IComponent, IHandleEvent, IHandleAfterRender, ICustomTypeDescriptor
+ {
+ [Parameter]
+ public string Test { get; set; }
+
+ public void Attach(RenderHandle renderHandle)
+ {
+ throw new NotImplementedException();
+ }
+
+ public AttributeCollection GetAttributes()
+ {
+ throw new NotImplementedException();
+ }
+
+ public string GetClassName()
+ {
+ return "TestElement";
+ }
+
+ public string GetComponentName()
+ {
+ return "GetComponentName";
+ }
+
+ public TypeConverter GetConverter()
+ {
+ throw new NotImplementedException();
+ }
+
+ public EventDescriptor GetDefaultEvent()
+ {
+ throw new NotImplementedException();
+ }
+
+ public PropertyDescriptor GetDefaultProperty()
+ {
+ throw new NotImplementedException();
+ }
+
+ public object GetEditor(Type editorBaseType)
+ {
+ throw new NotImplementedException();
+ }
+
+ public EventDescriptorCollection GetEvents()
+ {
+ throw new NotImplementedException();
+ }
+
+ public EventDescriptorCollection GetEvents(Attribute[] attributes)
+ {
+ throw new NotImplementedException();
+ }
+
+ public PropertyDescriptorCollection GetProperties()
+ {
+ return new PropertyDescriptorCollection(new CpfPropertyDescriptor[] { new CpfPropertyDescriptor("Pro1", false, typeof(string), null) });
+ }
+
+ public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
+ {
+ throw new NotImplementedException();
+ }
+
+ public object GetPropertyOwner(PropertyDescriptor pd)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task HandleEventAsync(EventCallbackWorkItem item, object arg)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task OnAfterRenderAsync()
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task SetParametersAsync(ParameterView parameters)
+ {
+ throw new NotImplementedException();
+ }
+ }
+ class CpfPropertyDescriptor : PropertyDescriptor
+ {
+ public CpfPropertyDescriptor(string name, bool readOnly, Type type, Attribute[] attributes) : base(name, attributes)
+ {
+ isreadonly = readOnly;
+ pType = type;
+ }
+ public string FileTypes { get; set; }
+ public bool IsAttached { get; set; }
+ public bool IsDependency { get; set; }
+
+ bool isreadonly;
+ Type pType;
+ public override Type ComponentType => typeof(TestElement);
+
+ public override bool IsReadOnly => isreadonly;
+
+ public override Type PropertyType => pType;
+
+ public override bool CanResetValue(object component)
+ {
+ return false;
+ }
+
+ public override object GetValue(object component)
+ {
+ if (component is UIElement element)
+ {
+ return element.GetPropretyValue(Name);
+ }
+ return null;
+ }
+
+ public override void ResetValue(object component)
+ {
+ //if (component is UIElement element)
+ //{
+ // element.ResetValue(Name);
+ //}
+ }
+
+ public override void SetValue(object component, object value)
+ {
+ if (component is UIElement element)
+ {
+ element.SetPropretyValue(Name, value);
+ }
+ }
+
+ public override bool ShouldSerializeValue(object component)
+ {
+ return false;
+ }
+ public override string ToString()
+ {
+ return this.Name;
+ }
+ }
+}
diff --git a/CPF.Razor/Controls/WindowFrame.cs b/CPF.Razor/Controls/WindowFrame.cs
new file mode 100644
index 0000000..8906ff8
--- /dev/null
+++ b/CPF.Razor/Controls/WindowFrame.cs
@@ -0,0 +1,13 @@
+using Microsoft.AspNetCore.Components;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CPF.Razor.Controls
+{
+ public partial class WindowFrame
+ {
+ [Parameter] public RenderFragment ChildContent { get; set; }
+ protected override RenderFragment GetChild() => ChildContent;
+ }
+}
diff --git a/CPF.Razor/Controls/WrapPanel.cs b/CPF.Razor/Controls/WrapPanel.cs
new file mode 100644
index 0000000..6980be7
--- /dev/null
+++ b/CPF.Razor/Controls/WrapPanel.cs
@@ -0,0 +1,14 @@
+using Microsoft.AspNetCore.Components;
+//using Microsoft.MobileBlazorBindings.Core;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CPF.Razor.Controls
+{
+ public partial class WrapPanel
+ {
+ [Parameter] public RenderFragment ChildContent { get; set; }
+ protected override RenderFragment GetChild() => ChildContent;
+ }
+}
diff --git a/CPF.Razor/Controls/generated/Border.generated.cs b/CPF.Razor/Controls/generated/Border.generated.cs
new file mode 100644
index 0000000..fe9c213
--- /dev/null
+++ b/CPF.Razor/Controls/generated/Border.generated.cs
@@ -0,0 +1,60 @@
+// CPF自动生成.
+
+using CPF;
+using CPF.Controls;
+using CPF.Drawing;
+using CPF.Input;
+using CPF.Razor;
+using CPF.Shapes;
+using Microsoft.AspNetCore.Components;
+
+namespace CPF.Razor.Controls
+{
+ ///
+ /// 在另一个元素四周绘制边框和背景
+ ///
+ public partial class Border : Element
+ {
+
+ [Parameter] public string Background { get; set; }
+ [Parameter] public string BorderFill { get; set; }
+ ///
+ /// 获取或设置线条类型
+ ///
+ [Parameter] public Stroke? BorderStroke { get; set; }
+ ///
+ /// 四周边框粗细
+ ///
+ [Parameter] public Thickness? BorderThickness { get; set; }
+ ///
+ /// 边框类型
+ ///
+ [Parameter] public BorderType? BorderType { get; set; }
+ [Parameter] public UIElement Child { get; set; }
+ ///
+ /// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。
+ ///
+ [Parameter] public CornerRadius? CornerRadius { get; set; }
+ ///
+ /// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值
+ ///
+ [Parameter] public Thickness? Padding { get; set; }
+ ///
+ /// 模糊宽度
+ ///
+ [Parameter] public byte? ShadowBlur { get; set; }
+ ///
+ /// 阴影颜色
+ ///
+ [Parameter] public string ShadowColor { get; set; }
+ ///
+ /// 阴影水平偏移
+ ///
+ [Parameter] public sbyte? ShadowHorizontal { get; set; }
+ ///
+ /// 阴影垂直偏移
+ ///
+ [Parameter] public sbyte? ShadowVertical { get; set; }
+
+ }
+}
diff --git a/CPF.Razor/Controls/generated/Button.generated.cs b/CPF.Razor/Controls/generated/Button.generated.cs
new file mode 100644
index 0000000..0a7462b
--- /dev/null
+++ b/CPF.Razor/Controls/generated/Button.generated.cs
@@ -0,0 +1,77 @@
+// CPF自动生成.
+
+using CPF;
+using CPF.Controls;
+using CPF.Drawing;
+using CPF.Input;
+using CPF.Razor;
+using CPF.Shapes;
+using Microsoft.AspNetCore.Components;
+
+namespace CPF.Razor.Controls
+{
+ ///
+ /// 表示 Windows 按钮控件,该按钮对 Click 事件做出反应。
+ ///
+ public partial class Button : Element ,IHandleChildContentText
+ {
+
+ ///
+ /// 背景填充
+ ///
+ [Parameter] public string Background { get; set; }
+ ///
+ /// 边框线条填充
+ ///
+ [Parameter] public string BorderFill { get; set; }
+ ///
+ /// 获取或设置线条类型
+ ///
+ [Parameter] public Stroke? BorderStroke { get; set; }
+ ///
+ /// 四周边框粗细
+ ///
+ [Parameter] public Thickness? BorderThickness { get; set; }
+ ///
+ /// 边框类型,BorderStroke和BorderThickness
+ ///
+ [Parameter] public BorderType? BorderType { get; set; }
+ [Parameter] public ClickMode? ClickMode { get; set; }
+ ///
+ /// 内容可以是字符串,UI元素等等
+ ///
+ [Parameter] public object Content { get; set; }
+ [Parameter] public string ContentStringFormat { get; set; }
+ ///
+ /// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
+ ///
+ [Parameter] public CornerRadius? CornerRadius { get; set; }
+ ///
+ /// 字体名
+ ///
+ [Parameter] public string FontFamily { get; set; }
+ ///
+ /// 字体尺寸,点
+ ///
+ [Parameter] public float? FontSize { get; set; }
+ ///
+ /// 字体样式
+ ///
+ [Parameter] public FontStyles? FontStyle { get; set; }
+ ///
+ /// 控件文字的填充
+ ///
+ [Parameter] public string Foreground { get; set; }
+ ///
+ /// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
+ ///
+ [Parameter] public Thickness? Padding { get; set; }
+ ///
+ /// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
+ ///
+ [Parameter] public TextDecoration? TextDecoration { get; set; }
+ [Parameter] public EventCallback Click { get; set; }
+ [Parameter] public EventCallback Initialized { get; set; }
+
+ }
+}
diff --git a/CPF.Razor/Controls/generated/Calendar.generated.cs b/CPF.Razor/Controls/generated/Calendar.generated.cs
new file mode 100644
index 0000000..9df7b41
--- /dev/null
+++ b/CPF.Razor/Controls/generated/Calendar.generated.cs
@@ -0,0 +1,75 @@
+// CPF自动生成.
+
+using CPF;
+using CPF.Controls;
+using CPF.Drawing;
+using CPF.Input;
+using CPF.Razor;
+using CPF.Shapes;
+using Microsoft.AspNetCore.Components;
+using System;
+
+namespace CPF.Razor.Controls
+{
+ ///
+ /// 代表一个控件,此控件允许用户使用可视的日历显示来选择日期
+ ///
+ public partial class Calendar : Element
+ {
+
+ ///
+ /// 背景填充
+ ///
+ [Parameter] public string Background { get; set; }
+ ///
+ /// 边框线条填充
+ ///
+ [Parameter] public string BorderFill { get; set; }
+ ///
+ /// 获取或设置线条类型
+ ///
+ [Parameter] public Stroke? BorderStroke { get; set; }
+ ///
+ /// 四周边框粗细
+ ///
+ [Parameter] public Thickness? BorderThickness { get; set; }
+ ///
+ /// 边框类型,BorderStroke和BorderThickness
+ ///
+ [Parameter] public BorderType? BorderType { get; set; }
+ ///
+ /// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
+ ///
+ [Parameter] public CornerRadius? CornerRadius { get; set; }
+ [Parameter] public DateTime? DisplayDate { get; set; }
+ [Parameter] public CalendarMode? DisplayMode { get; set; }
+ [Parameter] public DayOfWeek? FirstDayOfWeek { get; set; }
+ ///
+ /// 字体名
+ ///
+ [Parameter] public string FontFamily { get; set; }
+ ///
+ /// 字体尺寸,点
+ ///
+ [Parameter] public float? FontSize { get; set; }
+ ///
+ /// 字体样式
+ ///
+ [Parameter] public FontStyles? FontStyle { get; set; }
+ ///
+ /// 控件文字的填充
+ ///
+ [Parameter] public string Foreground { get; set; }
+ ///
+ /// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
+ ///
+ [Parameter] public Thickness? Padding { get; set; }
+ [Parameter] public Nullable SelectedDate { get; set; }
+ ///
+ /// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
+ ///
+ [Parameter] public TextDecoration? TextDecoration { get; set; }
+ [Parameter] public EventCallback Initialized { get; set; }
+
+ }
+}
diff --git a/CPF.Razor/Controls/generated/Chart.generated.cs b/CPF.Razor/Controls/generated/Chart.generated.cs
new file mode 100644
index 0000000..700db58
--- /dev/null
+++ b/CPF.Razor/Controls/generated/Chart.generated.cs
@@ -0,0 +1,139 @@
+// CPF自动生成.
+
+using CPF;
+using CPF.Charts;
+using CPF.Controls;
+using CPF.Drawing;
+using CPF.Input;
+using CPF.Razor;
+using CPF.Shapes;
+using Microsoft.AspNetCore.Components;
+using System;
+using System.Collections.Generic;
+
+namespace CPF.Razor.Controls
+{
+ ///
+ /// 提供折线图,曲线图,柱状图
+ ///
+ public partial class Chart : Element
+ {
+
+ ///
+ /// 背景填充
+ ///
+ [Parameter] public string Background { get; set; }
+ ///
+ /// 边框线条填充
+ ///
+ [Parameter] public string BorderFill { get; set; }
+ ///
+ /// 获取或设置线条类型
+ ///
+ [Parameter] public Stroke? BorderStroke { get; set; }
+ ///
+ /// 四周边框粗细
+ ///
+ [Parameter] public Thickness? BorderThickness { get; set; }
+ ///
+ /// 边框类型,BorderStroke和BorderThickness
+ ///
+ [Parameter] public BorderType? BorderType { get; set; }
+ ///
+ /// 是否可以缩放滚动
+ ///
+ [Parameter] public bool? CanScroll { get; set; }
+ ///
+ /// 图表区域填充
+ ///
+ [Parameter] public string ChartFill { get; set; }
+ ///
+ /// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
+ ///
+ [Parameter] public CornerRadius? CornerRadius { get; set; }
+ [Parameter] public IList Data { get; set; }
+ ///
+ /// 字体名
+ ///
+ [Parameter] public string FontFamily { get; set; }
+ ///
+ /// 字体尺寸,点
+ ///
+ [Parameter] public float? FontSize { get; set; }
+ ///
+ /// 字体样式
+ ///
+ [Parameter] public FontStyles? FontStyle { get; set; }
+ ///
+ /// 控件文字的填充
+ ///
+ [Parameter] public string Foreground { get; set; }
+ ///
+ /// 网格填充
+ ///
+ [Parameter] public string GridFill { get; set; }
+ ///
+ /// 网格显示模式
+ ///
+ [Parameter] public GridShowMode? GridShowMode { get; set; }
+ ///
+ /// 水平缩放值 大于等于1
+ ///
+ [Parameter] public float? HorizontalScaling { get; set; }
+ ///
+ /// 鼠标移入选中的线条填充
+ ///
+ [Parameter] public string HoverSelectLineFill { get; set; }
+ ///
+ /// 鼠标移入选中的坐标轴提示背景填充
+ ///
+ [Parameter] public string HoverSelectTipBackFill { get; set; }
+ ///
+ /// 鼠标移入选中的坐标轴提示文字填充
+ ///
+ [Parameter] public string HoverSelectTipFill { get; set; }
+ ///
+ /// Y轴最大值
+ ///
+ [Parameter] public Nullable MaxValue { get; set; }
+ ///
+ /// Y轴最小值
+ ///
+ [Parameter] public Nullable MinValue { get; set; }
+ ///
+ /// 鼠标移入图表的时候显示信息
+ ///
+ [Parameter] public bool? MouseHoverShowTip { get; set; }
+ ///
+ /// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
+ ///
+ [Parameter] public Thickness? Padding { get; set; }
+ ///
+ /// 显示滚动缩放值的线条填充
+ ///
+ [Parameter] public string ScrollLineFill { get; set; }
+ [Parameter] public float? ScrollValue { get; set; }
+ ///
+ /// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
+ ///
+ [Parameter] public TextDecoration? TextDecoration { get; set; }
+ ///
+ /// X轴文字
+ ///
+ [Parameter] public string XAxis { get; set; }
+ ///
+ /// X轴颜色
+ ///
+ [Parameter] public string XAxisFill { get; set; }
+ ///
+ /// Y轴颜色
+ ///
+ [Parameter] public string YAxisFill { get; set; }
+ ///
+ /// Y轴刻度分割数量,大于等于1
+ ///
+ [Parameter] public uint? YAxisScaleCount { get; set; }
+ [Parameter] public EventCallback Initialized { get; set; }
+
+ }
+}
diff --git a/CPF.Razor/Controls/generated/CheckBox.generated.cs b/CPF.Razor/Controls/generated/CheckBox.generated.cs
new file mode 100644
index 0000000..ba6182c
--- /dev/null
+++ b/CPF.Razor/Controls/generated/CheckBox.generated.cs
@@ -0,0 +1,83 @@
+// CPF自动生成.
+
+using CPF;
+using CPF.Controls;
+using CPF.Drawing;
+using CPF.Input;
+using CPF.Razor;
+using CPF.Shapes;
+using Microsoft.AspNetCore.Components;
+using System;
+
+namespace CPF.Razor.Controls
+{
+ ///
+ /// 表示用户可以选择和清除的控件。
+ ///
+ public partial class CheckBox : Element ,IHandleChildContentText
+ {
+
+ ///
+ /// 背景填充
+ ///
+ [Parameter] public string Background { get; set; }
+ ///
+ /// 边框线条填充
+ ///
+ [Parameter] public string BorderFill { get; set; }
+ ///
+ /// 获取或设置线条类型
+ ///
+ [Parameter] public Stroke? BorderStroke { get; set; }
+ ///
+ /// 四周边框粗细
+ ///
+ [Parameter] public Thickness? BorderThickness { get; set; }
+ ///
+ /// 边框类型,BorderStroke和BorderThickness
+ ///
+ [Parameter] public BorderType? BorderType { get; set; }
+ [Parameter] public ClickMode? ClickMode { get; set; }
+ ///
+ /// 内容可以是字符串,UI元素等等
+ ///
+ [Parameter] public object Content { get; set; }
+ [Parameter] public string ContentStringFormat { get; set; }
+ ///
+ /// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
+ ///
+ [Parameter] public CornerRadius? CornerRadius { get; set; }
+ ///
+ /// 字体名
+ ///
+ [Parameter] public string FontFamily { get; set; }
+ ///
+ /// 字体尺寸,点
+ ///
+ [Parameter] public float? FontSize { get; set; }
+ ///
+ /// 字体样式
+ ///
+ [Parameter] public FontStyles? FontStyle { get; set; }
+ ///
+ /// 控件文字的填充
+ ///
+ [Parameter] public string Foreground { get; set; }
+ [Parameter] public Nullable IsChecked { get; set; }
+ [Parameter] public bool? IsThreeState { get; set; }
+ ///
+ /// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
+ ///
+ [Parameter] public Thickness? Padding { get; set; }
+ ///
+ /// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
+ ///
+ [Parameter] public TextDecoration? TextDecoration { get; set; }
+ [Parameter] public EventCallback Checked { get; set; }
+ [Parameter] public EventCallback Indeterminate { get; set; }
+ [Parameter] public EventCallback Unchecked { get; set; }
+ [Parameter] public EventCallback Click { get; set; }
+ [Parameter] public EventCallback Initialized { get; set; }
+
+ }
+}
diff --git a/CPF.Razor/Controls/generated/CodeTextBox.generated.cs b/CPF.Razor/Controls/generated/CodeTextBox.generated.cs
new file mode 100644
index 0000000..2b15c49
--- /dev/null
+++ b/CPF.Razor/Controls/generated/CodeTextBox.generated.cs
@@ -0,0 +1,116 @@
+// CPF自动生成.
+
+using CPF;
+using CPF.Controls;
+using CPF.Drawing;
+using CPF.Input;
+using CPF.Razor;
+using CPF.Shapes;
+using Microsoft.AspNetCore.Components;
+
+namespace CPF.Razor.Controls
+{
+ ///
+ /// 支持可视化设计的控件基类
+ ///
+ public partial class CodeTextBox : Element
+ {
+
+ ///
+ /// 如果按 Tab 键会在当前光标位置插入一个制表符,则为 true;如果按 Tab 键会将焦点移动到标记为制表位的下一个控件且不插入制表符,则为 false
+ ///
+ [Parameter] public bool? AcceptsTab { get; set; }
+ ///
+ /// 背景填充
+ ///
+ [Parameter] public string Background { get; set; }
+ ///
+ /// 边框线条填充
+ ///
+ [Parameter] public string BorderFill { get; set; }
+ ///
+ /// 获取或设置线条类型
+ ///
+ [Parameter] public Stroke? BorderStroke { get; set; }
+ ///
+ /// 四周边框粗细
+ ///
+ [Parameter] public Thickness? BorderThickness { get; set; }
+ ///
+ /// 边框类型,BorderStroke和BorderThickness
+ ///
+ [Parameter] public BorderType? BorderType { get; set; }
+ ///
+ /// 获取或设置用于绘制文本框的插入符号的画笔
+ ///
+ [Parameter] public string CaretFill { get; set; }
+ ///
+ /// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
+ ///
+ [Parameter] public CornerRadius? CornerRadius { get; set; }
+ ///
+ /// 字体名
+ ///
+ [Parameter] public string FontFamily { get; set; }
+ ///
+ /// 字体尺寸,点
+ ///
+ [Parameter] public float? FontSize { get; set; }
+ ///
+ /// 字体样式
+ ///
+ [Parameter] public FontStyles? FontStyle { get; set; }
+ ///
+ /// 控件文字的填充
+ ///
+ [Parameter] public string Foreground { get; set; }
+ ///
+ /// 获取或设置一个值,该值指示是否应显示水平 ScrollBar
+ ///
+ [Parameter] public ScrollBarVisibility? HScrollBarVisibility { get; set; }
+ ///
+ /// 是否启用输入法,主要描述的是中文这类输入法
+ ///
+ [Parameter] public bool? IsInputMethodEnabled { get; set; }
+ ///
+ /// 获取或设置一个值,该值指示文本编辑控件对于与该控件交互的用户是否是只读的
+ ///
+ [Parameter] public bool? IsReadOnly { get; set; }
+ ///
+ /// 获取或设置一个值,该值指示文本编辑控件是否支持撤消功能
+ ///
+ [Parameter] public bool? IsUndoEnabled { get; set; }
+ ///
+ /// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
+ ///
+ [Parameter] public Thickness? Padding { get; set; }
+ ///
+ /// 获取或设置会突出显示选定文本的画笔。
+ ///
+ [Parameter] public string SelectionFill { get; set; }
+ ///
+ /// 获取或设置一个值,此值定义用于所选文本的画笔。
+ ///
+ [Parameter] public string SelectionTextFill { get; set; }
+ ///
+ /// 获取或设置一个值,是否显示行号
+ ///
+ [Parameter] public bool? ShowLineNumber { get; set; }
+ [Parameter] public string Text { get; set; }
+ ///
+ /// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
+ ///
+ [Parameter] public TextDecoration? TextDecoration { get; set; }
+ ///
+ /// 获取或设置存储在撤消队列中的操作的数目。 默认值为-1, 表示撤消队列限制为可用的内存。
+ ///
+ [Parameter] public int? UndoLimit { get; set; }
+ ///
+ /// 获取或设置一个值,该值指示是否应显示垂直 ScrollBar。
+ ///
+ [Parameter] public ScrollBarVisibility? VScrollBarVisibility { get; set; }
+ [Parameter] public EventCallback TextChanged { get; set; }
+ [Parameter] public EventCallback Initialized { get; set; }
+
+ }
+}
diff --git a/CPF.Razor/Controls/generated/ComboBox.generated.cs b/CPF.Razor/Controls/generated/ComboBox.generated.cs
new file mode 100644
index 0000000..007591e
--- /dev/null
+++ b/CPF.Razor/Controls/generated/ComboBox.generated.cs
@@ -0,0 +1,118 @@
+// CPF自动生成.
+
+using CPF;
+using CPF.Controls;
+using CPF.Drawing;
+using CPF.Input;
+using CPF.Razor;
+using CPF.Shapes;
+using Microsoft.AspNetCore.Components;
+using System.Collections;
+
+namespace CPF.Razor.Controls
+{
+ ///
+ /// 表示带有下拉列表的选择控件,通过单击控件上的箭头可显示或隐藏下拉列表
+ ///
+ public partial class ComboBox : Element
+ {
+
+ ///
+ /// 获取或设置 ItemsControl 中的交替项容器的数目,该控件可使交替容器具有唯一外观,通过附加数据AttachedExtenstions.AlternationIndex 读取循环的ID
+ ///
+ [Parameter] public uint? AlternationCount { get; set; }
+ ///
+ /// 背景填充
+ ///
+ [Parameter] public string Background { get; set; }
+ ///
+ /// 边框线条填充
+ ///
+ [Parameter] public string BorderFill { get; set; }
+ ///
+ /// 获取或设置线条类型
+ ///
+ [Parameter] public Stroke? BorderStroke { get; set; }
+ ///
+ /// 四周边框粗细
+ ///
+ [Parameter] public Thickness? BorderThickness { get; set; }
+ ///
+ /// 边框类型,BorderStroke和BorderThickness
+ ///
+ [Parameter] public BorderType? BorderType { get; set; }
+ ///
+ /// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
+ ///
+ [Parameter] public CornerRadius? CornerRadius { get; set; }
+ ///
+ /// 显示的数据字段或属性
+ ///
+ [Parameter] public string DisplayMemberPath { get; set; }
+ ///
+ /// 字体名
+ ///
+ [Parameter] public string FontFamily { get; set; }
+ ///
+ /// 字体尺寸,点
+ ///
+ [Parameter] public float? FontSize { get; set; }
+ ///
+ /// 字体样式
+ ///
+ [Parameter] public FontStyles? FontStyle { get; set; }
+ ///
+ /// 控件文字的填充
+ ///
+ [Parameter] public string Foreground { get; set; }
+ [Parameter] public bool? IsDropDownOpen { get; set; }
+ [Parameter] public bool? IsEditable { get; set; }
+ ///
+ /// 是否虚拟化UI,只支持StackPanel的虚拟化数据显示。初始化之前设置
+ ///
+ [Parameter] public bool? IsVirtualizing { get; set; }
+ ///
+ /// 返回CPF.Controls.ItemCollection类型,可以直接将数据源设置过来
+ ///
+ [Parameter] public IList Items { get; set; }
+ ///
+ /// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
+ ///
+ [Parameter] public Thickness? Padding { get; set; }
+ ///
+ /// 获取或者设置当前选定的项的第一个索引
+ ///
+ [Parameter] public int? SelectedIndex { get; set; }
+ ///
+ /// 获取或设置通过使用 SelectedItem 而获取的 SelectedValuePath 的值。如果数据量大不建议用这个来设置,如果是多选的时候,类型是IEnumerable数据,可以遍历获取
+ ///
+ [Parameter] public object SelectedValue { get; set; }
+ ///
+ /// 获取或设置用于从 SelectedValue 获取 SelectedItem 的路径。
+ ///
+ [Parameter] public string SelectedValuePath { get; set; }
+ ///