public int GetRangeTextLength(TextRange range)
 {
     return CreateDocumentSnapshot().GetRangeTextLength(range);
 }
 public string GetRangeText(TextRange range)
 {
     return CreateDocumentSnapshot().GetRangeText(range);
 }