You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proposal: Support for declaring the cursor for a XAML UI Element
Summary
In WPF, you can easily change the cursor of an element. However, in WinUI you have to subscribe to the OnPointerEntered and OnPointerExited events and change the shown cursor accordingly using WinRT APIs in a UWP CoreWindow or Win32 APIs in a Desktop HWND or use the XAML extensions from Windows Community Toolkit. WinUI should offer a built-in way to change the cursor.
Rationale
Many developers who are familiar with WPF expect a straightforward way to change the cursor of any element. Although devs can use Windows Community Toolkit, I believe that WinUI should offer it built-in. This will also allow C++ devs to change the cursor within XAML markup. It will also be better if we could define custom cursor in XAML without code-behind (Refer this link).
Scope
Capability
Priority
This proposal will allow developers to set the mouse cursor for a UI Element using XAML markup
Must
This proposal will allow developers to set the mouse cursor for a UI Element from code-behind without pointer events
Must
This proposal will allow developers to define and use custom cursors in markup without code-behind
Could
Important Notes
UIElement should have a Cursor property of CoreCursor. It should also work with WinUI Desktop Apps.
The text was updated successfully, but these errors were encountered:
Proposal: Support for declaring the cursor for a XAML UI Element
Summary
In WPF, you can easily change the cursor of an element. However, in WinUI you have to subscribe to the OnPointerEntered and OnPointerExited events and change the shown cursor accordingly using WinRT APIs in a UWP CoreWindow or Win32 APIs in a Desktop HWND or use the XAML extensions from Windows Community Toolkit. WinUI should offer a built-in way to change the cursor.
Rationale
Many developers who are familiar with WPF expect a straightforward way to change the cursor of any element. Although devs can use Windows Community Toolkit, I believe that WinUI should offer it built-in. This will also allow C++ devs to change the cursor within XAML markup. It will also be better if we could define custom cursor in XAML without code-behind (Refer this link).
Scope
Important Notes
UIElement should have a Cursor property of CoreCursor. It should also work with WinUI Desktop Apps.
The text was updated successfully, but these errors were encountered: