Class ViewAttribute
Extension attribute for integrating new views into Studio applications.
Inheritance
Implements
Namespace: Sdl.Desktop.IntegrationApi.Extensions
Assembly: Sdl.Desktop.IntegrationApi.Extensions.dll
Syntax
[AttributeUsage(AttributeTargets.Class)]
public sealed class ViewAttribute : ExtensionAttribute, ILocationAware
Remarks
A view is represented as an item in the explorer bar and is responsible for the showing the UI.
A view needs to implement the AbstractViewController class.
Constructors
ViewAttribute()
Default constructor for XML serialization.
Declaration
public ViewAttribute()
ViewAttribute(String, String, String, Type, String, Keys, Boolean)
Initialize the view attribute
Declaration
public ViewAttribute(string id, string name, string description, Type locationByType, string helpTopic, Keys shorcut, bool allowViewParts = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The unique id for this view. |
System.String | name | The name for this view. Should typically be a key of a resource string in PluginResources.resx. |
System.String | description | The description for this view. Should typically be a key of a resource string in PluginResources.resx. |
System.Type | locationByType | The location where the view is loaded. |
System.String | helpTopic | The help topic identifier of the view. |
System.Windows.Forms.Keys | shorcut | The shortcut key for accessing the view. |
System.Boolean | allowViewParts | Enables or disables the view parts integration inside the view. |
Properties
AllowViewParts
Gets or sets if the view can contain viewparts
Declaration
public bool AllowViewParts { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
HelpTopic
Gets or sets the help topic ID for this view. Can be null.
Declaration
public string HelpTopic { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IsSeparator
Is separator determines if a separator should be added before the action
Declaration
public bool IsSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
LocationByType
Gets or sets the location of the view
Declaration
public Type LocationByType { get; set; }
Property Value
Type | Description |
---|---|
System.Type |
Shortcut
Gets or sets the shortcut for accessing this view.
Declaration
public Keys Shortcut { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.Keys |
ZIndex
Defines a 0 based index order for the UI elements where the highest value is the most important.
Declaration
public uint ZIndex { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Remarks
The z-Index ordering is performed only for the intergrated elements and have a lower priority than SDL ordering. It acts as importance from left to right or top to bottom.
The highest ZIndex value is in the left or top and the lowest value is in the right or bottom.