A newer version of this page is available. Switch to the current version.

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.v18.2.dll

Declaration

public AttributeCollection Attributes { get; }
Public ReadOnly Property Attributes As AttributeCollection

Property Value

Type
AttributeCollection

Property Paths

You can access this nested property as listed below:

Object Type Path to Attributes
MVCxFormLayoutItem
PivotGridSettings
ReportToolbarExtension
.Settings.Attributes
ReportViewerExtension
.Settings.Attributes
SchedulerSettings
SchedulerStorageControlSettings

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