示例#1
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);
        }
示例#2
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;
        }