I am using the following code to find each line that starts with "@" and format it by making it bold:
foreach (var line in tweetText.Document.Blocks)
{
var text = new TextRange(line.ContentStart,
line.ContentEnd).Text;
line.FontWeight = text.StartsWith("@") ?
FontWeights.Bold : FontWeights.Normal;
}
However, I would like to use the code to find each word instead of line beginning with "@" so I could format a paragraph like:
See Question&Answers more detail:osBlah blah blah @username blah blah blah blah @anotherusername