Esempio n. 1
0
        /// <summary>
        /// set the location on the canvas of the caret symbol.
        /// </summary>
        /// <param name="Location"></param>
        public void SetCaretTextBlockLocation(
            IRowCol Location, bool TraceBlinkPos = false)
        {
            var pos = Location.ToCanvasPos(Screen.CanvasDefn.CharBoxDim);

            System.Windows.Controls.Canvas.SetLeft(CaretTextBlock, pos.X);
            System.Windows.Controls.Canvas.SetTop(CaretTextBlock, pos.Y);
        }
Esempio n. 2
0
        public Point AddItemToCanvas(IRowCol RowCol, FrameworkElement Elem)
        {
            // calc the x,y dot position of the visual item.
            var pos = RowCol.ToCanvasPos(this.CanvasDefn.CharBoxDim);

            this.Canvas.Children.Add(Elem);
            System.Windows.Controls.Canvas.SetLeft(Elem, pos.X);
            System.Windows.Controls.Canvas.SetTop(Elem, pos.Y);

            return(pos);
        }