wpftoolkit icon indicating copy to clipboard operation
wpftoolkit copied to clipboard

CheckListBox. When I check/uncheck <Select all> the Command don't execute

Open Andrey-2021 opened this issue 3 years ago • 5 comments

Hi!

When I check/uncheck <Select all> the Command don't execute!!!

I think is not correct, this is error, because each Item is checked/unchecked. The Command must be execute.

Thanks.

Andrey-2021 avatar Sep 28 '22 12:09 Andrey-2021

Hello which command are you talking about ? Is it suppose to be when you check the "Select All" checkBox or when you check the last CheckBox and all the other ones are checked ?

<xctk:CheckListBox IsSelectAllActive="True"> <ListBoxItem Content="AAA" /> <ListBoxItem Content="BBB" /> <ListBoxItem Content="CCC" /> </xctk:CheckListBox>

XceedBoucherS avatar Sep 29 '22 19:09 XceedBoucherS

I am seeing the same issue with CheckComboBox. A command (implementing ICommand) bound to the Command property is not invoked when check/uncheck the Select All checkbox. ItemSelectionChanged is still raised for Select All, and the command is invoked when individual checkboxes are clicked (as expected).

This issue does not occur with version 3.8.2. I am guessing some change added in v4.0.0 affected this behavior. I haven't looked into deeply but could the following change affect it? image

kmaki565 avatar Jan 08 '23 14:01 kmaki565

Hi, Try to go in file Xceed.Wpf.Toolkit/Primitives/SelectAllSelector.cs, in method SelectAll(), and add the following in the foreach: if( this.Command != null ) { this.Command.Execute( item ); }

You can do the same in the UnSelectAll() method.

This will be fixed in v4.6.

Thank you

XceedBoucherS avatar Jan 10 '23 18:01 XceedBoucherS

I confirmed the suggested change fixed the issue. Thank you! May I ask when the next version will be released?

kmaki565 avatar Jan 11 '23 12:01 kmaki565

Hi,

There is no release date planned yet, but I would bet for a few months. Thank you

XceedBoucherS avatar Jan 11 '23 20:01 XceedBoucherS