Skip to content

Instantly share code, notes, and snippets.

@renestein
Created December 6, 2010 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renestein/730057 to your computer and use it in GitHub Desktop.
Save renestein/730057 to your computer and use it in GitHub Desktop.
public class WebBrowserNavigateBehavior : Behavior<WebBrowser>
{
public static string GetNavigateText(DependencyObject obj)
{
return (string)obj.GetValue(NavigateText);
}
public static void SetNavigateText(DependencyObject obj, string value)
{
obj.SetValue(NavigateText, value);
}
// Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...
public static readonly DependencyProperty NavigateText =
DependencyProperty.RegisterAttached("NavigateText", typeof(string), typeof(WebBrowserNavigateBehavior), new PropertyMetadata(String.Empty,
NavigateTextChanged));}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment