microsoft/XamlBehaviors

WinUI Compatibility

JeganRavichandran opened this issue · 4 comments

@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

May be a duplicate of #221

@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).

It looks like I missed adding within Behaviors attached property.

<Interactivity:Interaction.Behaviors>

event to commands works after adding this.