Skip to content

[Material] Pressed/Enabled visual state remains when clicking on a Button to disable itself #1542

Open
@rajamatt

Description

@rajamatt

Current behavior

The Button in question has a click event that disables it:

20250514-1310-07.4455887.mp4

Expected behavior

The Button should properly display the disabled state when it is disabled upon being clicked.

  1. Set up a simple Material Button (any style) with a Click event:
public void Button_Click(object sender, RoutedEventArgs e)
{
	if (sender is Button button)
	{
		button.IsEnabled = false;
	}
}
  1. Upon clicking the Button, notice that it doesn't appear disabled, even though it no longer accepts clicks.

Environment

Nuget Package:

Package Version(s):

Affected platform(s): All

Anything else we need to know?

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions