public void DoesItWork() { var input = new StringPart("test > test-1", true); var output = new XamlHighlighter().Highlight(new[] { input, new StringPart("test"), }); Assert.That(output, Is.EqualTo("<Bold>test > test-1</Bold>test")); }
private static void AddPrefixNumbersToFormattedTitle(ICollection <AppWindowViewModel> windowCollection) { var windowList = windowCollection.ToList(); for (var i = 0; (i < 10) && (i < windowList.Count); i++) { var numberPrefix = new XamlHighlighter().Highlight(new[] { new StringPart("" + ((i + 1) % 10) + " ", true) }); windowList[i].FormattedTitle = numberPrefix + windowList[i].FormattedTitle; } }