How do I add or remove items in a GroupBar at runtime using procedural code?
(Views :1119)

The following code snippet can be used to add items to a GroupBar.

[C#]

GroupBar myGroupBar = new GroupBar();
GroupBarItem gbi = new GroupBarItem();
TextBlock tt1 = new TextBlock();
tt1.Text = "New Item added";
gbi.Header = "Dynamic Items";
gbi.Content = tt1;
myGroupBar.Items.Add(gbi);

The following code snippet can be used to remove items from a GroupBar

[C#]

myGroupBar.Items.Remove(gbi);

::adCenter::