public ReadOnlyObservableCollection<Element> GetSelectedElements()
Public Function GetSelectedElements() As ReadOnlyObservableCollection(Of Element)
public ReadOnlyObservableCollection<Element> GetSelectedElements()
Public Function GetSelectedElements() As ReadOnlyObservableCollection(Of Element)
//on the QueuedTask var elementsToRemove = layout.GetSelectedElements(); layout.DeleteElements(elementsToRemove);
//on the QueuedTask var elemsToGroup = layout.GetSelectedElements(); //Note: run within the QueuedTask //group elements var groupElement = layout.GroupElements(elemsToGroup);
//On the QueuedTask //get the current selection set var sel_elems = layout.GetSelectedElements(); //can they be brought forward? This will also check that all elements have the same parent if (layout.CanBringForward(sel_elems)) { //bring forward layout.BringForward(sel_elems); //bring to front (of parent) //graphicsLayer.BringToFront(sel_elems); } else if (layout.CanSendBackward(sel_elems)) { //send back layout.SendBackward(sel_elems); //send to the back (of parent) //graphicsLayer.SendToBack(sel_elems); }
var selElementsZOrder = layout.GetSelectedElements(); //list out the z order foreach (var elem in selElementsZOrder) //At 2.x - System.Diagnostics.Debug.WriteLine($"{elem.Name}: z-order {elem.GetZOrder()}"); System.Diagnostics.Debug.WriteLine($"{elem.Name}: z-order {elem.ZOrder}");
Target Platforms: Windows 11, Windows 10, Windows 8.1