wpftoolkit icon indicating copy to clipboard operation
wpftoolkit copied to clipboard

CheckComboBox: Disable AllItemsSelectedContent

Open TimKras opened this issue 3 years ago • 2 comments

We are missing the option to disable the behavior when you select all Items and the 'SelectedContent' is All. It should be configurable if you want to display 'All', or a concat string all selected items.

TimKras avatar Nov 14 '22 14:11 TimKras

Any update on this? Versions 4.4 and above are unusable for me.

tim-rue avatar Mar 15 '23 10:03 tim-rue

Hi,

You are right !

This will be fixed in v4.6

In the meantime, here's a workaround : Use your own CheckComboBox and override the UpdateText() method: `public class MyCheckComboBox : CheckComboBox { protected override void UpdateText() { string newValue = String.Join( this.Delimiter, this.SelectedItems.Cast().Select( x => this.GetItemDisplayValue( x ) ) );

  if( string.IsNullOrEmpty( this.Text ) || !this.Text.Equals( newValue ) )
  {
    this.SetCurrentValue( CheckComboBox.TextProperty, newValue );
  }
}

}`

Thank you

XceedBoucherS avatar Mar 15 '23 14:03 XceedBoucherS