Class GadgetAttribute
Declares a dashboard gadget. Adding this attribute to an ASP.NET MVC Controller marks it as available for adding on the dashboard.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Shell.Gadgets
Assembly: EPiServer.Shell.dll
Version: 8.11.0Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class GadgetAttribute : Attribute, _Attribute
Constructors
GadgetAttribute()
A dashboard gadget with default values.
Declaration
public GadgetAttribute()
Properties
Category
Gets or sets the category associated with this gadget. Used for determining where in the UI the gadget can be added.
Declaration
public string Category { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientScriptInitMethod
A javascript function called when this gadget is initialized on the dashboard. The function is called with the gadget instance object as parameter.
Declaration
public string ClientScriptInitMethod { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Examples
epi.gadgets.myTasks
DefaultAction
The ASP.NET MVC Controller action that provides the default view of gadget. Default is "Index".
Declaration
public string DefaultAction { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Description
The description of the gadget type. This appears in the add gadget list
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DescriptionResourceKey
The name of the resource key that provides the description.
Declaration
public string DescriptionResourceKey { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
This can either be a resource key to a resource provided by Current or the name of the static resource wrapper property if ResourceType is set.
IconUrl
The name of the static resource wrapper property that provides the URL for the icon image.
Declaration
public string IconUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Name
The name of the gadget type. Used as an identifier, must be unique among gadgets.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
NameResourceKey
The name of the resource key that provides the title.
Declaration
public string NameResourceKey { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
This can either be a resource key to a resource provided by Current or the name of the static resource wrapper property if ResourceType is set.
ResourceType
The static resource wrapper class a static property.
Declaration
public Type ResourceType { get; set; }
Property Value
Type | Description |
---|---|
System.Type |
Remarks
If not set the Current will be used to find a match for NameResourceKey and DescriptionResourceKey.
Title
The title of the gadget type. This appears in the add gadget list, and in the title bar of the gadget on the dashboard.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String |