Inheritance: System.Windows.Controls.Control
コード例 #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);
            }
        }
コード例 #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;
                    }
                }
            }
        }