public ScrollContentPresenter() { innerScrollInfo = new InnerScrollInfo(); delegateScrollInfo = innerScrollInfo; AdornerLayer = new AdornerLayer(); AddVisualChild(AdornerLayer); }
public Window() { SetResourceInheritanceParent(Application.Current); AdornerLayer = new AdornerLayer(); AddVisualChild(AdornerLayer); PopupLayer = new PopupLayer(); AddVisualChild(PopupLayer); radioButtonGroupScope = new SelectionGroupScope<RadioButton>(); }
public DesignPanel() { this.Focusable = true; this.Margin = new Thickness(16); DesignerProperties.SetIsInDesignMode(this, true); _eatAllHitTestRequests = new EatAllHitTestRequests(); _eatAllHitTestRequests.MouseDown += delegate { // ensure the design panel has focus while the user is interacting with it this.Focus(); }; _eatAllHitTestRequests.AllowDrop = true; _adornerLayer = new AdornerLayer(this); this.PreviewKeyUp += DesignPanel_KeyUp; this.PreviewKeyDown += DesignPanel_KeyDown; }
//------------------------------------------------------------------- // // Constructors // //------------------------------------------------------------------- #region Constructors /// <summary> /// Default DependencyObject constructor /// </summary> /// <remarks> /// Automatic determination of current Dispatcher. Use alternative constructor /// that accepts a Dispatcher for best performance. /// </remarks> public ScrollContentPresenter() : base() { _adornerLayer = new AdornerLayer(); }
private FocusVisualAdorner(FrameworkElement element) { adornerLayer = AdornerLayer.GetAdornerLayer(element); adorner = new Adorner(element) { Child = new Control { Style = element.FocusVisualStyle, Focusable = false } }; adornerLayer.Add(adorner); }