This is how we can add an image dynamically in stackpanel.
XAML
<stackpanel name="Container"></stackpanel>
.CS (C#)
Image img = new Image();
img.Source = new BitmapImage(new Uri(@"pack://application:,,,/Quiz1;component/Images/loin.png"));
Container.Children.Add(img);
No comments:
Post a Comment