Skip to content

Instantly share code, notes, and snippets.

@patridge
Last active January 22, 2016 21:10
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 patridge/c3fc1419e7e14447fda2 to your computer and use it in GitHub Desktop.
Save patridge/c3fc1419e7e14447fda2 to your computer and use it in GitHub Desktop.
Attempt at making a non-generic refactor-friendly BindableProperty. (Some back-story on the deprecation and my motivation: https://twitter.com/PatridgeDev/status/690620310870106112.)
public class SomeButton : Button {
public string ExampleThing {
get { return (string)GetValue(ExampleThingBindableProperty); }
set { SetValue(ExampleThingBindableProperty, value); }
}
public static readonly BindableProperty ExampleThingBindableProperty =
BindableProperty.Create(nameof(ExampleThing), typeof(string), typeof(Button), default(string));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment