示例#1
0
 private void DistroyAdorner()
 {
     if (Adorner != null)
     {
         Adorner.Remove();
         Adorner = null;
     }
 }
示例#2
0
        private void CreateAdorner()
        {
            var supportsRemoveControl = this.AssociatedObject.DataContext as ViewModels.ISupportRemoveControl;

            if (supportsRemoveControl != null && !supportsRemoveControl.CanRemove)
            {
                return;
            }

            Adorner = new RemoveCollectionItemAdorner(this.AssociatedObject);
            Adorner.HorizontalAlignment = this.HorizontalAlignment;
            Adorner.VerticalAlignment   = this.VerticalAlignment;
            Adorner.Content             = CreateRemoveButton();
        }