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

How do I change the UserControl visibility from the MainWindow - WPF Question

$
0
0

I have a User Control that is a calculator.  I want to open this tool from a menu control defined in the Main Window XAML.  So I added a reference for the control, created an instance of the control in the main window xaml and gave the control a name.  Then I got into the main window vb code and tried to set the visibility in the menuItem_checked event but when I tried to run the code I get an error saying the "control is not declared. It may be inaccessible due to its protection level."

Is the user control automatically protected?  And if this is my problem how should I fix it?  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>