During the migration of WPF projects based on. Net framework to. Net core 3, system.windows.interactivity is no longer compatible.

The following is the specific migration process:

1. Replace package

Open nuget package manager, remove references to Microsoft.Expression.Interactions and System.Windows.Interactivity, and install Microsoft.Xaml.Behaviors.Wpf package.

2. Replace xmlns namespace

Here is an example code:

xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" 

Replaced by:

xmlns:Behaviors="http://schemas.microsoft.com/xaml/behaviors"

3. Replace the namespace in the class file

Microsoft.Xaml.Interactivity and Microsoft.Xaml.Interactions replace by Microsoft.Xaml.Behaviors


More about Microsoft.Xaml.Behaviors.Wpf ,Click XAMLBehaviorsSample

Like The Article To View All

You May Also Like

You come to this world, You need to see the sun...

All Comments

Leave a Reply Cancel Reply

Tips: Your email address will not be disclosed!

If you can't see clearly,please click to change...