Skip to content

Commit 337b617

Browse files
committed
WPF - Use Microsoft.Xaml.Behaviors.Wpf
Migrate from System.Windows.Interactivity.WPF to Microsoft.Xaml.Behaviors.Wpf
1 parent 4ce32a4 commit 337b617

6 files changed

Lines changed: 13 additions & 17 deletions

File tree

CefSharp.MinimalExample.Wpf/Behaviours/HoverLinkBehaviour.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using CefSharp.Wpf;
22
using System.Windows;
3-
using System.Windows.Interactivity;
43
using System;
4+
using Microsoft.Xaml.Behaviors;
55

66
namespace CefSharp.MinimalExample.Wpf.Behaviours
77
{

CefSharp.MinimalExample.Wpf/Behaviours/TextBoxBindingUpdateOnEnterBehaviour.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using System.Windows.Interactivity;
2-
using System.Windows.Controls;
1+
using System.Windows.Controls;
32
using System.Windows.Input;
3+
using Microsoft.Xaml.Behaviors;
44

55
namespace CefSharp.MinimalExample.Wpf.Behaviours
66
{

CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.csproj

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,16 @@
7070
<ApplicationManifest>app.manifest</ApplicationManifest>
7171
</PropertyGroup>
7272
<ItemGroup>
73-
<Reference Include="Microsoft.Expression.Interactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
74-
<HintPath>..\packages\System.Windows.Interactivity.WPF.2.0.20525\lib\net40\Microsoft.Expression.Interactions.dll</HintPath>
75-
<Private>True</Private>
73+
<Reference Include="Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
74+
<HintPath>..\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.19\lib\net45\Microsoft.Xaml.Behaviors.dll</HintPath>
7675
</Reference>
7776
<Reference Include="System" />
78-
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
79-
<HintPath>..\packages\System.Windows.Interactivity.WPF.2.0.20525\lib\net40\System.Windows.Interactivity.dll</HintPath>
80-
<Private>True</Private>
81-
</Reference>
8277
<Reference Include="Microsoft.CSharp" />
8378
<Reference Include="System.Core" />
8479
<Reference Include="System.Xaml">
8580
<RequiredTargetFramework>4.0</RequiredTargetFramework>
8681
</Reference>
82+
<Reference Include="System.XML" />
8783
<Reference Include="WindowsBase" />
8884
<Reference Include="PresentationCore" />
8985
<Reference Include="PresentationFramework" />

CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.netcore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
</ItemGroup>
3434

3535
<ItemGroup>
36-
<PackageReference Include="System.Windows.Interactivity.WPF" Version="2.0.20525" />
3736
<PackageReference Include="CefSharp.Wpf" Version="84.4.10" />
37+
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.19" />
3838
</ItemGroup>
3939

4040
<ItemGroup>

CefSharp.MinimalExample.Wpf/MainWindow.xaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:wpf="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
55
xmlns:cef="clr-namespace:CefSharp;assembly=CefSharp.Core"
66
xmlns:behaviours="clr-namespace:CefSharp.MinimalExample.Wpf.Behaviours"
7-
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
7+
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
88
Title="{Binding Path=Title, ElementName=Browser, Converter={StaticResource TitleConverter}}"
99
WindowState="Maximized">
1010
<Grid>
@@ -32,19 +32,19 @@
3232
<Button Content="Back" Command="{Binding WebBrowser.BackCommand, ElementName=Browser}" Width="50"/>
3333
<Button Content="Forward" Command="{Binding WebBrowser.ForwardCommand, ElementName=Browser}" Grid.Column="1" Width="60"/>
3434
<TextBox x:Name="txtBoxAddress" Text="{Binding Address, ElementName=Browser, FallbackValue=www.google.com}" Grid.Column="2" FontSize="12" BorderBrush="Gray" BorderThickness="1">
35-
<i:Interaction.Behaviors>
35+
<behaviors:Interaction.Behaviors>
3636
<behaviours:TextBoxBindingUpdateOnEnterBehaviour />
37-
</i:Interaction.Behaviors>
37+
</behaviors:Interaction.Behaviors>
3838
</TextBox>
3939
<Button Content="Print..." Command="{Binding WebBrowser.PrintCommand, ElementName=Browser}" Grid.Column="3" Width="50" />
4040
<Button Content="View source" Command="{Binding WebBrowser.ViewSourceCommand, ElementName=Browser}" Grid.Column="4" Width="75" />
4141
</Grid>
4242
<Border Grid.Row="1" BorderBrush="Gray" BorderThickness="0,1">
4343
<wpf:ChromiumWebBrowser x:Name="Browser"
4444
Address="www.google.com">
45-
<i:Interaction.Behaviors>
45+
<behaviors:Interaction.Behaviors>
4646
<behaviours:HoverLinkBehaviour x:Name="HoverLinkBehaviour"/>
47-
</i:Interaction.Behaviors>
47+
</behaviors:Interaction.Behaviors>
4848
</wpf:ChromiumWebBrowser>
4949
</Border>
5050
<ProgressBar IsIndeterminate="{Binding IsLoading, ElementName=Browser}"

CefSharp.MinimalExample.Wpf/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
<package id="cef.redist.x86" version="84.4.1" targetFramework="net452" />
55
<package id="CefSharp.Common" version="84.4.10" targetFramework="net452" />
66
<package id="CefSharp.Wpf" version="84.4.10" targetFramework="net452" />
7-
<package id="System.Windows.Interactivity.WPF" version="2.0.20525" targetFramework="net452" />
7+
<package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.19" targetFramework="net452" />
88
</packages>

0 commit comments

Comments
 (0)