diff --git a/Directory.build.props b/Directory.build.props
index 1a99d6c40..a04d50580 100644
--- a/Directory.build.props
+++ b/Directory.build.props
@@ -23,7 +23,7 @@
-
+
diff --git a/MvvmCross.Plugins/Accelerometer/MvvmCross.Plugin.Accelerometer.csproj b/MvvmCross.Plugins/Accelerometer/MvvmCross.Plugin.Accelerometer.csproj
index 75547f883..4419f30b3 100644
--- a/MvvmCross.Plugins/Accelerometer/MvvmCross.Plugin.Accelerometer.csproj
+++ b/MvvmCross.Plugins/Accelerometer/MvvmCross.Plugin.Accelerometer.csproj
@@ -20,6 +20,7 @@
+
diff --git a/MvvmCross.Plugins/Color/MvvmCross.Plugin.Color.csproj b/MvvmCross.Plugins/Color/MvvmCross.Plugin.Color.csproj
index 9a669075d..4087d168f 100644
--- a/MvvmCross.Plugins/Color/MvvmCross.Plugin.Color.csproj
+++ b/MvvmCross.Plugins/Color/MvvmCross.Plugin.Color.csproj
@@ -20,6 +20,7 @@
+
diff --git a/MvvmCross.Plugins/DownloadCache/MvvmCross.Plugin.DownloadCache.csproj b/MvvmCross.Plugins/DownloadCache/MvvmCross.Plugin.DownloadCache.csproj
index e282e0b6b..2e954c3f5 100644
--- a/MvvmCross.Plugins/DownloadCache/MvvmCross.Plugin.DownloadCache.csproj
+++ b/MvvmCross.Plugins/DownloadCache/MvvmCross.Plugin.DownloadCache.csproj
@@ -24,6 +24,7 @@
+
diff --git a/MvvmCross.Plugins/Email/MvvmCross.Plugin.Email.csproj b/MvvmCross.Plugins/Email/MvvmCross.Plugin.Email.csproj
index 901dfb673..b7a57ea66 100644
--- a/MvvmCross.Plugins/Email/MvvmCross.Plugin.Email.csproj
+++ b/MvvmCross.Plugins/Email/MvvmCross.Plugin.Email.csproj
@@ -20,6 +20,7 @@
+
diff --git a/MvvmCross.Plugins/File/MvvmCross.Plugin.File.csproj b/MvvmCross.Plugins/File/MvvmCross.Plugin.File.csproj
index f3185a411..f226b44f7 100644
--- a/MvvmCross.Plugins/File/MvvmCross.Plugin.File.csproj
+++ b/MvvmCross.Plugins/File/MvvmCross.Plugin.File.csproj
@@ -20,6 +20,7 @@
+
diff --git a/MvvmCross.Plugins/File/Platform/Wpf/Plugin.cs b/MvvmCross.Plugins/File/Platform/Wpf/Plugin.cs
index a4e483ec8..11582108b 100644
--- a/MvvmCross.Plugins/File/Platform/Wpf/Plugin.cs
+++ b/MvvmCross.Plugins/File/Platform/Wpf/Plugin.cs
@@ -1,4 +1,4 @@
-// Plugin.cs
+// Plugin.cs
// (c) Copyright Cirrious Ltd. http://www.cirrious.com
// MvvmCross is licensed using Microsoft Public License (Ms-PL)
// Contributions and inspirations noted in readme.md and license.txt
@@ -9,7 +9,7 @@ using System;
using System.IO;
using MvvmCross.Platform;
using MvvmCross.Platform.Exceptions;
-using MvvmCross.Platform.Platform;
+using MvvmCross.Platform.Logging;
using MvvmCross.Platform.Plugins;
namespace MvvmCross.Plugins.File.Wpf
@@ -49,4 +49,4 @@ namespace MvvmCross.Plugins.File.Wpf
_configuration = fileConfiguration;
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross.Plugins/Location/MvvmCross.Plugin.Location.csproj b/MvvmCross.Plugins/Location/MvvmCross.Plugin.Location.csproj
index 983570c83..1aa587c76 100644
--- a/MvvmCross.Plugins/Location/MvvmCross.Plugin.Location.csproj
+++ b/MvvmCross.Plugins/Location/MvvmCross.Plugin.Location.csproj
@@ -20,6 +20,10 @@
+
+
+
+
diff --git a/MvvmCross.Plugins/Network/MvvmCross.Plugin.Network.csproj b/MvvmCross.Plugins/Network/MvvmCross.Plugin.Network.csproj
index 58e0fd7ca..f85872b35 100644
--- a/MvvmCross.Plugins/Network/MvvmCross.Plugin.Network.csproj
+++ b/MvvmCross.Plugins/Network/MvvmCross.Plugin.Network.csproj
@@ -20,6 +20,7 @@
+
diff --git a/MvvmCross.Plugins/PhoneCall/MvvmCross.Plugin.PhoneCall.csproj b/MvvmCross.Plugins/PhoneCall/MvvmCross.Plugin.PhoneCall.csproj
index 7114b321f..e22fa99c3 100644
--- a/MvvmCross.Plugins/PhoneCall/MvvmCross.Plugin.PhoneCall.csproj
+++ b/MvvmCross.Plugins/PhoneCall/MvvmCross.Plugin.PhoneCall.csproj
@@ -20,6 +20,7 @@
+
diff --git a/MvvmCross.Plugins/PictureChooser/MvvmCross.Plugin.PictureChooser.csproj b/MvvmCross.Plugins/PictureChooser/MvvmCross.Plugin.PictureChooser.csproj
index 8680b9acd..8b29afb14 100644
--- a/MvvmCross.Plugins/PictureChooser/MvvmCross.Plugin.PictureChooser.csproj
+++ b/MvvmCross.Plugins/PictureChooser/MvvmCross.Plugin.PictureChooser.csproj
@@ -20,6 +20,7 @@
+
diff --git a/MvvmCross.Plugins/ResourceLoader/MvvmCross.Plugin.ResourceLoader.csproj b/MvvmCross.Plugins/ResourceLoader/MvvmCross.Plugin.ResourceLoader.csproj
index d5ecf045f..bbee25abd 100644
--- a/MvvmCross.Plugins/ResourceLoader/MvvmCross.Plugin.ResourceLoader.csproj
+++ b/MvvmCross.Plugins/ResourceLoader/MvvmCross.Plugin.ResourceLoader.csproj
@@ -20,6 +20,7 @@
+
diff --git a/MvvmCross.Plugins/Share/MvvmCross.Plugin.Share.csproj b/MvvmCross.Plugins/Share/MvvmCross.Plugin.Share.csproj
index 311c3de84..31688d8f9 100644
--- a/MvvmCross.Plugins/Share/MvvmCross.Plugin.Share.csproj
+++ b/MvvmCross.Plugins/Share/MvvmCross.Plugin.Share.csproj
@@ -20,6 +20,7 @@
+
diff --git a/MvvmCross.Plugins/Visibility/MvvmCross.Plugin.Visibility.csproj b/MvvmCross.Plugins/Visibility/MvvmCross.Plugin.Visibility.csproj
index f50cf031e..976855008 100644
--- a/MvvmCross.Plugins/Visibility/MvvmCross.Plugin.Visibility.csproj
+++ b/MvvmCross.Plugins/Visibility/MvvmCross.Plugin.Visibility.csproj
@@ -20,6 +20,8 @@
+
+
diff --git a/MvvmCross.Plugins/Visibility/Platform/Console/MvxConsoleVisibility.cs b/MvvmCross.Plugins/Visibility/Platform/Console/MvxConsoleVisibility.cs
index db180ad3d..03ec0820a 100644
--- a/MvvmCross.Plugins/Visibility/Platform/Console/MvxConsoleVisibility.cs
+++ b/MvvmCross.Plugins/Visibility/Platform/Console/MvxConsoleVisibility.cs
@@ -5,6 +5,7 @@
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
+using MvvmCross.Platform;
using MvvmCross.Platform.UI;
namespace MvvmCross.Plugins.Visibility.Console
@@ -21,4 +22,4 @@ namespace MvvmCross.Plugins.Visibility.Console
#endregion Implementation of IMvxNativeVisibility
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross.Plugins/Visibility/Platform/Console/Plugin.cs b/MvvmCross.Plugins/Visibility/Platform/Console/Plugin.cs
index d8d27e582..96dc5d555 100644
--- a/MvvmCross.Plugins/Visibility/Platform/Console/Plugin.cs
+++ b/MvvmCross.Plugins/Visibility/Platform/Console/Plugin.cs
@@ -20,4 +20,4 @@ namespace MvvmCross.Plugins.Visibility.Console
Mvx.RegisterSingleton(new MvxConsoleVisibility());
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross.Plugins/WebBrowser/MvvmCross.Plugin.WebBrowser.csproj b/MvvmCross.Plugins/WebBrowser/MvvmCross.Plugin.WebBrowser.csproj
index b9b0a615a..cd12277f9 100644
--- a/MvvmCross.Plugins/WebBrowser/MvvmCross.Plugin.WebBrowser.csproj
+++ b/MvvmCross.Plugins/WebBrowser/MvvmCross.Plugin.WebBrowser.csproj
@@ -20,6 +20,7 @@
+
diff --git a/MvvmCross.Tests/MvvmCross.Tests/Base/MvvmCross.Platform.Test.csproj b/MvvmCross.Tests/MvvmCross.Tests/Base/MvvmCross.Platform.Test.csproj
deleted file mode 100644
index f997555e5..000000000
--- a/MvvmCross.Tests/MvvmCross.Tests/Base/MvvmCross.Platform.Test.csproj
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {666EB95D-7CD8-48B6-A2F8-395DECC84140}
- Library
- Properties
- MvvmCross.Platform.Test
- MvvmCross.Platform.Test
- 512
- ..\..\..\
- true
- v4.5
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
- ..\..\..\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll
-
-
-
-
- Properties\AssemblyInfo.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
- {CFF6F25A-3C3B-44EE-A54C-2ED4AAFF3ADB}
- MvvmCross.Platform
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/MvvmCross.Tests/MvvmCross.Tests/Base/packages.config b/MvvmCross.Tests/MvvmCross.Tests/Base/packages.config
deleted file mode 100644
index 63a0b34d3..000000000
--- a/MvvmCross.Tests/MvvmCross.Tests/Base/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/MvvmCross/Core/Platform/Logging/LogProviders/ConsoleLogProvider.cs b/MvvmCross/Core/Platform/Logging/LogProviders/ConsoleLogProvider.cs
index 0190200ce..5fba26316 100644
--- a/MvvmCross/Core/Platform/Logging/LogProviders/ConsoleLogProvider.cs
+++ b/MvvmCross/Core/Platform/Logging/LogProviders/ConsoleLogProvider.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
@@ -70,20 +70,20 @@ namespace MvvmCross.Platform.Logging.LogProviders
if (Colors.TryGetValue(logLevel, out var color))
{
- var originalColor = Console.ForegroundColor;
+ var originalColor = System.Console.ForegroundColor;
try
{
- Console.ForegroundColor = color;
- Console.WriteLine(formattedMessage);
+ System.Console.ForegroundColor = color;
+ System.Console.WriteLine(formattedMessage);
}
finally
{
- Console.ForegroundColor = originalColor;
+ System.Console.ForegroundColor = originalColor;
}
}
else
{
- Console.WriteLine(formattedMessage);
+ System.Console.WriteLine(formattedMessage);
}
}
}
diff --git a/MvvmCross/MvvmCross.csproj b/MvvmCross/MvvmCross.csproj
index d620d213d..f56f29605 100644
--- a/MvvmCross/MvvmCross.csproj
+++ b/MvvmCross/MvvmCross.csproj
@@ -24,7 +24,10 @@
+
+
+
diff --git a/MvvmCross/Platform/Console/Views/MvxBaseConsoleContainer.cs b/MvvmCross/Platform/Console/Views/MvxBaseConsoleContainer.cs
index 14589bedd..c8842d8ed 100644
--- a/MvvmCross/Platform/Console/Views/MvxBaseConsoleContainer.cs
+++ b/MvvmCross/Platform/Console/Views/MvxBaseConsoleContainer.cs
@@ -9,6 +9,7 @@ using System;
using System.Collections.Generic;
using MvvmCross.Core.ViewModels;
using MvvmCross.Core.Views;
+using MvvmCross.Platform.Logging;
using MvvmCross.Platform.Platform;
namespace MvvmCross.Console.Views
@@ -52,4 +53,4 @@ namespace MvvmCross.Console.Views
public abstract void Close(IMvxViewModel toClose);
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Console/Views/MvxConsoleContainer.cs b/MvvmCross/Platform/Console/Views/MvxConsoleContainer.cs
index 4163f9303..f84f285b7 100644
--- a/MvvmCross/Platform/Console/Views/MvxConsoleContainer.cs
+++ b/MvvmCross/Platform/Console/Views/MvxConsoleContainer.cs
@@ -10,6 +10,7 @@ using System.Collections.Generic;
using MvvmCross.Core.ViewModels;
using MvvmCross.Platform;
using MvvmCross.Platform.Exceptions;
+using MvvmCross.Platform.Logging;
using MvvmCross.Platform.Platform;
namespace MvvmCross.Console.Views
@@ -107,4 +108,4 @@ namespace MvvmCross.Console.Views
}
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Base/Converters/MvxNativeValueConverter.cs b/MvvmCross/Platform/Wpf/Base/Converters/MvxNativeValueConverter.cs
index 74eaaf7ee..72d5e382d 100644
--- a/MvvmCross/Platform/Wpf/Base/Converters/MvxNativeValueConverter.cs
+++ b/MvvmCross/Platform/Wpf/Base/Converters/MvxNativeValueConverter.cs
@@ -1,4 +1,4 @@
-// MvxNativeValueConverter.cs
+// MvxNativeValueConverter.cs
// MvvmCross is licensed using Microsoft Public License (Ms-PL)
// Contributions and inspirations noted in readme.md and license.txt
@@ -42,7 +42,7 @@ namespace MvvmCross.Platform.Wpf.Converters
{
if (toReturn == MvxBindingConstant.DoNothing)
{
- return Binding.DoNothing;
+ return System.Windows.Data.Binding.DoNothing;
}
if (toReturn == MvxBindingConstant.UnsetValue)
@@ -70,4 +70,4 @@ namespace MvvmCross.Platform.Wpf.Converters
{
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/Bi.n.d.cs b/MvvmCross/Platform/Wpf/Binding/Bi.n.d.cs
index cf1fb077d..071cd8edd 100644
--- a/MvvmCross/Platform/Wpf/Binding/Bi.n.d.cs
+++ b/MvvmCross/Platform/Wpf/Binding/Bi.n.d.cs
@@ -5,13 +5,6 @@
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
-#if WINDOWS_COMMON
-using Windows.UI.Xaml;
-
-namespace MvvmCross.BindingEx.WindowsCommon
-#endif
-
-#if WINDOWS_WPF
using System.Collections.Generic;
using System.Windows;
using MvvmCross.Binding.Bindings;
@@ -20,7 +13,6 @@ using MvvmCross.Platform.Core;
using MvvmCross.Platform.Exceptions;
namespace MvvmCross.Binding.Wpf
-#endif
{
// ReSharper disable InconsistentNaming
public static class Bi
@@ -91,4 +83,4 @@ namespace MvvmCross.Binding.Wpf
return MvxSingleton.Instance.BindingDescriptionParser.Parse(bindingText);
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/IMvxBindingCreator.cs b/MvvmCross/Platform/Wpf/Binding/IMvxBindingCreator.cs
index 855d9e051..4d76e5ab4 100644
--- a/MvvmCross/Platform/Wpf/Binding/IMvxBindingCreator.cs
+++ b/MvvmCross/Platform/Wpf/Binding/IMvxBindingCreator.cs
@@ -5,20 +5,12 @@
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
-#if WINDOWS_COMMON
-using Windows.UI.Xaml;
-
-namespace MvvmCross.BindingEx.WindowsCommon
-#endif
-
-#if WINDOWS_WPF
using System;
using System.Collections.Generic;
using System.Windows;
using MvvmCross.Binding.Bindings;
namespace MvvmCross.Binding.Wpf
-#endif
{
public interface IMvxBindingCreator
{
@@ -27,4 +19,4 @@ namespace MvvmCross.Binding.Wpf
DependencyPropertyChangedEventArgs args,
Func> parseBindingDescriptions);
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/IMvxWindowsAssemblyCache.cs b/MvvmCross/Platform/Wpf/Binding/IMvxWindowsAssemblyCache.cs
index d82ea421c..81a123a9a 100644
--- a/MvvmCross/Platform/Wpf/Binding/IMvxWindowsAssemblyCache.cs
+++ b/MvvmCross/Platform/Wpf/Binding/IMvxWindowsAssemblyCache.cs
@@ -8,16 +8,10 @@
using System.Collections.Generic;
using System.Reflection;
-#if WINDOWS_COMMON
-namespace MvvmCross.BindingEx.WindowsCommon
-#endif
-
-#if WINDOWS_WPF
namespace MvvmCross.Binding.Wpf
-#endif
{
public interface IMvxWindowsAssemblyCache
{
IList Assemblies { get; }
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/Import.cs b/MvvmCross/Platform/Wpf/Binding/Import.cs
index 81256e03d..2dd6b03f3 100644
--- a/MvvmCross/Platform/Wpf/Binding/Import.cs
+++ b/MvvmCross/Platform/Wpf/Binding/Import.cs
@@ -12,13 +12,7 @@ using MvvmCross.Platform.Converters;
using MvvmCross.Platform.Core;
using MvvmCross.Platform.IoC;
-#if WINDOWS_COMMON
-namespace MvvmCross.BindingEx.WindowsCommon
-#endif
-
-#if WINDOWS_WPF
namespace MvvmCross.Binding.Wpf
-#endif
{
public class Import
{
@@ -40,11 +34,7 @@ namespace MvvmCross.Binding.Wpf
_from = value;
if (_from != null)
{
-#if WINDOWS_COMMON
- RegisterAssembly(_from.GetType().GetTypeInfo().Assembly);
-#else
RegisterAssembly(_from.GetType().Assembly);
-#endif
}
}
}
@@ -71,4 +61,4 @@ namespace MvvmCross.Binding.Wpf
}
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/La.n.g.cs b/MvvmCross/Platform/Wpf/Binding/La.n.g.cs
index 3d153f20d..3c2272b6a 100644
--- a/MvvmCross/Platform/Wpf/Binding/La.n.g.cs
+++ b/MvvmCross/Platform/Wpf/Binding/La.n.g.cs
@@ -5,23 +5,14 @@
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
-#if WINDOWS_COMMON
-using Windows.UI.Xaml;
-
-namespace MvvmCross.BindingEx.WindowsCommon
-#endif
-
-#if WINDOWS_WPF
using System;
using System.Windows;
using System.Collections.Generic;
-
using MvvmCross.Binding.Bindings;
using MvvmCross.Platform;
using MvvmCross.Platform.Core;
namespace MvvmCross.Binding.Wpf
-#endif
{
// ReSharper disable InconsistentNaming
public static class La
@@ -83,4 +74,4 @@ namespace MvvmCross.Binding.Wpf
return MvxSingleton.Instance.BindingDescriptionParser.LanguageParse(languageText);
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/MvxBinding/MvxMvvmCrossBindingCreator.cs b/MvvmCross/Platform/Wpf/Binding/MvxBinding/MvxMvvmCrossBindingCreator.cs
index a9997da9d..f50150f58 100644
--- a/MvvmCross/Platform/Wpf/Binding/MvxBinding/MvxMvvmCrossBindingCreator.cs
+++ b/MvvmCross/Platform/Wpf/Binding/MvxBinding/MvxMvvmCrossBindingCreator.cs
@@ -5,14 +5,6 @@
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
-#if WINDOWS_COMMON
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Data;
-
-namespace MvvmCross.BindingEx.WindowsCommon.MvxBinding
-#endif
-
-#if WINDOWS_WPF
using System;
using System.Collections.Generic;
using System.Linq;
@@ -21,7 +13,6 @@ using System.Windows.Data;
using MvvmCross.Binding.Bindings;
namespace MvvmCross.Binding.Wpf.MvxBinding
-#endif
{
@@ -60,12 +51,7 @@ namespace MvvmCross.Binding.Wpf.MvxBinding
attachedObject.SetValue(BindingsListProperty, newList);
// create a binding watcher for the list
-#if WINDOWS_WPF
var binding = new System.Windows.Data.Binding();
-#endif
-#if WINDOWS_COMMON
- var binding = new Windows.UI.Xaml.Data.Binding();
-#endif
bool attached = false;
Action attachAction = () =>
{
@@ -79,11 +65,8 @@ namespace MvvmCross.Binding.Wpf.MvxBinding
{
if (!attached)
return;
-#if WINDOWS_COMMON
- attachedObject.ClearValue(DataContextWatcherProperty);
-#else
+
BindingOperations.ClearBinding(attachedObject, DataContextWatcherProperty);
-#endif
attached = false;
};
attachAction();
@@ -145,4 +128,4 @@ namespace MvvmCross.Binding.Wpf.MvxBinding
}
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/MvxBinding/MvxWindowsTargetBindingFactoryRegistry.cs b/MvvmCross/Platform/Wpf/Binding/MvxBinding/MvxWindowsTargetBindingFactoryRegistry.cs
index a2260206b..531250d55 100644
--- a/MvvmCross/Platform/Wpf/Binding/MvxBinding/MvxWindowsTargetBindingFactoryRegistry.cs
+++ b/MvvmCross/Platform/Wpf/Binding/MvxBinding/MvxWindowsTargetBindingFactoryRegistry.cs
@@ -10,16 +10,7 @@ using MvvmCross.Binding.Bindings.Target.Construction;
using MvvmCross.Binding.Wpf.MvxBinding.Target;
using MvvmCross.Platform.Platform;
-#if WINDOWS_COMMON
-using MvvmCross.BindingEx.WindowsCommon.MvxBinding.Target;
-
-namespace MvvmCross.BindingEx.WindowsCommon.MvxBinding
-#endif
-
-#if WINDOWS_WPF
-
namespace MvvmCross.Binding.Wpf.MvxBinding
-#endif
{
public class MvxWindowsTargetBindingFactoryRegistry : MvxTargetBindingFactoryRegistry
{
@@ -65,4 +56,4 @@ namespace MvvmCross.Binding.Wpf.MvxBinding
return true;
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/MvxBinding/Target/MvxCollapsedTargetBinding.cs b/MvvmCross/Platform/Wpf/Binding/MvxBinding/Target/MvxCollapsedTargetBinding.cs
index e622abf98..b7b2c2ff7 100644
--- a/MvvmCross/Platform/Wpf/Binding/MvxBinding/Target/MvxCollapsedTargetBinding.cs
+++ b/MvvmCross/Platform/Wpf/Binding/MvxBinding/Target/MvxCollapsedTargetBinding.cs
@@ -5,13 +5,7 @@
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
-#if WINDOWS_COMMON
-namespace MvvmCross.BindingEx.WindowsCommon.MvxBinding.Target
-#endif
-
-#if WINDOWS_WPF
namespace MvvmCross.Binding.Wpf.MvxBinding.Target
-#endif
{
public class MvxCollapsedTargetBinding : MvxVisibleTargetBinding
{
@@ -28,4 +22,4 @@ namespace MvvmCross.Binding.Wpf.MvxBinding.Target
base.SetValue(!boolValue);
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/MvxBinding/Target/MvxDependencyPropertyTargetBinding.cs b/MvvmCross/Platform/Wpf/Binding/MvxBinding/Target/MvxDependencyPropertyTargetBinding.cs
index 26ecedb95..2e4df60ac 100644
--- a/MvvmCross/Platform/Wpf/Binding/MvxBinding/Target/MvxDependencyPropertyTargetBinding.cs
+++ b/MvvmCross/Platform/Wpf/Binding/MvxBinding/Target/MvxDependencyPropertyTargetBinding.cs
@@ -5,14 +5,6 @@
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
-#if WINDOWS_COMMON
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Media;
-
-namespace MvvmCross.BindingEx.WindowsCommon.MvxBinding.Target
-#endif
-
-#if WINDOWS_WPF
using System;
using System.ComponentModel;
using System.Windows;
@@ -22,16 +14,13 @@ using MvvmCross.Binding.ExtensionMethods;
using MvvmCross.Platform.Platform;
namespace MvvmCross.Binding.Wpf.MvxBinding.Target
-#endif
{
public class MvxDependencyPropertyTargetBinding : MvxConvertingTargetBinding
{
private readonly string _targetName;
private readonly DependencyProperty _targetDependencyProperty;
private readonly Type _actualPropertyType;
-#if WINDOWS_WPF
private readonly TypeConverter _typeConverter;
-#endif
public MvxDependencyPropertyTargetBinding(object target, string targetName, DependencyProperty targetDependencyProperty, Type actualPropertyType)
: base(target)
@@ -39,9 +28,8 @@ namespace MvvmCross.Binding.Wpf.MvxBinding.Target
_targetDependencyProperty = targetDependencyProperty;
_actualPropertyType = actualPropertyType;
_targetName = targetName;
-#if WINDOWS_WPF
_typeConverter = _actualPropertyType.TypeConverter();
-#endif
+
// if we return TwoWay for ImageSource then we end up in
// problems with WP7 not doing the auto-conversion
// see some of my angst in http://stackoverflow.com/questions/16752242/how-does-xaml-create-the-string-to-bitmapimage-value-conversion-when-binding-to/16753488#16753488
@@ -57,18 +45,9 @@ namespace MvvmCross.Binding.Wpf.MvxBinding.Target
var frameworkElement = Target as FrameworkElement;
if (frameworkElement == null)
return;
-
-#if WINDOWS_WPF
var listenerBinding = new System.Windows.Data.Binding(_targetName)
{ Source = frameworkElement };
-#endif
-#if WINDOWS_COMMON
- var listenerBinding = new Windows.UI.Xaml.Data.Binding()
- {
- Path = new PropertyPath(_targetName),
- Source = frameworkElement
- };
-#endif
+
var attachedProperty = DependencyProperty.RegisterAttached(
"ListenAttached" + _targetName + Guid.NewGuid().ToString("N")
, typeof(object)
@@ -109,7 +88,6 @@ namespace MvvmCross.Binding.Wpf.MvxBinding.Target
protected override object MakeSafeValue(object value)
{
-#if WINDOWS_WPF
if (_actualPropertyType.IsInstanceOfType(value))
return value;
@@ -122,10 +100,6 @@ namespace MvvmCross.Binding.Wpf.MvxBinding.Target
return null; // TODO - is this correct? Do we need to do more here? See #297
return _typeConverter.ConvertFrom(value);
-#endif
-#if WINDOWS_COMMON
- return _actualPropertyType.MakeSafeValue(value);
-#endif
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/MvxBinding/Target/MvxVisibleTargetBinding.cs b/MvvmCross/Platform/Wpf/Binding/MvxBinding/Target/MvxVisibleTargetBinding.cs
index 30530965f..67f60d514 100644
--- a/MvvmCross/Platform/Wpf/Binding/MvxBinding/Target/MvxVisibleTargetBinding.cs
+++ b/MvvmCross/Platform/Wpf/Binding/MvxBinding/Target/MvxVisibleTargetBinding.cs
@@ -5,18 +5,10 @@
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
-#if WINDOWS_COMMON
-using Windows.UI.Xaml;
-
-namespace MvvmCross.BindingEx.WindowsCommon.MvxBinding.Target
-#endif
-
-#if WINDOWS_WPF
using System;
using System.Windows;
namespace MvvmCross.Binding.Wpf.MvxBinding.Target
-#endif
{
public class MvxVisibleTargetBinding : MvxDependencyPropertyTargetBinding
{
@@ -37,4 +29,4 @@ namespace MvvmCross.Binding.Wpf.MvxBinding.Target
base.SetValue(boolValue ? Visibility.Visible : Visibility.Collapsed);
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/MvxBindingCreator.cs b/MvvmCross/Platform/Wpf/Binding/MvxBindingCreator.cs
index fa5d9317b..39e547a91 100644
--- a/MvvmCross/Platform/Wpf/Binding/MvxBindingCreator.cs
+++ b/MvvmCross/Platform/Wpf/Binding/MvxBindingCreator.cs
@@ -5,21 +5,14 @@
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
-#if WINDOWS_COMMON
-using Windows.UI.Xaml;
-
-namespace MvvmCross.BindingEx.WindowsCommon
-#endif
-
-#if WINDOWS_WPF
using System;
using System.Collections.Generic;
using System.Windows;
using MvvmCross.Binding.Bindings;
using MvvmCross.Platform;
+using MvvmCross.Platform.Logging;
namespace MvvmCross.Binding.Wpf
-#endif
{
public abstract class MvxBindingCreator : IMvxBindingCreator
{
@@ -47,4 +40,4 @@ namespace MvvmCross.Binding.Wpf
protected abstract void ApplyBindings(FrameworkElement attachedObject,
IEnumerable bindingDescriptions);
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/MvxDependencyPropertyExtensionMethods.cs b/MvvmCross/Platform/Wpf/Binding/MvxDependencyPropertyExtensionMethods.cs
index 2aa6ff0de..f08b37a46 100644
--- a/MvvmCross/Platform/Wpf/Binding/MvxDependencyPropertyExtensionMethods.cs
+++ b/MvvmCross/Platform/Wpf/Binding/MvxDependencyPropertyExtensionMethods.cs
@@ -5,13 +5,6 @@
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
-#if WINDOWS_COMMON
-using Windows.UI.Xaml;
-
-namespace MvvmCross.BindingEx.WindowsCommon
-#endif
-
-#if WINDOWS_WPF
using System;
using System.ComponentModel;
using System.Linq;
@@ -19,12 +12,9 @@ using System.Reflection;
using System.Windows;
namespace MvvmCross.Binding.Wpf
-#endif
{
public static class MvxDependencyPropertyExtensionMethods
{
-#if WINDOWS_WPF
-
public static TypeConverter TypeConverter(this Type type)
{
var typeConverter =
@@ -71,49 +61,6 @@ namespace MvvmCross.Binding.Wpf
return null;
}
-#endif
-
-#if WINDOWS_COMMON
-
- public static PropertyInfo FindActualProperty(this Type type, string name)
- {
- if (string.IsNullOrEmpty(name))
- return null;
-
- var property = type.GetRuntimeProperty(name);
- return property;
- }
-
- private static PropertyInfo FindDependencyPropertyInfo(Type type, string dependencyPropertyName)
- {
- if (string.IsNullOrEmpty(dependencyPropertyName))
- return null;
-
- if (!EnsureIsDependencyPropertyName(ref dependencyPropertyName))
- return null;
-
- var typeInfo = type.GetTypeInfo();
- while (typeInfo != null)
- {
- var propertyInfo = typeInfo.GetDeclaredProperty(dependencyPropertyName);
- if (propertyInfo != null)
- {
- return propertyInfo;
- }
-
- if (typeInfo.BaseType == null)
- {
- return null;
- }
-
- typeInfo = typeInfo.BaseType.GetTypeInfo();
- }
-
- return null;
- }
-
-#endif
-
public static DependencyProperty FindDependencyProperty(this Type type, string name)
{
if (string.IsNullOrEmpty(name))
@@ -134,4 +81,4 @@ namespace MvvmCross.Binding.Wpf
return true;
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/MvxDesignTimeChecker.cs b/MvvmCross/Platform/Wpf/Binding/MvxDesignTimeChecker.cs
index dcb3d4f91..bae499d96 100644
--- a/MvvmCross/Platform/Wpf/Binding/MvxDesignTimeChecker.cs
+++ b/MvvmCross/Platform/Wpf/Binding/MvxDesignTimeChecker.cs
@@ -5,11 +5,6 @@
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com\
-#if WINDOWS_COMMON
-namespace MvvmCross.BindingEx.WindowsCommon
-#endif
-
-#if WINDOWS_WPF
using System.ComponentModel;
using System.Windows;
using MvvmCross.Binding.Parse.Binding;
@@ -18,7 +13,6 @@ using MvvmCross.Platform.Core;
using MvvmCross.Platform.IoC;
namespace MvvmCross.Binding.Wpf
-#endif
{
public static class MvxDesignTimeChecker
{
@@ -31,14 +25,8 @@ namespace MvvmCross.Binding.Wpf
_checked = true;
-#if WINDOWS_WPF
if (!(bool)DesignerProperties.IsInDesignModeProperty.GetMetadata(typeof(DependencyObject)).DefaultValue)
return;
-#endif
-#if WINDOWS_COMMON
- if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
- return;
-#endif
if (MvxSingleton.Instance == null)
{
@@ -53,4 +41,4 @@ namespace MvvmCross.Binding.Wpf
}
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/MvxWindowsAssemblyCache.cs b/MvvmCross/Platform/Wpf/Binding/MvxWindowsAssemblyCache.cs
index 5d8a76e9b..2193b09e4 100644
--- a/MvvmCross/Platform/Wpf/Binding/MvxWindowsAssemblyCache.cs
+++ b/MvvmCross/Platform/Wpf/Binding/MvxWindowsAssemblyCache.cs
@@ -10,13 +10,7 @@ using System.Reflection;
using MvvmCross.Platform.Core;
using MvvmCross.Platform.Exceptions;
-#if WINDOWS_COMMON
-namespace MvvmCross.BindingEx.WindowsCommon
-#endif
-
-#if WINDOWS_WPF
namespace MvvmCross.Binding.Wpf
-#endif
{
public class MvxWindowsAssemblyCache
: MvxSingleton
@@ -40,4 +34,4 @@ namespace MvvmCross.Binding.Wpf
public IList Assemblies { get; }
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Binding/MvxWindowsBindingBuilder.cs b/MvvmCross/Platform/Wpf/Binding/MvxWindowsBindingBuilder.cs
index 333546459..75441e4ae 100644
--- a/MvvmCross/Platform/Wpf/Binding/MvxWindowsBindingBuilder.cs
+++ b/MvvmCross/Platform/Wpf/Binding/MvxWindowsBindingBuilder.cs
@@ -5,16 +5,6 @@
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
-#if WINDOWS_COMMON
-using Windows.UI.Xaml;
-using MvvmCross.BindingEx.WindowsCommon.MvxBinding;
-using MvvmCross.BindingEx.WindowsCommon.MvxBinding.Target;
-using MvvmCross.BindingEx.WindowsCommon.WindowsBinding;
-
-namespace MvvmCross.BindingEx.WindowsCommon
-#endif
-
-#if WINDOWS_WPF
using System;
using System.Windows;
using MvvmCross.Binding.Binders;
@@ -28,7 +18,6 @@ using MvvmCross.Platform.Converters;
using MvvmCross.Platform.Core;
namespace MvvmCross.Binding.Wpf
-#endif
{
public class MvxWindowsBindingBuilder : MvxBindingBuilder
{
diff --git a/MvvmCross/Platform/Wpf/Binding/MvxWindowsPropertyBinding.cs b/MvvmCross/Platform/Wpf/Binding/MvxWindowsPropertyBinding.cs
index 7716f32de..84241a9c3 100644
--- a/MvvmCross/Platform/Wpf/Binding/MvxWindowsPropertyBinding.cs
+++ b/MvvmCross/Platform/Wpf/Binding/MvxWindowsPropertyBinding.cs
@@ -5,13 +5,7 @@
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
-#if WINDOWS_COMMON
-namespace MvvmCross.BindingEx.WindowsCommon
-#endif
-
-#if WINDOWS_WPF
namespace MvvmCross.Binding.Wpf
-#endif
{
internal static class MvxWindowsPropertyBinding
{
diff --git a/MvvmCross/Platform/Wpf/Binding/MvxWindowsPropertyBindingExtensions.cs b/MvvmCross/Platform/Wpf/Binding/MvxWindowsPropertyBindingExtensions.cs
index 26b4aa2f4..b9647c01a 100644
--- a/MvvmCross/Platform/Wpf/Binding/MvxWindowsPropertyBindingExtensions.cs
+++ b/MvvmCross/Platform/Wpf/Binding/MvxWindowsPropertyBindingExtensions.cs
@@ -7,13 +7,7 @@
using System.Windows;
-#if WINDOWS_COMMON
-namespace MvvmCross.BindingEx.WindowsCommon
-#endif
-
-#if WINDOWS_WPF
namespace MvvmCross.Binding.Wpf
-#endif
{
public static class MvxWindowsPropertyBindingExtensions
{
diff --git a/MvvmCross/Platform/Wpf/Binding/WindowsBinding/MvxWindowsBindingCreator.cs b/MvvmCross/Platform/Wpf/Binding/WindowsBinding/MvxWindowsBindingCreator.cs
index 7728abd52..eb47893d2 100644
--- a/MvvmCross/Platform/Wpf/Binding/WindowsBinding/MvxWindowsBindingCreator.cs
+++ b/MvvmCross/Platform/Wpf/Binding/WindowsBinding/MvxWindowsBindingCreator.cs
@@ -5,17 +5,6 @@
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
-#if WINDOWS_COMMON
-using MvvmCross.Platform.WindowsCommon.Converters;
-
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Data;
-using Windows.UI.Xaml.Media;
-
-namespace MvvmCross.BindingEx.WindowsCommon.WindowsBinding
-#endif
-
-#if WINDOWS_WPF
using System;
using System.Collections.Generic;
using System.Windows;
@@ -25,10 +14,10 @@ using MvvmCross.Binding.Bindings;
using MvvmCross.Binding.Bindings.SourceSteps;
using MvvmCross.Platform;
using MvvmCross.Platform.Converters;
+using MvvmCross.Platform.Logging;
using MvvmCross.Platform.Wpf.Converters;
namespace MvvmCross.Binding.Wpf.WindowsBinding
-#endif
{
public class MvxWindowsBindingCreator : MvxBindingCreator
{
@@ -55,20 +44,12 @@ namespace MvvmCross.Binding.Wpf.WindowsBinding
return;
}
-#if WINDOWS_WPF
var newBinding = new System.Windows.Data.Binding
-#endif
-#if WINDOWS_COMMON
- var newBinding = new Windows.UI.Xaml.Data.Binding
-#endif
{
Path = new PropertyPath(sourceStep.SourcePropertyPath),
Mode = ConvertMode(bindingDescription.Mode, property?.PropertyType ?? typeof(object)),
Converter = GetConverter(sourceStep.Converter),
ConverterParameter = sourceStep.ConverterParameter,
-#if WINDOWS_COMMON
- FallbackValue = sourceStep.FallbackValue
-#endif
};
BindingOperations.SetBinding(attachedObject, dependencyProperty, newBinding);
@@ -125,4 +106,4 @@ namespace MvvmCross.Binding.Wpf.WindowsBinding
}
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Views/Presenters/MvxBaseWpfViewPresenter.cs b/MvvmCross/Platform/Wpf/Views/Presenters/MvxBaseWpfViewPresenter.cs
index aebeed3a4..dd7deaef2 100644
--- a/MvvmCross/Platform/Wpf/Views/Presenters/MvxBaseWpfViewPresenter.cs
+++ b/MvvmCross/Platform/Wpf/Views/Presenters/MvxBaseWpfViewPresenter.cs
@@ -1,4 +1,4 @@
-// MvxBaseWpfViewPresenter.cs
+// MvxBaseWpfViewPresenter.cs
// MvvmCross is licensed using Microsoft Public License (Ms-PL)
// Contributions and inspirations noted in readme.md and license.txt
@@ -11,6 +11,7 @@ using MvvmCross.Core.ViewModels;
using MvvmCross.Core.Views;
using MvvmCross.Platform;
using MvvmCross.Platform.Exceptions;
+using MvvmCross.Platform.Logging;
using MvvmCross.Platform.Platform;
namespace MvvmCross.Wpf.Views.Presenters
@@ -42,4 +43,4 @@ namespace MvvmCross.Wpf.Views.Presenters
MvxLog.Instance.Warn("Hint ignored {0}", hint.GetType().Name);
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Views/Presenters/MvxSimpleWpfViewPresenter.cs b/MvvmCross/Platform/Wpf/Views/Presenters/MvxSimpleWpfViewPresenter.cs
index ec448c001..90393c3b3 100644
--- a/MvvmCross/Platform/Wpf/Views/Presenters/MvxSimpleWpfViewPresenter.cs
+++ b/MvvmCross/Platform/Wpf/Views/Presenters/MvxSimpleWpfViewPresenter.cs
@@ -11,6 +11,7 @@ using MvvmCross.Core.ViewModels;
using MvvmCross.Platform.Platform;
using System.Collections.Generic;
using System.Linq;
+using MvvmCross.Platform.Logging;
namespace MvvmCross.Wpf.Views.Presenters
{
@@ -64,4 +65,4 @@ namespace MvvmCross.Wpf.Views.Presenters
return false;
}
}
-}
\ No newline at end of file
+}
diff --git a/MvvmCross/Platform/Wpf/Views/Presenters/MvxWpfViewPresenter.cs b/MvvmCross/Platform/Wpf/Views/Presenters/MvxWpfViewPresenter.cs
index 41955576b..1ebde595b 100644
--- a/MvvmCross/Platform/Wpf/Views/Presenters/MvxWpfViewPresenter.cs
+++ b/MvvmCross/Platform/Wpf/Views/Presenters/MvxWpfViewPresenter.cs
@@ -1,4 +1,4 @@
-// MvxWpfViewPresenter.cs
+// MvxWpfViewPresenter.cs
// MvvmCross is licensed using Microsoft Public License (Ms-PL)
// Contributions and inspirations noted in readme.md and license.txt
@@ -8,6 +8,7 @@
using MvvmCross.Core.ViewModels;
using MvvmCross.Core.Views;
using MvvmCross.Platform;
+using MvvmCross.Platform.Logging;
using MvvmCross.Platform.Platform;
using MvvmCross.Wpf.Views.Presenters.Attributes;
using System;
@@ -227,4 +228,4 @@ namespace MvvmCross.Wpf.Views.Presenters
return false;
}
}
-}
\ No newline at end of file
+}