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
60
XamComboEditor ComboBoxItem Bind Selection
posted

I have a xamComboEditor bound to a DataView in my ViewModel.

The DataView has 3 fields textfield, valuefield, and IsSelected.

I am trying to bind to a property that would indicate that a ComboBoxItem IsSelected.

Using the included combo box with wpf,  I would do this with the item container style.

Like this.

<ComboBox Grid.Column="1" ItemsSource="{Binding Values}" DisplayMemberPath="textfield">

            <ComboBox.ItemContainerStyle>

                    <Style TargetType="{x:Type ComboBoxItem}">

                        <Setter Property="IsSelected" Value="{Binding Path=IsSelected, Mode=TwoWay}"/>

                    </Style>

            </ComboBox.ItemContainerStyle>

        </ComboBox>

 

The end result of this sets which item is selected and updates that dataview as the selection changes.

How do I achieve the same thing using the XamComboEditor?