Skip to main content

SettingsBase.Attributes Property

Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public AttributeCollection Attributes { get; }

Property Value

Type
AttributeCollection

Property Paths

You can access this nested property as listed below:

Object Type Path to Attributes
MVCxFormLayoutItem

Remarks

Example

For ASPxHyperLink:

@Html.DevExpress().HyperLink(settings => {
    settings.Name = "skipToMainContentLink";
    settings.Properties.Text = "Skip to Main Content";
    settings.ControlStyle.Font.Size = FontUnit.Parse("350%");
    settings.Theme = "Metropolis";
    settings.NavigateUrl = "javascript:void(0);";
    settings.Attributes["onclick"] = "MyDemo.focusMainElement();";
    settings.Attributes["onfocus"] = "MyDemo.toggleSkipLinks();";
    settings.Attributes["onblur"] = "MyDemo.toggleSkipLinks();";
}).GetHtml()
See Also