public ScrollContentPresenter()
        {
            innerScrollInfo = new InnerScrollInfo();
            delegateScrollInfo = innerScrollInfo;

            AdornerLayer = new AdornerLayer();
            AddVisualChild(AdornerLayer);
        }
Example #2
0
        public Window()
        {
            SetResourceInheritanceParent(Application.Current);

            AdornerLayer = new AdornerLayer();
            AddVisualChild(AdornerLayer);

            PopupLayer = new PopupLayer();
            AddVisualChild(PopupLayer);

            radioButtonGroupScope = new SelectionGroupScope<RadioButton>();
        }
Example #3
0
        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;
        }
Example #4
0
        //-------------------------------------------------------------------
        //
        //  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();
        }
Example #5
0
            private FocusVisualAdorner(FrameworkElement element)
            {
                adornerLayer = AdornerLayer.GetAdornerLayer(element);
                adorner = new Adorner(element) { Child = new Control { Style = element.FocusVisualStyle, Focusable = false } };

                adornerLayer.Add(adorner);
            }