/// <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); }
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); }