Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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();
}



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
Posted

1 solution

C#
var window = Application.Current.Windows.Cast<Window>().Where(x => x.Title == "6").FirstOrDefault();
 
Share this answer
 
v4
Comments
Anuja Pawar Indore 24-Jan-12 6:32am    
Added pre tag

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900