-
Notifications
You must be signed in to change notification settings - Fork 768
Open
Labels
area-BindingbugSomething isn't workingSomething isn't workingproduct-winui3WinUI 3 issuesWinUI 3 issuesteam-MarkupIssue for the Markup teamIssue for the Markup teamwct
Description
Describe the bug
Enumeration values passed as command parameters get bound as Int32
s rather than their enumeration type. Below is a basic example:
XAML
<Button Command={x:Bind VM.MyCommand}>
<Button.CommandParameter>
<local:MyEnum>SomeValue<\local:MyEnum>
<\Button.CommandParameter>
</Button>
ViewModel
private void DoMyCommand(object parameter)
{
parameter.GetType() // System.Int32
}
Steps to reproduce the bug
Minimal repro using template:
Expected behavior
Parameter gets bound as the Enumeration type.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.1.4
Windows app type
- UWP
- Win32
Device form factor
Desktop
Windows version
Windows 10 (21H2): Build 19044
Additional context
No response
michael-hawker and bogdan-patraucean
Metadata
Metadata
Assignees
Labels
area-BindingbugSomething isn't workingSomething isn't workingproduct-winui3WinUI 3 issuesWinUI 3 issuesteam-MarkupIssue for the Markup teamIssue for the Markup teamwct