Ejemplo n.º 1
0
 public WpfHtmlControlBase()
 {
     _htmlControl = new HtmlControl();
     _htmlControl.LoadResource += OnLoadResource;
     _htmlControl.SetBinding(HtmlControl.HtmlProperty, new Binding(nameof(Html))
     {
         Source = this
     });
     _htmlControl.SetBinding(HtmlControl.BackgroundProperty, new Binding(nameof(Background))
     {
         Source = this
     });
     _htmlControl.SetBinding(HtmlControl.ForegroundProperty, new Binding(nameof(Foreground))
     {
         Source = this
     });
     _htmlControl.SetBinding(HtmlControl.FontFamilyProperty, new Binding(nameof(FontFamily))
     {
         Source = this
     });
     _htmlControl.SetBinding(HtmlControl.FontSizeProperty, new Binding(nameof(FontSize))
     {
         Source = this
     });
     AddVisualChild(_htmlControl);
 }