Hello,The XamTextEditor and the standard WPF TextBox components behave differend with the text databinding, this causes our model to get dirty and other issues listening to a propertychange event. My first question is why that the difference exists and what the reason for it is. My second question is if it's possible to override the default behaviour.Thru i still believe that the property should not be set when the text is not being altered.Default textbox, when the textbox is clicked nothing happens, only when modified the property is set.<TextBox Text="{Binding Path=Naam}"></TextBox>
XalTextEditor, when the editor is clicked or gets focus as first control, the property is being set with the loaded value, which ofcourse is the same the first time.<igEditors:XamTextEditor Text="{Binding Path=Naam}">
You may want to refer to a similar discussion on this thread.
I disagree with the discussion, infragistic components behave differend as standard WPF components. It's not just the UpdateSourceTrigger being PropertyChanged. Having a standard WPF TextBox with the UpdateSourceTrigger on PropertyChanged the property setter isn't being called. Using standard WPF components don't require the setter evaluating if the value differs (which will hit performance a bit)
I don't agree. None of the intrinsic controls compare the value they are about to set to the value that is stored in the dependency property. So if you had a textbox with a Text value of "a" and you select the text and type "a" or you in code set the Text property to "a", you will get the setter of the target of the binding called. When you enter/exit edit mode our editors do recalculate the text based on the value in case the valuetotextconverter's implementation is such that its dependant on being in edit mode or not - e.g. to apply or not apply formatting. I don't really see how entering/exiting edit mode, which is a rather infrequent action, would lead to a performance hit. Note you could bind to the Value property instead of the Text property.