Ejemplo n.º 1
0
        public EditTextLayout()
        {
            ICanvasTextItem textMeasurer = new CanvasItemFactory().createCanvasTextItem();

            charecterDimensions = textMeasurer.measureText("a");

            this.handleMouseEvent += mouseEventHandler;
            this.handleKeyPress   += keyboardEventHandler;
            this.onFocus          += () =>
            {
                isViewFocused = true;
            };
            this.onLostFocus += () =>
            {
                makingSelection = false;
                scroller.stopScrolling();
                isViewFocused = false;
            };
        }
        public JsonLayout()
        {
            ICanvasTextItem textMeasurer = new CanvasItemFactory().createCanvasTextItem();

            charecterDimensions = textMeasurer.measureText("a");

            this.handleMouseEvent += mouseEventHandler;
            this.onFocus          += () =>
            {
                isViewFocused = true;
                edgeColor     = new Color(0, 90, 180);
            };
            this.onLostFocus += () =>
            {
                makingSelection = false;
                scroller.stopScrolling();
                isViewFocused = false;
                edgeColor     = new Color(170, 170, 170);
            };
        }