A poor man's workaround for this problem is to create a user control that wraps the WebBrowser and offers the needed dependency properties. Here is a quick example:
XAML Defenition (MyWebBrowser.xaml):
<UserControl x:Class="RSSTest.MyWebBrowser"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="Auto" Width="Auto">
<WebBrowser Name="mWebBrowser">
</WebBrowser>
</UserControl>
C# code (MyWebBrowser.cs):
public partial class MyWebBrowser
{
public MyWebBrowser()
InitializeComponent();
}
public WebBrowser WebBrowser { get { return mWebBrowser; } }
public static readonly DependencyProperty StringHtmlProperty =
DependencyProperty.Register("StringHtml", typeof(string), typeof(MyWebBrowser),
new PropertyMetadata(new PropertyChangedCallback(OnStringHtmlChanged)));
public string StringHtml
get { return (string)GetValue(StringHtmlProperty); }
set { SetValue(StringHtmlProperty, value); }
private static void OnStringHtmlChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
MyWebBrowser me = (MyWebBrowser)d;
me.WebBrowser.NavigateToString(me.StringHtml);
public static readonly DependencyProperty UriProperty =
DependencyProperty.Register("Uri", typeof(Uri), typeof(MyWebBrowser),
new PropertyMetadata(new PropertyChangedCallback(OnUriChanged)));
public Uri Uri
get { return (Uri)GetValue(UriProperty); }
set { SetValue(UriProperty, value); }
private static void OnUriChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
me.WebBrowser.Navigate(me.Uri);
Binding Examples:
<local:MyWebBrowser Uri="{Binding Path=Link}"/>
<local:MyWebBrowser StringHtml ="{Binding Path=HtmlString}"/>
<local:MyWebBrowser StringHtml="{Binding Path=Description, StringFormat={}<HTML><BODY\>\{0\}\<BODY\>\<HTML\>}"/>
Merhaba. mırç Sohbet, ailesi olarak chat, ve muhabbet, ve mirc hizmeti vermekteyiz.Bunun yanında papatya sohbet, mirc indir gibi hizmetlerimizde mevcut.Yorum biraz basit oldu ama neyse. etiketler ; sohbet, Chat, sohbet odaları, muhabbet, mirc, Papatya Sohbet, mirc indir
Merhaba. tek Sohbet, ailesi olarak chat, ve muhabbet, ve mirc hizmeti vermekteyiz.Bunun yanında papatya sohbet, mirc indir gibi hizmetlerimizde mevcut.Yorum biraz basit oldu ama neyse. etiketler ; sohbet, Chat, sohbet odaları, muhabbet, mirc, Papatya Sohbet, mirc indir