diff --git a/Chance.MvvmCross.Plugins.UserInteraction.Droid/Resources/Resource.designer.cs b/Chance.MvvmCross.Plugins.UserInteraction.Droid/Resources/Resource.designer.cs
index b7f630d..caf7a9a 100644
--- a/Chance.MvvmCross.Plugins.UserInteraction.Droid/Resources/Resource.designer.cs
+++ b/Chance.MvvmCross.Plugins.UserInteraction.Droid/Resources/Resource.designer.cs
@@ -1,15 +1,15 @@
#pragma warning disable 1591
-// ------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Mono Runtime Version: 4.0.30319.17020
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-// ------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.33440
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
-[assembly: Android.Runtime.ResourceDesignerAttribute("Chance.MvvmCross.Plugins.UserInteraction.Droid.Resource", IsApplication=false)]
+[assembly: global::Android.Runtime.ResourceDesignerAttribute("Chance.MvvmCross.Plugins.UserInteraction.Droid.Resource", IsApplication=false)]
namespace Chance.MvvmCross.Plugins.UserInteraction.Droid
{
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.Droid/UserInteractionPluginBootstrap.cs b/Chance.MvvmCross.Plugins.UserInteraction.Droid/UserInteractionPluginBootstrap.cs.pp
similarity index 83%
rename from Chance.MvvmCross.Plugins.UserInteraction.Droid/UserInteractionPluginBootstrap.cs
rename to Chance.MvvmCross.Plugins.UserInteraction.Droid/UserInteractionPluginBootstrap.cs.pp
index c58656d..3a6d392 100644
--- a/Chance.MvvmCross.Plugins.UserInteraction.Droid/UserInteractionPluginBootstrap.cs
+++ b/Chance.MvvmCross.Plugins.UserInteraction.Droid/UserInteractionPluginBootstrap.cs.pp
@@ -1,6 +1,6 @@
using Cirrious.CrossCore.Plugins;
-namespace .Bootstrap
+namespace $rootnamespace$.Bootstrap
{
public class UserInteractionPluginBootstrap
: MvxLoaderPluginBootstrapAction
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.Touch/UserInteractionPluginBootstrap.cs b/Chance.MvvmCross.Plugins.UserInteraction.Touch/UserInteractionPluginBootstrap.cs.pp
similarity index 86%
rename from Chance.MvvmCross.Plugins.UserInteraction.Touch/UserInteractionPluginBootstrap.cs
rename to Chance.MvvmCross.Plugins.UserInteraction.Touch/UserInteractionPluginBootstrap.cs.pp
index d82fb71..d1d124e 100644
--- a/Chance.MvvmCross.Plugins.UserInteraction.Touch/UserInteractionPluginBootstrap.cs
+++ b/Chance.MvvmCross.Plugins.UserInteraction.Touch/UserInteractionPluginBootstrap.cs.pp
@@ -1,6 +1,6 @@
using Cirrious.CrossCore.Plugins;
-namespace .Bootstrap
+namespace $rootnamespace$.Bootstrap
{
public class UserInteractionPluginBootstrap
: MvxLoaderPluginBootstrapAction
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone.csproj b/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone.csproj
new file mode 100644
index 0000000..d2827b1
--- /dev/null
+++ b/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone.csproj
@@ -0,0 +1,129 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}
+ {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
+ Library
+ Properties
+ Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone
+ Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone
+ v8.0
+
+
+
+
+ WindowsPhone
+ false
+ true
+ true
+ 11.0
+
+
+ true
+ full
+ false
+ ..\bin\Debug\WindowsPhone\
+ DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ prompt
+ 4
+ false
+
+
+ pdbonly
+ true
+ ..\bin\Release\WindowsPhone\
+ TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ prompt
+ 4
+ false
+
+
+ true
+ Bin\x86\Debug
+ DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ full
+
+
+ prompt
+ MinimumRecommendedRules.ruleset
+ false
+
+
+ Bin\x86\Release
+ TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ pdbonly
+
+
+ prompt
+ MinimumRecommendedRules.ruleset
+
+
+ true
+ Bin\ARM\Debug
+ DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ full
+
+
+ prompt
+ MinimumRecommendedRules.ruleset
+ false
+
+
+ Bin\ARM\Release
+ TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ pdbonly
+
+
+ prompt
+ MinimumRecommendedRules.ruleset
+
+
+
+ ..\lib\WindowsPhone\Cirrious.CrossCore.dll
+
+
+ ..\lib\WindowsPhone\Cirrious.CrossCore.WindowsPhone.dll
+
+
+ ..\packages\WPtoolkit.4.2013.08.16\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll
+
+
+
+
+
+
+
+
+
+ {C912911A-2216-447C-ADF4-8DC190804D75}
+ Chance.MvvmCross.Plugins.UserInteraction
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/Plugin.cs b/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/Plugin.cs
new file mode 100644
index 0000000..81b2cf6
--- /dev/null
+++ b/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/Plugin.cs
@@ -0,0 +1,15 @@
+using System;
+using Cirrious.CrossCore.Plugins;
+using Cirrious.CrossCore;
+
+namespace Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone
+{
+ public class Plugin : IMvxPlugin
+ {
+ public void Load()
+ {
+ Mvx.RegisterType();
+ }
+ }
+}
+
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/Properties/AssemblyInfo.cs b/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..4e32fea
--- /dev/null
+++ b/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/Properties/AssemblyInfo.cs
@@ -0,0 +1,37 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Resources;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone")]
+[assembly: AssemblyCopyright("Copyright © 2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("3856b230-5b7b-4285-b591-a36c7bbe08cb")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: NeutralResourcesLanguageAttribute("en-US")]
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/UserInteraction.cs b/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/UserInteraction.cs
new file mode 100644
index 0000000..cd5e53d
--- /dev/null
+++ b/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/UserInteraction.cs
@@ -0,0 +1,172 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using Microsoft.Phone.Controls;
+
+namespace Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone
+{
+ public class UserInteraction : IUserInteraction
+ {
+ public void Confirm(string message, Action okClicked, string title = null, string okButton = "OK", string cancelButton = "Cancel")
+ {
+ Task result = ConfirmAsync(message, title, okButton, cancelButton);
+
+
+ result.ContinueWith((button) =>
+ {
+ if (button.Result)
+ {
+ //ok clicked
+ okClicked();
+ }
+ });
+ }
+
+ public void Confirm(string message, Action answer, string title = null, string okButton = "OK", string cancelButton = "Cancel")
+ {
+ Task result = ConfirmAsync(message, title, okButton, cancelButton);
+
+ result.ContinueWith((button) => answer(button.Result));
+ }
+
+ public Task ConfirmAsync(string message, string title = "", string okButton = "OK", string cancelButton = "Cancel")
+ {
+ var box = new Microsoft.Phone.Controls.CustomMessageBox()
+ {
+ Caption = title,
+ Message = message,
+ LeftButtonContent = okButton,
+ RightButtonContent = cancelButton
+ };
+ var complete = new TaskCompletionSource();
+ box.Dismissed += (sender, args) => complete.TrySetResult(args.Result == CustomMessageBoxResult.LeftButton);
+ box.Show();
+ return complete.Task;
+ }
+
+
+
+
+
+
+ public void Alert(string message, Action done = null, string title = "", string okButton = "OK")
+ {
+
+ AlertAsync(message, title, okButton).ContinueWith((button) => { if (done != null) done(); });
+ }
+
+ public Task AlertAsync(string message, string title = "", string okButton = "OK")
+ {
+ var box = new Microsoft.Phone.Controls.CustomMessageBox()
+ {
+ Caption = title,
+ Message = message,
+ LeftButtonContent = okButton,
+ IsRightButtonEnabled = false
+ };
+ var complete = new TaskCompletionSource();
+ box.Dismissed += (sender, args) => complete.TrySetResult(true);
+ box.Show();
+ return complete.Task;
+ }
+
+
+ public void Input(string message, Action okClicked, string placeholder = null, string title = null, string okButton = "OK",
+ string cancelButton = "Cancel", string initialText = null)
+ {
+ var result = InputAsync(message, placeholder, title, okButton, cancelButton);
+ result.ContinueWith((value) =>
+ {
+ if (value.Result.Ok)
+ {
+ okClicked(value.Result.Text);
+ }
+ });
+ }
+
+ public void Input(string message, Action answer, string placeholder = null, string title = null, string okButton = "OK",
+ string cancelButton = "Cancel", string initialText = null)
+ {
+ var result = InputAsync(message, placeholder, title, okButton, cancelButton);
+ result.ContinueWith(value => answer(value.Result.Ok, value.Result.Text));
+ }
+
+ public Task InputAsync(string message, string placeholder = null, string title = null, string okButton = "OK",
+ string cancelButton = "Cancel", string initialText = null)
+ {
+ var textBox = new PhoneTextBox { Hint = placeholder };
+
+ var box = new Microsoft.Phone.Controls.CustomMessageBox()
+ {
+ Caption = title,
+ Message = message,
+ LeftButtonContent = okButton,
+ RightButtonContent = cancelButton,
+ Content = textBox
+ };
+
+ var response = new TaskCompletionSource();
+ box.Dismissed += (sender, args) => response.TrySetResult(new InputResponse()
+ {
+ Ok = args.Result == CustomMessageBoxResult.LeftButton,
+ Text = textBox.Text
+ });
+ box.Show();
+ return response.Task;
+ }
+
+
+ public void ConfirmThreeButtons(string message, Action answer, string title = null, string positive = "Yes", string negative = "No", string neutral = "Maybe")
+ {
+
+ var result = ConfirmThreeButtonsAsync(message, title, positive, negative, neutral);
+ result.ContinueWith((value) => answer(value.Result));
+ }
+
+ public Task ConfirmThreeButtonsAsync(string message, string title = null, string positive = "Yes", string negative = "No", string neutral = "Maybe")
+ {
+ StackPanel contents = new StackPanel();
+ contents.Orientation = Orientation.Vertical;
+ var positiveButton = new Button() { Content = positive };
+ var neutralButton = new Button() { Content = neutral };
+ var negativeButton = new Button() { Content = negative };
+ contents.Children.Add(positiveButton);
+ contents.Children.Add(neutralButton);
+ contents.Children.Add(negativeButton);
+
+ var box = new Microsoft.Phone.Controls.CustomMessageBox()
+ {
+ Caption = title,
+ Message = message,
+ IsLeftButtonEnabled = false,
+ IsRightButtonEnabled = false,
+ Content = contents
+ };
+
+ var response = new TaskCompletionSource();
+ positiveButton.Click += (sender, args) =>
+ {
+ response.TrySetResult(ConfirmThreeButtonsResponse.Positive);
+ box.Dismiss();
+ };
+ neutralButton.Click += (sender, args) =>
+ {
+ response.TrySetResult(ConfirmThreeButtonsResponse.Neutral);
+ box.Dismiss();
+ };
+ negativeButton.Click += (sender, args) =>
+ {
+ response.TrySetResult(ConfirmThreeButtonsResponse.Negative);
+ box.Dismiss();
+ };
+ box.Show();
+ return response.Task;
+
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/UserInteractionPluginBootstrap.cs.pp b/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/UserInteractionPluginBootstrap.cs.pp
new file mode 100644
index 0000000..43cf71d
--- /dev/null
+++ b/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/UserInteractionPluginBootstrap.cs.pp
@@ -0,0 +1,11 @@
+using Cirrious.CrossCore.Plugins;
+
+namespace $rootnamespace$.Bootstrap
+{
+ public class UserInteractionPluginBootstrap
+ : MvxLoaderPluginBootstrapAction
+
+ {
+ }
+}
+
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/packages.config b/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/packages.config
new file mode 100644
index 0000000..5a4331c
--- /dev/null
+++ b/Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore.csproj b/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore.csproj
new file mode 100644
index 0000000..c06592e
--- /dev/null
+++ b/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore.csproj
@@ -0,0 +1,137 @@
+
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}
+ Library
+ Properties
+ Chance.MvvmCross.Plugins.UserInteraction.WindowsStore
+ Chance.MvvmCross.Plugins.UserInteraction.WindowsStore
+ en-US
+ 512
+ {BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+
+
+ true
+ full
+ false
+ ..\bin\Debug\WindowsStore\
+ DEBUG;TRACE;NETFX_CORE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ ..\bin\Release\WindowsStore\
+ TRACE;NETFX_CORE
+ prompt
+ 4
+
+
+ true
+ bin\ARM\Debug\
+ DEBUG;TRACE;NETFX_CORE
+ ;2008
+ full
+ ARM
+ false
+ prompt
+ true
+
+
+ bin\ARM\Release\
+ TRACE;NETFX_CORE
+ true
+ ;2008
+ pdbonly
+ ARM
+ false
+ prompt
+ true
+
+
+ true
+ bin\x64\Debug\
+ DEBUG;TRACE;NETFX_CORE
+ ;2008
+ full
+ x64
+ false
+ prompt
+ true
+
+
+ bin\x64\Release\
+ TRACE;NETFX_CORE
+ true
+ ;2008
+ pdbonly
+ x64
+ false
+ prompt
+ true
+
+
+ true
+ bin\x86\Debug\
+ DEBUG;TRACE;NETFX_CORE
+ ;2008
+ full
+ x86
+ false
+ prompt
+ true
+
+
+ bin\x86\Release\
+ TRACE;NETFX_CORE
+ true
+ ;2008
+ pdbonly
+ x86
+ false
+ prompt
+ true
+
+
+
+
+
+
+
+
+ ..\lib\WindowsStore\Cirrious.CrossCore.dll
+
+
+ ..\lib\WindowsStore\Cirrious.CrossCore.WindowsStore.dll
+
+
+ ..\packages\WinRTXamlToolkit.1.6.1.3\lib\netcore45\WinRTXamlToolkit.dll
+
+
+
+
+ {c912911a-2216-447c-adf4-8dc190804d75}
+ Chance.MvvmCross.Plugins.UserInteraction
+
+
+
+
+
+
+ 11.0
+
+
+
+
\ No newline at end of file
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/Plugin.cs b/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/Plugin.cs
new file mode 100644
index 0000000..9e80fc2
--- /dev/null
+++ b/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/Plugin.cs
@@ -0,0 +1,15 @@
+using System;
+using Cirrious.CrossCore.Plugins;
+using Cirrious.CrossCore;
+
+namespace Chance.MvvmCross.Plugins.UserInteraction.WindowsStore
+{
+ public class Plugin : IMvxPlugin
+ {
+ public void Load()
+ {
+ Mvx.RegisterType();
+ }
+ }
+}
+
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/Properties/AssemblyInfo.cs b/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..ced7be3
--- /dev/null
+++ b/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/Properties/AssemblyInfo.cs
@@ -0,0 +1,29 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Chance.MvvmCross.Plugins.UserInteraction.WindowsStore")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Chance.MvvmCross.Plugins.UserInteraction.WindowsStore")]
+[assembly: AssemblyCopyright("Copyright © 2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/UserInteraction.cs b/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/UserInteraction.cs
new file mode 100644
index 0000000..f9d13f3
--- /dev/null
+++ b/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/UserInteraction.cs
@@ -0,0 +1,118 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using Windows.UI.Popups;
+using WinRTXamlToolkit.Controls;
+
+namespace Chance.MvvmCross.Plugins.UserInteraction.WindowsStore
+{
+ public class UserInteraction : IUserInteraction
+ {
+ public void Confirm(string message, Action okClicked, string title = null, string okButton = "OK", string cancelButton = "Cancel")
+ {
+ Task result = ConfirmAsync(message, title, okButton, cancelButton);
+
+
+ result.ContinueWith((button) =>
+ {
+ if (button.Result)
+ {
+ //ok clicked
+ okClicked();
+ }
+ });
+ }
+
+ public void Confirm(string message, Action answer, string title = null, string okButton = "OK", string cancelButton = "Cancel")
+ {
+ Task result = ConfirmAsync(message, title, okButton, cancelButton);
+
+ result.ContinueWith((button) => answer(button.Result));
+ }
+
+ public Task ConfirmAsync(string message, string title = "", string okButton = "OK", string cancelButton = "Cancel")
+ {
+ var complete = new TaskCompletionSource();
+
+ var box = new MessageDialog(message, title);
+
+ box.Commands.Add(new UICommand(okButton, delegate { complete.TrySetResult(true); }));
+ box.Commands.Add(new UICommand(cancelButton, delegate { complete.TrySetResult(false); }));
+
+ box.ShowAsync();
+
+ return complete.Task;
+ }
+
+
+ public void Alert(string message, Action done = null, string title = "", string okButton = "OK")
+ {
+
+ AlertAsync(message, title, okButton).ContinueWith((button) => { if (done != null) done(); });
+ }
+
+ public async Task AlertAsync(string message, string title = "", string okButton = "OK")
+ {
+ var box = new MessageDialog(message, title);
+
+ box.Commands.Add(new UICommand(okButton));
+
+ await box.ShowAsync();
+ }
+
+
+ public void Input(string message, Action okClicked, string placeholder = null, string title = null, string okButton = "OK",
+ string cancelButton = "Cancel", string initialText = null)
+ {
+ var result = InputAsync(message, placeholder, title, okButton, cancelButton);
+ result.ContinueWith((value) =>
+ {
+ if (value.Result.Ok)
+ {
+ okClicked(value.Result.Text);
+ }
+ });
+ }
+
+ public void Input(string message, Action answer, string placeholder = null, string title = null, string okButton = "OK",
+ string cancelButton = "Cancel", string initialText = null)
+ {
+ var result = InputAsync(message, placeholder, title, okButton, cancelButton);
+ result.ContinueWith(value => answer(value.Result.Ok, value.Result.Text));
+ }
+
+ public async Task InputAsync(string message, string placeholder = null, string title = null, string okButton = "OK",
+ string cancelButton = "Cancel", string initialText = null)
+ {
+ var box = new InputDialog { InputText = initialText ?? string.Empty };
+ var result = await box.ShowAsync(title ?? string.Empty, message, okButton, cancelButton);
+ return new InputResponse() {Text = box.InputText, Ok = result == okButton};
+ }
+
+
+ public void ConfirmThreeButtons(string message, Action answer, string title = null, string positive = "Yes", string negative = "No", string neutral = "Maybe")
+ {
+
+ var result = ConfirmThreeButtonsAsync(message, title, positive, negative, neutral);
+ result.ContinueWith((value) => answer(value.Result));
+ }
+
+ public Task ConfirmThreeButtonsAsync(string message, string title = null, string positive = "Yes", string negative = "No", string neutral = "Maybe")
+ {
+ var response = new TaskCompletionSource();
+
+ var box = new MessageDialog(message, title ?? string.Empty);
+
+ box.Commands.Add(new UICommand(positive, delegate { response.TrySetResult(ConfirmThreeButtonsResponse.Positive); }));
+ box.Commands.Add(new UICommand(neutral, delegate { response.TrySetResult(ConfirmThreeButtonsResponse.Neutral); }));
+ box.Commands.Add(new UICommand(negative, delegate { response.TrySetResult(ConfirmThreeButtonsResponse.Negative); }));
+
+ box.ShowAsync();
+
+ return response.Task;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/UserInteractionPluginBootstrap.cs.pp b/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/UserInteractionPluginBootstrap.cs.pp
new file mode 100644
index 0000000..976df7b
--- /dev/null
+++ b/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/UserInteractionPluginBootstrap.cs.pp
@@ -0,0 +1,11 @@
+using Cirrious.CrossCore.Plugins;
+
+namespace $rootnamespace$.Bootstrap
+{
+ public class UserInteractionPluginBootstrap
+ : MvxLoaderPluginBootstrapAction
+
+ {
+ }
+}
+
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/packages.config b/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/packages.config
new file mode 100644
index 0000000..1c98e82
--- /dev/null
+++ b/Chance.MvvmCross.Plugins.UserInteraction.WindowsStore/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Chance.MvvmCross.Plugins.UserInteraction.sln b/Chance.MvvmCross.Plugins.UserInteraction.sln
index ac335af..8bda8f1 100644
--- a/Chance.MvvmCross.Plugins.UserInteraction.sln
+++ b/Chance.MvvmCross.Plugins.UserInteraction.sln
@@ -11,12 +11,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bootstrap", "Bootstrap", "{
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Droid", "Droid", "{7EDF8691-1C9C-4453-9564-CE4A651E7824}"
ProjectSection(SolutionItems) = preProject
- Chance.MvvmCross.Plugins.UserInteraction.Droid\UserInteractionPluginBootstrap.cs = Chance.MvvmCross.Plugins.UserInteraction.Droid\UserInteractionPluginBootstrap.cs
+ Chance.MvvmCross.Plugins.UserInteraction.Droid\UserInteractionPluginBootstrap.cs.pp = Chance.MvvmCross.Plugins.UserInteraction.Droid\UserInteractionPluginBootstrap.cs.pp
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Touch", "Touch", "{BB599BA6-F8DE-43AB-80BC-68537C4C316E}"
ProjectSection(SolutionItems) = preProject
- Chance.MvvmCross.Plugins.UserInteraction.Touch\UserInteractionPluginBootstrap.cs = Chance.MvvmCross.Plugins.UserInteraction.Touch\UserInteractionPluginBootstrap.cs
+ Chance.MvvmCross.Plugins.UserInteraction.Touch\UserInteractionPluginBootstrap.cs.pp = Chance.MvvmCross.Plugins.UserInteraction.Touch\UserInteractionPluginBootstrap.cs.pp
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C6C2BCE6-73AC-4EDC-A08D-B12B2FF434CB}"
@@ -24,33 +24,108 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
readme.md = readme.md
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone", "Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone\Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone.csproj", "{3856B230-5B7B-4285-B591-A36C7BBE08CB}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WindowsPhone", "WindowsPhone", "{CABB35FF-C32A-4379-ACBF-F0B19FBBC9CD}"
+ ProjectSection(SolutionItems) = preProject
+ Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone\UserInteractionPluginBootstrap.cs.pp = Chance.MvvmCross.Plugins.UserInteraction.WindowsPhone\UserInteractionPluginBootstrap.cs.pp
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chance.MvvmCross.Plugins.UserInteraction.WindowsStore", "Chance.MvvmCross.Plugins.UserInteraction.WindowsStore\Chance.MvvmCross.Plugins.UserInteraction.WindowsStore.csproj", "{53FDB605-5B5D-4EA3-959E-D3F29B37686C}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WindowsStore", "WindowsStore", "{A5CA957C-99FB-4547-8E59-5265FD6B573E}"
+ ProjectSection(SolutionItems) = preProject
+ Chance.MvvmCross.Plugins.UserInteraction.WindowsStore\UserInteractionPluginBootstrap.cs.pp = Chance.MvvmCross.Plugins.UserInteraction.WindowsStore\UserInteractionPluginBootstrap.cs.pp
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{DC07D288-0C1B-41A0-A814-0C285F6BDB65}"
+ ProjectSection(SolutionItems) = preProject
+ nuget\Chance.MvvmCross.Plugins.UserInteraction.1.0.0.nuspec = nuget\Chance.MvvmCross.Plugins.UserInteraction.1.0.0.nuspec
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|ARM = Debug|ARM
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
+ Release|ARM = Release|ARM
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {5BE32F99-E41D-4D84-BBE8-E16A331C7767}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5BE32F99-E41D-4D84-BBE8-E16A331C7767}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5BE32F99-E41D-4D84-BBE8-E16A331C7767}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5BE32F99-E41D-4D84-BBE8-E16A331C7767}.Release|Any CPU.Build.0 = Release|Any CPU
{C912911A-2216-447C-ADF4-8DC190804D75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C912911A-2216-447C-ADF4-8DC190804D75}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C912911A-2216-447C-ADF4-8DC190804D75}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {C912911A-2216-447C-ADF4-8DC190804D75}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {C912911A-2216-447C-ADF4-8DC190804D75}.Debug|x86.ActiveCfg = Debug|Any CPU
{C912911A-2216-447C-ADF4-8DC190804D75}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C912911A-2216-447C-ADF4-8DC190804D75}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C912911A-2216-447C-ADF4-8DC190804D75}.Release|ARM.ActiveCfg = Release|Any CPU
+ {C912911A-2216-447C-ADF4-8DC190804D75}.Release|x64.ActiveCfg = Release|Any CPU
+ {C912911A-2216-447C-ADF4-8DC190804D75}.Release|x86.ActiveCfg = Release|Any CPU
+ {5BE32F99-E41D-4D84-BBE8-E16A331C7767}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5BE32F99-E41D-4D84-BBE8-E16A331C7767}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5BE32F99-E41D-4D84-BBE8-E16A331C7767}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {5BE32F99-E41D-4D84-BBE8-E16A331C7767}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {5BE32F99-E41D-4D84-BBE8-E16A331C7767}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5BE32F99-E41D-4D84-BBE8-E16A331C7767}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5BE32F99-E41D-4D84-BBE8-E16A331C7767}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5BE32F99-E41D-4D84-BBE8-E16A331C7767}.Release|ARM.ActiveCfg = Release|Any CPU
+ {5BE32F99-E41D-4D84-BBE8-E16A331C7767}.Release|x64.ActiveCfg = Release|Any CPU
+ {5BE32F99-E41D-4D84-BBE8-E16A331C7767}.Release|x86.ActiveCfg = Release|Any CPU
{CA487D21-3429-498C-971E-70A9C4453E6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA487D21-3429-498C-971E-70A9C4453E6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CA487D21-3429-498C-971E-70A9C4453E6C}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {CA487D21-3429-498C-971E-70A9C4453E6C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {CA487D21-3429-498C-971E-70A9C4453E6C}.Debug|x86.ActiveCfg = Debug|Any CPU
{CA487D21-3429-498C-971E-70A9C4453E6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CA487D21-3429-498C-971E-70A9C4453E6C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CA487D21-3429-498C-971E-70A9C4453E6C}.Release|ARM.ActiveCfg = Release|Any CPU
+ {CA487D21-3429-498C-971E-70A9C4453E6C}.Release|x64.ActiveCfg = Release|Any CPU
+ {CA487D21-3429-498C-971E-70A9C4453E6C}.Release|x86.ActiveCfg = Release|Any CPU
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}.Debug|ARM.ActiveCfg = Debug|ARM
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}.Debug|ARM.Build.0 = Debug|ARM
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}.Debug|x86.ActiveCfg = Debug|x86
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}.Debug|x86.Build.0 = Debug|x86
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}.Release|ARM.ActiveCfg = Release|ARM
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}.Release|ARM.Build.0 = Release|ARM
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}.Release|x64.ActiveCfg = Release|Any CPU
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}.Release|x86.ActiveCfg = Release|x86
+ {3856B230-5B7B-4285-B591-A36C7BBE08CB}.Release|x86.Build.0 = Release|x86
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Debug|ARM.ActiveCfg = Debug|ARM
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Debug|ARM.Build.0 = Debug|ARM
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Debug|x64.ActiveCfg = Debug|x64
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Debug|x64.Build.0 = Debug|x64
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Debug|x86.ActiveCfg = Debug|x86
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Debug|x86.Build.0 = Debug|x86
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Release|ARM.ActiveCfg = Release|ARM
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Release|ARM.Build.0 = Release|ARM
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Release|x64.ActiveCfg = Release|x64
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Release|x64.Build.0 = Release|x64
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Release|x86.ActiveCfg = Release|x86
+ {53FDB605-5B5D-4EA3-959E-D3F29B37686C}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{7EDF8691-1C9C-4453-9564-CE4A651E7824} = {CE291FF3-DF0C-4946-B6BD-F083D5CAF14B}
{BB599BA6-F8DE-43AB-80BC-68537C4C316E} = {CE291FF3-DF0C-4946-B6BD-F083D5CAF14B}
+ {CABB35FF-C32A-4379-ACBF-F0B19FBBC9CD} = {CE291FF3-DF0C-4946-B6BD-F083D5CAF14B}
+ {A5CA957C-99FB-4547-8E59-5265FD6B573E} = {CE291FF3-DF0C-4946-B6BD-F083D5CAF14B}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Chance.MvvmCross.Plugins.UserInteraction\Chance.MvvmCross.Plugins.UserInteraction.csproj
EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
EndGlobal
diff --git a/lib/WindowsPhone/Cirrious.CrossCore.WindowsPhone.dll b/lib/WindowsPhone/Cirrious.CrossCore.WindowsPhone.dll
new file mode 100644
index 0000000..f5d6e75
Binary files /dev/null and b/lib/WindowsPhone/Cirrious.CrossCore.WindowsPhone.dll differ
diff --git a/lib/WindowsPhone/Cirrious.CrossCore.dll b/lib/WindowsPhone/Cirrious.CrossCore.dll
new file mode 100644
index 0000000..5636e0a
Binary files /dev/null and b/lib/WindowsPhone/Cirrious.CrossCore.dll differ
diff --git a/lib/WindowsStore/Cirrious.CrossCore.WindowsStore.dll b/lib/WindowsStore/Cirrious.CrossCore.WindowsStore.dll
new file mode 100644
index 0000000..e1c5731
Binary files /dev/null and b/lib/WindowsStore/Cirrious.CrossCore.WindowsStore.dll differ
diff --git a/lib/WindowsStore/Cirrious.CrossCore.dll b/lib/WindowsStore/Cirrious.CrossCore.dll
new file mode 100644
index 0000000..5636e0a
Binary files /dev/null and b/lib/WindowsStore/Cirrious.CrossCore.dll differ
diff --git a/nuget/Chance.MvvmCross.Plugins.UserInteraction.1.0.0.nuspec b/nuget/Chance.MvvmCross.Plugins.UserInteraction.1.0.0.nuspec
new file mode 100644
index 0000000..3b89971
--- /dev/null
+++ b/nuget/Chance.MvvmCross.Plugins.UserInteraction.1.0.0.nuspec
@@ -0,0 +1,36 @@
+
+
+
+ Chance.MvvmCross.Plugins.UserInteraction
+ 1.0.0
+ Brian Chance
+ false
+ MvvmCross plugin for interacting with the user from a view model.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file