I have several icons that are declared in Window.Resources. They are displayed for the first time when they need to appear (for example: clicking on the Menu, MenuItem icon), but after displaying another menu (for example: context menu), the initial icon disappears and does not return. As if the last item that used the icon for the first time gets it.
<Window.Resources> <Image x:Key="Chart_16" Source="pack://application:,,,/Resources/images/chart_16.png" /> ... <Window.Resources> <MenuItem Header="Summary" Command="loc:AppCommands.ShowSummary" Icon="{StaticResource Chart_16}" />
I tried to save it as 24-bit PNG, interlaced 24-bit PNG and 8-bit PNG, but the same thing happens. This is not only one, each icon that is used in several places behaves this way.
wpf icons menuitem
Echilon
source share