Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

WPF menu resource usage

Posted on 2014-01-27
2
Medium Priority
?
397 Views
Last Modified: 2014-01-31
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.
0
Comment
Question by:Sid Price
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 1000 total points
ID: 39814735
One option is to define different context menus in each user control.
0
 

Author Comment

by:Sid Price
ID: 39815071
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.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question