Exemplo n.º 1
0
 /// <summary>
 /// Removes the insertion Adorner
 /// </summary>
 private void RemoveInsertionAdorner()
 {
     if (this.insertionAdorner != null)
     {
         this.insertionAdorner.Detach();
         this.insertionAdorner = null;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates an insertion Adorner
 /// </summary>
 private void CreateInsertionAdorner()
 {
     if (this.targetItemContainer != null)
     {
         // Here, I need to get adorner layer from targetItemContainer and not targetItemsControl.
         // This way I get the AdornerLayer within ScrollContentPresenter, and not the one under AdornerDecorator (Snoop is awesome).
         // If I used targetItemsControl, the adorner would hang out of ItemsControl when there's a horizontal scroll bar.
         var adornerLayer = AdornerLayer.GetAdornerLayer(this.targetItemContainer);
         this.insertionAdorner = new InsertionAdorner(this.hasVerticalOrientation, this.isInFirstHalf, this.targetItemContainer, adornerLayer);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Removes the insertion Adorner
 /// </summary>
 private void RemoveInsertionAdorner()
 {
     if (this.insertionAdorner != null)
     {
         this.insertionAdorner.Detach();
         this.insertionAdorner = null;
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Creates an insertion Adorner
 /// </summary>
 private void CreateInsertionAdorner()
 {
     if (this.targetItemContainer != null)
     {
         // Here, I need to get adorner layer from targetItemContainer and not targetItemsControl. 
         // This way I get the AdornerLayer within ScrollContentPresenter, and not the one under AdornerDecorator (Snoop is awesome).
         // If I used targetItemsControl, the adorner would hang out of ItemsControl when there's a horizontal scroll bar.
         var adornerLayer = AdornerLayer.GetAdornerLayer(this.targetItemContainer);
         this.insertionAdorner = new InsertionAdorner(this.hasVerticalOrientation, this.isInFirstHalf, this.targetItemContainer, adornerLayer);
     }
 }