We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75ae4e7 commit e4a3870Copy full SHA for e4a3870
1 file changed
maui/src/Button/SfButton.Methods.cs
@@ -900,16 +900,7 @@ protected override void ChangeVisualState()
900
#else
901
string stateName = IsEnabled ? _isPressed ? "Pressed" : IsCheckable && IsChecked ? "Checked" : "Normal" : IsCheckable && IsChecked ? "Checked" : "Disabled";
902
#endif
903
- var stateGroup = VisualStateManager.GetVisualStateGroups(this);
904
- var findName = "Normal";
905
- foreach (VisualStateGroup state in stateGroup)
906
- {
907
- foreach (var a in state.States)
908
909
- findName = a.Name == stateName ? stateName : findName;
910
- }
911
912
- VisualStateManager.GoToState(this, findName);
+ VisualStateManager.GoToState(this, stateName);
913
InvalidateDrawable();
914
}
915
0 commit comments