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 layoutInheritance
Inherited Members
Namespace: LemonEdge.Client.Core.Views.Core
Assembly: ClientCore.dll
Syntax
[AttributeUsage(AttributeTargets.Interface, AllowMultiple = true, Inherited = 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 |
---|---|---|
System.String | viewName | The user friendly name for this view |
System.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 |
System.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 |
---|---|---|
System.String | viewName | The user friendly name for this view |
System.Type | displayItemType | The type of item this view is valid to take as an input to be displayed |
System.String | iconID | The default icon to use when displaying this view in the client application ui |
System.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 |
---|---|---|
System.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 |
---|---|
System.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 |
---|---|
System.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 |
---|---|
System.Type |
ViewDecriptorEnumerator
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 ViewDecriptorEnumerator { get; }
Property Value
Type | Description |
---|---|
System.Type |
ViewName
The user friendly name for this view
Declaration
public string ViewName { get; }
Property Value
Type | Description |
---|---|
System.String |