Пример #1
0
        public static void OnHtmlChanged(DependencyObject s, DependencyPropertyChangedEventArgs e)
        {
            HtmlTextBlock sender = (HtmlTextBlock)s;

            sender.Inlines.Clear();


            HtmlTagTree tree   = new HtmlTagTree();
            HtmlParser  parser = new HtmlParser(tree);            //output

            parser.Parse(new StringReader(e.NewValue as string)); //input

            HtmlUpdater updater = new HtmlUpdater(sender);        //output

            updater.Update(tree);                                 //input
        }
Пример #2
0
        public static void OnHtmlChanged(DependencyObject s, DependencyPropertyChangedEventArgs e)
        {
            HtmlTextBlock sender = (HtmlTextBlock)s;

            sender.Parse((string)e.NewValue);
        }