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

Use Microsoft.Xaml.Behaviors.Wpf instead the System.Windows.Interactivity #3400

Closed
punker76 opened this issue Dec 11, 2018 · 3 comments · Fixed by #3402
Closed

Use Microsoft.Xaml.Behaviors.Wpf instead the System.Windows.Interactivity #3400

punker76 opened this issue Dec 11, 2018 · 3 comments · Fixed by #3402
Assignees
Milestone

Comments

@punker76
Copy link
Member

punker76 commented Dec 11, 2018

Use Microsoft.Xaml.Behaviors.Wpf as dependency from NuGet instead the System.Windows.Interactivity.dll

This will remove the reference to System.Windows.Interactivity.dll which is sometimes bad for other projects which are also use this dll.

With this change it's necessary to change the namespace too, so this is a breaking change for all others too.

Steps to migrate:

  1. Remove reference to Microsoft.Expression.Interactions and System.Windows.Interactivity
  2. Install the Microsoft.Xaml.Behaviors.Wpf NuGet package.
  3. XAML files – replace the xmlns namespaces http://schemas.microsoft.com/expression/2010/interactivity and http://schemas.microsoft.com/expression/2010/interactions with http://schemas.microsoft.com/xaml/behaviors
  4. C# files – replace the usings in c# files Microsoft.Xaml.Interactivity and Microsoft.Xaml.Interactions with Microsoft.Xaml.Behaviors

https://blogs.msdn.microsoft.com/dotnet/2018/12/10/open-sourcing-xaml-behaviors-for-wpf/

@navin21
Copy link

navin21 commented Sep 15, 2020

System.Windows.Markup.XamlParseException
HResult=0x80131501
Message='Add value to collection of type 'Microsoft.Xaml.Behaviors.TriggerCollection' threw an exception.' Line number '132' and line position '60'.
Source=PresentationFramework

Inner Exception 1:
ArgumentException: "EventTrigger" is not a valid type for the TriggerType parameter. Make sure "EventTrigger" derives from TriggerBase

for dotnetframework 4.7.2 for my wpf project how can I resolve this any idea

@batzen
Copy link
Collaborator

batzen commented Oct 3, 2020

Maybe you are trying to mix types from Microsoft.Xaml.Behaviors.Wpf and System.Windows.Interactivity?
Are you using both assemblies?

@navin21
Copy link

navin21 commented Oct 4, 2020 via email

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

Successfully merging a pull request may close this issue.

3 participants