找出WPF中的特定窗口 [英] Finding out the particular windows in wpf

查看:60
本文介绍了找出WPF中的特定窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi

我已经在程序中设计了一个名称为"windowname"的窗口,我在调用该窗口并在更多时间显示该窗口

hi

i had designed a window with a name of "windowname" , in programm iam calling the window and showing the window at many moretime liks

for(int i==0;i<=10;i++)
{
windowname openwindow= new windowname();
openwindow.title=i;
openwindow.show();
}




所以在这里我要动态调用窗口,但是现在我需要调用包含标题为"6"的窗口.


所以我怎么称呼那个窗口

通过编程;



请给我一个主意
Thankq




so here i am calling the windows dynamically ,but now i need to call the window that contains the title as "6"


so how can i call that window

through programming ;



please give me the idea
thankq

推荐答案

var window = Application.Current.Windows.Cast<Window>().Where(x => x.Title == "6").FirstOrDefault();


这篇关于找出WPF中的特定窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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