MenuStyles.Link Property
Gets an object that contains style settings to be applied to links in a menu.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
#Property Value
Type | Description |
---|---|
Link |
A Link |
#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.
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()