Skip to main content
Tab

MenuStyles.Link Property

Gets an object that contains style settings to be applied to links in a menu.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

Property Value

Type Description
LinkStyle

A LinkStyle object that contains style settings.

Remarks

The Link property provides access to the style settings that define the appearance of all links within a menu. Using the settings available via the Link property, you can specify the style for the normal, hovered and visited states of links.

To specify different styles for root and submenu items, use the MenuStyles.Item and MenuStyles.SubMenuItem properties respectively.

Note

This property is not in effect when used within the Menu extension for the ASP.NET MVC. As a workaround, you can define the appearance of links using CSS code.

The code sample below illustrates how to underline links when they are hovered.

<style type="text/css">
        #myMenu a:hover
        {
            text-decoration: underline;
        }
</style>

@Html.DevExpress().Menu(settings =>
{
    settings.Name = "myMenu";
    ...
}).GetHtml()
See Also