Skip to content
Tags

, ,

WPF Context Menu Not Showing Up

by Dan on February 14th, 2010

So I came across a problem with WPF and context menus. Whenever I added a context menu to a right click on a window or panel it would simple not open. The only time that a context menu would appear is when I right clicked on a button or label that was a child of the panel I added it to. I searched everywhere online for a solution and couldn’t find one. Finally, I figured it out myself. For some strange reason, a context menu will not appear if you to not manually set a background color for a component or child component. So to fix the problem, simple set a background color for which components you want the top level context menu to appear.

From → Uncategorized

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS