Table of Contents

Class MudMenuItem

Namespace
MudBlazor
Assembly
MudBlazor.dll
public class MudMenuItem : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged
Inheritance
MudMenuItem
Implements
Inherited Members
Extension Methods

Constructors

MudMenuItem()

public MudMenuItem()

Properties

AutoClose

If set to false, clicking the menu item will keep the menu open

[Parameter]
[Category("Click action")]
public bool AutoClose { get; set; }

Property Value

bool

ChildContent

[Parameter]
[Category("Behavior")]
public RenderFragment? ChildContent { get; set; }

Property Value

RenderFragment

Disabled

[Parameter]
[Category("Behavior")]
public bool Disabled { get; set; }

Property Value

bool

ForceLoad

If true in combination with Href, bypasses client-side routing and forces the browser to load the new page from the server, whether the URI would normally be handled by the client-side router. NavigateTo(string, bool, bool)

[Parameter]
[Category("Click action")]
public bool ForceLoad { get; set; }

Property Value

bool

Href

If set to a URL, clicking the button will open the referenced document. Use Target to specify where

[Parameter]
[Category("Click action")]
public string? Href { get; set; }

Property Value

string

Icon

Icon to be used for this menu entry

[Parameter]
[Category("Behavior")]
public string? Icon { get; set; }

Property Value

string

IconColor

The color of the icon. It supports the theme colors.

[Parameter]
[Category("Appearance")]
public Color IconColor { get; set; }

Property Value

Color

IconSize

The Icon Size.

[Parameter]
[Category("Appearance")]
public Size IconSize { get; set; }

Property Value

Size

JsApiService

[Inject]
protected IJsApiService JsApiService { get; set; }

Property Value

IJsApiService

MudMenu

[CascadingParameter]
public MudMenu? MudMenu { get; set; }

Property Value

MudMenu

OnClick

Raised when the menu item is activated by either the mouse or touch. Won't be raised if Href is also set.

[Parameter]
public EventCallback<MouseEventArgs> OnClick { get; set; }

Property Value

EventCallback<MouseEventArgs>

Target

The target attribute specifies where to open the link, if Href is specified. Possible values: _blank | _self | _parent | _top | framename

[Parameter]
[Category("Click action")]
public string? Target { get; set; }

Property Value

string

UriHelper

[Inject]
protected NavigationManager UriHelper { get; set; }

Property Value

NavigationManager

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

OnClickHandlerAsync(MouseEventArgs)

protected Task OnClickHandlerAsync(MouseEventArgs ev)

Parameters

ev MouseEventArgs

Returns

Task