Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing PointerOver VisualState for Button on Windows #9119

Closed
ghost opened this issue Aug 1, 2022 · 1 comment
Closed

Missing PointerOver VisualState for Button on Windows #9119

ghost opened this issue Aug 1, 2022 · 1 comment
Labels
area-controls-button Button, ImageButton platform/windows 🪟 proposal/open t/desktop The issue relates to desktop scenarios (MacOS/MacCatalyst/Windows/WinUI/WinAppSDK) t/enhancement ☀️ New feature or request
Milestone

Comments

@ghost
Copy link

ghost commented Aug 1, 2022

Description

I want to change the style of a button when the pointer is moving over it. The same feature exists in WPF as PointerOver VisualState.

Public API Changes

`
<VisualStateManager.VisualStateGroups>


<VisualState.Setters>

</VisualState.Setters>

        <VisualState x:Name="Focused">
            <VisualState.Setters>
                <Setter Property="BackgroundColor" Value="Yellow" />
            </VisualState.Setters>
        </VisualState>

        <VisualState x:Name="PointerOver">
            <VisualState.Setters>
                <Setter Property="BackgroundColor" Value="Red" />
            </VisualState.Setters>
        </VisualState>

        <VisualState x:Name="Disabled">
            <VisualState.Setters>
                <Setter Property="BackgroundColor" Value="Pink" />
            </VisualState.Setters>
        </VisualState>
    </VisualStateGroup>
</VisualStateManager.VisualStateGroups>

`

Intended Use-Case

In my application I want to give the user an indication when the pointer is moving over a button by styling that button with a different background.

@ghost ghost added the proposal/open label Aug 1, 2022
@Eilon Eilon added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Aug 2, 2022
@jfversluis jfversluis added t/enhancement ☀️ New feature or request legacy-area-desktop Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) labels Aug 4, 2022
@jfversluis jfversluis added this to the Backlog milestone Aug 4, 2022
@hartez
Copy link
Contributor

hartez commented Dec 3, 2022

This was implemented in #9592 - PointerOver is now available as a VisualState in Windows and Mac Catalyst.

@hartez hartez closed this as completed Dec 3, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jan 2, 2023
@Eilon Eilon added t/desktop The issue relates to desktop scenarios (MacOS/MacCatalyst/Windows/WinUI/WinAppSDK) and removed legacy-area-desktop Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-button Button, ImageButton platform/windows 🪟 proposal/open t/desktop The issue relates to desktop scenarios (MacOS/MacCatalyst/Windows/WinUI/WinAppSDK) t/enhancement ☀️ New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants