本文介绍了显示从主窗口调用的用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我正在使用WPF UserControl,我是第一次在WPF窗口之后使用UserControl。我创建了WPF应用程序,它有一个叫做MainWindow的窗口.MAinWindow有一个叫做''技术'的Button。我还创建了名为''TechnologyUserControl''的UserControl。我想点击按钮''Technology'后显示''TechnologyUserControl''。



我试过TechnologyUserControl.Visibility = System.Windows.Visibility.Visible;

其中,TechnologyUserControl是UserControl的实例......



任何人都可以帮助我..谢谢..

lately i''m working on WPF UserControl,i''m kind first time using UserControl after WPF window. I have created WPF Application, it has Window called "MainWindow".MAinWindow have Button named ''Technology''. I have also created UserControl named ''TechnologyUserControl''.I want to show ''TechnologyUserControl'' after clicking on button ''Technology''.

I have tried "TechnologyUserControl.Visibility = System.Windows.Visibility.Visible;"
where TechnologyUserControl is instance of UserControl...

Can anybody help me .. Thanks..

推荐答案


这篇关于显示从主窗口调用的用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-25 23:14