Class ViewAttribute
Extension attribute for integrating new views into Studio applications.
Inherited Members
Namespace: SdlSdl.DesktopIntegrationApiExtensions
Assembly: Sdl.Desktop.IntegrationApi.Extensions.dll
Syntax
[ExtensionPointInfo("Views", ExtensionPointBehavior.Static)]
[AttributeUsage(AttributeTargets.Class)]
public sealed class ViewAttribute : ExtensionAttribute, _Attribute, 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(string, string, string, Type, string, Keys, bool)
Initialize the view attribute
Declaration
public ViewAttribute(string id, string name, string description, Type locationByType, string helpTopic, Keys shorcut = Keys.None, bool allowViewParts = false)
Parameters
Type | Name | Description |
---|---|---|
string | id | The unique id for this view. |
string | name | The name for this view. Should typically be a key of a resource string in PluginResources.resx. |
string | description | The description for this view. Should typically be a key of a resource string in PluginResources.resx. |
Type | locationByType | The location where the view is loaded. |
string | helpTopic | The help topic identifier of the view. |
Keys | shorcut | The shortcut key for accessing the view. |
bool | 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 |
---|---|
bool |
HelpTopic
Gets or sets the help topic ID for this view. Can be null.
Declaration
public string HelpTopic { get; set; }
Property Value
Type | Description |
---|---|
string |
IsSeparator
Is separator determines if a separator should be added before the action
Declaration
public bool IsSeparator { get; set; }
Property Value
Type | Description |
---|---|
bool |
LocationByType
Gets or sets the location of the view
Declaration
public Type LocationByType { get; set; }
Property Value
Type | Description |
---|---|
Type |
Shortcut
Gets or sets the shortcut for accessing this view.
Declaration
public Keys Shortcut { get; set; }
Property Value
Type | Description |
---|---|
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 |
---|---|
uint |
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.