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

Get openned Form

$
0
0

Hello,

I have one form (frmHome) and one page (pgNetwork).

I navigate to the page with a Frame.

How can i Hide button on frmHome from pgNetwork?

I tried: 

var Home = Application.Current.Windows.Cast<Window>().FirstOrDefault(window => window is frmHome) as frmHome;

But VS returns me an error, I already use this code in another program, but I use it inside a UserControl, and now I need in Page.

Regards, ADAE.




Viewing all articles
Browse latest Browse all 18858

Trending Articles



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