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

WinUI Compatibility #225

Closed
JeganRavichandran opened this issue Jan 10, 2022 · 4 comments
Closed

WinUI Compatibility #225

JeganRavichandran opened this issue Jan 10, 2022 · 4 comments

Comments

@JeganRavichandran
Copy link

#192 is this resolved?

It looks like event to command is not working https://www.nuget.org/packages/Microsoft.Xaml.Behaviors.WinUI.Managed/

CommunityToolkit/WindowsCommunityToolkit#4448

@michael-hawker
Copy link
Contributor

@JeganRavichandran are you using the latest package versions and Visual Studio versions? These things should be working?

Can you provide a minimal project that reproduces the issue?

FYI @DVaughan @azchohfi

@michael-hawker
Copy link
Contributor

May be a duplicate of #221

@JeganRavichandran
Copy link
Author

JeganRavichandran commented Jan 11, 2022

@michael-hawker @DVaughan @azchohfi

Please refer to this simple demo.
Branch: https://github.com/SyncfusionExamples/Multiple-selection-made-easy-using-WinUI-ComboBox-control/tree/225-XamlBehavior-integration
MR: SyncfusionExamples/Multiple-selection-made-easy-using-WinUI-ComboBox-control#1

Expected:
OnInputSubmitted method in ViewModel should be called when the control is loaded.

            <Interactions:EventTriggerBehavior EventName="Loaded">
            <!--<Interactions:EventTriggerBehavior EventName="InputSubmitted">-->
                <Interactions:InvokeCommandAction Command="{Binding InputSubmitted}"/>
                <!--<Interactions:CallMethodAction MethodName="OnInputSubmitted" TargetObject="{Binding}"/>-->
            </Interactions:EventTriggerBehavior>

Issue:
OnInputSubmitted method in ViewModel is not called when the control is loaded.

I am getting this error in the output window.

Exception thrown at 0x74F2B5B2 (KernelBase.dll) in MultiselectComboBox.exe: 0x40080202: WinRT transform error (parameters: 0x8000000B, 0x80070490, 0x00000014, 0x02F7BF74).

@JeganRavichandran
Copy link
Author

JeganRavichandran commented Jan 11, 2022

It looks like I missed adding within Behaviors attached property.

<Interactivity:Interaction.Behaviors>

event to commands works after adding this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants