public static InsertionAdorner Create(UIElement adornedElement, bool isBottom) { var control = new InsertPositionAdorner(); control.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Stretch); control.SetValue(VerticalAlignmentProperty, isBottom ? VerticalAlignment.Bottom : VerticalAlignment.Top); return(new InsertionAdorner(adornedElement, control) { Control = control, }); }
public static InsertionAdorner Create(UIElement adornedElement, bool isBottom) { var control = new InsertPositionAdorner(); control.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Stretch); control.SetValue(VerticalAlignmentProperty, isBottom ? VerticalAlignment.Bottom : VerticalAlignment.Top); return new InsertionAdorner(adornedElement, control) { Control = control, }; }