From d06b6e651a088ccdf3dd6b916f0d451410c2caf8 Mon Sep 17 00:00:00 2001 From: Peace Date: Thu, 25 Jul 2024 16:08:54 +0900 Subject: [PATCH] menu --- .../Components/Layout/NavMenu.razor | 1 + .../Pages/Components/CompoMenu.razor | 110 ++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 BlazorFluentUI/Components/Pages/Components/CompoMenu.razor diff --git a/BlazorFluentUI/Components/Layout/NavMenu.razor b/BlazorFluentUI/Components/Layout/NavMenu.razor index 4491011..38ac807 100644 --- a/BlazorFluentUI/Components/Layout/NavMenu.razor +++ b/BlazorFluentUI/Components/Layout/NavMenu.razor @@ -65,6 +65,7 @@ Flipper Highlighter HorizontalScroll + Menu diff --git a/BlazorFluentUI/Components/Pages/Components/CompoMenu.razor b/BlazorFluentUI/Components/Pages/Components/CompoMenu.razor new file mode 100644 index 0000000..54383a4 --- /dev/null +++ b/BlazorFluentUI/Components/Pages/Components/CompoMenu.razor @@ -0,0 +1,110 @@ +@page "/compomenu" + +@rendermode RenderMode.InteractiveServer + +

Menu

+ +
+ The FluentMenu wraps a web component of a menu. +
+ + +

Default

+ +

Click this button to open a Menu.

+ + Open menu + + + + + Menu item 1 + + + Menu item 2 + + + Menu item 3 + + + + Menu item 4 + + +

Status: @estatus?.ToString()

+

Message: @emessage?.ToString()

+
+ +

Simple context menu

+ +
+ Right-click on this text
+ to open a Context Menu. +
+ + + + + + + + + + + + + + + + + +

Status: @sstatus?.ToString()

+

Message: @smessage?.ToString()

+
+ +

With Radio buttons and Checkboxes

+ + + + + + + + + + + + + + + + + + + + + + + + + + +@code { + bool eopen = false; + string? estatus; + string? emessage; + void OnEMenuChange(MenuChangeEventArgs args) + { + if (args is not null && args.Value is not null) + estatus = $"Item \"{args.Value}\" clicked"; + } + + + string? sstatus; + string? smessage; + void OnSMenuChange(MenuChangeEventArgs args) + { + if (args is not null && args.Value is not null) + sstatus = $"Item \"{args.Value}\" clicked"; + } +} \ No newline at end of file