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
850
XamComboEditor SelectedValues only setting last value in object array.
posted

I have a XamComboEditor like so

                        <ig:XamComboEditor Name="cmbProviderList"
                                           EmptyText="--ALL--"
                                           AllowMultipleSelection="True"
                                           Width="245"
                                           Margin="0,0,0,20"
                                           HorizontalAlignment="Left"
                                           ItemsSource="{Binding ProviderList}"
                                           DisplayMemberPath="DisplayName"
                                           SelectedValuePath="DisplayName"/>

I'm setting the SelectedValues in code behind like so

            object[] providers = new object[userPullListParameters.ProviderName.Count];
            for (int i = 0; i < userPullListParameters.ProviderName.Count; i++)
            {
                providers[i] = userPullListParameters.ProviderName[i];
            }
            cmbProviderList.SelectedValues = providers;

I can verify that the object array contains 3 strings, however only the last item in the array ends up set in the combobox.

Thanks

Peter