2024-01-09 16:57:27 +08:00
|
|
|
|
//CPF自动生成.
|
2024-01-08 20:55:43 +08:00
|
|
|
|
|
|
|
|
|
using CPF;
|
|
|
|
|
using CPF.Controls;
|
|
|
|
|
using CPF.Drawing;
|
|
|
|
|
using CPF.Input;
|
|
|
|
|
using CPF.Razor;
|
|
|
|
|
using CPF.Shapes;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
|
|
|
|
|
namespace CPF.Razor.Controls
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 定义一个内容修饰器,以便拉伸或缩放单一子项使其填满可用的控件。
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class Viewbox : Element<CPF.Controls.Viewbox>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 背景填充
|
|
|
|
|
/// <summary>
|
|
|
|
|
[Parameter] public string Background { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 边框线条填充
|
|
|
|
|
/// <summary>
|
|
|
|
|
[Parameter] public string BorderFill { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取或设置线条类型
|
|
|
|
|
/// <summary>
|
|
|
|
|
[Parameter] public Stroke? BorderStroke { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 四周边框粗细
|
|
|
|
|
/// <summary>
|
|
|
|
|
[Parameter] public Thickness? BorderThickness { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 边框类型,BorderStroke和BorderThickness
|
|
|
|
|
/// <summary>
|
|
|
|
|
[Parameter] public BorderType? BorderType { get; set; }
|
|
|
|
|
[Parameter] public UIElement Child { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取或设置一个值,该值表示将 Border 的角倒圆的程度。格式 一个数字或者四个数字 比如10或者 10,10,10,10 topLeft,topRight,bottomRight,bottomLeft
|
|
|
|
|
/// <summary>
|
|
|
|
|
[Parameter] public CornerRadius? CornerRadius { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 字体名
|
|
|
|
|
/// <summary>
|
|
|
|
|
[Parameter] public string FontFamily { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 字体尺寸,点
|
|
|
|
|
/// <summary>
|
|
|
|
|
[Parameter] public float? FontSize { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 字体样式
|
|
|
|
|
/// <summary>
|
|
|
|
|
[Parameter] public FontStyles? FontStyle { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 控件文字的填充
|
|
|
|
|
/// <summary>
|
|
|
|
|
[Parameter] public string Foreground { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取或设置描述 Thickness 及其子元素之间的空间量的 Border 值。格式:all或者left,top,right,bottom
|
|
|
|
|
/// <summary>
|
|
|
|
|
[Parameter] public Thickness? Padding { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取或设置 ViewboxStretch 模式,该模式确定内容适应可用空间的方式。
|
|
|
|
|
/// <summary>
|
|
|
|
|
[Parameter] public Stretch? Stretch { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取或设置 StretchDirection,它确定缩放如何应用 Viewbox 的内容。
|
|
|
|
|
/// <summary>
|
|
|
|
|
[Parameter] public StretchDirection? StretchDirection { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 表示一个文本修饰,它是可添加到文本的视觉装饰(如下划线)。字符串格式: overline/Underline/Strikethrough/none [width[,Solid/Dash/Dot/DashDot/DashDotDot]] [color]
|
|
|
|
|
/// <summary>
|
|
|
|
|
[Parameter] public TextDecoration? TextDecoration { get; set; }
|
|
|
|
|
[Parameter] public EventCallback Initialized { get; set; }
|
2024-01-09 16:57:27 +08:00
|
|
|
|
/// <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; }
|
2024-01-08 20:55:43 +08:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|