Freigeben über


"Those who cannot remember the past are condemned to repeat it." [WebBrowserExtensions.StringSource attached dependency property makes Silverlight/Windows Phone/WPF's WebBrowser control more XAML- and binding-friendly]

**

This blog has moved to a new location and comments have been disabled.

All old posts, new posts, and comments can be found on The blog of dlaa.me.

See you there!

Comments

  • Anonymous
    April 14, 2011
    I was trying to add this blog post to my favorites. But it doesn't work. Any idea? Adding the home site of your blog to favorites works fine, but not the specific site.

  • Anonymous
    April 14, 2011
    The comment has been removed

  • Anonymous
    April 14, 2011
    Just read the code of the extension: I guess the error in the encoding is still here (and here a better solution for that problem: codeclimber.net.nz/.../The-importance-of-performance-testing-in-a-Windows-Phone-7.aspx)

  • Anonymous
    April 14, 2011
    Hello David, based on your article I created a custom attached dependency property named XamlSource, which can be used to implement data binding for the RichTextBox.Xaml property. You can grab the source code of a demo app here: gallery.expression.microsoft.com/SLRTBAPSL4 and read an article on how to this demo app was built here: silverlawone.blogspot.com/.../datenbindung-fur-den-reichhaltigen-text.html The custom attached dependency property works hand in hand with my RichTextBox.Xaml Builder Addin, which one can download here: gallery.expression.microsoft.com/RTBXBAB41003SL Best regards, Martin

  • Anonymous
    April 15, 2011
    Martin Krüger, I'm not sure why you wouldn't be able to add this post to your favorites. Unfortunately, that's a feature of the blog hosting software I don't use, so I don't have any good troubleshooting steps. :( That aside, what you've done for RichTextBox.Xaml looks very neat! From what I gathered from reading the English translation of your article, the situation there is similar enough that the ideas here work there, too. Great stuff - thank you very much for sharing this! :)

  • Anonymous
    April 15, 2011
    Simone Chiaretta, No, I didn't set out to solve any encoding problem with the StringSource property - I think such things should probably be dealt with at a higher level (i.e., by the caller). And judging from your blog posts, that's exactly what you did! :) Great information - and what's funny is that I ran into pretty much the same problem as I was using the WebBrowser control and solved it similarly. Thanks very much for sharing your work with others! :)

  • Anonymous
    April 20, 2011
    I think the higher level to solve the problem should be the web browser control itself: the funny thing is that the encoding is dealt with correctly if navigating to a URL.

  • Anonymous
    April 20, 2011
    Simone Chiaretta, I agree - ideally the WebBrowser control would handle this better. :)

  • Anonymous
    April 21, 2011
    Couldn't this be done cleanly with a value converter?

  • Anonymous
    April 21, 2011
    Joshua Einstein, If you're referring to the "sanitization" of the input characters Simone Chiaretta discusses above, I believe you're right that could be done by using an IValueConverter on the Binding for the StringSource property.