Advertisement
eduardogr

Untitled

Nov 7th, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1.   richEbitBox.Document.Selection.SetRange(0, richEbitBox.Document.Selection.EndPosition);
  2.  
  3.             var id = sender as ComboBox;
  4.             switch (id.Tag) {
  5.  
  6.                 case "1":
  7.                     //Todo implement new font name
  8.                     string fontName = id.SelectedItem.ToString();
  9.                     richEbitBox.Document.Selection.CharacterFormat.Name = fontName;
  10.                     break;
  11.                 case "2":
  12.                     var size = (float)id.SelectedItem;
  13.                     //set size to the Selection
  14.                     richEbitBox.Document.Selection.CharacterFormat.Size = size;
  15.                     break;
  16.                 default:
  17.                     break;
  18.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement