//Create an empty group element at the root level of the contents pane.
//Construct on the worker thread
await QueuedTask.Run(() =>
{
GroupElement emptyGroupAtRoot = LayoutElementFactory.Instance.CreateGroupElement(layout);
emptyGroupAtRoot.SetName("Empty group at root");
});
//Create an empty group element at the root level of another group element.
//Find an existing group element
GroupElement existingGroupAtRoot = layout.FindElement("Empty group at root") as GroupElement;
//Construct on the worker thread
await QueuedTask.Run(() =>
{
GroupElement emptyGroupInGroupAtRoot = LayoutElementFactory.Instance.CreateGroupElement(existingGroupAtRoot);
emptyGroupInGroupAtRoot.SetName("Empty group in group at root");
});