Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <TextBlock Style="{StaticResource WordStyle}" x:Name="Foo"><Bold>d</Bold>o o<Bold>dd</Bold></TextBlock>
  2.  
  3. Foo.Inlines.Clear();
  4.  
  5. // Bold text.
  6. var block = new Run();
  7. block.Text = "d";
  8. block.FontWeight = FontWeights.Bold;
  9. Foo.Inlines.Add(block);
  10.  
  11. // Regular text.
  12. block = new Run();
  13. block.Text = "o o";
  14. Foo.Inlines.Add(block);
  15.  
  16. // Bold and italics text.
  17. block = new Run();
  18. block.FontStyle = FontStyle.Italic;
  19. block.FontWeight = FontWeights.Bold;
  20. block.Text = "dd";
  21. Foo.Inlines.Add(block);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement