Aug 3, 2010 at 4:21 PM
Edited Aug 3, 2010 at 4:22 PM
Hello List !
I tried to declare a binding targeting the CurrentTextProperty of the Fluent.ComboBox. The source of the binding is a public property of some of my objects.
It seems that binding does not work here for some reason. I see that the CurrentText property of the ComboBox has the value I enter/select, but the binding source is not updated. However, the same does work well with the ContentProperty of a Fluent.TextBox
There's one difference between the dependecy property declarations of the two controls:
1) For the ComboBox it is:
public static readonly DependencyProperty CurrentTextProperty =
DependencyProperty.Register("CurrentText", typeof(string), typeof(ComboBox), new UIPropertyMetadata("",OnCurrentTextChanged));
2) For the TextBox it's:
public static readonly DependencyProperty ContentProperty =
DependencyProperty.Register("Content", typeof(string), typeof(TextBox),
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
null, null, true, UpdateSourceTrigger.LostFocus));
Maybe the reason for the not-working binding is the UIPropertyMetadata-style of declaration for the ComboBox.
Can anyone help / fix this?