Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
754
XamCheckEditor: issues with late binding to viewmodel
posted

Good Morning,

after resolving some problems with the Theme property and custom styles we now find out that XamCheckEditor has issues with a very special requirement we have currently: Setting the DataContext property of the xaml form at runtime. Remark: The xaml we bind is used as an adorner. Maybe thats the source of the problem?

In this case the data binding for the checked property will not work as intended.

Steps to reproduce:

- Define 2 checkboxes and a text editor:

<igEditor:XamCheckEditor Value="{Binding SomeBoolProperty}"/>
<CheckBox Grid.Column="1" IsChecked="{Binding SomeBoolProperty}"/>
<igEditor:XamTextEditor Grid.Column="2" Value="{Binding SomeBoolProperty}"/>


- Do not set a DataContext for the upper container. Instead, bind the DataContext property of the xaml window at runtime to some data source which has "SomeBoolProperty" defined (and set to true for example).

- You will notice that the windows checkbox will refresh its binding and show the checked state, whereas the XamCheckEditor does not follow. XamTextEditor, however also correctly shows "True" in its text area. Changing the windows control correctly shows False in the text editor.

I attach a screenshot of the result...

BR Florian

Parents Reply Children