Inheritance: System.Windows.Controls.Control
Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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;
                    }
                }
            }
        }