1

I am switching my old System.Windows.Interactivity nuget packages to Microsoft.Xaml.Behaviors.Wpf . This is leading to compilation errors for the following

<b:Interaction.Triggers> <b:EventTrigger EventName="Click"> <cal:ActionMessage MethodName="Start"/> </b:EventTrigger> </b:Interaction.Triggers> 

Where ActionMessage is Caliburn.Micro.ActionMessage.

The error I am getting is the following

Error XDG0048 The specified value cannot be assigned to the collection. The following type was expected: "TriggerAction".

How can I upgrade while maintaining functionality?

6
  • Check if you are using supported version of Caliburn Micro require for Microsoft.Xaml.Behaviors.Wpf. Alternatively try with short syntax like <Button cal:Message.Attach="[Event MouseEnter] = [Action Save]"> Commented Feb 24, 2020 at 9:51
  • @user1672994 I updated to the latest Caliburn.Micro, nothing happened. From what I see on the github, not supported yet. But When you say switch to button syntax, that would replace the actionmessage? Where would that xaml go? I am a backend guy Commented Feb 24, 2020 at 9:53
  • According to this commit and description, Microsoft.Xaml.Behaviors.Wpf was added already and exists in 4.0.109-alpha version of CM. You can use myget feed to get an alpha version Commented Feb 24, 2020 at 10:12
  • @pavelanikhouski Alpha version. Not stable, not in Nuget yet Commented Feb 24, 2020 at 10:14
  • @JohnDemetriou yes, you're right, it isn't stable yet. You can use the stable 3.2.0 version or wait for stable 4.x version of CM :) Commented Feb 24, 2020 at 10:15

1 Answer 1

1

Given that Caliburn.Micro currently does not support the latest Microsoft.Behaviors.Xaml.Wpf Nuget package from microsoft until Version 4, which at the moment of writing is at alpha stage. My solution to this was to use CallMethodAction from Microsoft.Behaviors.Xaml.Wpf and later replace it with InvokeCommandAction which is prefered anyway since it is binding on commands instead of methods

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.