Interactive 2D wave optics simulator. Turn any image into a refractive scene, add sources, watch waves refract, diffract and interfere. Probes, intensity maps, video export.
C#
Menu icons from Windows' icon font on every command entry that has a standard glyph
Alexander Graef4804f16fe14f
diff --git a/WaveDudeNext.WPF/Controls/MenuIcon.cs b/WaveDudeNext.WPF/Controls/MenuIcon.csnew file mode 100644index 0000000..c0eb28b--- /dev/null+++ b/WaveDudeNext.WPF/Controls/MenuIcon.cs@@ -0,0 +1,57 @@+// SPDX-License-Identifier: GPL-3.0-or-later+// Copyright (C) 2026 Alexander Graef <[email protected]>+//+// This file is part of WaveDude Next, a 2D wave simulator.+//+// Based on the work of+// Jeroen Vleggaar (Huygens Optics), author of Wave Dude 2D, Copyright (C) 2026+// <https://www.youtube.com/@HuygensOptics>, <https://www.huygensoptics.com>+// 0x23 (Diffraction Limited), author of WaveSimulator2D+// <https://www.youtube.com/@DiffractionLimited>, <https://github.com/0x23/WaveSimulator2D>+//+// WaveDude Next is free software: you can redistribute it and/or modify it under+// the terms of the GNU General Public License as published by the Free Software+// Foundation, either version 3 of the License, or (at your option) any later+// version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or+// <https://www.gnu.org/licenses/>.++using System.Windows;+using System.Windows.Controls;++namespace WaveDudeNext.WPF.Controls;++/// <summary>+/// A menu entry's icon from Windows' icon font (2026-10-22, the user's request for the standard icons): attached as+/// <c>controls:MenuIcon.Glyph="&#xE74E;"</c>, it gives the <see cref="MenuItem"/> a <see cref="TextBlock"/> of that+/// character in the theme's <c>MenuIconText</c> style (Segoe Fluent Icons on Windows 11, Segoe MDL2 Assets on Windows 10,+/// in the entry's text colour). UI thread.+/// </summary>+public static class MenuIcon+{+ /// <summary>Identifies the attached Glyph property: the icon font's character for the entry, or null for none.</summary>+ public static readonly DependencyProperty GlyphProperty = DependencyProperty.RegisterAttached(+ "Glyph", typeof(string), typeof(MenuIcon), new PropertyMetadata(null, OnGlyphChanged));++ /// <summary>Gets the glyph of <paramref name="item"/>.</summary>+ public static string? GetGlyph(MenuItem item) => (string?)item.GetValue(GlyphProperty);++ /// <summary>Sets the glyph of <paramref name="item"/>, which becomes its icon.</summary>+ public static void SetGlyph(MenuItem item, string? glyph) => item.SetValue(GlyphProperty, glyph);++ private static void OnGlyphChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)+ {+ if (d is not MenuItem item)+ {+ return;+ }+ if (e.NewValue is not string { Length: > 0 } glyph)+ {+ item.Icon = null;+ return;+ }+ var text = new TextBlock { Text = glyph };+ // resolved once the entry is in its menu, so a context menu built in code finds the theme's style too+ text.SetResourceReference(FrameworkElement.StyleProperty, "MenuIconText");+ item.Icon = text;+ }+}diff --git a/WaveDudeNext.WPF/Controls/ProbeGraphOverlay.cs b/WaveDudeNext.WPF/Controls/ProbeGraphOverlay.csindex 90f883e..91bc636 100644--- a/WaveDudeNext.WPF/Controls/ProbeGraphOverlay.cs+++ b/WaveDudeNext.WPF/Controls/ProbeGraphOverlay.cs@@ -273,6 +273,7 @@ public sealed class ProbeGraphOverlay : Panel// the box's context menu (2026-10-18): the probe's recording as CSV; the header follows the language like the XAML menusvar export = new MenuItem { Command = Commands.ExportCommands.ProbeCsv, CommandParameter = probe, CommandTarget = thumb };export.SetResourceReference(HeaderedItemsControl.HeaderProperty, "MenuExportProbeCsv");+ MenuIcon.SetGlyph(export, char.ConvertFromUtf32(0xEDE1)); // ExportAutomationProperties.SetAutomationId(export, "ContextExportProbeCsv");thumb.ContextMenu = new ContextMenu { Items = { export } };}diff --git a/WaveDudeNext.WPF/MainWindow.xaml b/WaveDudeNext.WPF/MainWindow.xamlindex 17d103f..5e2f6d9 100644--- a/WaveDudeNext.WPF/MainWindow.xaml+++ b/WaveDudeNext.WPF/MainWindow.xaml@@ -21,6 +21,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file orxmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:local="clr-namespace:WaveDudeNext.WPF"+ xmlns:controls="clr-namespace:WaveDudeNext.WPF.Controls"xmlns:docking="clr-namespace:WaveDudeNext.WPF.Docking"xmlns:theming="clr-namespace:WaveDudeNext.WPF.Theming"xmlns:localization="clr-namespace:WaveDudeNext.WPF.Localization"@@ -42,22 +43,6 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file orAllowDrop="True" Drop="OnDrop"><Window.Resources>- <!-- a menu icon from Windows' icon font: Segoe Fluent Icons on Windows 11, Segoe MDL2 Assets on Windows 10 (the same code- points), drawn on their 16 px grid; the line is held to 16 px, as the font's own line height overflowed the 16 px slot- and cut the glyphs, and the glyph then moved down 3 px to the text's middle (measured on a capture: it sat 3.5 px high) -->- <Style x:Key="MenuIconText" TargetType="{x:Type TextBlock}">- <Setter Property="FontFamily" Value="Segoe Fluent Icons, Segoe MDL2 Assets" />- <Setter Property="FontSize" Value="16" />- <Setter Property="LineHeight" Value="16" />- <Setter Property="LineStackingStrategy" Value="BlockLineHeight" />- <Setter Property="RenderTransform">- <Setter.Value>- <TranslateTransform Y="3" />- </Setter.Value>- </Setter>- <Setter Property="HorizontalAlignment" Value="Center" />- <Setter Property="VerticalAlignment" Value="Center" />- </Style><converters:EqualityConverter x:Key="Equality" /><converters:FrameMemoryOptionConverter x:Key="FrameMemoryOption" /><converters:IntEqualsConverter x:Key="IntEquals" />@@ -224,51 +209,38 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<!-- not in the Tab cycle (Windows convention: F10 or Alt reach the menu bar); Tab used to wander through the headers into a submenu --><Menu x:Name="mainMenu" DockPanel.Dock="Top" KeyboardNavigation.TabNavigation="None" IsTabStop="False" PreviewKeyDown="OnMenuPreviewKeyDown"><MenuItem Header="{DynamicResource MenuFile}">- <MenuItem Command="ApplicationCommands.New" Header="{DynamicResource MenuFileNew}" />- <MenuItem Command="ApplicationCommands.Open" Header="{DynamicResource MenuFileOpen}" />+ <MenuItem Command="ApplicationCommands.New" Header="{DynamicResource MenuFileNew}" controls:MenuIcon.Glyph="" />+ <MenuItem Command="ApplicationCommands.Open" Header="{DynamicResource MenuFileOpen}" controls:MenuIcon.Glyph="" /><MenuItem Header="{DynamicResource MenuFileRecent}"ItemsSource="{Binding RecentFiles, Source={x:Static p:Settings.Default}}"- ItemContainerStyle="{StaticResource RecentFileMenuItemStyle}" />+ ItemContainerStyle="{StaticResource RecentFileMenuItemStyle}" controls:MenuIcon.Glyph="" /><Separator />- <MenuItem Command="ApplicationCommands.Save" Header="{DynamicResource MenuFileSave}" />- <MenuItem Command="ApplicationCommands.SaveAs" Header="{DynamicResource MenuFileSaveAs}" InputGestureText="Ctrl+Shift+S" />+ <MenuItem Command="ApplicationCommands.Save" Header="{DynamicResource MenuFileSave}" controls:MenuIcon.Glyph="" />+ <MenuItem Command="ApplicationCommands.SaveAs" Header="{DynamicResource MenuFileSaveAs}" InputGestureText="Ctrl+Shift+S" controls:MenuIcon.Glyph="" /><Separator /><!-- export of the current run's frames (the export range, the display settings as they are); the same entries sit on the pictures' context menus -->- <MenuItem Header="{DynamicResource MenuFileExport}" AutomationProperties.AutomationId="MenuExport">- <MenuItem Command="{x:Static commands:ExportCommands.Field}" Header="{DynamicResource MenuFileExportField}" AutomationProperties.AutomationId="MenuExportField" />- <MenuItem Command="{x:Static commands:ExportCommands.Intensity}" Header="{DynamicResource MenuFileExportIntensity}" AutomationProperties.AutomationId="MenuExportIntensity" />- <MenuItem Command="{x:Static commands:ExportCommands.Both}" Header="{DynamicResource MenuFileExportBoth}" AutomationProperties.AutomationId="MenuExportBoth" />+ <MenuItem Header="{DynamicResource MenuFileExport}" AutomationProperties.AutomationId="MenuExport" controls:MenuIcon.Glyph="">+ <MenuItem Command="{x:Static commands:ExportCommands.Field}" Header="{DynamicResource MenuFileExportField}" AutomationProperties.AutomationId="MenuExportField" controls:MenuIcon.Glyph="" />+ <MenuItem Command="{x:Static commands:ExportCommands.Intensity}" Header="{DynamicResource MenuFileExportIntensity}" AutomationProperties.AutomationId="MenuExportIntensity" controls:MenuIcon.Glyph="" />+ <MenuItem Command="{x:Static commands:ExportCommands.Both}" Header="{DynamicResource MenuFileExportBoth}" AutomationProperties.AutomationId="MenuExportBoth" controls:MenuIcon.Glyph="" /><Separator /><!-- the frame the preview shows, from the same run, as one image -->- <MenuItem Command="{x:Static commands:ExportCommands.FieldFrame}" Header="{DynamicResource MenuFileExportFieldFrame}" AutomationProperties.AutomationId="MenuExportFieldFrame" />- <MenuItem Command="{x:Static commands:ExportCommands.IntensityFrame}" Header="{DynamicResource MenuFileExportIntensityFrame}" AutomationProperties.AutomationId="MenuExportIntensityFrame" />+ <MenuItem Command="{x:Static commands:ExportCommands.FieldFrame}" Header="{DynamicResource MenuFileExportFieldFrame}" AutomationProperties.AutomationId="MenuExportFieldFrame" controls:MenuIcon.Glyph="" />+ <MenuItem Command="{x:Static commands:ExportCommands.IntensityFrame}" Header="{DynamicResource MenuFileExportIntensityFrame}" AutomationProperties.AutomationId="MenuExportIntensityFrame" controls:MenuIcon.Glyph="" /></MenuItem><Separator />- <MenuItem Command="ApplicationCommands.Close" Header="{DynamicResource MenuFileClose}" />+ <MenuItem Command="ApplicationCommands.Close" Header="{DynamicResource MenuFileClose}" controls:MenuIcon.Glyph="" /><Separator />- <MenuItem Command="{StaticResource FileExit}" Header="{DynamicResource MenuFileExit}" />+ <MenuItem Command="{StaticResource FileExit}" Header="{DynamicResource MenuFileExit}" controls:MenuIcon.Glyph="" /></MenuItem><MenuItem Header="{DynamicResource MenuEdit}">- <!-- the icons are Windows' own glyphs (Segoe Fluent Icons, Segoe MDL2 Assets on Windows 10), in the item's text colour -->- <MenuItem Header="{DynamicResource MenuEditUndo}" Command="{x:Static commands:EditCommands.Undo}" AutomationProperties.AutomationId="MenuUndo">- <MenuItem.Icon><TextBlock Style="{StaticResource MenuIconText}" Text="" /></MenuItem.Icon>- </MenuItem>- <MenuItem Header="{DynamicResource MenuEditRedo}" Command="{x:Static commands:EditCommands.Redo}" AutomationProperties.AutomationId="MenuRedo">- <MenuItem.Icon><TextBlock Style="{StaticResource MenuIconText}" Text="" /></MenuItem.Icon>- </MenuItem>+ <MenuItem Header="{DynamicResource MenuEditUndo}" Command="{x:Static commands:EditCommands.Undo}" AutomationProperties.AutomationId="MenuUndo" controls:MenuIcon.Glyph="" />+ <MenuItem Header="{DynamicResource MenuEditRedo}" Command="{x:Static commands:EditCommands.Redo}" AutomationProperties.AutomationId="MenuRedo" controls:MenuIcon.Glyph="" /><Separator />- <MenuItem Header="{DynamicResource MenuEditCut}" Command="ApplicationCommands.Cut" AutomationProperties.AutomationId="MenuCut">- <MenuItem.Icon><TextBlock Style="{StaticResource MenuIconText}" Text="" /></MenuItem.Icon>- </MenuItem>- <MenuItem Header="{DynamicResource MenuEditCopy}" Command="ApplicationCommands.Copy" AutomationProperties.AutomationId="MenuCopy">- <MenuItem.Icon><TextBlock Style="{StaticResource MenuIconText}" Text="" /></MenuItem.Icon>- </MenuItem>- <MenuItem Header="{DynamicResource MenuEditPaste}" Command="ApplicationCommands.Paste" AutomationProperties.AutomationId="MenuPaste">- <MenuItem.Icon><TextBlock Style="{StaticResource MenuIconText}" Text="" /></MenuItem.Icon>- </MenuItem>- <MenuItem Header="{DynamicResource MenuEditDelete}" Command="{x:Static commands:EditCommands.Delete}" InputGestureText="Del" AutomationProperties.AutomationId="MenuDelete">- <MenuItem.Icon><TextBlock Style="{StaticResource MenuIconText}" Text="" /></MenuItem.Icon>- </MenuItem>+ <MenuItem Header="{DynamicResource MenuEditCut}" Command="ApplicationCommands.Cut" AutomationProperties.AutomationId="MenuCut" controls:MenuIcon.Glyph="" />+ <MenuItem Header="{DynamicResource MenuEditCopy}" Command="ApplicationCommands.Copy" AutomationProperties.AutomationId="MenuCopy" controls:MenuIcon.Glyph="" />+ <MenuItem Header="{DynamicResource MenuEditPaste}" Command="ApplicationCommands.Paste" AutomationProperties.AutomationId="MenuPaste" controls:MenuIcon.Glyph="" />+ <MenuItem Header="{DynamicResource MenuEditDelete}" Command="{x:Static commands:EditCommands.Delete}" InputGestureText="Del" AutomationProperties.AutomationId="MenuDelete" controls:MenuIcon.Glyph="" /></MenuItem><MenuItem Header="{DynamicResource MenuView}"><MenuItem Header="{DynamicResource MenuViewPanes}"@@ -279,7 +251,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file orItemContainerStyle="{StaticResource ThemeMenuItemStyle}" /><MenuItem Header="{DynamicResource MenuViewLanguage}"ItemsSource="{Binding Options, Source={x:Static localization:LanguageController.Instance}}"- ItemContainerStyle="{StaticResource LanguageMenuItemStyle}" />+ ItemContainerStyle="{StaticResource LanguageMenuItemStyle}" controls:MenuIcon.Glyph="" /><Separator /><!-- the reduced preview (2026-10-15): how much of a run is captured and kept, for weaker machines; usersettings, never the project's, and an export always uses a full run -->@@ -315,9 +287,9 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or</MenuItem></MenuItem><MenuItem Header="{DynamicResource MenuSimulation}">- <MenuItem Command="{x:Static commands:SimulationCommands.Run}" Header="{DynamicResource MenuSimulationRun}" InputGestureText="F5" />+ <MenuItem Command="{x:Static commands:SimulationCommands.Run}" Header="{DynamicResource MenuSimulationRun}" InputGestureText="F5" controls:MenuIcon.Glyph="" /><!-- one entry pauses and resumes; the header follows whether a pause is pending -->- <MenuItem Command="{x:Static commands:SimulationCommands.TogglePause}" InputGestureText="F6">+ <MenuItem Command="{x:Static commands:SimulationCommands.TogglePause}" InputGestureText="F6" controls:MenuIcon.Glyph=""><MenuItem.Style><Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource {x:Type MenuItem}}"><Setter Property="Header" Value="{DynamicResource MenuSimulationPause}" />@@ -329,7 +301,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or</Style></MenuItem.Style></MenuItem>- <MenuItem Command="{x:Static commands:SimulationCommands.Stop}" Header="{DynamicResource MenuSimulationStop}" InputGestureText="Shift+F5" />+ <MenuItem Command="{x:Static commands:SimulationCommands.Stop}" Header="{DynamicResource MenuSimulationStop}" InputGestureText="Shift+F5" controls:MenuIcon.Glyph="" /><Separator /><!-- the engine is the application's choice, not the project's: it does not change the result --><MenuItem Header="{DynamicResource MenuSimulationUseGpu}" IsCheckable="True"@@ -345,7 +317,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file orItemContainerStyle="{StaticResource FrameMemoryMenuItemStyle}" /></MenuItem><MenuItem Header="{DynamicResource MenuHelp}">- <MenuItem Header="{DynamicResource MenuHelpAbout}" Command="{x:Static commands:HelpCommands.About}" AutomationProperties.AutomationId="MenuHelpAbout" />+ <MenuItem Header="{DynamicResource MenuHelpAbout}" Command="{x:Static commands:HelpCommands.About}" AutomationProperties.AutomationId="MenuHelpAbout" controls:MenuIcon.Glyph="" /></MenuItem></Menu>diff --git a/WaveDudeNext.WPF/Panes/MessagesPane.xaml b/WaveDudeNext.WPF/Panes/MessagesPane.xamlindex e850e71..fee023c 100644--- a/WaveDudeNext.WPF/Panes/MessagesPane.xaml+++ b/WaveDudeNext.WPF/Panes/MessagesPane.xaml@@ -21,6 +21,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file orxmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:local="clr-namespace:WaveDudeNext.WPF.Panes"+ xmlns:controls="clr-namespace:WaveDudeNext.WPF.Controls"xmlns:logging="clr-namespace:WaveDudeNext.WPF.Logging"DataContext="{Binding RelativeSource={RelativeSource Self}}">@@ -172,10 +173,10 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or</ListView.ItemContainerStyle><ListView.ContextMenu><ContextMenu>- <MenuItem Header="{DynamicResource MessagesCopy}" Command="ApplicationCommands.Copy" InputGestureText="Ctrl+C" />- <MenuItem Header="{DynamicResource MessagesCopyAll}" Command="{x:Static local:MessagesPane.CopyAll}" />+ <MenuItem Header="{DynamicResource MessagesCopy}" Command="ApplicationCommands.Copy" InputGestureText="Ctrl+C" controls:MenuIcon.Glyph="" />+ <MenuItem Header="{DynamicResource MessagesCopyAll}" Command="{x:Static local:MessagesPane.CopyAll}" controls:MenuIcon.Glyph="" /><Separator />- <MenuItem Header="{DynamicResource MessagesClear}" Command="{x:Static local:MessagesPane.Clear}" />+ <MenuItem Header="{DynamicResource MessagesClear}" Command="{x:Static local:MessagesPane.Clear}" controls:MenuIcon.Glyph="" /></ContextMenu></ListView.ContextMenu><ListView.View>diff --git a/WaveDudeNext.WPF/Panes/PreviewPane.xaml b/WaveDudeNext.WPF/Panes/PreviewPane.xamlindex 7c5a1dd..4e17281 100644--- a/WaveDudeNext.WPF/Panes/PreviewPane.xaml+++ b/WaveDudeNext.WPF/Panes/PreviewPane.xaml@@ -673,14 +673,14 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<Setter Property="CommandTarget" Value="{Binding PlacementTarget, RelativeSource={RelativeSource AncestorType={x:Type ContextMenu}}}" /></Style></ContextMenu.Resources>- <MenuItem Header="{DynamicResource MenuBrightness}" Command="{x:Static commands:DisplayCommands.EditBrightness}" CommandParameter="{x:Static model:ProbeLayer.Field}" AutomationProperties.AutomationId="ContextBrightness" />+ <MenuItem Header="{DynamicResource MenuBrightness}" Command="{x:Static commands:DisplayCommands.EditBrightness}" CommandParameter="{x:Static model:ProbeLayer.Field}" AutomationProperties.AutomationId="ContextBrightness" controls:MenuIcon.Glyph="" /><MenuItem Header="{DynamicResource MenuAutoBrightness}" Command="{x:Static commands:DisplayCommands.AutoBrightness}" CommandParameter="{x:Static model:ProbeLayer.Field}" AutomationProperties.AutomationId="ContextAutoBrightness" /><Separator />- <MenuItem Header="{DynamicResource MenuExportThisFrame}" Command="{x:Static commands:ExportCommands.FieldFrame}" AutomationProperties.AutomationId="ContextExportFrame" />+ <MenuItem Header="{DynamicResource MenuExportThisFrame}" Command="{x:Static commands:ExportCommands.FieldFrame}" AutomationProperties.AutomationId="ContextExportFrame" controls:MenuIcon.Glyph="" /><Separator />- <MenuItem Header="{DynamicResource MenuFileExportField}" Command="{x:Static commands:ExportCommands.Field}" AutomationProperties.AutomationId="ContextExportField" />- <MenuItem Header="{DynamicResource MenuFileExportIntensity}" Command="{x:Static commands:ExportCommands.Intensity}" AutomationProperties.AutomationId="ContextExportIntensity" />- <MenuItem Header="{DynamicResource MenuFileExportBoth}" Command="{x:Static commands:ExportCommands.Both}" AutomationProperties.AutomationId="ContextExportBoth" />+ <MenuItem Header="{DynamicResource MenuFileExportField}" Command="{x:Static commands:ExportCommands.Field}" AutomationProperties.AutomationId="ContextExportField" controls:MenuIcon.Glyph="" />+ <MenuItem Header="{DynamicResource MenuFileExportIntensity}" Command="{x:Static commands:ExportCommands.Intensity}" AutomationProperties.AutomationId="ContextExportIntensity" controls:MenuIcon.Glyph="" />+ <MenuItem Header="{DynamicResource MenuFileExportBoth}" Command="{x:Static commands:ExportCommands.Both}" AutomationProperties.AutomationId="ContextExportBoth" controls:MenuIcon.Glyph="" /></ContextMenu></HeaderedContentControl.ContextMenu></HeaderedContentControl>@@ -699,14 +699,14 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<Setter Property="CommandTarget" Value="{Binding PlacementTarget, RelativeSource={RelativeSource AncestorType={x:Type ContextMenu}}}" /></Style></ContextMenu.Resources>- <MenuItem Header="{DynamicResource MenuBrightness}" Command="{x:Static commands:DisplayCommands.EditBrightness}" CommandParameter="{x:Static model:ProbeLayer.Intensity}" AutomationProperties.AutomationId="ContextBrightness" />+ <MenuItem Header="{DynamicResource MenuBrightness}" Command="{x:Static commands:DisplayCommands.EditBrightness}" CommandParameter="{x:Static model:ProbeLayer.Intensity}" AutomationProperties.AutomationId="ContextBrightness" controls:MenuIcon.Glyph="" /><MenuItem Header="{DynamicResource MenuAutoBrightness}" Command="{x:Static commands:DisplayCommands.AutoBrightness}" CommandParameter="{x:Static model:ProbeLayer.Intensity}" AutomationProperties.AutomationId="ContextAutoBrightness" /><Separator />- <MenuItem Header="{DynamicResource MenuExportThisFrame}" Command="{x:Static commands:ExportCommands.IntensityFrame}" AutomationProperties.AutomationId="ContextExportFrame" />+ <MenuItem Header="{DynamicResource MenuExportThisFrame}" Command="{x:Static commands:ExportCommands.IntensityFrame}" AutomationProperties.AutomationId="ContextExportFrame" controls:MenuIcon.Glyph="" /><Separator />- <MenuItem Header="{DynamicResource MenuFileExportField}" Command="{x:Static commands:ExportCommands.Field}" AutomationProperties.AutomationId="ContextExportField" />- <MenuItem Header="{DynamicResource MenuFileExportIntensity}" Command="{x:Static commands:ExportCommands.Intensity}" AutomationProperties.AutomationId="ContextExportIntensity" />- <MenuItem Header="{DynamicResource MenuFileExportBoth}" Command="{x:Static commands:ExportCommands.Both}" AutomationProperties.AutomationId="ContextExportBoth" />+ <MenuItem Header="{DynamicResource MenuFileExportField}" Command="{x:Static commands:ExportCommands.Field}" AutomationProperties.AutomationId="ContextExportField" controls:MenuIcon.Glyph="" />+ <MenuItem Header="{DynamicResource MenuFileExportIntensity}" Command="{x:Static commands:ExportCommands.Intensity}" AutomationProperties.AutomationId="ContextExportIntensity" controls:MenuIcon.Glyph="" />+ <MenuItem Header="{DynamicResource MenuFileExportBoth}" Command="{x:Static commands:ExportCommands.Both}" AutomationProperties.AutomationId="ContextExportBoth" controls:MenuIcon.Glyph="" /></ContextMenu></HeaderedContentControl.ContextMenu></HeaderedContentControl>diff --git a/WaveDudeNext.WPF/Panes/ProjectTree.xaml b/WaveDudeNext.WPF/Panes/ProjectTree.xamlindex de64771..58858f1 100644--- a/WaveDudeNext.WPF/Panes/ProjectTree.xaml+++ b/WaveDudeNext.WPF/Panes/ProjectTree.xaml@@ -21,6 +21,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file orxmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:local="clr-namespace:WaveDudeNext.WPF.Panes"+ xmlns:controls="clr-namespace:WaveDudeNext.WPF.Controls"xmlns:commands="clr-namespace:WaveDudeNext.WPF.Commands"xmlns:converters="clr-namespace:WaveDudeNext.WPF.Converters"xmlns:model="clr-namespace:WaveDudeNext.Model;assembly=WaveDudeNext"@@ -173,23 +174,23 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<Setter Property="CommandParameter" Value="{Binding}" /></Style></ContextMenu.Resources>- <MenuItem Header="{DynamicResource MenuProjectAddSource}" Command="{x:Static commands:ProjectCommands.AddSource}" />- <MenuItem Header="{DynamicResource MenuProjectAddPart}" local:ProjectTree.MenuEntries="{StaticResource PartMenuEntries}" />- <MenuItem Header="{DynamicResource MenuProjectAddProbe}" Command="{x:Static commands:ProjectCommands.AddProbe}" />+ <MenuItem Header="{DynamicResource MenuProjectAddSource}" Command="{x:Static commands:ProjectCommands.AddSource}" controls:MenuIcon.Glyph="" />+ <MenuItem Header="{DynamicResource MenuProjectAddPart}" local:ProjectTree.MenuEntries="{StaticResource PartMenuEntries}" controls:MenuIcon.Glyph="" />+ <MenuItem Header="{DynamicResource MenuProjectAddProbe}" Command="{x:Static commands:ProjectCommands.AddProbe}" controls:MenuIcon.Glyph="" /><Separator /><MenuItem Header="{DynamicResource MenuProjectToggleSelected}" Command="{x:Static commands:ProjectCommands.ToggleSelected}" InputGestureText="Ins" AutomationProperties.AutomationId="ContextToggleSelected" />- <MenuItem Header="{DynamicResource MenuProjectSelectAll}" Command="{x:Static commands:ProjectCommands.SelectAll}" InputGestureText="Ctrl+A" AutomationProperties.AutomationId="ContextSelectAll" />+ <MenuItem Header="{DynamicResource MenuProjectSelectAll}" Command="{x:Static commands:ProjectCommands.SelectAll}" InputGestureText="Ctrl+A" AutomationProperties.AutomationId="ContextSelectAll" controls:MenuIcon.Glyph="" /><Separator />- <MenuItem Header="{DynamicResource MenuProjectToggleEnabled}" Command="{x:Static commands:ProjectCommands.ToggleEnabled}" InputGestureText="Space" />- <MenuItem Header="{DynamicResource MenuProjectDuplicate}" Command="{x:Static commands:ProjectCommands.Duplicate}" InputGestureText="Ctrl+D" />- <MenuItem Header="{DynamicResource MenuProjectRemove}" Command="{x:Static commands:ProjectCommands.Remove}" InputGestureText="Del" />+ <MenuItem Header="{DynamicResource MenuProjectToggleEnabled}" Command="{x:Static commands:ProjectCommands.ToggleEnabled}" InputGestureText="Space" controls:MenuIcon.Glyph="" />+ <MenuItem Header="{DynamicResource MenuProjectDuplicate}" Command="{x:Static commands:ProjectCommands.Duplicate}" InputGestureText="Ctrl+D" controls:MenuIcon.Glyph="" />+ <MenuItem Header="{DynamicResource MenuProjectRemove}" Command="{x:Static commands:ProjectCommands.Remove}" InputGestureText="Del" controls:MenuIcon.Glyph="" /><Separator />- <MenuItem Header="{DynamicResource MenuProjectMoveUp}" Command="{x:Static commands:ProjectCommands.MoveUp}" InputGestureText="Alt+Up" />- <MenuItem Header="{DynamicResource MenuProjectMoveDown}" Command="{x:Static commands:ProjectCommands.MoveDown}" InputGestureText="Alt+Down" />+ <MenuItem Header="{DynamicResource MenuProjectMoveUp}" Command="{x:Static commands:ProjectCommands.MoveUp}" InputGestureText="Alt+Up" controls:MenuIcon.Glyph="" />+ <MenuItem Header="{DynamicResource MenuProjectMoveDown}" Command="{x:Static commands:ProjectCommands.MoveDown}" InputGestureText="Alt+Down" controls:MenuIcon.Glyph="" /><!-- a probe's recording as CSV (2026-10-18): only a probe node shows the entry --><Separator Visibility="{Binding Converter={StaticResource IsType}, ConverterParameter={x:Type model:Probe}}" /><MenuItem Header="{DynamicResource MenuExportProbeCsv}" Command="{x:Static commands:ExportCommands.ProbeCsv}" AutomationProperties.AutomationId="ContextExportProbeCsv"- Visibility="{Binding Converter={StaticResource IsType}, ConverterParameter={x:Type model:Probe}}" />+ Visibility="{Binding Converter={StaticResource IsType}, ConverterParameter={x:Type model:Probe}}" controls:MenuIcon.Glyph="" /></ContextMenu></Setter.Value></Setter>diff --git a/WaveDudeNext.WPF/Themes/Controls.xaml b/WaveDudeNext.WPF/Themes/Controls.xamlindex 12a281e..1919ee2 100644--- a/WaveDudeNext.WPF/Themes/Controls.xaml+++ b/WaveDudeNext.WPF/Themes/Controls.xaml@@ -205,6 +205,23 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or</ControlTemplate.Triggers></ControlTemplate>+ <!-- a menu icon from Windows' icon font (controls:MenuIcon.Glyph): Segoe Fluent Icons on Windows 11, Segoe MDL2 Assets on Windows 10 (the same code+ points), drawn on their 16 px grid; the line is held to 16 px, as the font's own line height overflowed the 16 px slot+ and cut the glyphs, and the glyph then moved down 3 px to the text's middle (measured on a capture: it sat 3.5 px high) -->+ <Style x:Key="MenuIconText" TargetType="{x:Type TextBlock}">+ <Setter Property="FontFamily" Value="Segoe Fluent Icons, Segoe MDL2 Assets" />+ <Setter Property="FontSize" Value="16" />+ <Setter Property="LineHeight" Value="16" />+ <Setter Property="LineStackingStrategy" Value="BlockLineHeight" />+ <Setter Property="RenderTransform">+ <Setter.Value>+ <TranslateTransform Y="3" />+ </Setter.Value>+ </Setter>+ <Setter Property="HorizontalAlignment" Value="Center" />+ <Setter Property="VerticalAlignment" Value="Center" />+ </Style>+<Style TargetType="{x:Type MenuItem}"><Setter Property="Background" Value="Transparent" /><Setter Property="Foreground" Value="{DynamicResource MenuForeground}" />