Class SfMenu<TValue>
Menu is a graphical user interface that serve as navigation headers for your application.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.Navigations
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfMenu<TValue> : SfMenuBase<TValue>, IMenu
Type Parameters
Name |
---|
TValue |
Constructors
SfMenu()
Declaration
public SfMenu()
Properties
HamburgerMode
Gets or sets a value that indicates whether to enable or disable the hamburger mode.
Declaration
public bool HamburgerMode { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Orientation
Gets or sets a value that indicates the orientation of menu whether it can be horizontal or vertical.
Declaration
public Orientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
Orientation | One of the Orientation enumeration. The default value is |
Remarks
If the Orientation
is Horizontal
, the menu items will be aligned horizontally.
If the Orientation
is Vertical
, the menu items will be aligned vertically.
Target
Gets or sets a value that indicates the target element to open/close Menu while click in Hamburger mode.
Declaration
public string Target { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
Title
Gets or sets a value that indicates the title text for hamburger mode in Menu.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
CloseAsync()
Closes the Menu if it is opened in hamburger mode.
Declaration
public Task CloseAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |
GetItemIndex(TValue, Boolean)
Gets the index of the menu item from the menu based on the given argument.
Declaration
public List<int> GetItemIndex(TValue item, bool isUniqueId = false)
Parameters
Type | Name | Description |
---|---|---|
TValue | item | Item to be passed to get the index. |
System.Boolean | isUniqueId | Set |
Returns
Type |
---|
System.Collections.Generic.List<System.Int32> |
OnAfterRenderAsync(Boolean)
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender |
Returns
Type |
---|
System.Threading.Tasks.Task |
Overrides
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |
Overrides
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |
Overrides
OpenAsync()
Opens the menu in the hamburger mode.
Declaration
public Task OpenAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |