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

New Post: Custom Text for CheckComboBox based on items selected

$
0
0
Hi,

Starting at v3.1, you can override the CheckComboBox.UpdateText() method to display the text you want :
 public class MyCheckComboBox : CheckComboBox
  {
    protected override void UpdateText()
    {
      if( this.SelectedItems.Count == this.Items.Count )
      {
        this.SetCurrentValue( MyCheckComboBox.TextProperty, "All Items are selected." );
      }
      else if( this.SelectedItems.Count <= 1 )
      {
        base.UpdateText();
      }
      else
      {
        this.SetCurrentValue( MyCheckComboBox.TextProperty, this.SelectedItems.Count + " items are selected." );
      }
    }
  }
――――
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>