Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: mark all the options in checkcombobox checked for the initial load.

$
0
0
Hi,

If you want to select all the items from the ChecComboBox, you have to set its SelectedItems to the Items of the checkComboBox.
A possibility could be to listen to the Loaded event of the CheckComboBox and to set its SelectedItems at that moment :
<xctk:CheckComboBox ItemsSource="{Binding Values}"
                        Loaded="CheckComboBox_Loaded" />

 private void CheckComboBox_Loaded( object sender, RoutedEventArgs e )
    {
      var checkComboBox = sender as CheckComboBox;
      if( checkComboBox != null )
      {
        checkComboBox.SelectedItemsOverride = checkComboBox.ItemsSource as IList;
       //or
      //  foreach( var item in checkComboBox.Items )
      // {
      //    checkComboBox.SelectedItems.Add( item );
      // }
      }
    }
――――
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>