-
Notifications
You must be signed in to change notification settings - Fork 10
uwidgets.core.models.attributes.widgetinfoattribute
Namespace: uWidgets.Core.Models.Attributes
Attribute to register a widget inside an assembly.
public class WidgetInfoAttribute : System.Attribute
Inheritance Object → Attribute → WidgetInfoAttribute
Attributes NullableContextAttribute, NullableAttribute, AttributeUsageAttribute
Type of UserControl to render.
public Type ViewType { get; }
Type of Model, that will be stored in layout.json
and provided via DI.
public Type ModelType { get; }
Type of UserControl for editing the model.
Will be rendered in a separate window on Right-click, "Edit Widget"
public Type EditModelViewType { get; }
Resource key of your widget's name.
public string Title { get; }
Resource key of your widget's description.
public string Subtitle { get; }
public object TypeId { get; }
Attribute to register a widget inside an assembly.
public WidgetInfoAttribute(Type viewType, Type modelType, Type editModelViewType, string title, string subtitle)
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