HandyControl
HandyControl copied to clipboard
SplitButton can not raise Command
Describe the bug
I create a SplitButton
, At first I used Click
event, but clicking on the dropdown button also triggers Click
event, which is not what I want.
Then I used Command
, but it never triggered the command. I tried HandyControl's SimpleRelayCommand
, AsyncComand
etc. but to no avail!
Steps to reproduce the bug
- Create a
SplitButton
- Add Command(SimpleRelayCommand)
Expected behavior
No response
Screenshots
No response
NuGet package version
HandyControls (Custom version) 3.4.0
IDE
Visual Studio 2022
Framework type
.Net 6.0
Windows version
Windows 11 (22000)
Additional context
No response
Share a temporary solution to this issue:
private void MySplitButton_Click(object sender, RoutedEventArgs e)
{
if (MySplitButton.IsDropDownOpen)
{
return;
}
// Do something.
}
can not reproduce, pls provide demo.
I created a new simple example, but I can't reproduce the problem either, and since my problem project has changed, I can't restore it for now, and this issue is closed for now.