Merge branch 'master' of https://gitee.com/csharpui/CPF into my
# Conflicts: # ConsoleApp1.sln
This commit is contained in:
commit
cdc675e8ff
@ -257,5 +257,10 @@ namespace CPF.Android
|
||||
const string lib = "/system/lib/egl/libEGL_mali.so";
|
||||
[DllImport(lib)]
|
||||
public extern static IntPtr eglGetProcAddress(string procname);
|
||||
|
||||
public void MakeCurrent()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -4,16 +4,26 @@ using Microsoft.AspNetCore.Components;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using CPF.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CPF.Razor.Controls
|
||||
{
|
||||
public abstract partial class Element<T> : NativeControlComponentBase<T> where T : UIElement, new()
|
||||
{
|
||||
public Element()
|
||||
{
|
||||
type = GetType();
|
||||
|
||||
}
|
||||
|
||||
Type type;
|
||||
protected override void RenderAttributes(AttributesBuilder builder)
|
||||
{
|
||||
base.RenderAttributes(builder);
|
||||
|
||||
var type = GetType();
|
||||
//var type = GetType();
|
||||
var ps = type.GetProperties();
|
||||
foreach (var item in ps)
|
||||
{
|
||||
@ -25,7 +35,14 @@ namespace CPF.Razor.Controls
|
||||
{
|
||||
if (item.PropertyType == typeof(EventCallback) || (item.PropertyType.IsGenericType && item.PropertyType.GetGenericTypeDefinition() == typeof(EventCallback<>)))
|
||||
{//事件注册还必须加小写的on
|
||||
builder.AddAttribute("on" + item.Name, v);
|
||||
if (cPs.ContainsKey(item.Name))
|
||||
{
|
||||
builder.AddAttribute("on" + item.Name, EventCallback.Factory.Create<ChangeEventArgs>(this, a => HandleChanged(item, a)));
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.AddAttribute("on" + item.Name, v);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -39,25 +56,25 @@ namespace CPF.Razor.Controls
|
||||
//{
|
||||
// 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);
|
||||
//}
|
||||
}
|
||||
|
||||
private Task HandleChanged(PropertyInfo info, ChangeEventArgs evt)
|
||||
{
|
||||
return (Task)info.FastGetValue(this).Invoke("InvokeAsync", evt.Value);
|
||||
}
|
||||
|
||||
public override void ApplyAttribute(ulong attributeEventHandlerId, string attributeName, object attributeValue, string attributeEventUpdatesAttributeName)
|
||||
{
|
||||
var p = Element.GetPropertyMetadata(attributeName);
|
||||
if (p != null)
|
||||
//var p = Element.GetPropertyMetadata(attributeName);
|
||||
//var p = Element.Type.GetProperty(attributeName);
|
||||
//if (p != null)
|
||||
if (ePs.TryGetValue(attributeName, out var p))
|
||||
{
|
||||
Element.SetValue(attributeValue.ConvertTo(p.PropertyType), attributeName);
|
||||
//Element.SetValue(attributeValue.ConvertTo(p.PropertyType), attributeName);
|
||||
//p.FastSetValue(Element, attributeValue.ConvertTo(p.PropertyType));
|
||||
//这边传过来的值会变成字符串,那直接读取这边的属性值就好了
|
||||
var value = this.GetValue(attributeName);
|
||||
p.FastSetValue(Element, value.ConvertTo(p.PropertyType));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -70,15 +87,43 @@ namespace CPF.Razor.Controls
|
||||
}
|
||||
|
||||
Dictionary<string, ulong> handlerIds = new Dictionary<string, ulong>();
|
||||
|
||||
/// <summary>
|
||||
/// 事件
|
||||
/// </summary>
|
||||
HashSet<string> events = new HashSet<string>();
|
||||
/// <summary>
|
||||
/// 元素属性
|
||||
/// </summary>
|
||||
Dictionary<string, PropertyInfo> ePs = new Dictionary<string, PropertyInfo>();
|
||||
/// <summary>
|
||||
/// 依赖属性,用于绑定通知,TextChanged
|
||||
/// </summary>
|
||||
Dictionary<string, PropertyInfo> cPs = new Dictionary<string, PropertyInfo>();
|
||||
|
||||
protected override T CreateElement()
|
||||
{
|
||||
var r = base.CreateElement();
|
||||
var type = typeof(T);
|
||||
var ps = type.GetEvents();
|
||||
var es = type.GetEvents();
|
||||
var ps = type.GetProperties();
|
||||
foreach (var item in ps)
|
||||
{
|
||||
if (item.Name != "Item" || item.GetIndexParameters().Length == 0)
|
||||
{
|
||||
ePs.Add(item.Name, item);
|
||||
if (r.GetPropertyMetadata(item.Name) != null)
|
||||
{
|
||||
cPs.Add(item.Name + "Changed", item);
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var item in es)
|
||||
{
|
||||
if (cPs.ContainsKey(item.Name))
|
||||
{//过滤CPF内置的相同名称事件
|
||||
continue;
|
||||
}
|
||||
var name = "on" + item.Name;
|
||||
events.Add(name);
|
||||
r.Commands.Add(item.Name, (s, e) =>
|
||||
@ -89,10 +134,35 @@ namespace CPF.Razor.Controls
|
||||
}
|
||||
});
|
||||
}
|
||||
foreach (var item in cPs)
|
||||
{
|
||||
var name = "on" + item.Key;
|
||||
events.Add(name);
|
||||
}
|
||||
r.Commands.Add(nameof(r.PropertyChanged), (s, e) =>
|
||||
{//属性变换通知事件,给onXXXChanged
|
||||
var pe = (CPFPropertyChangedEventArgs)e;
|
||||
if (handlerIds.TryGetValue("on" + pe.PropertyName + "Changed", out var id))
|
||||
{
|
||||
var newValue = pe.NewValue;
|
||||
Renderer.Dispatcher.InvokeAsync(() =>
|
||||
{
|
||||
if (!handlerIds.ContainsValue(id))
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
return Renderer.DispatchEventAsync(id, null, new ChangeEventArgs { Value = newValue });
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 处理标签内部文字
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
/// <param name="text"></param>
|
||||
public void HandleText(int index, string text)
|
||||
{
|
||||
if (Element is CPF.Controls.ContentControl control)
|
||||
@ -100,6 +170,15 @@ namespace CPF.Razor.Controls
|
||||
control.Content = text;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 实现Razor控件自动转换成CPF控件
|
||||
/// </summary>
|
||||
/// <param name="element"></param>
|
||||
public static implicit operator T(Element<T> element)
|
||||
{
|
||||
return element.Element;
|
||||
}
|
||||
|
||||
|
||||
////只要属性和事件自动生成就行
|
||||
//[Parameter] public string Name { get; set; }
|
||||
@ -112,4 +191,6 @@ namespace CPF.Razor.Controls
|
||||
//[Parameter] public EventCallback<MouseButtonEventArgs> MouseDown { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -55,6 +55,45 @@ namespace CPF.Razor.Controls
|
||||
/// 阴影垂直偏移
|
||||
/// <summary>
|
||||
[Parameter] public sbyte? ShadowVertical { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
[Parameter] public EventCallback<UIElement> ChildChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 模糊宽度
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<byte> ShadowBlurChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 阴影颜色
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Color> ShadowColorChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 阴影水平偏移
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<sbyte> ShadowHorizontalChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 阴影垂直偏移
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<sbyte> ShadowVerticalChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -70,8 +70,62 @@ namespace CPF.Razor.Controls
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback<CPF.RoutedEventArgs> Click { get; set; }
|
||||
[Parameter] public EventCallback<RoutedEventArgs> Click { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
[Parameter] public EventCallback<ClickMode> ClickModeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 内容可以是字符串,UI元素等等
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> ContentChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> ContentStringFormatChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -70,6 +70,58 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
[Parameter] public EventCallback<DateTime> DisplayDateChanged { get; set; }
|
||||
[Parameter] public EventCallback<CalendarMode> DisplayModeChanged { get; set; }
|
||||
[Parameter] public EventCallback<DayOfWeek> FirstDayOfWeekChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
[Parameter] public EventCallback<Nullable<DateTime>> SelectedDateChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Charts;
|
||||
@ -134,6 +134,120 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public uint? YAxisScaleCount { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 是否可以缩放滚动
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> CanScrollChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 图表区域填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ChartFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
[Parameter] public EventCallback<IList<IChartData>> DataChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 网格填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> GridFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 网格显示模式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<GridShowMode> GridShowModeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 水平缩放值 大于等于1
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> HorizontalScalingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 鼠标移入选中的线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> HoverSelectLineFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 鼠标移入选中的坐标轴提示背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> HoverSelectTipBackFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 鼠标移入选中的坐标轴提示文字填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> HoverSelectTipFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// Y轴最大值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Nullable<double>> MaxValueChanged { get; set; }
|
||||
/// <summary>
|
||||
/// Y轴最小值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Nullable<double>> MinValueChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 鼠标移入图表的时候显示信息
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> MouseHoverShowTipChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 显示滚动缩放值的线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ScrollLineFillChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> ScrollValueChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// X轴文字
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<IList<string>> XAxisChanged { get; set; }
|
||||
/// <summary>
|
||||
/// X轴颜色
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> XAxisFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// Y轴颜色
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> YAxisFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// Y轴刻度分割数量,大于等于1
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<uint> YAxisScaleCountChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -76,8 +76,64 @@ namespace CPF.Razor.Controls
|
||||
[Parameter] public EventCallback Checked { get; set; }
|
||||
[Parameter] public EventCallback Indeterminate { get; set; }
|
||||
[Parameter] public EventCallback Unchecked { get; set; }
|
||||
[Parameter] public EventCallback<CPF.RoutedEventArgs> Click { get; set; }
|
||||
[Parameter] public EventCallback<RoutedEventArgs> Click { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
[Parameter] public EventCallback<ClickMode> ClickModeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 内容可以是字符串,UI元素等等
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> ContentChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> ContentStringFormatChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<Nullable<bool>> IsCheckedChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> IsThreeStateChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -109,8 +109,100 @@ namespace CPF.Razor.Controls
|
||||
/// 获取或设置一个值,该值指示是否应显示垂直 ScrollBar。
|
||||
/// <summary>
|
||||
[Parameter] public ScrollBarVisibility? VScrollBarVisibility { get; set; }
|
||||
[Parameter] public EventCallback TextChanged { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 如果按 Tab 键会在当前光标位置插入一个制表符,则为 true;如果按 Tab 键会将焦点移动到标记为制表位的下一个控件且不插入制表符,则为 false
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> AcceptsTabChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置用于绘制文本框的插入符号的画笔
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> CaretFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示是否应显示水平 ScrollBar
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ScrollBarVisibility> HScrollBarVisibilityChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 是否启用输入法,主要描述的是中文这类输入法
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsInputMethodEnabledChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示文本编辑控件对于与该控件交互的用户是否是只读的
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsReadOnlyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示文本编辑控件是否支持撤消功能
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsUndoEnabledChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置会突出显示选定文本的画笔。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> SelectionFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,此值定义用于所选文本的画笔。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> SelectionTextFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,是否显示行号
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> ShowLineNumberChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> TextChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置存储在撤消队列中的操作的数目。 默认值为-1, 表示撤消队列限制为可用的内存。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<int> UndoLimitChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示是否应显示垂直 ScrollBar。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ScrollBarVisibility> VScrollBarVisibilityChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -108,11 +108,102 @@ namespace CPF.Razor.Controls
|
||||
/// 虚拟模式下元素使用方式
|
||||
/// <summary>
|
||||
[Parameter] public VirtualizationMode? VirtualizationMode { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.ListBoxItemMouseEventArgs> ItemMouseDown { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.ListBoxItemMouseEventArgs> ItemMouseUp { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.ListBoxItemEventArgs> ItemDoubleClick { get; set; }
|
||||
[Parameter] public EventCallback<ListBoxItemMouseEventArgs> ItemMouseDown { get; set; }
|
||||
[Parameter] public EventCallback<ListBoxItemMouseEventArgs> ItemMouseUp { get; set; }
|
||||
[Parameter] public EventCallback<ListBoxItemEventArgs> ItemDoubleClick { get; set; }
|
||||
[Parameter] public EventCallback SelectionChanged { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置 ItemsControl 中的交替项容器的数目,该控件可使交替容器具有唯一外观,通过附加数据AttachedExtenstions.AlternationIndex 读取循环的ID
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<uint> AlternationCountChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 显示的数据字段或属性
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> DisplayMemberPathChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> IsDropDownOpenChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> IsEditableChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 是否虚拟化UI,只支持StackPanel的虚拟化数据显示。初始化之前设置
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsVirtualizingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 返回CPF.Controls.ItemCollection类型,可以直接将数据源设置过来
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<IList> ItemsChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或者设置当前选定的项的第一个索引
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<int> SelectedIndexChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置通过使用 SelectedItem 而获取的 SelectedValuePath 的值。如果数据量大不建议用这个来设置,如果是多选的时候,类型是IEnumerable数据,可以遍历获取
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> SelectedValueChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置用于从 SelectedValue 获取 SelectedItem 的路径。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> SelectedValuePathChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 鼠标选中方式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<SelectionMethod> SelectionMethodChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 选择行为,单选,多选方式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<SelectionMode> SelectionModeChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> ShowClearChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 虚拟模式下元素使用方式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<VirtualizationMode> VirtualizationModeChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -70,6 +70,59 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 内容可以是字符串,UI元素等等
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> ContentChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> ContentStringFormatChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -65,6 +65,54 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -99,15 +99,97 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public VirtualizationMode? VirtualizationMode { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.DataGridCellMouseEventArgs> CellMouseDown { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.DataGridCellMouseEventArgs> CellMouseUp { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.DataGridCellEventArgs> CellDoubleClick { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.DataGridCellEventArgs> CellClick { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.DataGridBeginningEditEventArgs> BeginningEdit { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.DataGridCellEditEndingEventArgs> CellEditEnding { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.DataGridAutoGeneratingColumnEventArgs> AutoGeneratingColumn { get; set; }
|
||||
[Parameter] public EventCallback<DataGridCellMouseEventArgs> CellMouseDown { get; set; }
|
||||
[Parameter] public EventCallback<DataGridCellMouseEventArgs> CellMouseUp { get; set; }
|
||||
[Parameter] public EventCallback<DataGridCellEventArgs> CellDoubleClick { get; set; }
|
||||
[Parameter] public EventCallback<DataGridCellEventArgs> CellClick { get; set; }
|
||||
[Parameter] public EventCallback<DataGridBeginningEditEventArgs> BeginningEdit { get; set; }
|
||||
[Parameter] public EventCallback<DataGridCellEditEndingEventArgs> CellEditEnding { get; set; }
|
||||
[Parameter] public EventCallback<DataGridAutoGeneratingColumnEventArgs> AutoGeneratingColumn { get; set; }
|
||||
[Parameter] public EventCallback SelectionChanged { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置 ItemsControl 中的交替项容器的数目,该控件可使交替容器具有唯一外观,通过附加数据AttachedExtenstions.AlternationIndex 读取循环的ID
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<uint> AlternationCountChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> AutoGenerateColumnsChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
[Parameter] public EventCallback<Collection<DataGridColumn>> ColumnsChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
[Parameter] public EventCallback<CustomScrollData> CustomScrollDataChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 显示的数据字段或属性
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> DisplayMemberPathChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 是否虚拟化UI,只支持StackPanel的虚拟化数据显示。初始化之前设置
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsVirtualizingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 返回CPF.Controls.ItemCollection类型,可以直接将数据源设置过来
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<IList> ItemsChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或者设置当前选定的项的第一个索引
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<int> SelectedIndexChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置通过使用 SelectedItem 而获取的 SelectedValuePath 的值。如果数据量大不建议用这个来设置,如果是多选的时候,类型是IEnumerable数据,可以遍历获取
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> SelectedValueChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置用于从 SelectedValue 获取 SelectedItem 的路径。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> SelectedValuePathChanged { get; set; }
|
||||
[Parameter] public EventCallback<DataGridSelectionMode> SelectionModeChanged { get; set; }
|
||||
[Parameter] public EventCallback<DataGridSelectionUnit> SelectionUnitChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
[Parameter] public EventCallback<VirtualizationMode> VirtualizationModeChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -74,6 +74,62 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
[Parameter] public EventCallback<bool> AutoCloseChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
[Parameter] public EventCallback<DateTime> DisplayDateChanged { get; set; }
|
||||
[Parameter] public EventCallback<CalendarMode> DisplayModeChanged { get; set; }
|
||||
[Parameter] public EventCallback<DayOfWeek> FirstDayOfWeekChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> IsDropDownOpenChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
[Parameter] public EventCallback<Nullable<DateTime>> SelectedDateChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> SelectedDateFormatChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> ShowClearButtonChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -66,6 +66,55 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
[Parameter] public EventCallback<UIElement> ChildChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -50,6 +50,40 @@ namespace CPF.Razor.Controls
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 定义一个控件组,一般由多个元素组成,在设计器中,子元素和该控件为一个控件组,点击子元素拖动时,将作为整体拖动整个控件组。如果该控件被子元素盖住,按Alt+Ctrl键加鼠标左键可以选中该控件。按住Alt键可以移动子元素。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsGroupChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示 DockPanel 中的最后一个子元素是否拉伸以填充剩余的可用空间
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> LastChildFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -23,6 +23,13 @@ namespace CPF.Razor.Controls
|
||||
[Parameter] public string Foreground { get; set; }
|
||||
[Parameter] public string Text { get; set; }
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> TextChanged { get; set; }
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -23,6 +23,13 @@ namespace CPF.Razor.Controls
|
||||
[Parameter] public bool? IsHitTestOnPath { get; set; }
|
||||
[Parameter] public string StrokeFill { get; set; }
|
||||
[Parameter] public Stroke? StrokeStyle { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> FillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 事件响应范围是路径的线条上还是路径围成的范围内,true就是在线条上
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsHitTestOnPathChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> StrokeFillChanged { get; set; }
|
||||
[Parameter] public EventCallback<Stroke> StrokeStyleChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -72,6 +72,61 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 内容可以是字符串,UI元素等等
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> ContentChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> ContentStringFormatChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<object> HeaderChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> IsExpandedChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -54,6 +54,44 @@ namespace CPF.Razor.Controls
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 定义一个控件组,一般由多个元素组成,在设计器中,子元素和该控件为一个控件组,点击子元素拖动时,将作为整体拖动整个控件组。如果该控件被子元素盖住,按Alt+Ctrl键加鼠标左键可以选中该控件。按住Alt键可以移动子元素。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsGroupChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> LineFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> LineStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -71,10 +71,65 @@ namespace CPF.Razor.Controls
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.DragStartedEventArgs> DragStarted { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.DragDeltaEventArgs> DragDelta { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.DragCompletedEventArgs> DragCompleted { get; set; }
|
||||
[Parameter] public EventCallback<DragStartedEventArgs> DragStarted { get; set; }
|
||||
[Parameter] public EventCallback<DragDeltaEventArgs> DragDelta { get; set; }
|
||||
[Parameter] public EventCallback<DragCompletedEventArgs> DragCompleted { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
[Parameter] public EventCallback<UIElement> ChildChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> DragIncrementChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> KeyboardIncrementChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
[Parameter] public EventCallback<Color> PreviewColorChanged { get; set; }
|
||||
[Parameter] public EventCallback<GridResizeBehavior> ResizeBehaviorChanged { get; set; }
|
||||
[Parameter] public EventCallback<GridResizeDirection> ResizeDirectionChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> ShowsPreviewChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -66,6 +66,55 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> TextChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -25,6 +25,15 @@ namespace CPF.Razor.Controls
|
||||
[Parameter] public Point? StartPoint { get; set; }
|
||||
[Parameter] public string StrokeFill { get; set; }
|
||||
[Parameter] public Stroke? StrokeStyle { get; set; }
|
||||
[Parameter] public EventCallback<Point> EndPointChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> FillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 事件响应范围是路径的线条上还是路径围成的范围内,true就是在线条上
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsHitTestOnPathChanged { get; set; }
|
||||
[Parameter] public EventCallback<Point> StartPointChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> StrokeFillChanged { get; set; }
|
||||
[Parameter] public EventCallback<Stroke> StrokeStyleChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -105,11 +105,99 @@ namespace CPF.Razor.Controls
|
||||
/// 虚拟模式下元素使用方式
|
||||
/// <summary>
|
||||
[Parameter] public VirtualizationMode? VirtualizationMode { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.ListBoxItemMouseEventArgs> ItemMouseDown { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.ListBoxItemMouseEventArgs> ItemMouseUp { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.ListBoxItemEventArgs> ItemDoubleClick { get; set; }
|
||||
[Parameter] public EventCallback<ListBoxItemMouseEventArgs> ItemMouseDown { get; set; }
|
||||
[Parameter] public EventCallback<ListBoxItemMouseEventArgs> ItemMouseUp { get; set; }
|
||||
[Parameter] public EventCallback<ListBoxItemEventArgs> ItemDoubleClick { get; set; }
|
||||
[Parameter] public EventCallback SelectionChanged { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置 ItemsControl 中的交替项容器的数目,该控件可使交替容器具有唯一外观,通过附加数据AttachedExtenstions.AlternationIndex 读取循环的ID
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<uint> AlternationCountChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 显示的数据字段或属性
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> DisplayMemberPathChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 是否虚拟化UI,只支持StackPanel的虚拟化数据显示。初始化之前设置
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsVirtualizingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 返回CPF.Controls.ItemCollection类型,可以直接将数据源设置过来
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<IList> ItemsChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或者设置当前选定的项的第一个索引
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<int> SelectedIndexChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置通过使用 SelectedItem 而获取的 SelectedValuePath 的值。如果数据量大不建议用这个来设置,如果是多选的时候,类型是IEnumerable数据,可以遍历获取
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> SelectedValueChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置用于从 SelectedValue 获取 SelectedItem 的路径。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> SelectedValuePathChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 鼠标选中方式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<SelectionMethod> SelectionMethodChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 选择行为,单选,多选方式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<SelectionMode> SelectionModeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 虚拟模式下元素使用方式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<VirtualizationMode> VirtualizationModeChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -24,6 +24,14 @@ namespace CPF.Razor.Controls
|
||||
/// 设置对应平台的控件句柄
|
||||
/// <summary>
|
||||
[Parameter] public object Content { get; set; }
|
||||
/// <summary>
|
||||
/// 背景色,有些平台可能无法透明
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Color> BackColorChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 设置对应平台的控件句柄
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> ContentChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -82,8 +82,72 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public double? Value { get; set; }
|
||||
[Parameter] public Func<double, string> ValueToStringConvert { get; set; }
|
||||
[Parameter] public EventCallback ValueChanged { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<double> IncrementChanged { get; set; }
|
||||
[Parameter] public EventCallback<double> LargeChangeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 最大值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<double> MaximumChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 最小值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<double> MinimumChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
[Parameter] public EventCallback<double> SmallChangeChanged { get; set; }
|
||||
[Parameter] public EventCallback<Func<string, double>> StringToValueConvertChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 当前值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<double> ValueChanged { get; set; }
|
||||
[Parameter] public EventCallback<Func<double, string>> ValueToStringConvertChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -66,6 +66,55 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
[Parameter] public EventCallback<int> PageIndexChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -46,6 +46,36 @@ namespace CPF.Razor.Controls
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 定义一个控件组,一般由多个元素组成,在设计器中,子元素和该控件为一个控件组,点击子元素拖动时,将作为整体拖动整个控件组。如果该控件被子元素盖住,按Alt+Ctrl键加鼠标左键可以选中该控件。按住Alt键可以移动子元素。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsGroupChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -28,6 +28,18 @@ namespace CPF.Razor.Controls
|
||||
[Parameter] public Stretch? Stretch { get; set; }
|
||||
[Parameter] public string StrokeFill { get; set; }
|
||||
[Parameter] public Stroke? StrokeStyle { get; set; }
|
||||
[Parameter] public EventCallback<PathGeometry> DataChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> FillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 事件响应范围是路径的线条上还是路径围成的范围内,true就是在线条上
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsHitTestOnPathChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置 Stretch 模式,该模式确定内容适应可用空间的方式。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stretch> StretchChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> StrokeFillChanged { get; set; }
|
||||
[Parameter] public EventCallback<Stroke> StrokeStyleChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -29,6 +29,18 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public StretchDirection? StretchDirection { get; set; }
|
||||
[Parameter] public EventCallback ImageFailed { get; set; }
|
||||
/// <summary>
|
||||
/// 图片源,可以是路径、Url、Drawing.Image对象、Stream、byte[]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> SourceChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 图片缩放模式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stretch> StretchChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 描述如何对内容应用缩放,并限制对已命名像素类型的缩放。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<StretchDirection> StretchDirectionChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Charts;
|
||||
@ -73,6 +73,60 @@ namespace CPF.Razor.Controls
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public string TipLineFill { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
[Parameter] public EventCallback<IList<PieChartData>> DataChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 圆环宽度
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FloatField> RingWidthChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> TipLineFillChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -23,6 +23,13 @@ namespace CPF.Razor.Controls
|
||||
[Parameter] public bool? IsHitTestOnPath { get; set; }
|
||||
[Parameter] public string StrokeFill { get; set; }
|
||||
[Parameter] public Stroke? StrokeStyle { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> FillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 事件响应范围是路径的线条上还是路径围成的范围内,true就是在线条上
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsHitTestOnPathChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> StrokeFillChanged { get; set; }
|
||||
[Parameter] public EventCallback<Stroke> StrokeStyleChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -23,6 +23,13 @@ namespace CPF.Razor.Controls
|
||||
[Parameter] public bool? IsHitTestOnPath { get; set; }
|
||||
[Parameter] public string StrokeFill { get; set; }
|
||||
[Parameter] public Stroke? StrokeStyle { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> FillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 事件响应范围是路径的线条上还是路径围成的范围内,true就是在线条上
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsHitTestOnPathChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> StrokeFillChanged { get; set; }
|
||||
[Parameter] public EventCallback<Stroke> StrokeStyleChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -83,8 +83,74 @@ namespace CPF.Razor.Controls
|
||||
/// 当前值
|
||||
/// <summary>
|
||||
[Parameter] public double? Value { get; set; }
|
||||
[Parameter] public EventCallback ValueChanged { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置 ProgressBar 是显示实际值,还是显示一般的连续进度反馈。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsIndeterminateChanged { get; set; }
|
||||
[Parameter] public EventCallback<double> LargeChangeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 最大值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<double> MaximumChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 最小值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<double> MinimumChanged { get; set; }
|
||||
[Parameter] public EventCallback<Orientation> OrientationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
[Parameter] public EventCallback<double> SmallChangeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 当前值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<double> ValueChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -80,8 +80,68 @@ namespace CPF.Razor.Controls
|
||||
[Parameter] public EventCallback Checked { get; set; }
|
||||
[Parameter] public EventCallback Indeterminate { get; set; }
|
||||
[Parameter] public EventCallback Unchecked { get; set; }
|
||||
[Parameter] public EventCallback<CPF.RoutedEventArgs> Click { get; set; }
|
||||
[Parameter] public EventCallback<RoutedEventArgs> Click { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
[Parameter] public EventCallback<ClickMode> ClickModeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 内容可以是字符串,UI元素等等
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> ContentChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> ContentStringFormatChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 通过该属性对RadioButton分组,通过Root.GetRadioButtonValue()获取分组的选中值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> GroupNameChanged { get; set; }
|
||||
[Parameter] public EventCallback<Nullable<bool>> IsCheckedChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> IsThreeStateChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -23,6 +23,13 @@ namespace CPF.Razor.Controls
|
||||
[Parameter] public bool? IsHitTestOnPath { get; set; }
|
||||
[Parameter] public string StrokeFill { get; set; }
|
||||
[Parameter] public Stroke? StrokeStyle { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> FillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 事件响应范围是路径的线条上还是路径围成的范围内,true就是在线条上
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsHitTestOnPathChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> StrokeFillChanged { get; set; }
|
||||
[Parameter] public EventCallback<Stroke> StrokeStyleChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -72,8 +72,64 @@ namespace CPF.Razor.Controls
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback<CPF.RoutedEventArgs> Click { get; set; }
|
||||
[Parameter] public EventCallback<RoutedEventArgs> Click { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
[Parameter] public EventCallback<ClickMode> ClickModeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 内容可以是字符串,UI元素等等
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> ContentChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> ContentStringFormatChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
[Parameter] public EventCallback<int> DelayChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<int> IntervalChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -58,6 +58,48 @@ namespace CPF.Razor.Controls
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 定义响应布局的尺寸
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BreakPoints> BreakPointsChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 定义一个控件组,一般由多个元素组成,在设计器中,子元素和该控件为一个控件组,点击子元素拖动时,将作为整体拖动整个控件组。如果该控件被子元素盖住,按Alt+Ctrl键加鼠标左键可以选中该控件。按住Alt键可以移动子元素。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsGroupChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 定义列数
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<int> MaxDivisionChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 显示分割列线条
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> ShowGridLinesChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -29,6 +29,19 @@ namespace CPF.Razor.Controls
|
||||
/// 描述如何对内容应用缩放,并限制对已命名像素类型的缩放。
|
||||
/// <summary>
|
||||
[Parameter] public StretchDirection? StretchDirection { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> FillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// SVG源,可以是路径、Url、或者svg文档字符串
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> SourceChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 图片缩放模式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stretch> StretchChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 描述如何对内容应用缩放,并限制对已命名像素类型的缩放。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<StretchDirection> StretchDirectionChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -80,8 +80,71 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public double? Value { get; set; }
|
||||
[Parameter] public float? ViewportSize { get; set; }
|
||||
[Parameter] public EventCallback ValueChanged { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<double> LargeChangeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 最大值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<double> MaximumChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 最小值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<double> MinimumChanged { get; set; }
|
||||
[Parameter] public EventCallback<Orientation> OrientationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
[Parameter] public EventCallback<double> SmallChangeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 当前值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<double> ValueChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> ViewportSizeChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -74,6 +74,63 @@ namespace CPF.Razor.Controls
|
||||
[Parameter] public float? VerticalOffset { get; set; }
|
||||
[Parameter] public ScrollBarVisibility? VerticalScrollBarVisibility { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 内容可以是字符串,UI元素等等
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> ContentChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> ContentStringFormatChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> HorizontalOffsetChanged { get; set; }
|
||||
[Parameter] public EventCallback<ScrollBarVisibility> HorizontalScrollBarVisibilityChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> VerticalOffsetChanged { get; set; }
|
||||
[Parameter] public EventCallback<ScrollBarVisibility> VerticalScrollBarVisibilityChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -65,6 +65,54 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -114,8 +114,105 @@ namespace CPF.Razor.Controls
|
||||
/// 当前值
|
||||
/// <summary>
|
||||
[Parameter] public double? Value { get; set; }
|
||||
[Parameter] public EventCallback ValueChanged { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置在按下 RepeatButton 之后等待执行用于移动 Thumb 的命令(如 DecreaseLarge 命令)的时间(以毫秒为单位)。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<int> DelayChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置当用户单击 RepeatButton 的 Slider 时增加或减少命令之间的时间量(以毫秒为单位)
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<int> IntervalChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 如果增加值的方向向左(对于水平滑块)或向下(对于垂直滑块),则为 true;否则为 false。 默认值为 false。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsDirectionReversedChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示是否立即将 Slider 的 Thumb 移动到在鼠标指针悬停在 Slider 轨道的上方时鼠标单击的位置。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsMoveToPointEnabledChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示 Slider 是否自动将 Thumb 移动到最近的刻度线
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsSnapToTickEnabledChanged { get; set; }
|
||||
[Parameter] public EventCallback<double> LargeChangeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 最大值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<double> MaximumChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 最小值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<double> MinimumChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 布局方向
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Orientation> OrientationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
[Parameter] public EventCallback<double> SmallChangeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 刻度线之间的距离。 默认值为 (1.0)。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> TickFrequencyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置与 Track 的 Slider 相关的刻度线的位置。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TickPlacement> TickPlacementChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置刻度线的位置。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Collection<float>> TicksChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 当前值
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<double> ValueChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -50,6 +50,40 @@ namespace CPF.Razor.Controls
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 定义一个控件组,一般由多个元素组成,在设计器中,子元素和该控件为一个控件组,点击子元素拖动时,将作为整体拖动整个控件组。如果该控件被子元素盖住,按Alt+Ctrl键加鼠标左键可以选中该控件。按住Alt键可以移动子元素。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsGroupChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 布局方向
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Orientation> OrientationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -84,8 +84,72 @@ namespace CPF.Razor.Controls
|
||||
[Parameter] public EventCallback Checked { get; set; }
|
||||
[Parameter] public EventCallback Indeterminate { get; set; }
|
||||
[Parameter] public EventCallback Unchecked { get; set; }
|
||||
[Parameter] public EventCallback<CPF.RoutedEventArgs> Click { get; set; }
|
||||
[Parameter] public EventCallback<RoutedEventArgs> Click { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
[Parameter] public EventCallback<ClickMode> ClickModeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 内容可以是字符串,UI元素等等
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> ContentChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> ContentStringFormatChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<Nullable<bool>> IsCheckedChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> IsThreeStateChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 关闭时候显示的背景色
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Color> OffColorChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 打开时候显示的背景色
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Color> OnColorChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -73,6 +73,62 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置当前选择中第一项的索引,如果选择为空,则返回负一(-1)
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<int> SelectedIndexChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 选项卡标题相对于选项卡内容的对齐方式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Dock> TabStripPlacementChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -40,6 +40,30 @@ namespace CPF.Razor.Controls
|
||||
/// 文本在垂直方向的对齐方式
|
||||
/// <summary>
|
||||
[Parameter] public VerticalAlignment? VerticalAlignment { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> TextChanged { get; set; }
|
||||
[Parameter] public EventCallback<TextAlignment> TextAlignmentChanged { get; set; }
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 文字描边
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> TextStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 文字描边
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> TextStrokeFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 文本裁剪
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextTrimming> TextTrimmingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 文本在垂直方向的对齐方式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<VerticalAlignment> VerticalAlignmentChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -129,8 +129,120 @@ namespace CPF.Razor.Controls
|
||||
/// 自动换行
|
||||
/// <summary>
|
||||
[Parameter] public bool? WordWarp { get; set; }
|
||||
[Parameter] public EventCallback TextChanged { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示在用户按 ENTER 键时文本编辑控件如何响应。如果按 Enter 键会在当前光标位置插入一个新行,则为 true;否则将忽略 Enter 键
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> AcceptsReturnChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 如果按 Tab 键会在当前光标位置插入一个制表符,则为 true;如果按 Tab 键会将焦点移动到标记为制表位的下一个控件且不插入制表符,则为 false
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> AcceptsTabChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置用于绘制文本框的插入符号的画笔
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> CaretFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示是否应显示水平 ScrollBar
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ScrollBarVisibility> HScrollBarVisibilityChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 是否允许粘贴图片
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsAllowPasteImageChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 是否启用输入法,主要描述的是中文这类输入法
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsInputMethodEnabledChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示文本编辑控件对于与该控件交互的用户是否是只读的
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsReadOnlyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示文本编辑控件是否支持撤消功能
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsUndoEnabledChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 最大长度,为0的时候不限
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<uint> MaxLengthChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 密码模式的代替字符
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<char> PasswordCharChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置会突出显示选定文本的画笔。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> SelectionFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,此值定义用于所选文本的画笔。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> SelectionTextFillChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> TextChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 文本对齐方式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextAlignment> TextAlignmentChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置存储在撤消队列中的操作的数目。 默认值为-1, 表示撤消队列限制为可用的内存。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<int> UndoLimitChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示是否应显示垂直 ScrollBar。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ScrollBarVisibility> VScrollBarVisibilityChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 自动换行
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> WordWarpChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -65,10 +65,59 @@ namespace CPF.Razor.Controls
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.DragStartedEventArgs> DragStarted { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.DragDeltaEventArgs> DragDelta { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.DragCompletedEventArgs> DragCompleted { get; set; }
|
||||
[Parameter] public EventCallback<DragStartedEventArgs> DragStarted { get; set; }
|
||||
[Parameter] public EventCallback<DragDeltaEventArgs> DragDelta { get; set; }
|
||||
[Parameter] public EventCallback<DragCompletedEventArgs> DragCompleted { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
[Parameter] public EventCallback<UIElement> ChildChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -69,6 +69,57 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<TimeSpan> MaxTimeChanged { get; set; }
|
||||
[Parameter] public EventCallback<TimeSpan> MinTimeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
[Parameter] public EventCallback<TimeSpan> SelectedTimeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -76,8 +76,64 @@ namespace CPF.Razor.Controls
|
||||
[Parameter] public EventCallback Checked { get; set; }
|
||||
[Parameter] public EventCallback Indeterminate { get; set; }
|
||||
[Parameter] public EventCallback Unchecked { get; set; }
|
||||
[Parameter] public EventCallback<CPF.RoutedEventArgs> Click { get; set; }
|
||||
[Parameter] public EventCallback<RoutedEventArgs> Click { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
[Parameter] public EventCallback<ClickMode> ClickModeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 内容可以是字符串,UI元素等等
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> ContentChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> ContentStringFormatChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<Nullable<bool>> IsCheckedChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> IsThreeStateChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -71,6 +71,60 @@ namespace CPF.Razor.Controls
|
||||
[Parameter] public float? Value { get; set; }
|
||||
[Parameter] public float? ViewportSize { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> IsDirectionReversedChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> MaximumChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> MinimumChanged { get; set; }
|
||||
[Parameter] public EventCallback<Orientation> OrientationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> ValueChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> ViewportSizeChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -79,10 +79,71 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback SelectionChanged { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.TreeViewItemMouseEventArgs> ItemMouseDown { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.TreeViewItemMouseEventArgs> ItemMouseUp { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Controls.TreeViewItemEventArgs> ItemDoubleClick { get; set; }
|
||||
[Parameter] public EventCallback<TreeViewItemMouseEventArgs> ItemMouseDown { get; set; }
|
||||
[Parameter] public EventCallback<TreeViewItemMouseEventArgs> ItemMouseUp { get; set; }
|
||||
[Parameter] public EventCallback<TreeViewItemEventArgs> ItemDoubleClick { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置 ItemsControl 中的交替项容器的数目,该控件可使交替容器具有唯一外观,通过附加数据AttachedExtenstions.AlternationIndex 读取循环的ID
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<uint> AlternationCountChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 显示的数据字段或属性
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> DisplayMemberPathChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 返回CPF.Controls.ItemCollection类型,可以直接将数据源设置过来
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<IList> ItemsChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> ItemsMemberPathChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -22,6 +22,10 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public bool? AllowDrop { get; set; }
|
||||
/// <summary>
|
||||
/// 应用到元素上的类名,多个类用,分割
|
||||
/// <summary>
|
||||
[Parameter] public string Classes { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示是否剪切此元素的内容(或来自此元素的子元素的内容)使其适合包含元素的大小。这是一个依赖项属性。
|
||||
/// <summary>
|
||||
[Parameter] public bool? ClipToBounds { get; set; }
|
||||
@ -123,34 +127,140 @@ namespace CPF.Razor.Controls
|
||||
/// Z轴
|
||||
/// <summary>
|
||||
[Parameter] public int? ZIndex { get; set; }
|
||||
[Parameter] public EventCallback<CPF.UIElementAddedEventArgs> UIElementAdded { get; set; }
|
||||
[Parameter] public EventCallback<CPF.UIElementRemovedEventArgs> UIElementRemoved { get; set; }
|
||||
[Parameter] public EventCallback<UIElementAddedEventArgs> UIElementAdded { get; set; }
|
||||
[Parameter] public EventCallback<UIElementRemovedEventArgs> UIElementRemoved { get; set; }
|
||||
[Parameter] public EventCallback DesiredSizeChanged { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.MouseButtonEventArgs> PreviewMouseDown { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.MouseButtonEventArgs> PreviewMouseUp { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.MouseButtonEventArgs> MouseDown { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.MouseButtonEventArgs> MouseUp { get; set; }
|
||||
[Parameter] public EventCallback<CPF.RoutedEventArgs> DoubleClick { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.MouseEventArgs> MouseMove { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.MouseEventArgs> MouseEnter { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.MouseEventArgs> MouseLeave { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.TouchEventArgs> TouchUp { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.TouchEventArgs> TouchDown { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.TouchEventArgs> TouchMove { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.MouseWheelEventArgs> MouseWheel { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.KeyEventArgs> KeyDown { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.KeyEventArgs> KeyUp { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.TextInputEventArgs> TextInput { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.GotFocusEventArgs> GotFocus { get; set; }
|
||||
[Parameter] public EventCallback<CPF.RoutedEventArgs> LostFocus { get; set; }
|
||||
[Parameter] public EventCallback<CPF.RoutedEventArgs> LayoutUpdated { get; set; }
|
||||
[Parameter] public EventCallback<MouseButtonEventArgs> PreviewMouseDown { get; set; }
|
||||
[Parameter] public EventCallback<MouseButtonEventArgs> PreviewMouseUp { get; set; }
|
||||
[Parameter] public EventCallback<MouseButtonEventArgs> MouseDown { get; set; }
|
||||
[Parameter] public EventCallback<MouseButtonEventArgs> MouseUp { get; set; }
|
||||
[Parameter] public EventCallback<RoutedEventArgs> DoubleClick { get; set; }
|
||||
[Parameter] public EventCallback<MouseEventArgs> MouseMove { get; set; }
|
||||
[Parameter] public EventCallback<MouseEventArgs> MouseEnter { get; set; }
|
||||
[Parameter] public EventCallback<MouseEventArgs> MouseLeave { get; set; }
|
||||
[Parameter] public EventCallback<TouchEventArgs> TouchUp { get; set; }
|
||||
[Parameter] public EventCallback<TouchEventArgs> TouchDown { get; set; }
|
||||
[Parameter] public EventCallback<TouchEventArgs> TouchMove { get; set; }
|
||||
[Parameter] public EventCallback<MouseWheelEventArgs> MouseWheel { get; set; }
|
||||
[Parameter] public EventCallback<KeyEventArgs> KeyDown { get; set; }
|
||||
[Parameter] public EventCallback<KeyEventArgs> KeyUp { get; set; }
|
||||
[Parameter] public EventCallback<TextInputEventArgs> TextInput { get; set; }
|
||||
[Parameter] public EventCallback<GotFocusEventArgs> GotFocus { get; set; }
|
||||
[Parameter] public EventCallback<RoutedEventArgs> LostFocus { get; set; }
|
||||
[Parameter] public EventCallback<RoutedEventArgs> LayoutUpdated { get; set; }
|
||||
[Parameter] public EventCallback Disposed { get; set; }
|
||||
[Parameter] public EventCallback<CPF.RoutedEventArgs> ToolTipOpening { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.DragEventArgs> DragEnter { get; set; }
|
||||
[Parameter] public EventCallback<RoutedEventArgs> ToolTipOpening { get; set; }
|
||||
[Parameter] public EventCallback<DragEventArgs> DragEnter { get; set; }
|
||||
[Parameter] public EventCallback DragLeave { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.DragEventArgs> DragOver { get; set; }
|
||||
[Parameter] public EventCallback<CPF.Input.DragEventArgs> Drop { get; set; }
|
||||
[Parameter] public EventCallback<CPF.CPFPropertyChangedEventArgs> PropertyChanged { get; set; }
|
||||
[Parameter] public EventCallback<DragEventArgs> DragOver { get; set; }
|
||||
[Parameter] public EventCallback<DragEventArgs> Drop { get; set; }
|
||||
[Parameter] public EventCallback<CPFPropertyChangedEventArgs> PropertyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示此元素能否用作拖放操作的目标。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> AllowDropChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示是否剪切此元素的内容(或来自此元素的子元素的内容)使其适合包含元素的大小。这是一个依赖项属性。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> ClipToBoundsChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 绑定的命令上下文
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> CommandContextChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 右键菜单
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ContextMenu> ContextMenuChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 光标
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Cursor> CursorChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 绑定的数据上下文
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> DataContextChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 位图特效
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Effect> EffectChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 是否可以获取焦点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> FocusableChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 按tab键切换焦点显示的聚焦框填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> FocusFrameFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 聚焦框到元素边缘距离
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> FocusFramePaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 按tab键切换焦点显示的聚焦框
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> FocusFrameStrokeChanged { get; set; }
|
||||
[Parameter] public EventCallback<FloatField> HeightChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 图形抗锯齿
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsAntiAliasChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsEnabledChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 是否可以通过鼠标点击到
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsHitTestVisibleChanged { get; set; }
|
||||
[Parameter] public EventCallback<FloatField> MarginBottomChanged { get; set; }
|
||||
[Parameter] public EventCallback<FloatField> MarginLeftChanged { get; set; }
|
||||
[Parameter] public EventCallback<FloatField> MarginRightChanged { get; set; }
|
||||
[Parameter] public EventCallback<FloatField> MarginTopChanged { get; set; }
|
||||
[Parameter] public EventCallback<FloatField> MaxHeightChanged { get; set; }
|
||||
[Parameter] public EventCallback<FloatField> MaxWidthChanged { get; set; }
|
||||
[Parameter] public EventCallback<FloatField> MinHeightChanged { get; set; }
|
||||
[Parameter] public EventCallback<FloatField> MinWidthChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 元素名称
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> NameChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 当添加触发器时并且触发器有设置动画,如果满足条件是否播放动画
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> PlayAnimationOnAddTriggerChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 渲染变换
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Transform> RenderTransformChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 渲染原点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<PointField> RenderTransformOriginChanged { get; set; }
|
||||
/// <summary>
|
||||
/// tab键切换元素焦点时候的顺序
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<int> TabIndexChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 与控件关联的用户自定义数据
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> TagChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置在用户界面 (UI) 中为此元素显示的工具提示对象
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> ToolTipChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示是否应向此元素的大小和位置布局应用布局舍入。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> UseLayoutRoundingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// UI元素可见性
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Visibility> VisibilityChanged { get; set; }
|
||||
[Parameter] public EventCallback<FloatField> WidthChanged { get; set; }
|
||||
/// <summary>
|
||||
/// Z轴
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<int> ZIndexChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -74,6 +74,63 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
[Parameter] public EventCallback<UIElement> ChildChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置 ViewboxStretch 模式,该模式确定内容适应可用空间的方式。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stretch> StretchChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置 StretchDirection,它确定缩放如何应用 Viewbox 的内容。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<StretchDirection> StretchDirectionChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -13,7 +13,7 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
/// 通用窗体框架,包含窗体边框,系统按钮,阴影这些元素
|
||||
/// </summary>
|
||||
public partial class WindowFrame : Element<CPF.Controls.WindowFrame>
|
||||
public partial class WindowFrame : Element<CPF.Controls.WindowFrame> ,IHandleChildContentText
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@ -37,6 +37,11 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public BorderType? BorderType { get; set; }
|
||||
/// <summary>
|
||||
/// 内容可以是字符串,UI元素等等
|
||||
/// <summary>
|
||||
[Parameter] public object Content { get; set; }
|
||||
[Parameter] public string ContentStringFormat { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public CornerRadius? CornerRadius { get; set; }
|
||||
@ -75,6 +80,69 @@ namespace CPF.Razor.Controls
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback Initialized { get; set; }
|
||||
/// <summary>
|
||||
/// 背景填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框类型,BorderStroke和BorderThickness
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 内容可以是字符串,UI元素等等
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<object> ContentChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> ContentStringFormatChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体名
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体尺寸,点
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 字体样式
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 控件文字的填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> MaximizeBoxChanged { get; set; }
|
||||
[Parameter] public EventCallback<bool> MinimizeBoxChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> PaddingChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 阴影宽度
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<byte> ShadowBlurChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 显示标题栏图标
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> ShowIconChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// CPF自动生成.
|
||||
//CPF自动生成.
|
||||
|
||||
using CPF;
|
||||
using CPF.Controls;
|
||||
@ -49,6 +49,39 @@ namespace CPF.Razor.Controls
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> BackgroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 边框线条填充
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<ViewFill> BorderFillChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置线条类型
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Stroke> BorderStrokeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 四周边框粗细
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<Thickness> BorderThicknessChanged { get; set; }
|
||||
[Parameter] public EventCallback<BorderType> BorderTypeChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<CornerRadius> CornerRadiusChanged { get; set; }
|
||||
[Parameter] public EventCallback<string> FontFamilyChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> FontSizeChanged { get; set; }
|
||||
[Parameter] public EventCallback<FontStyles> FontStyleChanged { get; set; }
|
||||
[Parameter] public EventCallback<ViewFill> ForegroundChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 定义一个控件组,一般由多个元素组成,在设计器中,子元素和该控件为一个控件组,点击子元素拖动时,将作为整体拖动整个控件组。如果该控件被子元素盖住,按Alt+Ctrl键加鼠标左键可以选中该控件。按住Alt键可以移动子元素。
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<bool> IsGroupChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> ItemHeightChanged { get; set; }
|
||||
[Parameter] public EventCallback<float> ItemWidthChanged { get; set; }
|
||||
[Parameter] public EventCallback<Orientation> OrientationChanged { get; set; }
|
||||
/// <summary>
|
||||
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
||||
/// <summary>
|
||||
[Parameter] public EventCallback<TextDecoration> TextDecorationChanged { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -261,6 +261,7 @@ namespace CPF.Razor
|
||||
if (elementHandler is ICpfElementHandler handler)
|
||||
{
|
||||
handler.Renderer = Renderer;
|
||||
handler.ComponentId = componentId;
|
||||
}
|
||||
|
||||
if (siblingIndex != 0)
|
||||
|
@ -34,6 +34,7 @@ namespace CPF.Razor
|
||||
get => _Renderer;
|
||||
set => _Renderer = value;
|
||||
}
|
||||
public int ComponentId { get ; set; }
|
||||
|
||||
//public void SetElementReference(IElementHandler elementHandler)
|
||||
//{
|
||||
|
@ -22,6 +22,7 @@ namespace CPF.Razor
|
||||
public CPF.UIElement Element { get; }
|
||||
public object TargetElement => Element;
|
||||
|
||||
public int ComponentId { get; set; }
|
||||
NativeComponentRenderer ICpfElementHandler.Renderer { get; set; }
|
||||
|
||||
public virtual void ApplyAttribute(ulong attributeEventHandlerId, string attributeName, object attributeValue, string attributeEventUpdatesAttributeName)
|
||||
|
@ -9,5 +9,6 @@ namespace CPF.Razor
|
||||
{
|
||||
UIElement Element { get; }
|
||||
NativeComponentRenderer Renderer { get; set; }
|
||||
int ComponentId { get; set; }
|
||||
}
|
||||
}
|
||||
|
33
CPF.Toolkit.Demo/CPF.Toolkit.Demo.csproj
Normal file
33
CPF.Toolkit.Demo/CPF.Toolkit.Demo.csproj
Normal file
@ -0,0 +1,33 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<ApplicationIcon />
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DefineConstants />
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Stylesheet1.css" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Stylesheet1.css" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CPF.Linux\CPF.Linux.csproj" />
|
||||
<ProjectReference Include="..\CPF.Mac\CPF.Mac.csproj" />
|
||||
<ProjectReference Include="..\CPF.Skia\CPF.Skia.csproj" />
|
||||
<ProjectReference Include="..\CPF.Toolkit\CPF.Toolkit.csproj" />
|
||||
<ProjectReference Include="..\CPF.Windows\CPF.Windows.csproj" />
|
||||
<ProjectReference Include="..\CPF\CPF.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
44
CPF.Toolkit.Demo/MainView.cs
Normal file
44
CPF.Toolkit.Demo/MainView.cs
Normal file
@ -0,0 +1,44 @@
|
||||
using CPF;
|
||||
using CPF.Animation;
|
||||
using CPF.Charts;
|
||||
using CPF.Controls;
|
||||
using CPF.Drawing;
|
||||
using CPF.Shapes;
|
||||
using CPF.Styling;
|
||||
using CPF.Svg;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace CPF.Toolkit.Demo
|
||||
{
|
||||
public class MainView : Window
|
||||
{
|
||||
protected override void InitializeComponent()
|
||||
{
|
||||
//LoadStyleFile("res://CPF.Toolkit.Demo/Stylesheet1.css");
|
||||
|
||||
this.Title = "标题";
|
||||
this.Width = 500;
|
||||
this.Height = 400;
|
||||
this.Background = null;
|
||||
var vm = new MainViewModel();
|
||||
this.DataContext = this.CommandContext = vm;
|
||||
this.Children.Add(new WindowFrame(this, new Panel
|
||||
{
|
||||
Width = "100%",
|
||||
Height = "100%",
|
||||
Children =
|
||||
{
|
||||
new Button
|
||||
{
|
||||
Content="按钮",
|
||||
[nameof(Button.Click)] = new CommandDescribe((ss,ee) => vm.Test()),
|
||||
}
|
||||
},
|
||||
}));
|
||||
this.Behaviors.Add(new ViewBehavior());
|
||||
}
|
||||
}
|
||||
}
|
27
CPF.Toolkit.Demo/MainViewModel.cs
Normal file
27
CPF.Toolkit.Demo/MainViewModel.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using CPF.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace CPF.Toolkit.Demo
|
||||
{
|
||||
internal class MainViewModel : ViewModelBase
|
||||
{
|
||||
protected override void OnLoaded()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void Test()
|
||||
{
|
||||
this.Dialog.Alert("确定删除所选的文件吗?", "确定删除", DialogType.Warn, "", "取消", "删除");
|
||||
}
|
||||
|
||||
//protected override void OnClosing(ClosingEventArgs e)
|
||||
//{
|
||||
// e.Cancel = true;
|
||||
// base.OnClosing(e);
|
||||
//}
|
||||
}
|
||||
}
|
21
CPF.Toolkit.Demo/Program.cs
Normal file
21
CPF.Toolkit.Demo/Program.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using CPF.Platform;
|
||||
using CPF.Skia;
|
||||
using CPF.Windows;
|
||||
using System;
|
||||
|
||||
namespace CPF.Toolkit.Demo
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Application.Initialize(
|
||||
(OperatingSystemType.Windows, new WindowsPlatform(), new SkiaDrawingFactory())
|
||||
, (OperatingSystemType.OSX, new CPF.Mac.MacPlatform(), new SkiaDrawingFactory())//如果需要支持Mac才需要
|
||||
, (OperatingSystemType.Linux, new CPF.Linux.LinuxPlatform(), new SkiaDrawingFactory())//如果需要支持Linux才需要
|
||||
);
|
||||
Application.Run(new MainView());
|
||||
}
|
||||
}
|
||||
}
|
502
CPF.Toolkit.Demo/Stylesheet1.css
Normal file
502
CPF.Toolkit.Demo/Stylesheet1.css
Normal file
@ -0,0 +1,502 @@
|
||||
/*@font-face {
|
||||
font-family: '微软雅黑';
|
||||
src: url('res://ConsoleApp1/msyh.ttc');
|
||||
}*/ /*加载字体*/
|
||||
|
||||
/** {
|
||||
FontFamily: 微软雅黑;
|
||||
}*/
|
||||
|
||||
@media windows {
|
||||
* {
|
||||
FontFamily: '微软雅黑'; /*不同系统的字体不同,自己根据情况改或者使用内嵌字体*/
|
||||
}
|
||||
}
|
||||
|
||||
@media osx {
|
||||
* {
|
||||
FontFamily: '苹方-简';
|
||||
}
|
||||
}
|
||||
|
||||
@media linux {
|
||||
* {
|
||||
FontFamily: '文泉驿正黑';
|
||||
}
|
||||
}
|
||||
/*设置窗体标题栏背景颜色圆角*/
|
||||
/*#caption {
|
||||
IsAntiAlias: true;
|
||||
Background: #2c2c2c;
|
||||
CornerRadius:5,5,0,0;
|
||||
Height:30;
|
||||
}
|
||||
#frame {
|
||||
CornerRadius: 5;
|
||||
IsAntiAlias: true;
|
||||
}*/
|
||||
Button {
|
||||
BorderFill: #DCDFE6;
|
||||
IsAntiAlias: True;
|
||||
CornerRadius: 4,4,4,4;
|
||||
Background: #FFFFFF;
|
||||
}
|
||||
|
||||
Button[IsMouseOver=true] {
|
||||
BorderFill: rgb(198,226,255);
|
||||
Background: rgb(236,245,255);
|
||||
Foreground: rgb(64,158,255);
|
||||
}
|
||||
|
||||
Button[IsPressed=true] {
|
||||
BorderFill: rgb(58,142,230);
|
||||
}
|
||||
|
||||
Button.primary {
|
||||
BorderFill: rgb(64,158,255);
|
||||
CornerRadius: 4,4,4,4;
|
||||
Background: rgb(64,158,255);
|
||||
Foreground: #FFFFFF;
|
||||
}
|
||||
|
||||
Button.primary[IsMouseOver=true] {
|
||||
BorderFill: rgb(102,177,255);
|
||||
Background: rgb(102,177,255);
|
||||
Foreground: #FFFFFF;
|
||||
}
|
||||
|
||||
Button.primary[IsPressed=true] {
|
||||
BorderFill: rgb(58,142,230);
|
||||
Background: rgb(58,142,230);
|
||||
}
|
||||
|
||||
Button.success {
|
||||
BorderFill: rgb(103,194,58);
|
||||
CornerRadius: 4,4,4,4;
|
||||
Background: rgb(103,194,58);
|
||||
Foreground: #FFFFFF;
|
||||
}
|
||||
|
||||
Button.success[IsMouseOver=true] {
|
||||
BorderFill: rgb(133,206,97);
|
||||
Background: rgb(133,206,97);
|
||||
Foreground: #FFFFFF;
|
||||
}
|
||||
|
||||
Button.success[IsPressed=true] {
|
||||
BorderFill: rgb(93,175,52);
|
||||
Background: rgb(93,175,52);
|
||||
}
|
||||
|
||||
Button.danger {
|
||||
BorderFill: rgb(245,108,108);
|
||||
Background: rgb(245,108,108);
|
||||
CornerRadius: 4,4,4,4;
|
||||
Foreground: #FFFFFF;
|
||||
}
|
||||
|
||||
Button.danger[IsMouseOver=true] {
|
||||
BorderFill: rgb(247,137,137);
|
||||
Background: rgb(247,137,137);
|
||||
Foreground: #FFFFFF;
|
||||
}
|
||||
|
||||
Button.danger[IsPressed=true] {
|
||||
BorderFill: rgb(221,97,97);
|
||||
Background: rgb(221,97,97);
|
||||
}
|
||||
|
||||
#dialogClose {
|
||||
BorderFill: null;
|
||||
}
|
||||
|
||||
TextBox, .textBox, DatePicker {
|
||||
Background: #fff;
|
||||
IsAntiAlias: true;
|
||||
BorderFill: #DCDFE6;
|
||||
CornerRadius: 4,4,4,4;
|
||||
BorderStroke: 1;
|
||||
}
|
||||
|
||||
.groupPanel TextBox, DatePicker TextBox, .textBox TextBox {
|
||||
BorderStroke: 0;
|
||||
}
|
||||
|
||||
.textBox[IsKeyboardFocusWithin=true] {
|
||||
BorderFill: #1E9FFF;
|
||||
}
|
||||
|
||||
.singleLine { /*单行文本框*/
|
||||
AcceptsReturn: false;
|
||||
HScrollBarVisibility: Hidden;
|
||||
VScrollBarVisibility: Hidden;
|
||||
}
|
||||
|
||||
.singleLine #contentPresenter {
|
||||
Padding: 3;
|
||||
}
|
||||
|
||||
.multiline { /*多行文本框*/
|
||||
}
|
||||
|
||||
|
||||
.slotLeft {
|
||||
CornerRadius: 0,4,4,0;
|
||||
BorderFill: #DCDFE6;
|
||||
Background: #F5F7FA;
|
||||
BorderThickness: 1,0,0,0;
|
||||
BorderType: BorderThickness;
|
||||
MarginTop: 0;
|
||||
MarginBottom: 0;
|
||||
MarginRight: 0;
|
||||
}
|
||||
|
||||
RadioButton #radioButtonBorder {
|
||||
StrokeFill: rgb(220,223,230);
|
||||
}
|
||||
|
||||
RadioButton[IsChecked=true] #radioButtonBorder {
|
||||
StrokeFill: #1E9FFF;
|
||||
Fill: #1E9FFF;
|
||||
}
|
||||
|
||||
RadioButton #optionMark {
|
||||
StrokeFill: #1E9FFF;
|
||||
Fill: #fff;
|
||||
}
|
||||
|
||||
CheckBox #indeterminateMark {
|
||||
Fill: #1E9FFF;
|
||||
}
|
||||
|
||||
CheckBox #checkBoxBorder {
|
||||
Background: #fff;
|
||||
BorderFill: rgb(220,223,230);
|
||||
}
|
||||
|
||||
CheckBox[IsChecked=true] #checkBoxBorder {
|
||||
Background: #1E9FFF;
|
||||
BorderFill: #1E9FFF;
|
||||
}
|
||||
|
||||
CheckBox Polyline {
|
||||
StrokeFill: #fff;
|
||||
}
|
||||
|
||||
.radioGroup {
|
||||
BorderType: BorderThickness;
|
||||
BorderFill: rgb(220,223,230);
|
||||
BorderThickness: 1,1,0,1;
|
||||
}
|
||||
|
||||
.radioGroup RadioButton {
|
||||
BorderType: BorderThickness;
|
||||
BorderFill: rgb(220,223,230);
|
||||
BorderThickness: 0,0,1,0;
|
||||
}
|
||||
|
||||
.radioGroup RadioButton #markPanel {
|
||||
Visibility: Collapsed;
|
||||
}
|
||||
|
||||
.radioGroup RadioButton TextBlock {
|
||||
Margin: 5;
|
||||
}
|
||||
|
||||
.radioGroup RadioButton[IsChecked=true] {
|
||||
Background: rgb(64,158,255);
|
||||
Foreground: #fff;
|
||||
}
|
||||
|
||||
.error {
|
||||
Foreground: #f00;
|
||||
Visibility: Collapsed;
|
||||
}
|
||||
|
||||
.error[DesignMode=true] {
|
||||
Visibility: Visible;
|
||||
}
|
||||
|
||||
.twoLine[AttachedExtenstions.IsError=true] .error {
|
||||
Visibility: Visible;
|
||||
}
|
||||
|
||||
.twoLine[AttachedExtenstions.IsError=true] .textBox {
|
||||
BorderFill: #f00;
|
||||
}
|
||||
|
||||
ScrollBar {
|
||||
Background: null;
|
||||
}
|
||||
|
||||
ScrollBar Thumb {
|
||||
IsAntiAlias: true;
|
||||
CornerRadius: 5;
|
||||
}
|
||||
|
||||
ScrollBar[Orientation=Horizontal] {
|
||||
Height: 12;
|
||||
}
|
||||
|
||||
ScrollBar[Orientation=Vertical] {
|
||||
Width: 12;
|
||||
}
|
||||
|
||||
ScrollBar #PART_LineUpButton, ScrollBar #PART_LineDownButton {
|
||||
Visibility: Collapsed;
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
Background: #fff;
|
||||
IsAntiAlias: true;
|
||||
BorderFill: #DCDFE6;
|
||||
CornerRadius: 4,4,4,4;
|
||||
BorderStroke: 1;
|
||||
}
|
||||
|
||||
ComboBox[IsKeyboardFocusWithin=true] {
|
||||
BorderFill: #1E9FFF;
|
||||
}
|
||||
|
||||
#DropDownPanel TextBlock {
|
||||
MarginLeft: 5;
|
||||
MarginTop: 2;
|
||||
MarginBottom: 2;
|
||||
}
|
||||
|
||||
#dropDownBorder {
|
||||
ShadowBlur: 2;
|
||||
ShadowColor: rgba(0, 0, 0, 0.4);
|
||||
BorderStroke: 0;
|
||||
}
|
||||
|
||||
#DropDownPanel[IsMouseOver=false] ScrollBar {
|
||||
Visibility: Collapsed;
|
||||
}
|
||||
|
||||
#DropDownPanel ScrollBar[Orientation=Horizontal] {
|
||||
Height: 10;
|
||||
}
|
||||
|
||||
#DropDownPanel ScrollBar[Orientation=Vertical] {
|
||||
Width: 10;
|
||||
}
|
||||
|
||||
Slider {
|
||||
IsAntiAlias: true;
|
||||
}
|
||||
|
||||
Slider Thumb {
|
||||
IsAntiAlias: true;
|
||||
Width: 16;
|
||||
Height: 16;
|
||||
CornerRadius: 7;
|
||||
BorderFill: rgb(64,158,255);
|
||||
BorderStroke: 2;
|
||||
Background: #fff;
|
||||
ZIndex: 1;
|
||||
}
|
||||
|
||||
|
||||
Slider Thumb[IsMouseOver=true] {
|
||||
animation-name: sliderMouseOver;
|
||||
animation-duration: 0.1s;
|
||||
animation-iteration-count: 1;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
|
||||
Slider #TrackBackground {
|
||||
CornerRadius: 2;
|
||||
Background: rgb(228,231,237);
|
||||
BorderStroke: 0;
|
||||
}
|
||||
|
||||
Slider #decreaseRepeatButton {
|
||||
Background: rgb(64,158,255);
|
||||
CornerRadius: 2;
|
||||
}
|
||||
|
||||
Slider[Orientation=Horizontal] #decreaseRepeatButton {
|
||||
Height: 4;
|
||||
MarginLeft: 5;
|
||||
}
|
||||
|
||||
Slider[Orientation=Vertical] #decreaseRepeatButton {
|
||||
Width: 4;
|
||||
MarginBottom: 5;
|
||||
}
|
||||
|
||||
ProgressBar {
|
||||
CornerRadius: 5;
|
||||
IsAntiAlias: true;
|
||||
BorderFill: null;
|
||||
Background: rgb(235,238,245);
|
||||
}
|
||||
|
||||
ProgressBar #Indicator, ProgressBar #Animation {
|
||||
CornerRadius: 5;
|
||||
}
|
||||
|
||||
NumericUpDown {
|
||||
Background: #fff;
|
||||
IsAntiAlias: true;
|
||||
BorderFill: #DCDFE6;
|
||||
CornerRadius: 4,4,4,4;
|
||||
BorderStroke: 1;
|
||||
}
|
||||
|
||||
NumericUpDown RepeatButton {
|
||||
Width: 20;
|
||||
Background: rgb(245,247,250);
|
||||
}
|
||||
|
||||
NumericUpDown #decreaseBtn {
|
||||
CornerRadius: 4,0,0,4;
|
||||
}
|
||||
|
||||
NumericUpDown #increaseBtn {
|
||||
CornerRadius: 0,4,4,0;
|
||||
}
|
||||
|
||||
NumericUpDown #textBoxBorder {
|
||||
BorderFill: #DCDFE6;
|
||||
}
|
||||
|
||||
NumericUpDown TextBox {
|
||||
BorderStroke: 0;
|
||||
}
|
||||
|
||||
.widget {
|
||||
IsAntiAlias: true;
|
||||
BorderFill: #DCDFE6;
|
||||
CornerRadius: 4,4,4,4;
|
||||
BorderStroke: 1;
|
||||
}
|
||||
|
||||
.widgetHead {
|
||||
Background: linear-gradient(0 0,0 100%,#F7F7F7 0,#F0F0F0 1);
|
||||
BorderType: BorderThickness;
|
||||
BorderThickness: 0,0,0,1;
|
||||
BorderFill: #DCDFE6;
|
||||
}
|
||||
|
||||
DataGrid {
|
||||
Foreground: #7a7a7a;
|
||||
}
|
||||
|
||||
DataGridCellTemplate, DataGridRow, DataGrid, .DataGridCell {
|
||||
BorderFill: rgb(235,238,245);
|
||||
}
|
||||
|
||||
DataGridRow {
|
||||
Height: 36;
|
||||
}
|
||||
|
||||
DataGridRow[IsMouseOver=true] {
|
||||
Background: rgb(245,247,250);
|
||||
}
|
||||
|
||||
DataGridRow[IsSelected=true] {
|
||||
Background: rgb(245,247,250);
|
||||
}
|
||||
|
||||
DataGridColumnTemplate {
|
||||
Height: 38;
|
||||
FontSize: 15;
|
||||
FontStyle: Bold;
|
||||
Background: #fff;
|
||||
BorderFill: rgb(235,238,245);
|
||||
}
|
||||
|
||||
TabControl #headBorder {
|
||||
Background: #fff;
|
||||
}
|
||||
|
||||
TabItem > Border {
|
||||
BorderThickness: 0,0,0,2;
|
||||
}
|
||||
|
||||
TabItem[IsSelected=true] > Border {
|
||||
BorderFill: #1E9FFF;
|
||||
}
|
||||
|
||||
TabItem[IsSelected=true] {
|
||||
Foreground: #1E9FFF;
|
||||
}
|
||||
|
||||
TabControl[TabStripPlacement=Left] TabItem, TabControl[TabStripPlacement=Right] TabItem {
|
||||
Width: 100%;
|
||||
BorderType: BorderThickness;
|
||||
BorderThickness: 0,0,0,1;
|
||||
BorderFill: #e8e8e8;
|
||||
}
|
||||
|
||||
TabControl[TabStripPlacement=Left] TabItem TextBlock {
|
||||
MarginRight: 0;
|
||||
}
|
||||
|
||||
TabControl[TabStripPlacement=Left] TabItem > Border {
|
||||
Width: 100%;
|
||||
}
|
||||
|
||||
TabControl[TabStripPlacement=Left] #headerPanel, TabControl[TabStripPlacement=Right] #headerPanel {
|
||||
Width: 100;
|
||||
Background: rgb(245,247,250);
|
||||
}
|
||||
|
||||
.closeBtn[IsMouseOver=true] {
|
||||
Fill: #171717;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
IsHitTestVisible: false;
|
||||
Foreground: "192,196,204";
|
||||
Visibility: Collapsed;
|
||||
}
|
||||
|
||||
.textBox[AttachedExtenstions.IsEmpty=true] .placeholder {
|
||||
Visibility: Visible;
|
||||
}
|
||||
|
||||
.loginBox TextBox, .loginBox .placeholder {
|
||||
FontSize: 16;
|
||||
}
|
||||
|
||||
.loginBox CheckBox {
|
||||
Foreground: #757575;
|
||||
}
|
||||
|
||||
.searchBox Button {
|
||||
CornerRadius: 0,4,4,0,
|
||||
}
|
||||
|
||||
#MenuPop #menuPanel > Border, #MenuPop ContextMenu > Border {
|
||||
Background: #fff;
|
||||
ShadowColor: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
#MenuPop MenuItem[IsMouseOver=true] {
|
||||
Background: #DCDFE6;
|
||||
}
|
||||
|
||||
ListBoxItem {
|
||||
Width: 100%;
|
||||
}
|
||||
|
||||
#dialogClose, #dialogClose[IsMouseOver=true] {
|
||||
Background: null;
|
||||
BorderFill: null;
|
||||
}
|
||||
|
||||
#dialogClose[IsPressed=true] {
|
||||
Background: null;
|
||||
BorderFill: null;
|
||||
}
|
||||
|
||||
#dialogClose Line {
|
||||
StrokeFill: 218,218,218;
|
||||
}
|
||||
|
||||
#dialogClose[IsMouseOver=true] Line {
|
||||
StrokeFill: #fff;
|
||||
}
|
25
CPF.Toolkit/CPF.Toolkit.csproj
Normal file
25
CPF.Toolkit/CPF.Toolkit.csproj
Normal file
@ -0,0 +1,25 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Images\ask.png" />
|
||||
<None Remove="Images\error.png" />
|
||||
<None Remove="Images\sucess.png" />
|
||||
<None Remove="Images\warn.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Images\ask.png" />
|
||||
<EmbeddedResource Include="Images\error.png" />
|
||||
<EmbeddedResource Include="Images\sucess.png" />
|
||||
<EmbeddedResource Include="Images\warn.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CPF\CPF.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
63
CPF.Toolkit/DialogService.cs
Normal file
63
CPF.Toolkit/DialogService.cs
Normal file
@ -0,0 +1,63 @@
|
||||
using CPF.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace CPF.Toolkit
|
||||
{
|
||||
public interface IDialog
|
||||
{
|
||||
IDialogService Dialog { get; set; }
|
||||
}
|
||||
|
||||
public interface IDialogService
|
||||
{
|
||||
string Alert(string text, string title, DialogType dialogType, string defaultButton, params string[] buttons);
|
||||
void Alert(string text);
|
||||
void Sucess(string text);
|
||||
void Error(string text);
|
||||
void Warn(string text);
|
||||
bool Ask(string text);
|
||||
}
|
||||
|
||||
public class DialogService : IDialogService
|
||||
{
|
||||
public DialogService(Window owner)
|
||||
{
|
||||
this.owner = owner ?? throw new ArgumentNullException(nameof(owner));
|
||||
}
|
||||
Window owner;
|
||||
|
||||
public string Alert(string text, string title, DialogType dialogType, string defaultButton, params string[] buttons)
|
||||
{
|
||||
var view = new DialogView(text, title, dialogType, defaultButton, buttons);
|
||||
var result = view.ShowDialogSync(owner);
|
||||
return result?.ToString();
|
||||
}
|
||||
|
||||
public void Alert(string text)
|
||||
{
|
||||
this.Alert(text, "消息", DialogType.None, "确定", "确定");
|
||||
}
|
||||
|
||||
public bool Ask(string text)
|
||||
{
|
||||
return this.Alert(text, "询问", DialogType.Ask, "确定", "确定", "取消") == "确定";
|
||||
}
|
||||
|
||||
public void Error(string text)
|
||||
{
|
||||
this.Alert(text, "错误", DialogType.Error, defaultButton: "确定", "确定");
|
||||
}
|
||||
|
||||
public void Sucess(string text)
|
||||
{
|
||||
this.Alert(text, "成功", DialogType.Sucess, "确定", "确定");
|
||||
}
|
||||
|
||||
public void Warn(string text)
|
||||
{
|
||||
this.Alert(text, "警告", DialogType.Warn, "确定", "确定");
|
||||
}
|
||||
}
|
||||
}
|
163
CPF.Toolkit/DialogView.cs
Normal file
163
CPF.Toolkit/DialogView.cs
Normal file
@ -0,0 +1,163 @@
|
||||
using CPF.Controls;
|
||||
using CPF.Drawing;
|
||||
using CPF.Input;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace CPF.Toolkit
|
||||
{
|
||||
internal class DialogView : Window
|
||||
{
|
||||
public DialogView(string text, string title, DialogType dialogType, string defaultButton, params string[] buttons)
|
||||
{
|
||||
this.Title = title;
|
||||
this.Text = text;
|
||||
this.Buttons = buttons;
|
||||
this.DefaultButton = defaultButton;
|
||||
this.DialogType = dialogType;
|
||||
}
|
||||
|
||||
public DialogType DialogType { get => GetValue<DialogType>(); set => SetValue(value); }
|
||||
public string DefaultButton { get => GetValue<string>(); set => SetValue(value); }
|
||||
public string Text { get => GetValue<string>(); set => SetValue(value); }
|
||||
public string[] Buttons { get => GetValue<string[]>(); set => SetValue(value); }
|
||||
|
||||
protected override void InitializeComponent()
|
||||
{
|
||||
this.ShowInTaskbar = false;
|
||||
this.MaxWidth = 800;
|
||||
this.MinWidth = 400;
|
||||
this.MaxHeight = 600;
|
||||
this.MinHeight = 250;
|
||||
this.CanResize = false;
|
||||
this.Width = "auto";
|
||||
this.Height = "auto";
|
||||
this.Background = null;
|
||||
var frame = this.Children.Add(new WindowFrame(this, new Grid
|
||||
{
|
||||
Size = SizeField.Fill,
|
||||
//LineFill = "red",
|
||||
//LineStroke = new Stroke(1),
|
||||
RowDefinitions =
|
||||
{
|
||||
new RowDefinition{ Height = "auto" },
|
||||
new RowDefinition{ },
|
||||
new RowDefinition{ Height = 35 },
|
||||
},
|
||||
Children =
|
||||
{
|
||||
new Picture
|
||||
{
|
||||
Stretch = Stretch.None,
|
||||
Height = "70",
|
||||
Bindings =
|
||||
{
|
||||
{
|
||||
nameof(Visibility),
|
||||
nameof(DialogType),
|
||||
this,BindingMode.OneWay,
|
||||
(DialogType t) => t == DialogType.None ? Visibility.Collapsed : Visibility.Visible
|
||||
},
|
||||
{
|
||||
nameof(Picture.Source),
|
||||
nameof(DialogType),
|
||||
this,BindingMode.OneWay,
|
||||
(DialogType t) =>
|
||||
{
|
||||
switch (t)
|
||||
{
|
||||
case DialogType.Sucess: return "res://CPF.Toolkit/Images/sucess.png";
|
||||
case DialogType.Error:return"res://CPF.Toolkit/Images/error.png";
|
||||
case DialogType.Ask: return"res://CPF.Toolkit/Images/ask.png";
|
||||
case DialogType.Warn:return "res://CPF.Toolkit/Images/warn.png";
|
||||
default:return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
new TextBox
|
||||
{
|
||||
Attacheds = { { Grid.RowIndex,1 } },
|
||||
BorderType = BorderType.BorderThickness,
|
||||
BorderStroke = new Stroke(1, DashStyles.Solid),
|
||||
BorderThickness = new Thickness(0,0,0,1),
|
||||
//BorderFill = "Silver",
|
||||
IsReadOnly = true,
|
||||
Size = SizeField.Fill,
|
||||
FontSize = 16,
|
||||
WordWarp = true,
|
||||
TextAlignment = TextAlignment.Center,
|
||||
MarginTop = 30,
|
||||
Bindings =
|
||||
{
|
||||
{ nameof(TextBox.Text),nameof(Text),this,BindingMode.OneWay}
|
||||
}
|
||||
}.Assign(out var textBox),
|
||||
new StackPanel
|
||||
{
|
||||
Height = "100%",
|
||||
Attacheds = { { Grid.RowIndex,2 } },
|
||||
MarginBottom = 4,
|
||||
Orientation = Orientation.Horizontal,
|
||||
}
|
||||
.LoopCreate(this.Buttons.Length, i => new Button
|
||||
{
|
||||
Content = this.Buttons[i],
|
||||
MinWidth = this.Buttons.Length <= 1 ? 80 : 65,
|
||||
Background = "white",
|
||||
BorderFill = "236,236,236",
|
||||
Height = "95%",
|
||||
MarginRight = 5,
|
||||
Commands = { { nameof(Button.Click),(s,e) => this.DialogResult = this.Buttons[i] } }
|
||||
}),
|
||||
}
|
||||
}));
|
||||
var controlBox = frame.Find<StackPanel>().FirstOrDefault(x => x.Name == "controlBox");
|
||||
var caption = frame.Find<Panel>().FirstOrDefault(x => x.Name == "caption");
|
||||
var title = frame.Find<TextBlock>().FirstOrDefault(x => x.Name == "title");
|
||||
controlBox.Visibility = Visibility.Collapsed;
|
||||
caption.Background = "white";
|
||||
title.Foreground = "black";
|
||||
textBox.TextChanged += TextBox_TextChanged;
|
||||
}
|
||||
|
||||
private void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
var textBox = sender as TextBox;
|
||||
if (textBox.Document.Lines.Count > 5)
|
||||
{
|
||||
textBox.TextAlignment = TextAlignment.Left;
|
||||
textBox.Height = "100%";
|
||||
}
|
||||
else
|
||||
{
|
||||
textBox.TextAlignment = TextAlignment.Center;
|
||||
textBox.Height = "auto";
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnKeyUp(KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Keys.Enter || e.Key == Keys.Space)
|
||||
{
|
||||
var buttons = this.Find<Button>();
|
||||
var btn = buttons.FirstOrDefault(x => x.IsFocused) ?? buttons.FirstOrDefault(x => x.Content?.ToString() == this.DefaultButton);
|
||||
this.DialogResult = btn.Content.ToString();
|
||||
e.Handled = true;
|
||||
}
|
||||
base.OnKeyUp(e);
|
||||
}
|
||||
}
|
||||
|
||||
public enum DialogType
|
||||
{
|
||||
None,
|
||||
Sucess,
|
||||
Error,
|
||||
Ask,
|
||||
Warn
|
||||
}
|
||||
}
|
3
CPF.Toolkit/FodyWeavers.xml
Normal file
3
CPF.Toolkit/FodyWeavers.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<PropertyChanged />
|
||||
</Weavers>
|
74
CPF.Toolkit/FodyWeavers.xsd
Normal file
74
CPF.Toolkit/FodyWeavers.xsd
Normal file
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="TriggerDependentProperties" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Used to control if the Dependent properties feature is enabled.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="EnableIsChangedProperty" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Used to control if the IsChanged property feature is enabled.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="EventInvokerNames" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="CheckForEquality" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="SuppressWarnings" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Used to turn off build warnings from this weaver.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="SuppressOnPropertyNameChangedWarning" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Used to turn off build warnings about mismatched On_PropertyName_Changed methods.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
14
CPF.Toolkit/ICloseable.cs
Normal file
14
CPF.Toolkit/ICloseable.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using CPF.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace CPF.Toolkit
|
||||
{
|
||||
public interface ICloseable
|
||||
{
|
||||
event EventHandler<ClosingEventArgs> Closable;
|
||||
void OnClosable(ClosingEventArgs e);
|
||||
}
|
||||
}
|
11
CPF.Toolkit/ILoaded.cs
Normal file
11
CPF.Toolkit/ILoaded.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace CPF.Toolkit
|
||||
{
|
||||
public interface ILoaded
|
||||
{
|
||||
void OnLoaded();
|
||||
}
|
||||
}
|
BIN
CPF.Toolkit/Images/ask.png
Normal file
BIN
CPF.Toolkit/Images/ask.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 679 B |
BIN
CPF.Toolkit/Images/error.png
Normal file
BIN
CPF.Toolkit/Images/error.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 879 B |
BIN
CPF.Toolkit/Images/sucess.png
Normal file
BIN
CPF.Toolkit/Images/sucess.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 834 B |
BIN
CPF.Toolkit/Images/warn.png
Normal file
BIN
CPF.Toolkit/Images/warn.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 748 B |
91
CPF.Toolkit/ViewBehavior.cs
Normal file
91
CPF.Toolkit/ViewBehavior.cs
Normal file
@ -0,0 +1,91 @@
|
||||
using CPF.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace CPF.Toolkit
|
||||
{
|
||||
public class ViewBehavior : Behavior<Window>
|
||||
{
|
||||
protected override void OnBehaviorTo(Window window)
|
||||
{
|
||||
this.DataContextChanged(window);
|
||||
window.PropertyChanged += Window_PropertyChanged;
|
||||
window.Loaded += Window_Loaded;
|
||||
window.Closing += Window_Closing;
|
||||
window.Closed += Window_Closed;
|
||||
base.OnBehaviorTo(window);
|
||||
}
|
||||
|
||||
protected override void OnDetachingFrom(Window window)
|
||||
{
|
||||
window.PropertyChanged -= Window_PropertyChanged;
|
||||
window.Loaded -= Window_Loaded;
|
||||
window.Closing -= Window_Closing;
|
||||
window.Closed -= Window_Closed;
|
||||
base.OnDetachingFrom(window);
|
||||
}
|
||||
|
||||
private void Window_Closed(object sender, EventArgs e)
|
||||
{
|
||||
var window = (Window)sender;
|
||||
if (window.DataContext is IDisposable disposable)
|
||||
{
|
||||
disposable.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private void Window_Closing(object sender, ClosingEventArgs e)
|
||||
{
|
||||
var window = (Window)sender;
|
||||
if (window.DataContext is ICloseable closeable)
|
||||
{
|
||||
closeable.OnClosable(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void Window_Loaded(object sender, EventArgs e)
|
||||
{
|
||||
var window = (Window)sender;
|
||||
if (window.DataContext is ILoaded loaded)
|
||||
{
|
||||
loaded.OnLoaded();
|
||||
}
|
||||
}
|
||||
|
||||
void DataContextChanged(Window window)
|
||||
{
|
||||
if (window == null) throw new ArgumentNullException(nameof(window));
|
||||
if (window.DataContext is ICloseable closeable)
|
||||
{
|
||||
closeable.Closable -= Closeable_Closable;
|
||||
closeable.Closable += Closeable_Closable;
|
||||
}
|
||||
|
||||
if (window.DataContext is IDialog dialog)
|
||||
{
|
||||
dialog.Dialog = new DialogService(window);
|
||||
}
|
||||
|
||||
void Closeable_Closable(object _, ClosingEventArgs ee)
|
||||
{
|
||||
if (!ee.Cancel)
|
||||
{
|
||||
window.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Window_PropertyChanged(object sender, CPFPropertyChangedEventArgs e)
|
||||
{
|
||||
switch (e.PropertyName)
|
||||
{
|
||||
case nameof(DataContext):
|
||||
{
|
||||
DataContextChanged(sender as Window);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
38
CPF.Toolkit/ViewModelBase.cs
Normal file
38
CPF.Toolkit/ViewModelBase.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using CPF.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace CPF.Toolkit
|
||||
{
|
||||
public class ViewModelBase : INotifyPropertyChanged, ILoaded, IDisposable, ICloseable, IDialog
|
||||
{
|
||||
WeakEventHandlerList events = new WeakEventHandlerList();
|
||||
|
||||
IDialogService IDialog.Dialog { get; set; }
|
||||
|
||||
event EventHandler<ClosingEventArgs> ICloseable.Closable { add => AddHandler(value); remove => RemoveHandler(value); }
|
||||
|
||||
public virtual void Dispose() { }
|
||||
|
||||
void ICloseable.OnClosable(ClosingEventArgs e) => this.OnClosing(e);
|
||||
|
||||
void ILoaded.OnLoaded() => this.OnLoaded();
|
||||
|
||||
protected IDialogService Dialog => (this as IDialog).Dialog;
|
||||
|
||||
protected virtual void OnLoaded() { }
|
||||
protected void Close() => this.RaiseEvent(new ClosingEventArgs(), nameof(ICloseable.Closable));
|
||||
|
||||
protected virtual void OnClosing(ClosingEventArgs e) { }
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected void AddHandler(Delegate handler, [CallerMemberName] string eventName = null) => events.AddHandler(handler, eventName);
|
||||
protected void RemoveHandler(Delegate handler, [CallerMemberName] string eventName = null) => events.RemoveHandler(handler, eventName);
|
||||
protected void RaiseEvent<TEventArgs>(in TEventArgs eventArgs, string eventName) => events[eventName]?.Invoke(this, eventArgs);
|
||||
}
|
||||
}
|
@ -406,8 +406,22 @@ namespace CPF.Windows
|
||||
case DataFormat.Text:
|
||||
if (formatId == (int)UnmanagedMethods.ClipboardFormat.CF_TEXT)
|
||||
{
|
||||
var rv = Marshal.PtrToStringAnsi(hText);
|
||||
return rv;
|
||||
try
|
||||
{
|
||||
var rv = Marshal.PtrToStringAnsi(hText);//在Unity 里会报错
|
||||
return rv;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine(e);
|
||||
Console.WriteLine(e);
|
||||
var dwBufSize = (int)UnmanagedMethods.GlobalSize(hText);
|
||||
//var ss = new String((sbyte*)hText, 0, dwBufSize);
|
||||
byte[] cc = new byte[dwBufSize];
|
||||
Marshal.Copy(hText, cc, 0, (int)dwBufSize);
|
||||
string ss = Encoding.GetEncoding("GBK").GetString(cc).TrimEnd('\0');
|
||||
return ss;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -464,7 +478,7 @@ namespace CPF.Windows
|
||||
#if Net4
|
||||
var bmp = (UnmanagedMethods.BITMAPINFOHEADER)Marshal.PtrToStructure(ptr, typeof(UnmanagedMethods.BITMAPINFOHEADER));
|
||||
#else
|
||||
var bmp = Marshal.PtrToStructure<UnmanagedMethods.BITMAPINFOHEADER>(ptr);
|
||||
var bmp = Marshal.PtrToStructure<UnmanagedMethods.BITMAPINFOHEADER>(ptr);
|
||||
|
||||
#endif
|
||||
IntPtr screenDC = UnmanagedMethods.GetDC(IntPtr.Zero);
|
||||
@ -478,7 +492,7 @@ namespace CPF.Windows
|
||||
var hBitmap = UnmanagedMethods.CreateDIBSection(memDc, ref info, 0, out IntPtr ppvBits, IntPtr.Zero, 0);
|
||||
var oldBits = UnmanagedMethods.SelectObject(memDc, hBitmap);//将位图载入上下文
|
||||
//_ = UnmanagedMethods.GlobalLock(hText);
|
||||
_ = UnmanagedMethods.StretchDIBits(memDc, 0, 0, bmp.biWidth, bmp.biHeight, 0, 0, bmp.biWidth, bmp.biHeight, (ptr + sizeof(UnmanagedMethods.BITMAPINFOHEADER)), ref info, 0, (uint)TernaryRasterOperations.SRCCOPY);
|
||||
_ = UnmanagedMethods.StretchDIBits(memDc, 0, 0, bmp.biWidth, Math.Abs(bmp.biHeight), 0, 0, bmp.biWidth, Math.Abs(bmp.biHeight), (ptr + sizeof(UnmanagedMethods.BITMAPINFOHEADER)), ref info, 0, (uint)TernaryRasterOperations.SRCCOPY);
|
||||
//sizeof(UnmanagedMethods.BITMAPFILEHEADER) +
|
||||
//var c = sizeof(UnmanagedMethods.BITMAPINFOHEADER);
|
||||
|
||||
|
@ -295,7 +295,7 @@ namespace CPF.GDIPlus
|
||||
{
|
||||
if (h == -1)
|
||||
{
|
||||
h = Font.Height;
|
||||
h = Font.Height + 0.01f;//有些字体用行高计算字符尺寸的时候会有问题,只能加0.01
|
||||
}
|
||||
return h;
|
||||
}
|
||||
|
70
CPF/Behavior.cs
Normal file
70
CPF/Behavior.cs
Normal file
@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace CPF
|
||||
{
|
||||
public interface IBehaviorObject
|
||||
{
|
||||
void BehaviorTo(CpfObject cpfObject);
|
||||
void DetachFrom(CpfObject cpfObject);
|
||||
}
|
||||
|
||||
public abstract class Behavior : CpfObject, IBehaviorObject
|
||||
{
|
||||
protected Behavior() : this(typeof(CpfObject))
|
||||
{
|
||||
}
|
||||
internal Behavior(Type associatedType) => AssociatedType = associatedType ?? throw new ArgumentNullException(nameof(associatedType));
|
||||
|
||||
protected Type AssociatedType { get; }
|
||||
|
||||
void IBehaviorObject.BehaviorTo(CpfObject cpfObject)
|
||||
{
|
||||
if (cpfObject == null)
|
||||
throw new ArgumentNullException(nameof(cpfObject));
|
||||
if (!AssociatedType.IsInstanceOfType(cpfObject))
|
||||
throw new InvalidOperationException("object not an instance of AssociatedType");
|
||||
OnBehaviorTo(cpfObject);
|
||||
}
|
||||
|
||||
void IBehaviorObject.DetachFrom(CpfObject cpfObject) => OnDetachingFrom(cpfObject);
|
||||
|
||||
protected virtual void OnBehaviorTo(CpfObject cpfObject)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected virtual void OnDetachingFrom(CpfObject cpfObject)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class Behavior<T> : Behavior where T : CpfObject
|
||||
{
|
||||
protected Behavior() : base(typeof(T))
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnBehaviorTo(CpfObject cpfObject)
|
||||
{
|
||||
base.OnBehaviorTo(cpfObject);
|
||||
OnBehaviorTo((T)cpfObject);
|
||||
}
|
||||
|
||||
protected virtual void OnBehaviorTo(T cpfObject)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDetachingFrom(CpfObject cpfObject)
|
||||
{
|
||||
OnDetachingFrom((T)cpfObject);
|
||||
base.OnDetachingFrom(cpfObject);
|
||||
}
|
||||
|
||||
protected virtual void OnDetachingFrom(T cpfObject)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -26,6 +26,17 @@ namespace CPF.Controls
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载中显示的图片
|
||||
/// </summary>
|
||||
[TypeConverter(typeof(StringConverter)), CPF.Design.FileBrowser(".png;.jpg;.bmp;.gif")]
|
||||
[PropertyMetadata(null)]
|
||||
[Description("加载中显示的图片")]
|
||||
public Image LoadingImage
|
||||
{
|
||||
get { return GetValue<Image>(); }
|
||||
set { SetValue(value); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 图片源,可以是路径、Url、Drawing.Image对象、Stream、byte[]
|
||||
/// </summary>
|
||||
@ -124,6 +135,10 @@ namespace CPF.Controls
|
||||
timer = null;
|
||||
}
|
||||
}
|
||||
if (img != null && img != ResourceManager.ErrorImage && img != LoadingImage)
|
||||
{
|
||||
RaiseEvent(EventArgs.Empty, nameof(ImageLoaded));
|
||||
}
|
||||
}
|
||||
//int frameTimer = 0;
|
||||
private void Timer_Tick(object sender, EventArgs e)
|
||||
@ -165,8 +180,18 @@ namespace CPF.Controls
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
[PropertyChanged(nameof(LoadingImage))]
|
||||
void OnLoadingImage(object newValue, object oldValue, PropertyMetadataAttribute attribute)
|
||||
{
|
||||
var load = newValue as Image;
|
||||
if (load != null && img == null)
|
||||
{
|
||||
SetImage(load);
|
||||
}
|
||||
}
|
||||
[PropertyChanged(nameof(Source))]
|
||||
void RegisterSource(object newValue, object oldValue, PropertyMetadataAttribute attribute)
|
||||
void OnSource(object newValue, object oldValue, PropertyMetadataAttribute attribute)
|
||||
{
|
||||
if (newValue != null)
|
||||
{
|
||||
@ -183,10 +208,19 @@ namespace CPF.Controls
|
||||
else if (newValue is string)
|
||||
{
|
||||
var s = newValue as string;
|
||||
var load = LoadingImage;
|
||||
if (load != null)
|
||||
{
|
||||
SetImage(load);
|
||||
}
|
||||
ResourceManager.GetImage(s, a =>
|
||||
{
|
||||
Invoke(() =>
|
||||
{
|
||||
if (!s.Equals(Source))
|
||||
{
|
||||
return;
|
||||
}
|
||||
SetImage(a);
|
||||
needDisposeImg = false;
|
||||
if (a == null)
|
||||
@ -403,6 +437,15 @@ namespace CPF.Controls
|
||||
remove { RemoveHandler(value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 图片加载
|
||||
/// </summary>
|
||||
public event EventHandler ImageLoaded
|
||||
{
|
||||
add { AddHandler(value); }
|
||||
remove { RemoveHandler(value); }
|
||||
}
|
||||
|
||||
protected override void OnOverrideMetadata(OverrideMetadata overridePropertys)
|
||||
{
|
||||
base.OnOverrideMetadata(overridePropertys);
|
||||
|
@ -1442,24 +1442,40 @@ namespace CPF.Controls
|
||||
sb.Append("<pre>");
|
||||
StringBuilder textSb = new StringBuilder();
|
||||
IDocumentContainer documentContainer = Document;
|
||||
var l = Math.Min(caretIndex.Count, selectionEnd.Count);
|
||||
var cs = caretIndex.ToList();
|
||||
var ss = selectionEnd.ToList();
|
||||
var l = Math.Max(cs.Count, ss.Count);
|
||||
if (cs.Count < l)
|
||||
{//假如两个索引层级不一样,要补充索引
|
||||
for (int i = 0; i < l - cs.Count; i++)
|
||||
{
|
||||
cs.Add(0);
|
||||
}
|
||||
}
|
||||
if (ss.Count < l)
|
||||
{
|
||||
for (int i = 0; i < l - ss.Count; i++)
|
||||
{
|
||||
ss.Add(0);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < l; i++)
|
||||
{
|
||||
if (caretIndex[i] > selectionEnd[i])
|
||||
if (cs[i] > ss[i])
|
||||
{
|
||||
GetText(sb, textSb, i, documentContainer, caretIndex, selectionEnd);
|
||||
GetText(sb, textSb, i, documentContainer, cs, ss);
|
||||
break;
|
||||
}
|
||||
else if (caretIndex[i] < selectionEnd[i])
|
||||
else if (cs[i] < ss[i])
|
||||
{
|
||||
GetText(sb, textSb, i, documentContainer, selectionEnd, caretIndex);
|
||||
GetText(sb, textSb, i, documentContainer, ss, cs);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i < l - 1)
|
||||
{
|
||||
documentContainer = documentContainer.Children[(int)caretIndex[i]] as IDocumentContainer;
|
||||
documentContainer = documentContainer.Children[(int)cs[i]] as IDocumentContainer;
|
||||
if (documentContainer == null)
|
||||
{
|
||||
break;
|
||||
@ -1499,7 +1515,23 @@ namespace CPF.Controls
|
||||
sb.Append("<pre>");
|
||||
StringBuilder textSb = new StringBuilder();
|
||||
IDocumentContainer documentContainer = Document;
|
||||
var l = Math.Min(start.Count, end.Count);
|
||||
start = start.ToList();
|
||||
end = end.ToList();
|
||||
var l = Math.Max(start.Count, end.Count);
|
||||
if (start.Count < l)
|
||||
{//假如两个索引层级不一样,要补充索引
|
||||
for (int i = 0; i < l - start.Count; i++)
|
||||
{
|
||||
start.Add(0);
|
||||
}
|
||||
}
|
||||
if (end.Count < l)
|
||||
{
|
||||
for (int i = 0; i < l - end.Count; i++)
|
||||
{
|
||||
end.Add(0);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < l; i++)
|
||||
{
|
||||
if (start[i] > end[i])
|
||||
|
@ -663,8 +663,8 @@ namespace CPF.Controls
|
||||
dc.FillRectangle(backBrush, backRect);
|
||||
}
|
||||
}
|
||||
lastOffset = line.X + line.Width;
|
||||
lastTop = line.Y;
|
||||
lastOffset = document.Left + line.X + line.Width;
|
||||
lastTop = document.Top + line.Y;
|
||||
}
|
||||
foreach (var line in documentContainer.Lines)
|
||||
{
|
||||
@ -802,6 +802,6 @@ namespace CPF.Controls
|
||||
timer.Dispose();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -2512,6 +2512,11 @@ namespace CPF.Controls
|
||||
{
|
||||
views.TryRemove(this, out _);
|
||||
base.Dispose(disposing);
|
||||
if (viewImpl != null)
|
||||
{
|
||||
viewImpl.Dispose();
|
||||
//viewImpl = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -28,6 +28,12 @@ namespace CPF.Controls
|
||||
|
||||
IWindowImpl windowImpl;
|
||||
|
||||
bool isLoaded = false;
|
||||
public event EventHandler Loaded
|
||||
{
|
||||
add => AddHandler(value);
|
||||
remove => RemoveHandler(value);
|
||||
}
|
||||
public event EventHandler Closed
|
||||
{
|
||||
add { AddHandler(value); }
|
||||
@ -144,6 +150,11 @@ namespace CPF.Controls
|
||||
|
||||
public void Show()
|
||||
{
|
||||
if (!this.isLoaded)
|
||||
{
|
||||
this.BeginInvoke(() => RaiseEvent(EventArgs.Empty, nameof(Loaded)));
|
||||
this.isLoaded = true;
|
||||
}
|
||||
//windowImpl.Show();
|
||||
Visibility = Visibility.Visible;
|
||||
}
|
||||
@ -529,11 +540,11 @@ namespace CPF.Controls
|
||||
RaiseEvent(e, nameof(Closed));
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
windowImpl.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
//protected override void Dispose(bool disposing)
|
||||
//{
|
||||
// windowImpl.Dispose();
|
||||
// base.Dispose(disposing);
|
||||
//}
|
||||
}
|
||||
|
||||
public class ClosingEventArgs : EventArgs
|
||||
|
@ -178,6 +178,42 @@ namespace CPF
|
||||
}
|
||||
}
|
||||
|
||||
internal IList<Behavior> behaviors;
|
||||
[NotCpfProperty]
|
||||
[Category("绑定")]
|
||||
[Description("设置行为")]
|
||||
public IList<Behavior> Behaviors
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.behaviors == null)
|
||||
{
|
||||
var b = new Collection<Behavior>();
|
||||
b.CollectionChanged -= Behavior_CollectionChanged;
|
||||
b.CollectionChanged += Behavior_CollectionChanged;
|
||||
this.behaviors = b;
|
||||
}
|
||||
return this.behaviors;
|
||||
}
|
||||
}
|
||||
|
||||
private void Behavior_CollectionChanged(object sender, CollectionChangedEventArgs<Behavior> e)
|
||||
{
|
||||
switch (e.Action)
|
||||
{
|
||||
case CollectionChangedAction.Add:
|
||||
(e.NewItem as IBehaviorObject).BehaviorTo(this);
|
||||
break;
|
||||
case CollectionChangedAction.Remove:
|
||||
(e.NewItem as IBehaviorObject).DetachFrom(this);
|
||||
break;
|
||||
case CollectionChangedAction.Replace:
|
||||
break;
|
||||
case CollectionChangedAction.Sort:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Type type;
|
||||
/// <summary>
|
||||
/// 设置绑定
|
||||
@ -1383,7 +1419,6 @@ namespace CPF
|
||||
{
|
||||
SetCommand(cpc, list1);
|
||||
}
|
||||
|
||||
RaiseEvent(cpc, strPropertyChanged);
|
||||
|
||||
//PropertyChangedEventHandler handler = (PropertyChangedEventHandler)Events["INotifyPropertyChanged"];
|
||||
@ -1496,7 +1531,6 @@ namespace CPF
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 当要设置属性值的时候,返回值为true的时候将设置值
|
||||
/// </summary>
|
||||
|
@ -362,7 +362,7 @@ namespace CPF
|
||||
|
||||
internal static readonly HashSet<Type> ConvertTypes = new HashSet<Type>() {
|
||||
//typeof(System.Empty),
|
||||
typeof(Object),
|
||||
//typeof(Object),
|
||||
typeof(System.DBNull),
|
||||
typeof(Boolean),
|
||||
typeof(Char),
|
||||
@ -378,7 +378,7 @@ namespace CPF
|
||||
typeof(Double),
|
||||
typeof(Decimal),
|
||||
typeof(DateTime),
|
||||
typeof(Object), //TypeCode is discontinuous so we need a placeholder.
|
||||
// typeof(Object), //TypeCode is discontinuous so we need a placeholder.
|
||||
typeof(String)
|
||||
};
|
||||
|
||||
@ -407,7 +407,7 @@ namespace CPF
|
||||
throw new Exception(obj.GetType() + "无法转换成" + type, e);
|
||||
}
|
||||
var vType = obj.GetType();
|
||||
if (vType == type || vType.IsSubclassOf(type))
|
||||
if (vType == type || vType.IsSubclassOf(type) || (type.IsInterface && type.IsAssignableFrom(vType)))
|
||||
{
|
||||
return obj;
|
||||
}
|
||||
@ -990,7 +990,7 @@ namespace CPF
|
||||
List<PropertyMetadataAttribute> list = new List<PropertyMetadataAttribute>();
|
||||
foreach (DataColumn item in row.Table.Columns)
|
||||
{
|
||||
list.Add(new PropertyMetadataAttribute { PropertyName = item.ColumnName, PropertyType = item.DataType, });
|
||||
list.Add(new PropertyMetadataAttribute { PropertyName = item.ColumnName, PropertyType = item.DataType, });
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
@ -78,6 +78,22 @@ namespace CPF.Styling
|
||||
}
|
||||
set { errorImage = value; }
|
||||
}
|
||||
static Image loadingImage;
|
||||
/// <summary>
|
||||
/// 获取或设置加载图片
|
||||
/// </summary>
|
||||
public static Image LoadingImage
|
||||
{
|
||||
get
|
||||
{
|
||||
if (loadingImage == null || loadingImage.ImageImpl == null)
|
||||
{
|
||||
GetImage("res://CPF/loading.gif", a => loadingImage = a);
|
||||
}
|
||||
return loadingImage;
|
||||
}
|
||||
set { loadingImage = value; }
|
||||
}
|
||||
|
||||
static ConcurrentDictionary<string, WeakReference<Image>> res = new ConcurrentDictionary<string, WeakReference<Image>>();
|
||||
static ConcurrentDictionary<string, ConcurrentBag<Action<Image>>> downloading = new ConcurrentDictionary<string, ConcurrentBag<Action<Image>>>();
|
||||
|
@ -147,8 +147,8 @@ namespace CPF.Svg
|
||||
|
||||
public override ViewFill GetBrush(double opacity)
|
||||
{
|
||||
byte a = (byte)(255 * opacity / 100);
|
||||
Color c = Color;
|
||||
byte a = (byte)(c.A * opacity / 100);
|
||||
Color newcol = Color.FromArgb(a, c.R, c.G, c.B);
|
||||
if (sb == null || sb.IsDisposed)
|
||||
{
|
||||
@ -158,7 +158,7 @@ namespace CPF.Svg
|
||||
return sb;
|
||||
}
|
||||
}
|
||||
abstract class GradientColor : PaintServer
|
||||
internal abstract class GradientColor : PaintServer
|
||||
{
|
||||
// http://www.w3.org/TR/SVG11/pservers.html#LinearGradients
|
||||
List<GradientStop> m_stops = new List<GradientStop>();
|
||||
@ -244,7 +244,11 @@ namespace CPF.Svg
|
||||
{
|
||||
LinearGradientFill b = new LinearGradientFill();
|
||||
foreach (GradientStop stop in Stops)
|
||||
b.GradientStops.Add(stop);
|
||||
{
|
||||
var c = stop.Color;
|
||||
byte a = (byte)(c.A * opacity / 100);
|
||||
b.GradientStops.Add(new GradientStop(Color.FromArgb(a, c.R, c.G, c.B), stop.Position));
|
||||
}
|
||||
|
||||
//b.MappingMode = BrushMappingMode.RelativeToBoundingBox;
|
||||
b.StartPoint = "0, 0";
|
||||
@ -336,7 +340,11 @@ namespace CPF.Svg
|
||||
{
|
||||
RadialGradientFill b = new RadialGradientFill();
|
||||
foreach (GradientStop stop in Stops)
|
||||
b.GradientStops.Add(stop);
|
||||
{
|
||||
var c = stop.Color;
|
||||
byte a = (byte)(c.A * opacity / 100);
|
||||
b.GradientStops.Add(new GradientStop(Color.FromArgb(a, c.R, c.G, c.B), stop.Position));
|
||||
}
|
||||
|
||||
//b.GradientOrigin = new System.Windows.Point(0.5, 0.5);
|
||||
b.Center = "50%,50%";
|
||||
|
@ -7,240 +7,240 @@ using CPF.Drawing;
|
||||
|
||||
namespace CPF.Svg
|
||||
{
|
||||
class PathShape : SvgShape
|
||||
{
|
||||
//public class CommandSplitter
|
||||
//{
|
||||
// // http://www.w3.org/TR/SVGTiny12/paths.html
|
||||
// // command is from one non numeric character to the next (-.,space is part of the numeric value since it defines a point)
|
||||
// string m_value;
|
||||
// int m_curPos = -1;
|
||||
// char[] m_commands = new char[] {'m', 'M', 'z', 'Z', 'A', 'a', 'L', 'l', 'h', 'H', 'v', 'V', 'c', 'C', 's', 'S' };
|
||||
// public CommandSplitter(string value)
|
||||
// {
|
||||
// m_value = value;
|
||||
// }
|
||||
// public string ReadNext()
|
||||
// {
|
||||
// int startpos = m_curPos;
|
||||
// if (startpos < 0)
|
||||
// startpos = 0;
|
||||
// if (startpos >= m_value.Length)
|
||||
// return string.Empty;
|
||||
// int cmdstart = m_value.IndexOfAny(m_commands, startpos);
|
||||
// int cmdend = cmdstart;
|
||||
// if (cmdstart >= 0)
|
||||
// cmdend = m_value.IndexOfAny(m_commands, cmdstart+1);
|
||||
// if (cmdend < 0)
|
||||
// {
|
||||
// int len = m_value.Length - startpos;
|
||||
// m_curPos = m_value.Length;
|
||||
// return m_value.Substring(startpos, len).Trim();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// int len = cmdend - startpos;
|
||||
// m_curPos = cmdend;
|
||||
// return m_value.Substring(startpos, len).Trim();
|
||||
// }
|
||||
// }
|
||||
|
||||
// ShapeUtil.StringSplitter m_splitter = new ShapeUtil.StringSplitter(string.Empty);
|
||||
// public ShapeUtil.StringSplitter SplitCommand(string command, out char cmd)
|
||||
// {
|
||||
// cmd = command[0];
|
||||
// m_splitter.SetString(command, 1);
|
||||
// return m_splitter;
|
||||
// }
|
||||
//}
|
||||
//public class PathElement
|
||||
//{
|
||||
// public char Command { get; protected set; }
|
||||
// public bool IsRelative
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// return char.IsLower(Command);
|
||||
// }
|
||||
// }
|
||||
// protected PathElement(char command)
|
||||
// {
|
||||
// Command = command;
|
||||
// }
|
||||
//}
|
||||
//public class MoveTo : PathElement
|
||||
//{
|
||||
// public Point Point { get; private set; }
|
||||
// public MoveTo(char command, ShapeUtil.StringSplitter value) : base(command)
|
||||
// {
|
||||
// Point = value.ReadNextPoint();
|
||||
// }
|
||||
//}
|
||||
//public class LineTo : PathElement
|
||||
//{
|
||||
// public enum eType
|
||||
// {
|
||||
// Point,
|
||||
// Horizontal,
|
||||
// Vertical,
|
||||
// }
|
||||
// public eType PositionType { get; private set; }
|
||||
// public Point[] Points { get; private set; }
|
||||
// public LineTo(char command, ShapeUtil.StringSplitter value) : base(command)
|
||||
// {
|
||||
// if (char.ToLower(command) == 'h')
|
||||
// {
|
||||
// PositionType = eType.Horizontal;
|
||||
// double v = value.ReadNextValue();
|
||||
// Points = new Point[] { new Point((float)v, 0) };
|
||||
// return;
|
||||
// }
|
||||
// if (char.ToLower(command) == 'v')
|
||||
// {
|
||||
// PositionType = eType.Vertical;
|
||||
// double v = value.ReadNextValue();
|
||||
// Points = new Point[] { new Point(0, (float)v) };
|
||||
// return;
|
||||
// }
|
||||
|
||||
// PositionType = eType.Point;
|
||||
// List<Point> list = new List<Point>();
|
||||
// while (value.More)
|
||||
// {
|
||||
// Point p = value.ReadNextPoint();
|
||||
// list.Add(p);
|
||||
// }
|
||||
// Points = list.ToArray();
|
||||
// }
|
||||
//}
|
||||
class PathShape : SvgShape
|
||||
{
|
||||
//public class CommandSplitter
|
||||
//{
|
||||
// // http://www.w3.org/TR/SVGTiny12/paths.html
|
||||
// // command is from one non numeric character to the next (-.,space is part of the numeric value since it defines a point)
|
||||
// string m_value;
|
||||
// int m_curPos = -1;
|
||||
// char[] m_commands = new char[] {'m', 'M', 'z', 'Z', 'A', 'a', 'L', 'l', 'h', 'H', 'v', 'V', 'c', 'C', 's', 'S' };
|
||||
// public CommandSplitter(string value)
|
||||
// {
|
||||
// m_value = value;
|
||||
// }
|
||||
// public string ReadNext()
|
||||
// {
|
||||
// int startpos = m_curPos;
|
||||
// if (startpos < 0)
|
||||
// startpos = 0;
|
||||
// if (startpos >= m_value.Length)
|
||||
// return string.Empty;
|
||||
// int cmdstart = m_value.IndexOfAny(m_commands, startpos);
|
||||
// int cmdend = cmdstart;
|
||||
// if (cmdstart >= 0)
|
||||
// cmdend = m_value.IndexOfAny(m_commands, cmdstart+1);
|
||||
// if (cmdend < 0)
|
||||
// {
|
||||
// int len = m_value.Length - startpos;
|
||||
// m_curPos = m_value.Length;
|
||||
// return m_value.Substring(startpos, len).Trim();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// int len = cmdend - startpos;
|
||||
// m_curPos = cmdend;
|
||||
// return m_value.Substring(startpos, len).Trim();
|
||||
// }
|
||||
// }
|
||||
|
||||
//public class CurveTo : PathElement
|
||||
//{
|
||||
// public Point CtrlPoint1 { get; private set; }
|
||||
// public Point CtrlPoint2 { get; private set; }
|
||||
// public Point Point { get; private set; }
|
||||
// public CurveTo(char command, ShapeUtil.StringSplitter value) : base(command)
|
||||
// {
|
||||
// CtrlPoint1 = value.ReadNextPoint();
|
||||
// CtrlPoint2 = value.ReadNextPoint();
|
||||
// Point = value.ReadNextPoint();
|
||||
// }
|
||||
// public CurveTo(char command, ShapeUtil.StringSplitter value, Point ctrlPoint1) : base(command)
|
||||
// {
|
||||
// CtrlPoint1 = ctrlPoint1;
|
||||
// CtrlPoint2 = value.ReadNextPoint();
|
||||
// Point = value.ReadNextPoint();
|
||||
// }
|
||||
//}
|
||||
//public class EllipticalArcTo : PathElement
|
||||
//{
|
||||
// public double RX { get; private set; }
|
||||
// public double RY { get; private set; }
|
||||
// public double AxisRotation { get; private set; }
|
||||
// public double X { get; private set; }
|
||||
// public double Y { get; private set; }
|
||||
// public bool Clockwise { get; private set; }
|
||||
// public bool LargeArc { get; private set; }
|
||||
// public EllipticalArcTo(char command, ShapeUtil.StringSplitter value) : base(command)
|
||||
// {
|
||||
// RX = value.ReadNextValue();
|
||||
// RY = value.ReadNextValue();
|
||||
// AxisRotation = value.ReadNextValue();
|
||||
// double arcflag = value.ReadNextValue();
|
||||
// LargeArc = (arcflag > 0);
|
||||
// double sweepflag = value.ReadNextValue();
|
||||
// Clockwise = (sweepflag > 0);
|
||||
// X = value.ReadNextValue();
|
||||
// Y = value.ReadNextValue();
|
||||
// }
|
||||
//}
|
||||
//List<PathElement> m_elements = new List<PathElement>();
|
||||
// ShapeUtil.StringSplitter m_splitter = new ShapeUtil.StringSplitter(string.Empty);
|
||||
// public ShapeUtil.StringSplitter SplitCommand(string command, out char cmd)
|
||||
// {
|
||||
// cmd = command[0];
|
||||
// m_splitter.SetString(command, 1);
|
||||
// return m_splitter;
|
||||
// }
|
||||
//}
|
||||
//public class PathElement
|
||||
//{
|
||||
// public char Command { get; protected set; }
|
||||
// public bool IsRelative
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// return char.IsLower(Command);
|
||||
// }
|
||||
// }
|
||||
// protected PathElement(char command)
|
||||
// {
|
||||
// Command = command;
|
||||
// }
|
||||
//}
|
||||
//public class MoveTo : PathElement
|
||||
//{
|
||||
// public Point Point { get; private set; }
|
||||
// public MoveTo(char command, ShapeUtil.StringSplitter value) : base(command)
|
||||
// {
|
||||
// Point = value.ReadNextPoint();
|
||||
// }
|
||||
//}
|
||||
//public class LineTo : PathElement
|
||||
//{
|
||||
// public enum eType
|
||||
// {
|
||||
// Point,
|
||||
// Horizontal,
|
||||
// Vertical,
|
||||
// }
|
||||
// public eType PositionType { get; private set; }
|
||||
// public Point[] Points { get; private set; }
|
||||
// public LineTo(char command, ShapeUtil.StringSplitter value) : base(command)
|
||||
// {
|
||||
// if (char.ToLower(command) == 'h')
|
||||
// {
|
||||
// PositionType = eType.Horizontal;
|
||||
// double v = value.ReadNextValue();
|
||||
// Points = new Point[] { new Point((float)v, 0) };
|
||||
// return;
|
||||
// }
|
||||
// if (char.ToLower(command) == 'v')
|
||||
// {
|
||||
// PositionType = eType.Vertical;
|
||||
// double v = value.ReadNextValue();
|
||||
// Points = new Point[] { new Point(0, (float)v) };
|
||||
// return;
|
||||
// }
|
||||
|
||||
//public IList<PathElement> Elements
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return m_elements.AsReadOnly();
|
||||
// }
|
||||
//}
|
||||
// PositionType = eType.Point;
|
||||
// List<Point> list = new List<Point>();
|
||||
// while (value.More)
|
||||
// {
|
||||
// Point p = value.ReadNextPoint();
|
||||
// list.Add(p);
|
||||
// }
|
||||
// Points = list.ToArray();
|
||||
// }
|
||||
//}
|
||||
|
||||
public string Data { get; set; }
|
||||
//public class CurveTo : PathElement
|
||||
//{
|
||||
// public Point CtrlPoint1 { get; private set; }
|
||||
// public Point CtrlPoint2 { get; private set; }
|
||||
// public Point Point { get; private set; }
|
||||
// public CurveTo(char command, ShapeUtil.StringSplitter value) : base(command)
|
||||
// {
|
||||
// CtrlPoint1 = value.ReadNextPoint();
|
||||
// CtrlPoint2 = value.ReadNextPoint();
|
||||
// Point = value.ReadNextPoint();
|
||||
// }
|
||||
// public CurveTo(char command, ShapeUtil.StringSplitter value, Point ctrlPoint1) : base(command)
|
||||
// {
|
||||
// CtrlPoint1 = ctrlPoint1;
|
||||
// CtrlPoint2 = value.ReadNextPoint();
|
||||
// Point = value.ReadNextPoint();
|
||||
// }
|
||||
//}
|
||||
//public class EllipticalArcTo : PathElement
|
||||
//{
|
||||
// public double RX { get; private set; }
|
||||
// public double RY { get; private set; }
|
||||
// public double AxisRotation { get; private set; }
|
||||
// public double X { get; private set; }
|
||||
// public double Y { get; private set; }
|
||||
// public bool Clockwise { get; private set; }
|
||||
// public bool LargeArc { get; private set; }
|
||||
// public EllipticalArcTo(char command, ShapeUtil.StringSplitter value) : base(command)
|
||||
// {
|
||||
// RX = value.ReadNextValue();
|
||||
// RY = value.ReadNextValue();
|
||||
// AxisRotation = value.ReadNextValue();
|
||||
// double arcflag = value.ReadNextValue();
|
||||
// LargeArc = (arcflag > 0);
|
||||
// double sweepflag = value.ReadNextValue();
|
||||
// Clockwise = (sweepflag > 0);
|
||||
// X = value.ReadNextValue();
|
||||
// Y = value.ReadNextValue();
|
||||
// }
|
||||
//}
|
||||
//List<PathElement> m_elements = new List<PathElement>();
|
||||
|
||||
//public bool ClosePath { get; private set;}
|
||||
// http://apike.ca/prog_svg_paths.html
|
||||
public PathShape(XmlNode node) : base(node)
|
||||
{
|
||||
//ClosePath = false;
|
||||
string path = XmlUtil.AttrValue(node, "d", string.Empty);
|
||||
Data = path;
|
||||
//CommandSplitter cmd = new CommandSplitter(path);
|
||||
//string commandstring;
|
||||
//char command;
|
||||
//List<PathElement> elements = m_elements;
|
||||
//while (true)
|
||||
//{
|
||||
// commandstring = cmd.ReadNext();
|
||||
// if (commandstring.Length == 0)
|
||||
// break;
|
||||
// ShapeUtil.StringSplitter split = cmd.SplitCommand(commandstring, out command);
|
||||
// if (command == 'm' || command == 'M')
|
||||
// {
|
||||
// elements.Add(new MoveTo(command, split));
|
||||
// if (split.More)
|
||||
// elements.Add(new LineTo(command, split));
|
||||
// continue;
|
||||
// }
|
||||
// if (command == 'l' || command == 'L' || command == 'H' || command == 'h' || command == 'V' || command == 'v')
|
||||
// {
|
||||
// elements.Add(new LineTo(command, split));
|
||||
// continue;
|
||||
// }
|
||||
// if (command == 'c' || command == 'C')
|
||||
// {
|
||||
// while (split.More)
|
||||
// elements.Add(new CurveTo(command, split));
|
||||
// continue;
|
||||
// }
|
||||
// if (command == 's' || command == 'S')
|
||||
// {
|
||||
// while (split.More)
|
||||
// {
|
||||
// CurveTo lastshape = elements[elements.Count - 1] as CurveTo;
|
||||
// System.Diagnostics.Debug.Assert(lastshape != null);
|
||||
// elements.Add(new CurveTo(command, split, lastshape.CtrlPoint2));
|
||||
// }
|
||||
// continue;
|
||||
// }
|
||||
// if (command == 'a' || command == 'A')
|
||||
// {
|
||||
// elements.Add(new EllipticalArcTo(command, split));
|
||||
// while (split.More)
|
||||
// elements.Add(new EllipticalArcTo(command, split));
|
||||
// continue;
|
||||
// }
|
||||
// if (command == 'z' || command == 'Z')
|
||||
// {
|
||||
// ClosePath = true;
|
||||
// continue;
|
||||
// }
|
||||
//public IList<PathElement> Elements
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return m_elements.AsReadOnly();
|
||||
// }
|
||||
//}
|
||||
|
||||
// // extended format moveto or lineto can contain multiple points which should be translated into lineto
|
||||
// PathElement lastitem = elements[elements.Count-1];
|
||||
// if (lastitem is MoveTo || lastitem is LineTo || lastitem is CurveTo)
|
||||
// {
|
||||
// //Point p = Point.Parse(s);
|
||||
// //elements.Add(new LineTo(p));
|
||||
// continue;
|
||||
// }
|
||||
public string Data { get; set; }
|
||||
|
||||
//public bool ClosePath { get; private set;}
|
||||
// http://apike.ca/prog_svg_paths.html
|
||||
public PathShape(XmlNode node, SvgShape parent) : base(node, parent)
|
||||
{
|
||||
//ClosePath = false;
|
||||
string path = XmlUtil.AttrValue(node, "d", string.Empty);
|
||||
Data = path;
|
||||
//CommandSplitter cmd = new CommandSplitter(path);
|
||||
//string commandstring;
|
||||
//char command;
|
||||
//List<PathElement> elements = m_elements;
|
||||
//while (true)
|
||||
//{
|
||||
// commandstring = cmd.ReadNext();
|
||||
// if (commandstring.Length == 0)
|
||||
// break;
|
||||
// ShapeUtil.StringSplitter split = cmd.SplitCommand(commandstring, out command);
|
||||
// if (command == 'm' || command == 'M')
|
||||
// {
|
||||
// elements.Add(new MoveTo(command, split));
|
||||
// if (split.More)
|
||||
// elements.Add(new LineTo(command, split));
|
||||
// continue;
|
||||
// }
|
||||
// if (command == 'l' || command == 'L' || command == 'H' || command == 'h' || command == 'V' || command == 'v')
|
||||
// {
|
||||
// elements.Add(new LineTo(command, split));
|
||||
// continue;
|
||||
// }
|
||||
// if (command == 'c' || command == 'C')
|
||||
// {
|
||||
// while (split.More)
|
||||
// elements.Add(new CurveTo(command, split));
|
||||
// continue;
|
||||
// }
|
||||
// if (command == 's' || command == 'S')
|
||||
// {
|
||||
// while (split.More)
|
||||
// {
|
||||
// CurveTo lastshape = elements[elements.Count - 1] as CurveTo;
|
||||
// System.Diagnostics.Debug.Assert(lastshape != null);
|
||||
// elements.Add(new CurveTo(command, split, lastshape.CtrlPoint2));
|
||||
// }
|
||||
// continue;
|
||||
// }
|
||||
// if (command == 'a' || command == 'A')
|
||||
// {
|
||||
// elements.Add(new EllipticalArcTo(command, split));
|
||||
// while (split.More)
|
||||
// elements.Add(new EllipticalArcTo(command, split));
|
||||
// continue;
|
||||
// }
|
||||
// if (command == 'z' || command == 'Z')
|
||||
// {
|
||||
// ClosePath = true;
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// // extended format moveto or lineto can contain multiple points which should be translated into lineto
|
||||
// PathElement lastitem = elements[elements.Count-1];
|
||||
// if (lastitem is MoveTo || lastitem is LineTo || lastitem is CurveTo)
|
||||
// {
|
||||
// //Point p = Point.Parse(s);
|
||||
// //elements.Add(new LineTo(p));
|
||||
// continue;
|
||||
// }
|
||||
|
||||
|
||||
// System.Diagnostics.Debug.Assert(false, string.Format("type '{0}' not supported", commandstring));
|
||||
//}
|
||||
}
|
||||
// System.Diagnostics.Debug.Assert(false, string.Format("type '{0}' not supported", commandstring));
|
||||
//}
|
||||
}
|
||||
|
||||
public override PathGeometry CreateGeometry()
|
||||
{
|
||||
return Data;
|
||||
return Data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -206,7 +206,10 @@ namespace CPF.Svg
|
||||
var fill = Fill;
|
||||
foreach (var item in m_elements)
|
||||
{
|
||||
item.GetFill().FillBrush = fill;
|
||||
if (item.GetFill().Color == null)
|
||||
{
|
||||
item.GetFill().FillBrush = fill;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -245,7 +248,10 @@ namespace CPF.Svg
|
||||
var fill = newValue as ViewFill;
|
||||
foreach (var item in m_elements)
|
||||
{
|
||||
item.GetFill().FillBrush = fill;
|
||||
if (item.GetFill().Color == null)
|
||||
{
|
||||
item.GetFill().FillBrush = fill;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -505,9 +511,22 @@ namespace CPF.Svg
|
||||
}
|
||||
if (item.Fill != null && item.Fill.FillBrush != null)
|
||||
{
|
||||
using (var brush = item.Fill.FillBrush.CreateBrush(item.Geometry.GetBounds(), Root.RenderScaling))
|
||||
if (item.Fill.Color is GradientColor svgFill)
|
||||
{
|
||||
dc.FillPath(brush, item.Geometry);
|
||||
using (var brush = item.Fill.FillBrush.CreateBrush(svgFill.GradientUnits == SVGTags.sGradientUserSpace ? new Rect(0, 0, naturalSize.Width, naturalSize.Height) : item.Geometry.GetBounds(), Root.RenderScaling))
|
||||
{
|
||||
dc.FillPath(brush, item.Geometry);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//if (item.Fill.Color != null)
|
||||
{
|
||||
using (var brush = item.Fill.FillBrush.CreateBrush(item.Geometry.GetBounds(), Root.RenderScaling))
|
||||
{
|
||||
dc.FillPath(brush, item.Geometry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,8 +63,8 @@ namespace CPF.Svg
|
||||
public float Opacity { get; set; } = 1;
|
||||
|
||||
public virtual Transform Transform { get; private set; }
|
||||
public SvgShape Parent { get; set; }
|
||||
public SvgShape(XmlNode node) : this(node, null) { }
|
||||
public SvgShape Parent { get; private set; }
|
||||
//public SvgShape(XmlNode node) : this(node, null) { }
|
||||
public SvgShape(XmlNode node, SvgShape parent) : base(node)
|
||||
{
|
||||
Parent = parent;
|
||||
@ -83,6 +83,18 @@ namespace CPF.Svg
|
||||
m_stroke.Opacity *= Opacity;
|
||||
}
|
||||
}
|
||||
if (parent != null && parent.Opacity != 1)
|
||||
{
|
||||
if (m_fill != null)
|
||||
{
|
||||
m_fill.Opacity *= parent.Opacity;
|
||||
m_fill.FillBrush = null;
|
||||
}
|
||||
if (m_stroke != null)
|
||||
{
|
||||
m_stroke.Opacity *= parent.Opacity;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public SvgShape(List<ShapeUtil.Attribute> attrs, SvgShape parent) : base(null)
|
||||
@ -308,7 +320,7 @@ namespace CPF.Svg
|
||||
public float Height { get; set; }
|
||||
public float RX { get; set; }
|
||||
public float RY { get; set; }
|
||||
public RectangleShape(XmlNode node) : base(node)
|
||||
public RectangleShape(XmlNode node, SvgShape parent) : base(node, parent)
|
||||
{
|
||||
X = (float)XmlUtil.AttrValue(node, "x", 0);
|
||||
Y = (float)XmlUtil.AttrValue(node, "y", 0);
|
||||
@ -399,7 +411,7 @@ namespace CPF.Svg
|
||||
public float CX { get; set; }
|
||||
public float CY { get; set; }
|
||||
public float R { get; set; }
|
||||
public CircleShape(XmlNode node) : base(node)
|
||||
public CircleShape(XmlNode node, SvgShape parent) : base(node, parent)
|
||||
{
|
||||
CX = (float)XmlUtil.AttrValue(node, "cx", 0);
|
||||
CY = (float)XmlUtil.AttrValue(node, "cy", 0);
|
||||
@ -456,7 +468,7 @@ namespace CPF.Svg
|
||||
public float CY { get; set; }
|
||||
public float RX { get; set; }
|
||||
public float RY { get; set; }
|
||||
public EllipseShape(XmlNode node) : base(node)
|
||||
public EllipseShape(XmlNode node, SvgShape parent) : base(node, parent)
|
||||
{
|
||||
CX = (float)XmlUtil.AttrValue(node, "cx", 0);
|
||||
CY = (float)XmlUtil.AttrValue(node, "cy", 0);
|
||||
@ -510,7 +522,7 @@ namespace CPF.Svg
|
||||
{
|
||||
public Point P1 { get; private set; }
|
||||
public Point P2 { get; private set; }
|
||||
public LineShape(XmlNode node) : base(node)
|
||||
public LineShape(XmlNode node, SvgShape parent) : base(node, parent)
|
||||
{
|
||||
double x1 = XmlUtil.AttrValue(node, "x1", 0);
|
||||
double y1 = XmlUtil.AttrValue(node, "y1", 0);
|
||||
@ -532,7 +544,7 @@ namespace CPF.Svg
|
||||
class PolylineShape : SvgShape
|
||||
{
|
||||
public Point[] Points { get; private set; }
|
||||
public PolylineShape(XmlNode node) : base(node)
|
||||
public PolylineShape(XmlNode node, SvgShape parent) : base(node, parent)
|
||||
{
|
||||
string points = XmlUtil.AttrValue(node, SVGTags.sPoints, string.Empty);
|
||||
ShapeUtil.StringSplitter split = new ShapeUtil.StringSplitter(points);
|
||||
@ -562,7 +574,7 @@ namespace CPF.Svg
|
||||
class PolygonShape : SvgShape
|
||||
{
|
||||
public Point[] Points { get; private set; }
|
||||
public PolygonShape(XmlNode node) : base(node)
|
||||
public PolygonShape(XmlNode node, SvgShape parent) : base(node, parent)
|
||||
{
|
||||
string points = XmlUtil.AttrValue(node, SVGTags.sPoints, string.Empty);
|
||||
ShapeUtil.StringSplitter split = new ShapeUtil.StringSplitter(points);
|
||||
@ -595,7 +607,7 @@ namespace CPF.Svg
|
||||
public double X { get; set; }
|
||||
public double Y { get; set; }
|
||||
public string hRef { get; set; }
|
||||
public UseShape(XmlNode node) : base(node)
|
||||
public UseShape(XmlNode node, SvgShape parent) : base(node, parent)
|
||||
{
|
||||
X = XmlUtil.AttrValue(node, "x", 0);
|
||||
Y = XmlUtil.AttrValue(node, "y", 0);
|
||||
@ -646,21 +658,21 @@ namespace CPF.Svg
|
||||
get { return m_elements; }
|
||||
}
|
||||
|
||||
SvgShape AddChild(SvgShape shape)
|
||||
//SvgShape AddChild(SvgShape shape)
|
||||
//{
|
||||
// m_elements.Add(shape);
|
||||
// shape.Parent = this;
|
||||
// return shape;
|
||||
//}
|
||||
public Group(XmlNode node, SvgShape parent) : base(node, parent)
|
||||
{
|
||||
m_elements.Add(shape);
|
||||
shape.Parent = this;
|
||||
return shape;
|
||||
}
|
||||
public Group(XmlNode node, SvgShape parent) : base(node)
|
||||
{
|
||||
// parent on group must be set before children are added
|
||||
this.Parent = parent;
|
||||
//// parent on group must be set before children are added
|
||||
//this.Parent = parent;
|
||||
foreach (XmlNode childnode in node.ChildNodes)
|
||||
{
|
||||
SvgShape shape = AddToList(m_elements, childnode, this);
|
||||
if (shape != null)
|
||||
shape.Parent = this;
|
||||
//if (shape != null)
|
||||
// shape.Parent = this;
|
||||
}
|
||||
//if (Id.Length > 0)
|
||||
// svg.AddShape(Id, this);
|
||||
@ -671,37 +683,37 @@ namespace CPF.Svg
|
||||
return null;
|
||||
if (childnode.Name == SVGTags.sShapeRect)
|
||||
{
|
||||
list.Add(new RectangleShape(childnode));
|
||||
list.Add(new RectangleShape(childnode, parent));
|
||||
return list[list.Count - 1];
|
||||
}
|
||||
if (childnode.Name == SVGTags.sShapeCircle)
|
||||
{
|
||||
list.Add(new CircleShape(childnode));
|
||||
list.Add(new CircleShape(childnode, parent));
|
||||
return list[list.Count - 1];
|
||||
}
|
||||
if (childnode.Name == SVGTags.sShapeEllipse)
|
||||
{
|
||||
list.Add(new EllipseShape(childnode));
|
||||
list.Add(new EllipseShape(childnode, parent));
|
||||
return list[list.Count - 1];
|
||||
}
|
||||
if (childnode.Name == SVGTags.sShapeLine)
|
||||
{
|
||||
list.Add(new LineShape(childnode));
|
||||
list.Add(new LineShape(childnode, parent));
|
||||
return list[list.Count - 1];
|
||||
}
|
||||
if (childnode.Name == SVGTags.sShapePolyline)
|
||||
{
|
||||
list.Add(new PolylineShape(childnode));
|
||||
list.Add(new PolylineShape(childnode, parent));
|
||||
return list[list.Count - 1];
|
||||
}
|
||||
if (childnode.Name == SVGTags.sShapePolygon)
|
||||
{
|
||||
list.Add(new PolygonShape(childnode));
|
||||
list.Add(new PolygonShape(childnode, parent));
|
||||
return list[list.Count - 1];
|
||||
}
|
||||
if (childnode.Name == SVGTags.sShapePath)
|
||||
{
|
||||
list.Add(new PathShape(childnode));
|
||||
list.Add(new PathShape(childnode, parent));
|
||||
return list[list.Count - 1];
|
||||
}
|
||||
if (childnode.Name == SVGTags.sShapeGroup)
|
||||
@ -726,7 +738,7 @@ namespace CPF.Svg
|
||||
}
|
||||
if (childnode.Name == SVGTags.sShapeUse)
|
||||
{
|
||||
list.Add(new UseShape(childnode));
|
||||
list.Add(new UseShape(childnode, parent));
|
||||
return list[list.Count - 1];
|
||||
}
|
||||
//if (childnode.Name == SVGTags.sShapeImage)
|
||||
|
@ -25,11 +25,13 @@ namespace CPF.Svg
|
||||
get
|
||||
{
|
||||
|
||||
if (Color != null)
|
||||
return Color.GetBrush(Opacity);
|
||||
if (fillBrush != null)
|
||||
return fillBrush;
|
||||
return null;
|
||||
if (Color != null)
|
||||
{
|
||||
return Color.GetBrush(Opacity);
|
||||
}
|
||||
return fillBrush;
|
||||
}
|
||||
|
||||
set
|
||||
|
@ -75,6 +75,7 @@ namespace ComponentWrapperGenerator
|
||||
};
|
||||
|
||||
// props
|
||||
Dictionary<string, PropertyInfo> cps = new Dictionary<string, PropertyInfo>();
|
||||
var propertyDeclarationBuilder = new StringBuilder();
|
||||
if (propertiesToGenerate.Any())
|
||||
{
|
||||
@ -82,6 +83,10 @@ namespace ComponentWrapperGenerator
|
||||
}
|
||||
foreach (var prop in propertiesToGenerate)
|
||||
{
|
||||
if (prop.GetCustomAttribute(typeof(CPF.NotCpfProperty)) == null)
|
||||
{
|
||||
cps.Add(prop.Name + "Changed", prop);
|
||||
}
|
||||
propertyDeclarationBuilder.Append(GetPropertyDeclaration(prop, usings));
|
||||
}
|
||||
|
||||
@ -90,10 +95,19 @@ namespace ComponentWrapperGenerator
|
||||
{
|
||||
if (typeToGenerate == typeof(CPF.UIElement) || (typeToGenerate != typeof(CPF.UIElement) && prop.DeclaringType != typeof(CPF.UIElement) && prop.DeclaringType != typeof(CPF.Visual) && prop.DeclaringType != typeof(CPF.CpfObject)))
|
||||
{
|
||||
propertyDeclarationBuilder.Append(GetEventDeclaration(prop, usings));
|
||||
if (!cps.ContainsKey(prop.Name))
|
||||
{
|
||||
propertyDeclarationBuilder.Append(GetEventDeclaration(prop, usings));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in cps)
|
||||
{
|
||||
propertyDeclarationBuilder.Append(GetPropertyChangedDeclaration(item.Value, usings));
|
||||
}
|
||||
|
||||
|
||||
var propertyDeclarations = propertyDeclarationBuilder.ToString();
|
||||
|
||||
//var propertyAttributeBuilder = new StringBuilder();
|
||||
@ -176,7 +190,7 @@ namespace {Settings.RootNamespace}
|
||||
{
|
||||
var propertyType = prop.PropertyType;
|
||||
string propertyTypeName;
|
||||
if (propertyType == typeof(IList<string>) || propertyType == typeof(CPF.ViewFill) || propertyType == typeof(CPF.Drawing.Color) || propertyType == typeof(CPF.Drawing.Brush))
|
||||
if (propertyType == typeof(IList<string>) || propertyType == typeof(CPF.ViewFill) || propertyType == typeof(CPF.Drawing.Color) || propertyType == typeof(CPF.Drawing.Brush) || propertyType == typeof(CPF.Classes))
|
||||
{
|
||||
// Lists of strings are special-cased because they are handled specially by the handlers as a comma-separated list
|
||||
propertyTypeName = "string";
|
||||
@ -210,12 +224,12 @@ namespace {Settings.RootNamespace}
|
||||
}
|
||||
else
|
||||
{
|
||||
//propertyTypeName = GetTypeNameAndAddNamespace(propertyType, usings);
|
||||
//if (propertyType.IsValueType)
|
||||
//{
|
||||
// propertyTypeName += "?";
|
||||
//}
|
||||
propertyTypeName = $"EventCallback<{propertyType.GetGenericArguments()[0]}>";
|
||||
propertyTypeName = GetTypeNameAndAddNamespace(propertyType.GetGenericArguments()[0], usings);
|
||||
if (propertyType.GetGenericArguments()[0].IsValueType)
|
||||
{
|
||||
propertyTypeName += "?";
|
||||
}
|
||||
propertyTypeName = $"EventCallback<{propertyTypeName}>";
|
||||
}
|
||||
var des = "";
|
||||
var d = prop.GetCustomAttribute<System.ComponentModel.DescriptionAttribute>();
|
||||
@ -227,6 +241,25 @@ namespace {Settings.RootNamespace}
|
||||
";
|
||||
}
|
||||
|
||||
static string GetPropertyChangedDeclaration(PropertyInfo prop, IList<UsingStatement> usings)
|
||||
{
|
||||
var propertyType = prop.PropertyType;
|
||||
string propertyTypeName = GetTypeNameAndAddNamespace(propertyType, usings);
|
||||
//if (propertyType.IsValueType && (!propertyType.IsGenericType || propertyType.GetGenericTypeDefinition() == typeof(Nullable)))
|
||||
//{
|
||||
// propertyTypeName += "?";
|
||||
//}
|
||||
propertyTypeName = $"EventCallback<{propertyTypeName}>";
|
||||
var des = "";
|
||||
var d = prop.GetCustomAttribute<System.ComponentModel.DescriptionAttribute>();
|
||||
if (d != null)
|
||||
{
|
||||
des = $" /// <summary>\r\n /// {d.Description}\r\n /// <summary>\r\n";
|
||||
}
|
||||
return $@"{des} [Parameter] public {propertyTypeName} {GetIdentifierName(prop.Name + "Changed")} {{ get; set; }}
|
||||
";
|
||||
}
|
||||
|
||||
private static string GetTypeNameAndAddNamespace(Type type, IList<UsingStatement> usings)
|
||||
{
|
||||
var typeName = GetCSharpType(type);
|
||||
@ -613,7 +646,7 @@ namespace {Settings.RootNamespace}
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return propInfo.GetGetMethod() != null && propInfo.GetSetMethod() != null && propInfo.GetCustomAttribute(typeof(CPF.NotCpfProperty)) == null;
|
||||
return propInfo.GetGetMethod() != null && propInfo.GetSetMethod() != null && (propInfo.GetCustomAttribute(typeof(CPF.NotCpfProperty)) == null || propInfo.PropertyType == typeof(CPF.Classes));
|
||||
}
|
||||
|
||||
private static bool IsPropertyBrowsable(PropertyInfo propInfo)
|
||||
|
@ -18,6 +18,7 @@ namespace CpfRazorSample
|
||||
//, (OperatingSystemType.OSX, new CPF.Mac.MacPlatform(), new SkiaDrawingFactory())//如果需要支持Mac才需要
|
||||
//, (OperatingSystemType.Linux, new CPF.Linux.LinuxPlatform(), new SkiaDrawingFactory())//如果需要支持Linux才需要
|
||||
);
|
||||
//Create();
|
||||
|
||||
var host = Host.CreateDefaultBuilder()
|
||||
.ConfigureServices((hostContext, services) =>
|
||||
@ -28,10 +29,10 @@ namespace CpfRazorSample
|
||||
.Build();
|
||||
|
||||
var window = new CPF.Controls.Window { Width = 500, Height = 500, Background = null };
|
||||
window.LoadStyleFile("res://CpfRazorSample/Stylesheet1.css");
|
||||
host.AddComponent<Test>(window);
|
||||
Application.Run(window);
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void Create()
|
||||
|
@ -1,24 +1,49 @@
|
||||
<WindowFrame MaximizeBox="true" Width='"100%"' Height="@("100%")">
|
||||
<StackPanel Background="#f00" Width='"100%"' Height="@("100%")">
|
||||
<Button Width="80" Height="30" MouseDown="OnMouseDown" Content="text">
|
||||
<StackPanel Width='"100%"' Height="@("100%")">
|
||||
<Button Width="80" Height="30" MouseDown="OnMouseDown" Content="test">
|
||||
</Button>
|
||||
<CheckBox Content="12"></CheckBox>
|
||||
@if (visible)
|
||||
{
|
||||
<Panel Background="#0f0" Width="20" Height="30" MarginLeft="10"></Panel>
|
||||
}
|
||||
<Button>1234dsggs</Button>
|
||||
<TextBox Text="@text"></TextBox>
|
||||
<Button><CheckBox></CheckBox></Button>
|
||||
<TextBox @ref="textBox" @bind-Text="text" Width="100" Height="30"></TextBox>
|
||||
<Button @ref="button"><CheckBox>@enable</CheckBox></Button>
|
||||
<ListBox @ref="listBox" Width="200" Height="200" Items="list"></ListBox>
|
||||
</StackPanel>
|
||||
</WindowFrame>
|
||||
@code
|
||||
{
|
||||
string key = "textBox";
|
||||
TextBox textBox;
|
||||
CPF.Controls.Button button;
|
||||
bool visible = false;
|
||||
string text = "test";
|
||||
List<string> list = new List<string>()
|
||||
{
|
||||
"1","2","3"
|
||||
};
|
||||
ListBox listBox;
|
||||
object test = "test";
|
||||
bool enable;
|
||||
void OnMouseDown(CPF.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
//enable = visible;
|
||||
button.IsEnabled = visible;
|
||||
|
||||
text = "test" + visible;
|
||||
visible = !visible;
|
||||
list.Add(list.Count.ToString());
|
||||
test = list.Count;
|
||||
}
|
||||
|
||||
void TextChanged()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user