November Happy Hour will be moved to Thursday December 5th.

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
System.Object
System.Attribute
GadgetAttribute
Implements
System.Runtime.InteropServices._Attribute
Inherited Members
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Module)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Module, System.Type)
System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.Equals(System.Object)
System.Attribute.GetHashCode()
System.Attribute.Match(System.Object)
System.Attribute.IsDefaultAttribute()
System.Attribute.System.Runtime.InteropServices._Attribute.GetTypeInfoCount(System.UInt32)
System.Attribute.System.Runtime.InteropServices._Attribute.GetTypeInfo(System.UInt32, System.UInt32, System.IntPtr)
System.Attribute.System.Runtime.InteropServices._Attribute.GetIDsOfNames(System.Guid, System.IntPtr, System.UInt32, System.UInt32, System.IntPtr)
System.Attribute.System.Runtime.InteropServices._Attribute.Invoke(System.UInt32, System.Guid, System.UInt32, System.Int16, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr)
System.Attribute.TypeId
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Shell.Gadgets
Assembly: EPiServer.Shell.dll
Version: 9.12.2
Syntax
[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

Implements

System.Runtime.InteropServices._Attribute

Extension Methods