Link to home
Start Free TrialLog in
Avatar of Sid Price
Sid PriceFlag for United States of America

asked on

WPF menu resource usage

I have a ContextMenu resource that needs to be used in three UserControls. It looks like this:

	<ContextMenu x:Key="mnuOverride">
		<MenuItem Header="Show as bits" IsCheckable="True" Name="mnuShowAsBits" />
		<MenuItem Header="Hide Peripheral" Name="mnuHidePeripheral" />
		<Separator />
		<MenuItem Header="View Hidden Peripherals" Name="mnuViewHiddenPeripherals"  />
	</ContextMenu>

Open in new window


One of the menu items needs to be handled in two of the controls and the other two in the third control. How can I do this?

Thanks,
Sid.
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sid Price

ASKER

Yes that is an option, however I was hoping to not have multiple, duplicated, resources. From my research that may be the only option.
Thanks,
Sid.