Search Results for

    Show / Hide Table of Contents
    View Source

    Class ConfigurationFieldAttribute

    Marks a ConfigurationEditor property as a configuration field, and a class as a configuration field type.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.PropertyEditors
    Assembly: Umbraco.Core.dll
    Syntax
    public class ConfigurationFieldAttribute : Attribute
    Remarks

    Properties marked with this attribute are discovered as fields.

    Constructors

    View Source

    ConfigurationFieldAttribute(String, String)

    Initializes a new instance of the ConfigurationField class.

    Declaration
    public ConfigurationFieldAttribute(string name, string view)
    Parameters
    Type Name Description
    System.String name

    The friendly name of the field.

    System.String view

    The view to use to render the field editor.

    Remarks

    When no key is specified, the ConfigurationEditor will derive a key from the name of the property marked with this attribute.

    View Source

    ConfigurationFieldAttribute(String, String, String)

    Initializes a new instance of the ConfigurationField class.

    Declaration
    public ConfigurationFieldAttribute(string key, string name, string view)
    Parameters
    Type Name Description
    System.String key

    The unique identifier of the field.

    System.String name

    The friendly name of the field.

    System.String view

    The view to use to render the field editor.

    View Source

    ConfigurationFieldAttribute(Type)

    Initializes a new instance of the ConfigurationField class.

    Declaration
    public ConfigurationFieldAttribute(Type type)
    Parameters
    Type Name Description
    Type type

    Properties

    View Source

    Description

    Gets or sets the description of the field.

    Declaration
    public string Description { get; set; }
    Property Value
    Type Description
    System.String
    View Source

    HideLabel

    Gets or sets a value indicating whether the field editor should be displayed without its label.

    Declaration
    public bool HideLabel { get; set; }
    Property Value
    Type Description
    System.Boolean
    View Source

    HideLabelSettable

    Gets the settable underlying HideLabel.

    Declaration
    public Settable<bool> HideLabelSettable { get; }
    Property Value
    Type Description
    Settable<System.Boolean>
    View Source

    Key

    Gets the key of the field.

    Declaration
    public string Key { get; }
    Property Value
    Type Description
    System.String
    Remarks

    When null or empty, the ConfigurationEditor should derive a key from the name of the property marked with this attribute.

    View Source

    Name

    Gets the friendly name of the field.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    System.String
    View Source

    SortOrder

    Gets or sets the sort order to use to render the field editor.

    Declaration
    public int SortOrder { get; set; }
    Property Value
    Type Description
    System.Int32
    View Source

    Type

    Gets or sets the type of the field.

    Declaration
    public Type? Type { get; set; }
    Property Value
    Type Description
    System.Nullable<Type>
    Remarks

    By default, fields are created as ConfigurationField instances, unless specified otherwise through this property.

    The specified type must inherit from ConfigurationField.

    View Source

    View

    Gets the view to use to render the field editor.

    Declaration
    public string View { get; }
    Property Value
    Type Description
    System.String
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • ConfigurationFieldAttribute(String, String)
      • ConfigurationFieldAttribute(String, String, String)
      • ConfigurationFieldAttribute(Type)
    • Properties
      • Description
      • HideLabel
      • HideLabelSettable
      • Key
      • Name
      • SortOrder
      • Type
      • View
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX