如何从WPF中的userControl获取属性 [英] How to Get property from userControl in WPF

查看:478
本文介绍了如何从WPF中的userControl获取属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在WPF中创建用户控件由DataGrid组成。



我在Window1.xaml中加载此Usercontrol当我从DataGrid中选择一行时,需要在Window1.xaml中启用该按钮。



请帮忙找路......



非常感谢........

Hi,

I am creating User control in WPF consists of DataGrid.

I Load this Usercontrol in my Window1.xaml When i select a row from DataGrid the button needs to be enable in Window1.xaml.

Please help to find the way.....

Thank you very much........

推荐答案

设置在usercontrol中选择行时将引发的事件以及何时引发事件,在Window1.xaml中启用按钮
Set event that will raise when your row isSelected in usercontrol and when event will be raised, enable button in Window1.xaml


这篇关于如何从WPF中的userControl获取属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆