private static void HtmlChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) { NewHtmlBlock instance = (NewHtmlBlock)o; if (instance._itemsControl != null) { var html = new HtmlDocument(); html.LoadHtml(e.NewValue.ToString()); instance.RenderBody(html.DocumentNode); } }
private static void NavigationCommandChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) { NewHtmlBlock instance = (NewHtmlBlock)o; if (instance._textBoxes != null) { foreach (var textBlock in instance._textBoxes) { foreach (var hyperlink in textBlock.GetChildInlines().OfType <Hyperlink>()) { hyperlink.Command = instance.NavigationCommand; } } } }