WPF - Use Microsoft.Xaml.Behaviors.Wpf

Migrate from System.Windows.Interactivity.WPF to Microsoft.Xaml.Behaviors.Wpf
This commit is contained in:
amaitland
2020-08-26 16:27:10 +10:00
committed by Alex Maitland
parent 4ce32a4778
commit 337b617b46
6 changed files with 13 additions and 17 deletions

View File

@@ -4,7 +4,7 @@
xmlns:wpf="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
xmlns:cef="clr-namespace:CefSharp;assembly=CefSharp.Core"
xmlns:behaviours="clr-namespace:CefSharp.MinimalExample.Wpf.Behaviours"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
Title="{Binding Path=Title, ElementName=Browser, Converter={StaticResource TitleConverter}}"
WindowState="Maximized">
<Grid>
@@ -32,9 +32,9 @@
<Button Content="Back" Command="{Binding WebBrowser.BackCommand, ElementName=Browser}" Width="50"/>
<Button Content="Forward" Command="{Binding WebBrowser.ForwardCommand, ElementName=Browser}" Grid.Column="1" Width="60"/>
<TextBox x:Name="txtBoxAddress" Text="{Binding Address, ElementName=Browser, FallbackValue=www.google.com}" Grid.Column="2" FontSize="12" BorderBrush="Gray" BorderThickness="1">
<i:Interaction.Behaviors>
<behaviors:Interaction.Behaviors>
<behaviours:TextBoxBindingUpdateOnEnterBehaviour />
</i:Interaction.Behaviors>
</behaviors:Interaction.Behaviors>
</TextBox>
<Button Content="Print..." Command="{Binding WebBrowser.PrintCommand, ElementName=Browser}" Grid.Column="3" Width="50" />
<Button Content="View source" Command="{Binding WebBrowser.ViewSourceCommand, ElementName=Browser}" Grid.Column="4" Width="75" />
@@ -42,9 +42,9 @@
<Border Grid.Row="1" BorderBrush="Gray" BorderThickness="0,1">
<wpf:ChromiumWebBrowser x:Name="Browser"
Address="www.google.com">
<i:Interaction.Behaviors>
<behaviors:Interaction.Behaviors>
<behaviours:HoverLinkBehaviour x:Name="HoverLinkBehaviour"/>
</i:Interaction.Behaviors>
</behaviors:Interaction.Behaviors>
</wpf:ChromiumWebBrowser>
</Border>
<ProgressBar IsIndeterminate="{Binding IsLoading, ElementName=Browser}"