Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

WPF 2010 - How To Stop a Window Called From WPF MenuItem From Displaying Twice

$
0
0

Hi.

I am trying to call a XMAL Window from a selection in my WPF MenuItem. I do so with a sub that has a "WINDOWNAME.ShowDialog()" statement.  So far, each time I do, the Window I call displays twice (only once when I do this from a button).

I tried a flag to test to see if the Window is open or closed and that made it appear only once, but when I called the window from the MenuItem again, it no longer appeared.

I did read one Internet reply to this problem that this is a natural, expected occurrence due to The Tree Structure (which I have just a little understanding of).

How do I stop a Window called from a menu appearing twice and make it appear only once each time I select it from the MenuItem? Is there a workaround if not natural?

Thanks.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>