Table of Contents

ComponentSettings 类

命名空间
ClassIsland.Core.Models.Components
程序集
ClassIsland.Core.dll

代表一个在主界面上显示的组件项目。

public class ComponentSettings : ObservableRecipient, INotifyPropertyChanging, IMainWindowCustomizableNodeSettings, INotifyPropertyChanged
继承
ComponentSettings
实现
继承成员

属性

AssociatedComponentInfo

这个组件关联的组件注册信息。

[JsonIgnore]
public ComponentInfo AssociatedComponentInfo { get; }

属性值

ComponentInfo

BackgroundColor

自定义背景色

public Color BackgroundColor { get; set; }

属性值

Color

BackgroundOpacity

自定义背景不透明度

public double BackgroundOpacity { get; set; }

属性值

double

Children

这个组件包含的组件

[JsonIgnore]
public ObservableCollection<ComponentSettings>? Children { get; }

属性值

ObservableCollection<ComponentSettings>

备注

如果这个组件不是容器组件,或组件设置没有实现IComponentContainerSettings,那么此属性将为 null。

CustomCornerRadius

自定义圆角半径

public double CustomCornerRadius { get; set; }

属性值

double

FixedWidth

固定宽度

public double FixedWidth { get; set; }

属性值

double

备注

此属性仅在 IsFixedWidthEnabled 为 true 时生效。

ForegroundColor

自定义前景色

public Color ForegroundColor { get; set; }

属性值

Color

HideOnRule

是否在条件满足时自动隐藏

public bool HideOnRule { get; set; }

属性值

bool

HidingRules

隐藏规则

public Ruleset HidingRules { get; set; }

属性值

Ruleset

HorizontalAlignment

组件水平对齐方式

public HorizontalAlignment HorizontalAlignment { get; set; }

属性值

HorizontalAlignment

Id

要显示的组件Id,ClassIsland用这个来索引组件,与ComponentInfo的Guid一致。

public string Id { get; set; }

属性值

string

IsCustomBackgroundColorEnabled

是否启用自定义背景色

public bool IsCustomBackgroundColorEnabled { get; set; }

属性值

bool

IsCustomBackgroundOpacityEnabled

是否启用自定义背景不透明度

public bool IsCustomBackgroundOpacityEnabled { get; set; }

属性值

bool

IsCustomCornerRadiusEnabled

是否启用自定义圆角半径

public bool IsCustomCornerRadiusEnabled { get; set; }

属性值

bool

IsCustomForegroundColorEnabled

是否启用自定义前景色

public bool IsCustomForegroundColorEnabled { get; set; }

属性值

bool

IsCustomMarginEnabled

启用自定义间距

public bool IsCustomMarginEnabled { get; set; }

属性值

bool

IsFixedWidthEnabled

是否启用固定宽度

public bool IsFixedWidthEnabled { get; set; }

属性值

bool

IsMaxWidthEnabled

是否启用最大宽度

public bool IsMaxWidthEnabled { get; set; }

属性值

bool

IsMinWidthEnabled

是否启用最小宽度

public bool IsMinWidthEnabled { get; set; }

属性值

bool

IsResourceOverridingEnabled

是否启用资源覆盖

public bool IsResourceOverridingEnabled { get; set; }

属性值

bool

IsVisible

组件当前是否可见

[JsonIgnore]
public bool IsVisible { get; }

属性值

bool

LastWidthCache

组件上次的宽度缓存。

public double LastWidthCache { get; set; }

属性值

double

MainWindowBodyFontSize

正文字体大小

public double MainWindowBodyFontSize { get; set; }

属性值

double

MainWindowEmphasizedFontSize

强调字体大小

public double MainWindowEmphasizedFontSize { get; set; }

属性值

double

MainWindowLargeFontSize

大号字体大小

public double MainWindowLargeFontSize { get; set; }

属性值

double

MainWindowSecondaryFontSize

次级字体大小

public double MainWindowSecondaryFontSize { get; set; }

属性值

double

MarginBottom

下间距

public double MarginBottom { get; set; }

属性值

double

MarginLeft

左间距

public double MarginLeft { get; set; }

属性值

double

MarginRight

右间距

public double MarginRight { get; set; }

属性值

double

MarginTop

上间距

public double MarginTop { get; set; }

属性值

double

MaxWidth

最大宽度

public double MaxWidth { get; set; }

属性值

double

备注

此属性仅在 IsMaxWidthEnabled 为 true 时生效。

MinWidth

最小宽度

public double MinWidth { get; set; }

属性值

double

备注

此属性仅在 IsMinWidthEnabled 为 true 时生效。

NameCache

组件名缓存。如果这个组件没有加载,会临时用这个名称来代替组件。

public string NameCache { get; set; }

属性值

string

Opacity

元素不透明度

public double Opacity { get; set; }

属性值

double

RelativeLineNumber

相对行号

public int RelativeLineNumber { get; set; }

属性值

int

Settings

组件的自定义设置

public object? Settings { get; set; }

属性值

object