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 #3402

Merged
merged 1 commit into from
Dec 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ NUGET
Caliburn.Micro (3.2)
Caliburn.Micro.Core (3.2)
Caliburn.Micro.Core (3.2)
ControlzEx (4.0.0-alpha0210)
ControlzEx (4.0.0-alpha0218)
Microsoft.Xaml.Behaviors.Wpf (>= 1.0.1)
Costura.Fody (3.2.1)
Fody (>= 3.3.3) - restriction: || (== net45) (== net46) (== net47) (&& (== netcoreapp3.0) (>= net40))
ExposedObject (1.2)
Fody (3.3.3)
JetBrains.Annotations (2018.2.1) - copy_local: true
MahApps.Metro.IconPacks (3.0.0-alpha0096)
MaterialDesignColors (1.1.3)
MaterialDesignThemes (2.5.1-ci1255)
MaterialDesignThemes (2.5.1-ci1267)
MaterialDesignColors (>= 1.1)
Microsoft.Build.Tasks.Git (1.0.0-beta-63127-02) - copy_local: true
Microsoft.CodeCoverage (15.9)
Expand Down Expand Up @@ -66,6 +67,7 @@ NUGET
Microsoft.Win32.Registry (4.5) - restriction: || (&& (== net45) (>= netcoreapp1.0)) (&& (== net46) (>= netcoreapp1.0)) (&& (== net47) (>= netcoreapp1.0)) (== netcoreapp3.0)
System.Security.AccessControl (>= 4.5) - restriction: || (&& (== net45) (>= monoandroid)) (&& (== net45) (>= monotouch)) (&& (== net45) (>= net461)) (&& (== net45) (>= netcoreapp2.0)) (&& (== net45) (>= netstandard2.0)) (&& (== net45) (>= xamarinios)) (&& (== net45) (>= xamarinmac)) (&& (== net45) (>= xamarintvos)) (&& (== net45) (>= xamarinwatchos)) (&& (== net46) (>= monoandroid)) (&& (== net46) (>= monotouch)) (&& (== net46) (>= net461)) (&& (== net46) (>= netcoreapp2.0)) (&& (== net46) (>= xamarinios)) (&& (== net46) (>= xamarinmac)) (&& (== net46) (>= xamarintvos)) (&& (== net46) (>= xamarinwatchos)) (== net47) (== netcoreapp3.0)
System.Security.Principal.Windows (>= 4.5) - restriction: || (&& (== net45) (>= monoandroid)) (&& (== net45) (>= monotouch)) (&& (== net45) (>= net461)) (&& (== net45) (>= netcoreapp2.0)) (&& (== net45) (>= netstandard2.0)) (&& (== net45) (>= xamarinios)) (&& (== net45) (>= xamarinmac)) (&& (== net45) (>= xamarintvos)) (&& (== net45) (>= xamarinwatchos)) (&& (== net46) (>= monoandroid)) (&& (== net46) (>= monotouch)) (&& (== net46) (>= net461)) (&& (== net46) (>= netcoreapp2.0)) (&& (== net46) (>= xamarinios)) (&& (== net46) (>= xamarinmac)) (&& (== net46) (>= xamarintvos)) (&& (== net46) (>= xamarinwatchos)) (== net47) (== netcoreapp3.0)
Microsoft.Xaml.Behaviors.Wpf (1.0.1)
NETStandard.Library (2.0.3) - restriction: || (== net45) (&& (== net46) (< net452)) (&& (== net46) (>= netcoreapp1.0)) (&& (== net47) (< net452)) (&& (== net47) (>= netcoreapp1.0)) (== netcoreapp3.0)
Microsoft.NETCore.Platforms (>= 1.1)
System.Runtime.InteropServices.RuntimeInformation (>= 4.3) - restriction: || (== net45) (== net46) (&& (== net47) (< net45)) (&& (== net47) (< netstandard1.0)) (&& (== net47) (< netstandard1.3)) (&& (== net47) (< netstandard1.4)) (&& (== net47) (>= uap10.0)) (&& (== netcoreapp3.0) (< netstandard1.0)) (&& (== netcoreapp3.0) (< netstandard1.2)) (&& (== netcoreapp3.0) (< netstandard1.3)) (&& (== netcoreapp3.0) (< netstandard1.4)) (&& (== netcoreapp3.0) (< netstandard1.5)) (&& (== netcoreapp3.0) (< netstandard1.6)) (&& (== netcoreapp3.0) (< netstandard2.0)) (&& (== netcoreapp3.0) (>= uap10.0))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<Costura DisableCompression="false" />
</Weavers>
111 changes: 111 additions & 0 deletions src/MahApps.Metro.Samples/MahApps.Metro.Caliburn.Demo/FodyWeavers.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCleanup" type="xs:boolean">
<xs:annotation>
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<TargetFrameworks>net45;net46;net47</TargetFrameworks>
<AssemblyName>MahApps.Metro.Caliburn.Demo</AssemblyName>
<RootNamespace>Caliburn.Metro.Demo</RootNamespace>
<DisableFody Condition="'$(Configuration)' == 'Debug'">true</DisableFody>
</PropertyGroup>
<PropertyGroup>
<OutputType>WinExe</OutputType>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
JetBrains.Annotations
Fody
Costura.Fody content: once
MahApps.Metro.IconPacks
Caliburn.Micro
exclude System.Windows.Interactivity
Caliburn.Micro
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
namespace MetroDemo.Behaviors
{
using System;
using System.Windows.Interactivity;
using System.Windows.Threading;
using MahApps.Metro.Controls;
using System;
using System.Windows.Threading;
using MahApps.Metro.Controls;
using Microsoft.Xaml.Behaviors;

namespace MetroDemo.Behaviors
{
public class DateTimeNowBehavior : Behavior<DateTimePicker>
{
private DispatcherTimer _dispatcherTimer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:MetroDemo="clr-namespace:MetroDemo"
xmlns:behaviours="http://metro.mahapps.com/winfx/xaml/shared"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DataContext="{d:DesignInstance MetroDemo:MainWindowViewModel}"
d:DesignHeight="600"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xmlns:behaviors="clr-namespace:MetroDemo.Behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:globalization="clr-namespace:System.Globalization;assembly=mscorlib"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:system="clr-namespace:System;assembly=mscorlib"
d:DataContext="{d:DesignInstance MetroDemo:MainWindowViewModel}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<controls:MetroWindow x:Class="MetroDemo.ExampleWindows.InteropDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:behaviours="clr-namespace:MahApps.Metro.Behaviours;assembly=MahApps.Metro"
xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:winForms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
Title="Interop Demo"
Width="800"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:actions="clr-namespace:MahApps.Metro.Actions;assembly=MahApps.Metro"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:metroDemo="clr-namespace:MetroDemo"
xmlns:system="clr-namespace:System;assembly=mscorlib"
Expand Down
1 change: 1 addition & 0 deletions src/MahApps.Metro.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,7 @@
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro/Actions/CommandTriggerAction.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Windows;
using System.Windows.Input;
using System.Windows.Interactivity;
using Microsoft.Xaml.Behaviors;

namespace MahApps.Metro.Actions
{
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro/Behaviours/BindableResourceBehavior.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Windows;
using System.Windows.Interactivity;
using System.Windows.Shapes;
using Microsoft.Xaml.Behaviors;

namespace MahApps.Metro.Behaviours
{
Expand Down
13 changes: 7 additions & 6 deletions src/MahApps.Metro/Behaviours/DatePickerTextBoxBehavior.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
namespace MahApps.Metro.Behaviours
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Threading;
using MahApps.Metro.Controls;
using Microsoft.Xaml.Behaviors;

namespace MahApps.Metro.Behaviours
{
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Interactivity;
using System.Windows.Threading;
using MahApps.Metro.Controls;

public class DatePickerTextBoxBehavior : Behavior<DatePickerTextBox>
{
Expand Down
3 changes: 1 addition & 2 deletions src/MahApps.Metro/Behaviours/PasswordBoxBindingBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Interactivity;
using System.Windows.Threading;
using MahApps.Metro.Controls;
using Microsoft.Xaml.Behaviors;

namespace MahApps.Metro.Behaviours
{
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro/Behaviours/StylizedBehaviorCollection.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Windows;
using System.Windows.Interactivity;
using Microsoft.Xaml.Behaviors;

namespace MahApps.Metro.Behaviours
{
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro/Behaviours/StylizedBehaviors.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Diagnostics;
using System.Windows;
using System.Windows.Interactivity;
using Microsoft.Xaml.Behaviors;

namespace MahApps.Metro.Behaviours
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Interactivity;
using Microsoft.Xaml.Behaviors;

namespace MahApps.Metro.Behaviours
{
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro/Behaviours/TiltBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Interactivity;
using System.Windows.Media;
using MahApps.Metro.Controls;
using Microsoft.Xaml.Behaviors;

namespace MahApps.Metro.Behaviours
{
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro/Behaviours/WindowsSettingBehaviour.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Interactivity;
using System.Windows.Interop;
using ControlzEx.Native;
using ControlzEx.Standard;
using MahApps.Metro.Controls;
using Microsoft.Xaml.Behaviors;

namespace MahApps.Metro.Behaviours
{
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro/Styles/Controls.DatePicker.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
xmlns:Converters="clr-namespace:MahApps.Metro.Converters"
xmlns:behaviours="clr-namespace:MahApps.Metro.Behaviours"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity">
xmlns:i="http://schemas.microsoft.com/xaml/behaviors">

<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Shared.xaml" />
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro/Styles/VS/TabControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:Actions="clr-namespace:MahApps.Metro.Actions"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity">
xmlns:i="http://schemas.microsoft.com/xaml/behaviors">

<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.TabControl.xaml" />
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro/Themes/DateTimePicker.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:Behaviours="clr-namespace:MahApps.Metro.Behaviours"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
xmlns:Converters="clr-namespace:MahApps.Metro.Converters"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:system="clr-namespace:System;assembly=mscorlib">

<ResourceDictionary.MergedDictionaries>
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro/Themes/Flyout.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
xmlns:actions="clr-namespace:MahApps.Metro.Actions"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity">
xmlns:i="http://schemas.microsoft.com/xaml/behaviors">

<DataTemplate x:Key="HeaderTemplate" x:Shared="False">
<DockPanel x:Name="dpHeader"
Expand Down
Loading