Answer the question
In order to leave comments, you need to log in
How to add XAML elements via C# to WPF
There is a WPF page and a tag tree in it. I'm taking the image link URLs from the database and I have to turn those links into images that I have to insert into the StackPanel. How do I insert the created Image objects into the StackPanel in C# code?
Answer the question
In order to leave comments, you need to log in
<StackPanel Name="stackPanel"/>
TextBox tbox = new TextBox();
tbox.Text = "Hello";
stackPanel.Children.Add(tbox);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question