Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How do I use for each loop in this context correctly?

$
0
0
ContainerOfTaskViewer ObjectContainerOfTaskViewer = new ContainerOfTaskViewer(ClassMainForm);
//naming the tasklist.
ObjectContainerOfTaskViewer.Name = Convert.ToString(LstTaskBox.Items[x]);
//setting the text property of the label in the task list.
ObjectContainerOfTaskViewer.Label1.Text = Convert.ToString(LstTaskBox.Items[x]);
//adding the task list into the main flow layout panel.
                FloLayTaskListContainer.Controls.Add(ObjectContainerOfTaskViewer);

foreach (Object ObjectContainerOfTaskViewer in FloLayTaskListContainer.Controls)
{

}
I have created an object, and added it to a flowlayout panel. Now I want to go though a loop that goes through each object within the flowlayout panel. How do I do that?


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>