From 052fdb90437d50755b9bfafc4443e3c3ac54e4b4 Mon Sep 17 00:00:00 2001 From: Vincent Baaij Date: Fri, 13 Feb 2026 12:16:53 +0100 Subject: [PATCH 1/6] Make OnCLick close popover --- .../Pages/AppBar/Examples/AppBarClick.razor | 114 +++++++++--------- .../Examples/AppBarFromListOfApps.razor | 4 +- .../Components/AppBar/FluentAppBar.razor.cs | 2 +- .../AppBar/FluentAppBarItem.razor.cs | 1 + 4 files changed, 62 insertions(+), 59 deletions(-) diff --git a/examples/Demo/Shared/Pages/AppBar/Examples/AppBarClick.razor b/examples/Demo/Shared/Pages/AppBar/Examples/AppBarClick.razor index 84309bb5da..89acd1a6f6 100644 --- a/examples/Demo/Shared/Pages/AppBar/Examples/AppBarClick.razor +++ b/examples/Demo/Shared/Pages/AppBar/Examples/AppBarClick.razor @@ -1,72 +1,74 @@ @inject IDialogService DialogService - - - - - - - +
+ + + + + + + +
@code { - private static Icon HomeIcon(bool active = false) => - active ? new Icons.Filled.Size24.Home() - : new Icons.Regular.Size24.Home(); + private static Icon HomeIcon(bool active = false) => + active ? new Icons.Filled.Size24.Home() + : new Icons.Regular.Size24.Home(); - private static Icon AppBarIcon(bool active = false) => - active ? new Icons.Filled.Size24.AppsList() - : new Icons.Regular.Size24.AppsList(); + private static Icon AppBarIcon(bool active = false) => + active ? new Icons.Filled.Size24.AppsList() + : new Icons.Regular.Size24.AppsList(); - private static Icon WhatsNewIcon(bool active = false) => - active ? new Icons.Filled.Size24.Info() - : new Icons.Regular.Size24.Info(); + private static Icon WhatsNewIcon(bool active = false) => + active ? new Icons.Filled.Size24.Info() + : new Icons.Regular.Size24.Info(); - private static Icon IconsIcon(bool active = false) => - active ? new Icons.Filled.Size24.Symbols() - : new Icons.Regular.Size24.Symbols(); + private static Icon IconsIcon(bool active = false) => + active ? new Icons.Filled.Size24.Symbols() + : new Icons.Regular.Size24.Symbols(); - private static Icon DialogIcon(bool active = false) => - active ? new Icons.Filled.Size24.AppGeneric() - : new Icons.Regular.Size24.AppGeneric(); + private static Icon DialogIcon(bool active = false) => + active ? new Icons.Filled.Size24.AppGeneric() + : new Icons.Regular.Size24.AppGeneric(); - private void HandleOnClick(IAppBarItem item) - { + private void HandleOnClick(IAppBarItem item) + { - DemoLogger.WriteLine($"Clicked {item.Text}!"); - } + DemoLogger.WriteLine($"Clicked {item.Text}!"); + } - private async Task ShowSuccessAsync(IAppBarItem item) - { - var dialog = await DialogService.ShowSuccessAsync($"You clicked {item.Text}"); - var result = await dialog.Result; - } + private async Task ShowSuccessAsync(IAppBarItem item) + { + var dialog = await DialogService.ShowSuccessAsync($"You clicked {item.Text}"); + var result = await dialog.Result; + } - private async Task ShowWarningAsync(IAppBarItem item) - { - var dialog = await DialogService.ShowWarningAsync($"Are you sure? {item.Text}"); - var result = await dialog.Result; - } + private async Task ShowWarningAsync(IAppBarItem item) + { + var dialog = await DialogService.ShowWarningAsync($"Are you sure? {item.Text}"); + var result = await dialog.Result; + } } diff --git a/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor b/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor index 858a36c9a7..c899748cbf 100644 --- a/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor +++ b/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor @@ -1,9 +1,9 @@  -
+
diff --git a/src/Core/Components/AppBar/FluentAppBar.razor.cs b/src/Core/Components/AppBar/FluentAppBar.razor.cs index 0b407e4466..e3d2f04f04 100644 --- a/src/Core/Components/AppBar/FluentAppBar.razor.cs +++ b/src/Core/Components/AppBar/FluentAppBar.razor.cs @@ -144,7 +144,7 @@ private async Task InitializeOverflowAsync() } } - private Task TogglePopoverAsync() => HandlePopoverToggleAsync(!_showMoreItems); + internal Task TogglePopoverAsync() => HandlePopoverToggleAsync(!_showMoreItems); private async Task HandlePopoverKeyDownAsync(FluentKeyCodeEventArgs args) { diff --git a/src/Core/Components/AppBar/FluentAppBarItem.razor.cs b/src/Core/Components/AppBar/FluentAppBarItem.razor.cs index ca0c5d1d36..027cb0f639 100644 --- a/src/Core/Components/AppBar/FluentAppBarItem.razor.cs +++ b/src/Core/Components/AppBar/FluentAppBarItem.razor.cs @@ -105,6 +105,7 @@ protected async Task OnClickHandlerAsync(MouseEventArgs ev) { if (OnClick.HasDelegate) { + await Owner.AppBar.TogglePopoverAsync(); await OnClick.InvokeAsync(this); } } From 9b6334557f7ce56f13fecf3ced06d68272d6f1b6 Mon Sep 17 00:00:00 2001 From: Vincent Baaij Date: Fri, 13 Feb 2026 12:35:44 +0100 Subject: [PATCH 2/6] Only close the popover when in overflowed state --- src/Core/Components/AppBar/FluentAppBarItem.razor.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Core/Components/AppBar/FluentAppBarItem.razor.cs b/src/Core/Components/AppBar/FluentAppBarItem.razor.cs index 027cb0f639..ddbdbbf389 100644 --- a/src/Core/Components/AppBar/FluentAppBarItem.razor.cs +++ b/src/Core/Components/AppBar/FluentAppBarItem.razor.cs @@ -105,7 +105,11 @@ protected async Task OnClickHandlerAsync(MouseEventArgs ev) { if (OnClick.HasDelegate) { - await Owner.AppBar.TogglePopoverAsync(); + if (Overflow is true) + { + await Owner.AppBar.TogglePopoverAsync(); + } + await OnClick.InvokeAsync(this); } } From 356780a7ed5e1282c00053bb131cd089ee5a5b55 Mon Sep 17 00:00:00 2001 From: Vincent Baaij Date: Fri, 13 Feb 2026 15:06:48 +0100 Subject: [PATCH 3/6] Fix spacing --- .../Examples/AppBarFromListOfApps.razor | 109 +++++++++--------- 1 file changed, 54 insertions(+), 55 deletions(-) diff --git a/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor b/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor index c899748cbf..b4e2896f0b 100644 --- a/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor +++ b/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor @@ -1,62 +1,61 @@  - +
- - -
+ + +
@code { - private class FluentCustomAppBarItem : FluentAppBarItem - { - public int Order { get; set; } - } - - private List _apps => new List - { - new FluentCustomAppBarItem { Order = 15, IconRest = ResourcesIcon(), IconActive = ResourcesIcon(active: true), Text = "Aaaaa", Href = "/AppBarDefault" }, - new FluentCustomAppBarItem { Order = 14, IconRest = ResourcesIcon(), IconActive = ResourcesIcon(active: true), Text = "Bbbbb", Href = "/AppBar" }, - new FluentCustomAppBarItem { Order = 13, IconRest = ResourcesIcon(), IconActive = ResourcesIcon(active: true), Text = "Ccccc" }, - new FluentCustomAppBarItem { Order = 12, IconRest = ConsoleLogsIcon(), IconActive = ConsoleLogsIcon(active: true), Text = "Ddddd" }, - new FluentCustomAppBarItem { Order = 11, IconRest = ConsoleLogsIcon(), IconActive = ConsoleLogsIcon(active: true), Text = "Eeeee" }, - new FluentCustomAppBarItem { Order = 10, IconRest = ConsoleLogsIcon(), IconActive = ConsoleLogsIcon(active: true), Text = "Fffff" }, - new FluentCustomAppBarItem { Order = 9, IconRest = StructuredLogsIcon(), IconActive = StructuredLogsIcon(active: true), Text = "Ggggg", Count = 4 }, - new FluentCustomAppBarItem { Order = 8, IconRest = StructuredLogsIcon(), IconActive = StructuredLogsIcon(active: true), Text = "Hhhhh" }, - new FluentCustomAppBarItem { Order = 7, IconRest = StructuredLogsIcon(), IconActive = StructuredLogsIcon(active: true), Text = "Iiiii" }, - new FluentCustomAppBarItem { Order = 6, IconRest = TracesIcon(), IconActive = TracesIcon(active: true), Text = "Jjjjj" }, - new FluentCustomAppBarItem { Order = 5, IconRest = TracesIcon(), IconActive = TracesIcon(active: true), Text = "Kkkkk" }, - new FluentCustomAppBarItem { Order = 4, IconRest = TracesIcon(), IconActive = TracesIcon(active: true), Text = "Lllll" }, - new FluentCustomAppBarItem { Order = 3, IconRest = MetricsIcon(), IconActive = MetricsIcon(active: true), Text = "Mmmmm" }, - new FluentCustomAppBarItem { Order = 2, IconRest = MetricsIcon(), IconActive = MetricsIcon(active: true), Text = "Nnnnn" }, - new FluentCustomAppBarItem { Order = 1, IconRest = MetricsIcon(), IconActive = MetricsIcon(active: true), Text = "Ooooo" } - }; - - private bool _showSearch = true; - - private static Icon ResourcesIcon(bool active = false) => - active ? new Icons.Filled.Size24.AppFolder() - : new Icons.Regular.Size24.AppFolder(); - - private static Icon ConsoleLogsIcon(bool active = false) => - active ? new Icons.Filled.Size24.SlideText() - : new Icons.Regular.Size24.SlideText(); - - private static Icon StructuredLogsIcon(bool active = false) => - active ? new Icons.Filled.Size24.SlideTextSparkle() - : new Icons.Regular.Size24.SlideTextSparkle(); - - private static Icon TracesIcon(bool active = false) => - active ? new Icons.Filled.Size24.GanttChart() - : new Icons.Regular.Size24.GanttChart(); - - private static Icon MetricsIcon(bool active = false) => - active ? new Icons.Filled.Size24.ChartMultiple() - : new Icons.Regular.Size24.ChartMultiple(); - - private void HandlePopover(bool visible) => DemoLogger.WriteLine($"Popover visibility changed to {visible}"); + private class FluentCustomAppBarItem : FluentAppBarItem + { + public int Order { get; set; } + } + + private List _apps => new List + { + new FluentCustomAppBarItem { Order = 15, IconRest = ResourcesIcon(), IconActive = ResourcesIcon(active: true), Text = "Aaaaa", Href = "/AppBarDefault" }, + new FluentCustomAppBarItem { Order = 14, IconRest = ResourcesIcon(), IconActive = ResourcesIcon(active: true), Text = "Bbbbb", Href = "/AppBar" }, + new FluentCustomAppBarItem { Order = 13, IconRest = ResourcesIcon(), IconActive = ResourcesIcon(active: true), Text = "Ccccc" }, + new FluentCustomAppBarItem { Order = 12, IconRest = ConsoleLogsIcon(), IconActive = ConsoleLogsIcon(active: true), Text = "Ddddd" }, + new FluentCustomAppBarItem { Order = 11, IconRest = ConsoleLogsIcon(), IconActive = ConsoleLogsIcon(active: true), Text = "Eeeee" }, + new FluentCustomAppBarItem { Order = 10, IconRest = ConsoleLogsIcon(), IconActive = ConsoleLogsIcon(active: true), Text = "Fffff" }, + new FluentCustomAppBarItem { Order = 9, IconRest = StructuredLogsIcon(), IconActive = StructuredLogsIcon(active: true), Text = "Ggggg", Count = 4 }, + new FluentCustomAppBarItem { Order = 8, IconRest = StructuredLogsIcon(), IconActive = StructuredLogsIcon(active: true), Text = "Hhhhh" }, + new FluentCustomAppBarItem { Order = 7, IconRest = StructuredLogsIcon(), IconActive = StructuredLogsIcon(active: true), Text = "Iiiii" }, + new FluentCustomAppBarItem { Order = 6, IconRest = TracesIcon(), IconActive = TracesIcon(active: true), Text = "Jjjjj" }, + new FluentCustomAppBarItem { Order = 5, IconRest = TracesIcon(), IconActive = TracesIcon(active: true), Text = "Kkkkk" }, + new FluentCustomAppBarItem { Order = 4, IconRest = TracesIcon(), IconActive = TracesIcon(active: true), Text = "Lllll" }, + new FluentCustomAppBarItem { Order = 3, IconRest = MetricsIcon(), IconActive = MetricsIcon(active: true), Text = "Mmmmm" }, + new FluentCustomAppBarItem { Order = 2, IconRest = MetricsIcon(), IconActive = MetricsIcon(active: true), Text = "Nnnnn" }, + new FluentCustomAppBarItem { Order = 1, IconRest = MetricsIcon(), IconActive = MetricsIcon(active: true), Text = "Ooooo" } + }; + + private bool _showSearch = true; + + private static Icon ResourcesIcon(bool active = false) => + active ? new Icons.Filled.Size24.AppFolder() + : new Icons.Regular.Size24.AppFolder(); + + private static Icon ConsoleLogsIcon(bool active = false) => + active ? new Icons.Filled.Size24.SlideText() + : new Icons.Regular.Size24.SlideText(); + + private static Icon StructuredLogsIcon(bool active = false) => + active ? new Icons.Filled.Size24.SlideTextSparkle() + : new Icons.Regular.Size24.SlideTextSparkle(); + + private static Icon TracesIcon(bool active = false) => + active ? new Icons.Filled.Size24.GanttChart() + : new Icons.Regular.Size24.GanttChart(); + + private static Icon MetricsIcon(bool active = false) => + active ? new Icons.Filled.Size24.ChartMultiple() + : new Icons.Regular.Size24.ChartMultiple(); + + private void HandlePopover(bool visible) => DemoLogger.WriteLine($"Popover visibility changed to {visible}"); } From add3019abdc4be2d6b705f57bc49d8fd2582ed40 Mon Sep 17 00:00:00 2001 From: Vincent Baaij Date: Fri, 13 Feb 2026 15:56:46 +0100 Subject: [PATCH 4/6] Fix spacing? --- .../Pages/AppBar/Examples/AppBarClick.razor | 116 +++++++++--------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/examples/Demo/Shared/Pages/AppBar/Examples/AppBarClick.razor b/examples/Demo/Shared/Pages/AppBar/Examples/AppBarClick.razor index 89acd1a6f6..0ca1b463a3 100644 --- a/examples/Demo/Shared/Pages/AppBar/Examples/AppBarClick.razor +++ b/examples/Demo/Shared/Pages/AppBar/Examples/AppBarClick.razor @@ -1,74 +1,74 @@ @inject IDialogService DialogService -
- - - - - - - -
+
+ + + + + + + +
@code { - private static Icon HomeIcon(bool active = false) => - active ? new Icons.Filled.Size24.Home() - : new Icons.Regular.Size24.Home(); + private static Icon HomeIcon(bool active = false) => + active ? new Icons.Filled.Size24.Home() + : new Icons.Regular.Size24.Home(); - private static Icon AppBarIcon(bool active = false) => - active ? new Icons.Filled.Size24.AppsList() - : new Icons.Regular.Size24.AppsList(); + private static Icon AppBarIcon(bool active = false) => + active ? new Icons.Filled.Size24.AppsList() + : new Icons.Regular.Size24.AppsList(); - private static Icon WhatsNewIcon(bool active = false) => - active ? new Icons.Filled.Size24.Info() - : new Icons.Regular.Size24.Info(); + private static Icon WhatsNewIcon(bool active = false) => + active ? new Icons.Filled.Size24.Info() + : new Icons.Regular.Size24.Info(); - private static Icon IconsIcon(bool active = false) => - active ? new Icons.Filled.Size24.Symbols() - : new Icons.Regular.Size24.Symbols(); + private static Icon IconsIcon(bool active = false) => + active ? new Icons.Filled.Size24.Symbols() + : new Icons.Regular.Size24.Symbols(); - private static Icon DialogIcon(bool active = false) => - active ? new Icons.Filled.Size24.AppGeneric() - : new Icons.Regular.Size24.AppGeneric(); + private static Icon DialogIcon(bool active = false) => + active ? new Icons.Filled.Size24.AppGeneric() + : new Icons.Regular.Size24.AppGeneric(); - private void HandleOnClick(IAppBarItem item) - { + private void HandleOnClick(IAppBarItem item) + { - DemoLogger.WriteLine($"Clicked {item.Text}!"); - } + DemoLogger.WriteLine($"Clicked {item.Text}!"); + } - private async Task ShowSuccessAsync(IAppBarItem item) - { - var dialog = await DialogService.ShowSuccessAsync($"You clicked {item.Text}"); - var result = await dialog.Result; - } + private async Task ShowSuccessAsync(IAppBarItem item) + { + var dialog = await DialogService.ShowSuccessAsync($"You clicked {item.Text}"); + var result = await dialog.Result; + } - private async Task ShowWarningAsync(IAppBarItem item) - { - var dialog = await DialogService.ShowWarningAsync($"Are you sure? {item.Text}"); - var result = await dialog.Result; - } + private async Task ShowWarningAsync(IAppBarItem item) + { + var dialog = await DialogService.ShowWarningAsync($"Are you sure? {item.Text}"); + var result = await dialog.Result; + } } From 3e49dfcbf3ecc58900507de461eb388c5f9d3ba4 Mon Sep 17 00:00:00 2001 From: Vincent Baaij Date: Fri, 13 Feb 2026 15:57:41 +0100 Subject: [PATCH 5/6] More spacing fixes --- .../Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor b/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor index b4e2896f0b..7bb3b00a33 100644 --- a/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor +++ b/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor @@ -11,7 +11,7 @@ @code { - private class FluentCustomAppBarItem : FluentAppBarItem + private class FluentCustomAppBarItem : FluentAppBarItem { public int Order { get; set; } } From 5a9464104f59b3a8c02ddbbad1f813058a8eb040 Mon Sep 17 00:00:00 2001 From: Vincent Baaij Date: Fri, 13 Feb 2026 15:58:46 +0100 Subject: [PATCH 6/6] Even moe spacing ifixes --- .../Examples/AppBarFromListOfApps.razor | 108 +++++++++--------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor b/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor index 7bb3b00a33..0cbad5d6b6 100644 --- a/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor +++ b/examples/Demo/Shared/Pages/AppBar/Examples/AppBarFromListOfApps.razor @@ -1,61 +1,61 @@  - -
- - -
+ +
+ + +
@code { private class FluentCustomAppBarItem : FluentAppBarItem - { - public int Order { get; set; } - } - - private List _apps => new List - { - new FluentCustomAppBarItem { Order = 15, IconRest = ResourcesIcon(), IconActive = ResourcesIcon(active: true), Text = "Aaaaa", Href = "/AppBarDefault" }, - new FluentCustomAppBarItem { Order = 14, IconRest = ResourcesIcon(), IconActive = ResourcesIcon(active: true), Text = "Bbbbb", Href = "/AppBar" }, - new FluentCustomAppBarItem { Order = 13, IconRest = ResourcesIcon(), IconActive = ResourcesIcon(active: true), Text = "Ccccc" }, - new FluentCustomAppBarItem { Order = 12, IconRest = ConsoleLogsIcon(), IconActive = ConsoleLogsIcon(active: true), Text = "Ddddd" }, - new FluentCustomAppBarItem { Order = 11, IconRest = ConsoleLogsIcon(), IconActive = ConsoleLogsIcon(active: true), Text = "Eeeee" }, - new FluentCustomAppBarItem { Order = 10, IconRest = ConsoleLogsIcon(), IconActive = ConsoleLogsIcon(active: true), Text = "Fffff" }, - new FluentCustomAppBarItem { Order = 9, IconRest = StructuredLogsIcon(), IconActive = StructuredLogsIcon(active: true), Text = "Ggggg", Count = 4 }, - new FluentCustomAppBarItem { Order = 8, IconRest = StructuredLogsIcon(), IconActive = StructuredLogsIcon(active: true), Text = "Hhhhh" }, - new FluentCustomAppBarItem { Order = 7, IconRest = StructuredLogsIcon(), IconActive = StructuredLogsIcon(active: true), Text = "Iiiii" }, - new FluentCustomAppBarItem { Order = 6, IconRest = TracesIcon(), IconActive = TracesIcon(active: true), Text = "Jjjjj" }, - new FluentCustomAppBarItem { Order = 5, IconRest = TracesIcon(), IconActive = TracesIcon(active: true), Text = "Kkkkk" }, - new FluentCustomAppBarItem { Order = 4, IconRest = TracesIcon(), IconActive = TracesIcon(active: true), Text = "Lllll" }, - new FluentCustomAppBarItem { Order = 3, IconRest = MetricsIcon(), IconActive = MetricsIcon(active: true), Text = "Mmmmm" }, - new FluentCustomAppBarItem { Order = 2, IconRest = MetricsIcon(), IconActive = MetricsIcon(active: true), Text = "Nnnnn" }, - new FluentCustomAppBarItem { Order = 1, IconRest = MetricsIcon(), IconActive = MetricsIcon(active: true), Text = "Ooooo" } - }; - - private bool _showSearch = true; - - private static Icon ResourcesIcon(bool active = false) => - active ? new Icons.Filled.Size24.AppFolder() - : new Icons.Regular.Size24.AppFolder(); - - private static Icon ConsoleLogsIcon(bool active = false) => - active ? new Icons.Filled.Size24.SlideText() - : new Icons.Regular.Size24.SlideText(); - - private static Icon StructuredLogsIcon(bool active = false) => - active ? new Icons.Filled.Size24.SlideTextSparkle() - : new Icons.Regular.Size24.SlideTextSparkle(); - - private static Icon TracesIcon(bool active = false) => - active ? new Icons.Filled.Size24.GanttChart() - : new Icons.Regular.Size24.GanttChart(); - - private static Icon MetricsIcon(bool active = false) => - active ? new Icons.Filled.Size24.ChartMultiple() - : new Icons.Regular.Size24.ChartMultiple(); - - private void HandlePopover(bool visible) => DemoLogger.WriteLine($"Popover visibility changed to {visible}"); + { + public int Order { get; set; } + } + + private List _apps => new List + { + new FluentCustomAppBarItem { Order = 15, IconRest = ResourcesIcon(), IconActive = ResourcesIcon(active: true), Text = "Aaaaa", Href = "/AppBarDefault" }, + new FluentCustomAppBarItem { Order = 14, IconRest = ResourcesIcon(), IconActive = ResourcesIcon(active: true), Text = "Bbbbb", Href = "/AppBar" }, + new FluentCustomAppBarItem { Order = 13, IconRest = ResourcesIcon(), IconActive = ResourcesIcon(active: true), Text = "Ccccc" }, + new FluentCustomAppBarItem { Order = 12, IconRest = ConsoleLogsIcon(), IconActive = ConsoleLogsIcon(active: true), Text = "Ddddd" }, + new FluentCustomAppBarItem { Order = 11, IconRest = ConsoleLogsIcon(), IconActive = ConsoleLogsIcon(active: true), Text = "Eeeee" }, + new FluentCustomAppBarItem { Order = 10, IconRest = ConsoleLogsIcon(), IconActive = ConsoleLogsIcon(active: true), Text = "Fffff" }, + new FluentCustomAppBarItem { Order = 9, IconRest = StructuredLogsIcon(), IconActive = StructuredLogsIcon(active: true), Text = "Ggggg", Count = 4 }, + new FluentCustomAppBarItem { Order = 8, IconRest = StructuredLogsIcon(), IconActive = StructuredLogsIcon(active: true), Text = "Hhhhh" }, + new FluentCustomAppBarItem { Order = 7, IconRest = StructuredLogsIcon(), IconActive = StructuredLogsIcon(active: true), Text = "Iiiii" }, + new FluentCustomAppBarItem { Order = 6, IconRest = TracesIcon(), IconActive = TracesIcon(active: true), Text = "Jjjjj" }, + new FluentCustomAppBarItem { Order = 5, IconRest = TracesIcon(), IconActive = TracesIcon(active: true), Text = "Kkkkk" }, + new FluentCustomAppBarItem { Order = 4, IconRest = TracesIcon(), IconActive = TracesIcon(active: true), Text = "Lllll" }, + new FluentCustomAppBarItem { Order = 3, IconRest = MetricsIcon(), IconActive = MetricsIcon(active: true), Text = "Mmmmm" }, + new FluentCustomAppBarItem { Order = 2, IconRest = MetricsIcon(), IconActive = MetricsIcon(active: true), Text = "Nnnnn" }, + new FluentCustomAppBarItem { Order = 1, IconRest = MetricsIcon(), IconActive = MetricsIcon(active: true), Text = "Ooooo" } + }; + + private bool _showSearch = true; + + private static Icon ResourcesIcon(bool active = false) => + active ? new Icons.Filled.Size24.AppFolder() + : new Icons.Regular.Size24.AppFolder(); + + private static Icon ConsoleLogsIcon(bool active = false) => + active ? new Icons.Filled.Size24.SlideText() + : new Icons.Regular.Size24.SlideText(); + + private static Icon StructuredLogsIcon(bool active = false) => + active ? new Icons.Filled.Size24.SlideTextSparkle() + : new Icons.Regular.Size24.SlideTextSparkle(); + + private static Icon TracesIcon(bool active = false) => + active ? new Icons.Filled.Size24.GanttChart() + : new Icons.Regular.Size24.GanttChart(); + + private static Icon MetricsIcon(bool active = false) => + active ? new Icons.Filled.Size24.ChartMultiple() + : new Icons.Regular.Size24.ChartMultiple(); + + private void HandlePopover(bool visible) => DemoLogger.WriteLine($"Popover visibility changed to {visible}"); }