Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
Add control in TabItem programatically
michal adamkiewicz
Jun 23 2014 4:43 AM
1.1k
Reply
Hello All,
I have generally one question - my target is to random select picture from my resources and add it as image source to image control for each tabitem I have in TabControl. Random generate index with my table contains pictures I already have and It works. But my main problem is that how I can do it in C# (not by XAML) becouse I don't want to create image control in Visual Studio, I prefer do it in runtime code.
Every TabItem contains Grid control, and exactly in this Grid control I want to add picture - how it's possible? I need to iterate by every TabItem, and then every Grid?
I tried simple way, but it's not proper way I suppose:/
foreach (TabItem tab in TabControl)
{
}
Is this possible somehow?:)
Thanks for any help:)
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Dynamic Tab Items in wpf
Change Text Box Design