Class DataEditorAttribute
Marks a class that represents a data editor.
Inheritance
Namespace: Umbraco.Core.PropertyEditors
Assembly: Umbraco.Core.dll
Syntax
[AttributeUsage(AttributeTargets.Class)]
public sealed class DataEditorAttribute : Attribute, _Attribute
Constructors
View SourceDataEditorAttribute(String, String)
Initializes a new instance of the DataEditorAttribute class for a property editor.
Declaration
public DataEditorAttribute(string alias, string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | The unique identifier of the editor. |
System.String | name | The friendly name of the editor. |
DataEditorAttribute(String, String, String)
Initializes a new instance of the DataEditorAttribute class for a property editor.
Declaration
public DataEditorAttribute(string alias, string name, string view)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | The unique identifier of the editor. |
System.String | name | The friendly name of the editor. |
System.String | view | The view to use to render the editor. |
DataEditorAttribute(String, EditorType, String)
Initializes a new instance of the DataEditorAttribute class.
Declaration
public DataEditorAttribute(string alias, EditorType type, string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | The unique identifier of the editor. |
EditorType | type | The type of the editor. |
System.String | name | The friendly name of the editor. |
DataEditorAttribute(String, EditorType, String, String)
Initializes a new instance of the DataEditorAttribute class.
Declaration
public DataEditorAttribute(string alias, EditorType type, string name, string view)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | The unique identifier of the editor. |
EditorType | type | The type of the editor. |
System.String | name | The friendly name of the editor. |
System.String | view | The view to use to render the editor. |
Remarks
Set view
to NullView to explicitly set the view to null.
Otherwise, view
cannot be null nor empty.
Fields
View SourceNullView
Gets a special value indicating that the view should be null.
Declaration
public const string NullView = "EXPLICITELY-SET-VIEW-TO-NULL-2B5B0B73D3DD47B28DDB84E02C349DFB"
Field Value
Type | Description |
---|---|
System.String |
Properties
View SourceAlias
Gets the unique alias of the editor.
Declaration
public string Alias { get; }
Property Value
Type | Description |
---|---|
System.String |
Group
Gets or sets an optional group.
Declaration
public string Group { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
The group can be used for example to group the editors by category.
HideLabel
Gets or sets a value indicating whether the editor should be displayed without its label.
Declaration
public bool HideLabel { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Icon
Gets or sets an optional icon.
Declaration
public string Icon { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
The icon can be used for example when presenting datatypes based upon the editor.
IsDeprecated
Gets or sets a value indicating whether the value editor is deprecated.
Declaration
public bool IsDeprecated { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
A deprecated editor is still supported but not proposed in the UI.
Name
Gets the friendly name of the editor.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Type
Gets the type of the editor.
Declaration
public EditorType Type { get; }
Property Value
Type | Description |
---|---|
EditorType |
ValueType
Gets or sets the type of the edited value.
Declaration
public string ValueType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Must be a valid ValueTypes value.
View
Gets the view to use to render the editor.
Declaration
public string View { get; }
Property Value
Type | Description |
---|---|
System.String |