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
ChildContent
[Parameter]
[Category("Behavior")]
public RenderFragment? ChildContent { get; set; }
Property Value
Disabled
[Parameter]
[Category("Behavior")]
public bool Disabled { get; set; }
Property Value
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
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
Icon
Icon to be used for this menu entry
[Parameter]
[Category("Behavior")]
public string? Icon { get; set; }
Property Value
IconColor
The color of the icon. It supports the theme colors.
[Parameter]
[Category("Appearance")]
public Color IconColor { get; set; }
Property Value
IconSize
The Icon Size.
[Parameter]
[Category("Appearance")]
public Size IconSize { get; set; }
Property Value
JsApiService
[Inject]
protected IJsApiService JsApiService { get; set; }
Property Value
MudMenu
[CascadingParameter]
public MudMenu? MudMenu { get; set; }
Property Value
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
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
UriHelper
[Inject]
protected NavigationManager UriHelper { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
OnClickHandlerAsync(MouseEventArgs)
protected Task OnClickHandlerAsync(MouseEventArgs ev)