Visual Studio 2017 - What happened to Expression interactions?

后端 未结 3 1939
日久生厌
日久生厌 2020-12-09 01:22

I make extensive use of Expression interactions\' CallMethodAction to handle events from XAML in a MVVM-friendly way.

I have just created a new WPF project in VS2017

相关标签:
3条回答
  • 2020-12-09 01:40

    A little update as for 2020:

    As mentioned by Jan in other question:

    Microsoft open-sourced XAML Behaviours and posted a blog post how to update to this version.

    Steps to proceed with update:

    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”
    0 讨论(0)
  • 2020-12-09 01:55

    CallMethodAction is defined in Microsoft.Expressions.Interactions.dll. This assembly is not part of the .NET Framework but you can download it using NuGet: https://www.nuget.org/packages/MicrosoftExpressionInteractions/

    And the InvokeCommandAction class is defined in System.Windows.Interactivity.dll assembly: https://www.nuget.org/packages/System.Windows.Interactivity.WPF/

    0 讨论(0)
  • 2020-12-09 02:00

    Use the Visual Studio 2017 installer to install "Blend for Visual Studio SDK for .NET", which you can find on the "Individual components" page, under the "SDKs, libraries, and frameworks" heading.

    0 讨论(0)
提交回复
热议问题