In WPF, I would like to be able to template how my bindings are applied by default.
For instance, I want to write :
Text=\"{Binding Path=PedigreeName}\"
In addition to Joe White's good answer, you could also create a class that inherits from Binding and sets the default property values you need. For instance :
public class TwoWayBinding : Binding
{
public TwoWayBinding()
{
Initialize();
}
public TwoWayBinding(string path)
: base(path)
{
Initialize();
}
private void Initialize()
{
this.Mode = BindingMode.TwoWay;
}
}