microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.36k stars 678 forks source link

Disabled Buttons - UX Improvement #10019

Open Ajaiqmar opened 1 month ago

Ajaiqmar commented 1 month ago

Describe the bug

Noticed, that the disabled buttons doesn't seem to show Tooltips and it lets the click event bubble to the parent controls.

It seems vital to show the tooltip even in the disabled state, If the button just contains an Icon. Noticed this in the Windows Settings App.

image

Here the tooltip is shown, but incase we have reached the GoBack limit, The button disables and the tooltip isn't appearing anymore. And whether bubbling the event seems to be ideal or not is based on the UI that we opt for.

Keen to know, What's your take on this?

And checked out the same behaviour in Mac for comparison and found that they do show Tooltip and Nullify the event bubbling.

Steps to reproduce the bug

  1. Go to Windows Settings Page

Expected behavior

No response

Screenshots

No response

NuGet package version

None

Packaging type

No response

Windows version

No response

IDE

No response

Additional context

No response

castorix commented 1 month ago

You can use a Container like a transparent Grid For example, in this test, the Tooltip is displayed even when the Button is disabled :

        <Grid Margin="10, 10, 10, 10" Background="Transparent">
            <Button x:Name="btn1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0, 0, 0, 0" Width="60" Height="60"               
                    Click="btn1_Click" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
                    FontFamily="Segoe UI Emoji" FontSize="40" Content="&#x1F4BE;" Padding="0, 0, 0, 0" >
            </Button>
            <ToolTipService.ToolTip>
                <ToolTip Content="This is a Tooltip" Placement="Bottom" Background="LightYellow" Foreground="Black"/>
            </ToolTipService.ToolTip>
        </Grid>
codendone commented 1 month ago

Same as #1149?