Skip to content

uwidgets.core.models.attributes.widgetinfoattribute

GitHub Action edited this page Aug 11, 2024 · 1 revision

WidgetInfoAttribute

Namespace: uWidgets.Core.Models.Attributes

Attribute to register a widget inside an assembly.

public class WidgetInfoAttribute : System.Attribute

Inheritance ObjectAttributeWidgetInfoAttribute
Attributes NullableContextAttribute, NullableAttribute, AttributeUsageAttribute

Properties

ViewType

Type of UserControl to render.

public Type ViewType { get; }

Property Value

Type

ModelType

Type of Model, that will be stored in layout.json and provided via DI.

public Type ModelType { get; }

Property Value

Type

EditModelViewType

Type of UserControl for editing the model.

Will be rendered in a separate window on Right-click, "Edit Widget"

public Type EditModelViewType { get; }

Property Value

Type

Title

Resource key of your widget's name.

public string Title { get; }

Property Value

String

Subtitle

Resource key of your widget's description.

public string Subtitle { get; }

Property Value

String

TypeId

public object TypeId { get; }

Property Value

Object

Constructors

WidgetInfoAttribute(Type, Type, Type, String, String)

Attribute to register a widget inside an assembly.

public WidgetInfoAttribute(Type viewType, Type modelType, Type editModelViewType, string title, string subtitle)

Parameters

viewType Type
Type of UserControl to render.

modelType Type
Type of Model, that will be stored in layout.json and provided via DI.

editModelViewType Type
Type of UserControl for editing the model.

title String
Resource key of your widget's name

subtitle String
Resource key of your widget's description

Clone this wiki locally