Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
WPF get children from layout by name
Vlasta Juračka
Sep 12 2017 8:48 PM
273
Reply
Hi guys i have really special problem.... I need return child from layout by name... But method findName works only on XAML. But i create layout with label programmatically and i neeed search Label by name from layout. Thanks for some help.
Grid g = (Grid) tasks.SelectedItem;
Label b = (Label)g.FindName("idLabel");
Console.WriteLine(b.Content); //b is null
And guys i havent variable i know only name..
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
How to print pdf file without opening it in wpf.
unable to create/save a file using SaveFileDialog in WPF