如何使用WPF将一个用户控件移动到另一个用户控件 [英] How to move one user control to another User Control using WPF

查看:456
本文介绍了如何使用WPF将一个用户控件移动到另一个用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我使用usercontrol创建弹出窗口,现在我想将此用户控件用于另一个用户控件。





任何人帮助我。



谢谢,

解决方案

http://stackoverflow.com/questions / 15891869 / how-to-move-wpf-usercontrol-from-one-window-to another [ ^ ]


class MyUserControl1:UserControl

{

public DropDownList MyDropDownList

{

get {

return this.DropDownList1;}

}

}

protected void nameInUserControl2()

{

MyUserControl1 myUserControl1 =(MyUserControl1)Page.FindControl(MyUserControl1);

DropDownList dropDown = myUserControl1.MyDropDownList; }

Hi All,

I create popup using usercontrol, now i want to use this usercontrol to another usercontrol.


Anybody help to me.

Thanks,

解决方案

http://stackoverflow.com/questions/15891869/how-to-move-wpf-usercontrol-from-one-window-to-another[^]


class MyUserControl1:UserControl
{
public DropDownList MyDropDownList
{
get{
return this.DropDownList1;}
}
}
protected void nameInUserControl2()
{
MyUserControl1 myUserControl1 = (MyUserControl1)Page.FindControl("MyUserControl1");
DropDownList dropDown = myUserControl1.MyDropDownList; }


这篇关于如何使用WPF将一个用户控件移动到另一个用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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