I have a WPF UserControl
with a DependancyProperty
that I would like to assign the default BindingMode
of OneWayToSource
.
So far, I've only found the FrameworkPropertyMetadataOptions.BindsTwoWayByDefault
flag for the FrameworkPropertyMetadata
, which lets me set OneWay
or TwoWay
binding as the default, but I can't find anything that allows me to set OneWayToSource
as the default.
Current DependancyProperty
registration:
public static readonly DependencyProperty ThumbDeltaProperty =
DependencyProperty.Register("ThumbDelta", typeof(ThumbDeltaInfo), typeof(ThumbLink),
new FrameworkPropertyMetadata(defaultValue: default(ThumbDeltaInfo),
flags: FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
Is it possible to set OneWayToSource
as the default BindingMode
of a DependancyProperty
in WPF?