private void AddAdornerSet2D(AdornerSet adornerSet2D) { AdornerElementSet elementSet = adornerSet2D.ElementSet; if (elementSet == null) { throw new InvalidOperationException(ExceptionStringTable.AdornerElementSetMayNotBeNull); } if (adornerSet2D.Parent != this) { this.children.Add((Visual)adornerSet2D); } AdornerLayer.ElementInfo createElementInfo = this.GetOrCreateElementInfo(elementSet); createElementInfo.Update(elementSet, this, AdornerLayer.ElementInfoUpdateSource.Explicit); createElementInfo.AddAdornerSet(adornerSet2D); }
private void RemoveAdornerSet2D(AdornerSet adornerSet2D) { AdornerElementSet elementSet = adornerSet2D.ElementSet; if (elementSet == null) { throw new InvalidOperationException(ExceptionStringTable.AdornerElementSetMayNotBeNull); } AdornerLayer.ElementInfo elementInfo = this.GetElementInfo(elementSet); if (elementInfo != null && elementInfo.RemoveAdornerSet(adornerSet2D)) { if (elementInfo.IsEmpty) { this.elementMap.Remove(elementSet); } this.children.Remove((Visual)adornerSet2D); } adornerSet2D.OnRemove(); }
private void UpdateMatrix(AdornerSet adornerSet, AdornerLayer adornerLayer) { Matrix matrixToAdornerLayer = adornerSet.GetTransformMatrixToAdornerLayer(); adornerSet.SetMatrix(matrixToAdornerLayer); }
public bool RemoveAdornerSet(AdornerSet adornerSet) { return(this.adornerSets.Remove(adornerSet)); }
public void AddAdornerSet(AdornerSet adornerSet) { this.adornerSets.Add(adornerSet); this.UpdateMatrix(adornerSet, (AdornerLayer)adornerSet.Parent); }
protected EventHandlingAdorner(AdornerSet adornerSet) : base(adornerSet) { this.DesignerContext.ActiveView.AdornerLayer.AdornerPropertyChanged += new EventHandler <AdornerPropertyChangedEventArgs>(this.OnAdornerPropertyChanged); }
protected Adorner(AdornerSet adornerSet) { this.adornerSet = adornerSet; }