foreach (ModelItem item in itemsCollection) { string itemName = item.Properties["DisplayName"].Value.ToString(); string itemType = item.Properties["Type"].Value.ToString(); // further processing of the item }
var newItem = new ModelItem(); newItem.Properties["DisplayName"].SetValue("New item"); newItem.Properties["Type"].SetValue(typeof(Activity)); existingItemsCollection.Add(newItem);The System.Activities.Presentation.Model namespace belongs to the Microsoft .NET Framework, and is available as a part of the WindowsBase.dll package.