Class ViewDescriptorAttribute
The attribute against any IModelView interface that defines a view that can be created in a client application within a layout. This attribute can be used multiple times to describe multiple different view descriptor instances that are valid for a view.
This attribute provides the equivelant of the ViewDescriptorInstance used to describe the IModelView this attribute is against
Alternatively it provides a type that inherits ViewDescriptorEnumerator that itself returns a list of all the possible ViewDescriptorInstance that can be used against this view.This is typically used to provide a seperate ViewDescriptor for each entity it can work against, or if the IModelView has a generic argument it may enumerate all the possible types in the parameters, etc.
These instances are used by the layout designer to display to the user valid views that can be added against a layoutInherited Members
Namespace: LemonEdge.Client.UI.API.Views
Assembly: LemonEdge.Client.UI.API.dll
Syntax
[AttributeUsage(AttributeTargets.Interface, AllowMultiple = true)]
public class ViewDescriptorAttribute : Attribute
Constructors
ViewDescriptorAttribute(string, Type, ImageType, Type)
Creates a new View Descriptor Attribute with the specified properties
Declaration
public ViewDescriptorAttribute(string viewName, Type displayItemType, ImageType iconID, Type selectableType = null)
Parameters
Type | Name | Description |
---|---|---|
string | viewName | The user friendly name for this view |
Type | displayItemType | The type of item this view is valid to take as an input to be displayed |
ImageType | iconID | The default icon to use when displaying this view in the client application ui |
Type | selectableType | An optional type this view provides that can be selected and used by sub views |
ViewDescriptorAttribute(string, Type, string, Type)
Creates a new View Descriptor Attribute with the specified properties
Declaration
public ViewDescriptorAttribute(string viewName, Type displayItemType, string iconID, Type selectableType = null)
Parameters
Type | Name | Description |
---|---|---|
string | viewName | The user friendly name for this view |
Type | displayItemType | The type of item this view is valid to take as an input to be displayed |
string | iconID | The default icon to use when displaying this view in the client application ui |
Type | selectableType | An optional type this view provides that can be selected and used by sub views |
ViewDescriptorAttribute(Type)
Creates a new View Descriptor Attribute with the specified type of class that inherits ViewDescriptorEnumerator
Declaration
public ViewDescriptorAttribute(Type viewDescriptorEnumeratorType)
Parameters
Type | Name | Description |
---|---|---|
Type | viewDescriptorEnumeratorType | The type that inherits ViewDescriptorEnumerator that can provide a list of all possible view descriptor instances for this view |
Properties
DisplayItemType
The type of item this view is valid to take as an input to be displayed
Declaration
public Type DisplayItemType { get; }
Property Value
Type | Description |
---|---|
Type |
IconID
The default icon to use when displaying this view in the client application ui
Declaration
public Guid IconID { get; }
Property Value
Type | Description |
---|---|
Guid |
SelectableType
An optional type this view provides that can be selected and used by sub views
Declaration
public Type SelectableType { get; }
Property Value
Type | Description |
---|---|
Type |
ViewDescriptorEnumerator
The type of a class that inherits ViewDescriptorEnumerator that can enumerate all the possible view descriptor instances that can be used for this view
Declaration
public Type? ViewDescriptorEnumerator { get; }
Property Value
Type | Description |
---|---|
Type |
ViewName
The user friendly name for this view
Declaration
public string ViewName { get; }
Property Value
Type | Description |
---|---|
string |