System.Windows.Documents.TextPointer.GetCharacterRect C# (CSharp) Method

GetCharacterRect() public method

public GetCharacterRect ( LogicalDirection direction ) : Rect
direction LogicalDirection
return Rect
		public Rect GetCharacterRect (LogicalDirection direction)
		{
			return NativeMethods.text_pointer_get_character_rect (native, direction);
		}

Usage Example

コード例 #1
0
ファイル: Console.cs プロジェクト: anurse/Coco
 private static void AdjustMarker(Shape marker, TextPointer pointer)
 {
     var rect = pointer.GetCharacterRect(LogicalDirection.Forward);
     marker.Margin = new Thickness(rect.Left, rect.Top, 0, 0);
     marker.Visibility = System.Windows.Visibility.Visible;
     marker.Fill = pointer.LogicalDirection == LogicalDirection.Forward ? Brushes.HotPink : Brushes.Yellow;
 }