-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
area-controls-buttonButton, ImageButtonButton, ImageButtonfixed-in-7.0.100fixed-in-7.0.101fixed-in-7.0.59Look for this fix in 7.0.59!Look for this fix in 7.0.59!fixed-in-8.0.0-preview.1.7762Look for this fix in 8.0.0-preview.1.7762!Look for this fix in 8.0.0-preview.1.7762!platform/windowss/needs-attentionIssue has more information and needs another lookIssue has more information and needs another looks/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
When I set up the Button's "IsEnabled" property, programmatically. The expected behavior is working in all platforms. However, the formatting of the button in the Windows Platform gets lost after a couple of changes. In the Android platform it works as expected.
Steps to Reproduce
- Create a new Maui App
- Add a Grid and a StackLayout with two buttons
- Disable of the buttons by setting IsEnabled="False"
- Add code to programmatically change the is enabled property.
<Grid BackgroundColor="Black">
<StackLayout Orientation="Horizontal" HorizontalOptions="Center">
<Button x:Name="btn1" Text="Start" WidthRequest="100" Background="Green" Clicked="btn1_Clicked"></Button>
<Button x:Name="btn2" Text="Stop" WidthRequest="100" Background="Green" Clicked="btn2_Clicked" IsEnabled="False"></Button>
</StackLayout>
</Grid>
private void btn1_Clicked(object sender, EventArgs e)
{
btn1.IsEnabled = false;
btn2.IsEnabled = true;
}
private void btn2_Clicked(object sender, EventArgs e)
{
btn1.IsEnabled = true;
btn2.IsEnabled = false;
}
5.Click on the buttons a couple of times to enable and disable them. After the first cycle both buttons will look disabled. the functionality will still be working but it is confusing for the user. This only happens in windows, not in Android or IOS.
Version with bug
Release Candidate 3 (current)
Last version that worked well
Release Candidate 3 (current)
Affected platforms
Windows
Affected platform versions
Windows 11
Did you find any workaround?
No
Relevant log output
No response
wbaldoumas, shillingp, ShinQdan and chaddoncooper
Metadata
Metadata
Assignees
Labels
area-controls-buttonButton, ImageButtonButton, ImageButtonfixed-in-7.0.100fixed-in-7.0.101fixed-in-7.0.59Look for this fix in 7.0.59!Look for this fix in 7.0.59!fixed-in-8.0.0-preview.1.7762Look for this fix in 8.0.0-preview.1.7762!Look for this fix in 8.0.0-preview.1.7762!platform/windowss/needs-attentionIssue has more information and needs another lookIssue has more information and needs another looks/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working