short syntax for WPF DependencyProperty registration

Would like to share short syntax for depencecy properties registration found on web

public static readonly DependencyProperty TypeNameProperty = 
	
	RegisterProperty(_ => _.TypeName).OnChange(_ => _.OnTypeNameChanged);



public static readonly DependencyProperty BankClientProperty = 
	
	RegisterProperty(_ => _.Client).Default(null);

Just take a look how clean and easy it looks!

Found at the https://github.com

DependencyPropertyRegistrar source code is stored at the https://gist.github.com/zlatanov/

Tags:

Categories:

Updated: