diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..1ff0c423 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore index 54fb2df2..8a3e3cf3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,45 +1,47 @@ -*.suo -*.user -*.FileListAbsolute.txt -*\bin\* -*\obj\* -*.ncb -*.nlb -*.aps -*.clw -*.pdb -*.obj -*.exe -*.pch -*.vspscc -*_i.c -*_p.c -*.tlb -*.tlh -*.bak -*.cache -*.Cache -*.ilk -*.log -*.lib -*.sbr -*.scc -*.sig -*.xap -_ReSharper* -[Bb]in -[Dd]ebug*/ -obj/ -[Rr]elease*/ -[Tt]est[Rr]esult* -[Bb]uild[Ll]og.* -*.[Pp]ublish.xml -glob:desktop.ini -generated-templates -nuget/*.nupkg -nuget/*/lib/ -*.*~ -*.vs10x -*.docstates -packages/ +*.suo +*.user +*.FileListAbsolute.txt +*\bin\* +*\obj\* +*.ncb +*.nlb +*.aps +*.clw +*.pdb +*.obj +*.exe +*.pch +*.vspscc +*_i.c +*_p.c +*.tlb +*.tlh +*.bak +*.cache +*.Cache +*.ilk +*.log +*.lib +*.sbr +*.scc +*.sig +*.xap +_ReSharper* +[Bb]in +[Dd]ebug*/ +obj/ +[Rr]elease*/ +[Tt]est[Rr]esult* +[Bb]uild[Ll]og.* +*.[Pp]ublish.xml +glob:desktop.ini +generated-templates +nuget/*.nupkg +nuget/*/lib/ +*.*~ +*.vs10x +*.docstates +packages/ +*.project.lock.json +project.lock.json .vs \ No newline at end of file diff --git a/nuget/Caliburn.Micro.Core.nuspec b/nuget/Caliburn.Micro.Core.nuspec index 9f6e5968..9d282058 100644 --- a/nuget/Caliburn.Micro.Core.nuspec +++ b/nuget/Caliburn.Micro.Core.nuspec @@ -2,7 +2,7 @@ Caliburn.Micro.Core - 2.0.2 + 3.0.0 Rob Eisenberg, Marco Amendola, Chin Bae, Ryan Cromwell, Nigel Sampson, Thomas Ibel, Matt Hidinger A small, yet powerful framework designed for Xaml platforms, Caliburn.Micro implements a variety of UI patterns for solving real-world problems. Patterns that are highlighted include MVVM (Presentation Model), MVP and MVC. en-US @@ -16,7 +16,7 @@ - + diff --git a/nuget/Caliburn.Micro.Start.nuspec b/nuget/Caliburn.Micro.Start.nuspec index c5dbc3a6..20e21ebf 100644 --- a/nuget/Caliburn.Micro.Start.nuspec +++ b/nuget/Caliburn.Micro.Start.nuspec @@ -2,7 +2,7 @@ Caliburn.Micro.Start - 2.0.2 + 3.0.0 Rob Eisenberg, Marco Amendola, Chin Bae, Ryan Cromwell, Nigel Sampson, Thomas Ibel, Matt Hidinger A startup sample for Caliburn.Micro. en-US @@ -20,7 +20,7 @@ - + diff --git a/nuget/Caliburn.Micro.Xamarin.Forms.nuspec b/nuget/Caliburn.Micro.Xamarin.Forms.nuspec new file mode 100644 index 00000000..d3cfdff9 --- /dev/null +++ b/nuget/Caliburn.Micro.Xamarin.Forms.nuspec @@ -0,0 +1,32 @@ + + + + Caliburn.Micro.Xamarin.Forms + 3.0.0 + Rob Eisenberg, Marco Amendola, Chin Bae, Ryan Cromwell, Nigel Sampson, Thomas Ibel, Matt Hidinger + A small, yet powerful framework designed for Xaml platforms, Caliburn.Micro implements a variety of UI patterns for solving real-world problems. Patterns that are highlighted include MVVM (Presentation Model), MVP and MVC. + en-US + https://raw.githubusercontent.com/Caliburn-Micro/Caliburn.Micro/master/License.txt + http://caliburnmicro.com/ + https://raw.githubusercontent.com/Caliburn-Micro/Caliburn.Micro/master/CaliburnIcon.png + false + + Copyright (c) 2010 Blue Spire Consulting, Inc. + MVVM Silverlight WPF WP8 WinRT Metro SL5 SL MVC CoC Convention MVP PM Screen Coroutine Behavior Model-View-ViewModel Presentation UI ViewModel Phone Caliburn + + + + + + + + + + + + + + + + + diff --git a/nuget/Caliburn.Micro.nuspec b/nuget/Caliburn.Micro.nuspec index 941aba76..92c622ce 100644 --- a/nuget/Caliburn.Micro.nuspec +++ b/nuget/Caliburn.Micro.nuspec @@ -2,7 +2,7 @@ Caliburn.Micro - 2.0.2 + 3.0.0 Rob Eisenberg, Marco Amendola, Chin Bae, Ryan Cromwell, Nigel Sampson, Thomas Ibel, Matt Hidinger A small, yet powerful framework designed for Xaml platforms, Caliburn.Micro implements a variety of UI patterns for solving real-world problems. Patterns that are highlighted include MVVM (Presentation Model), MVP and MVC. en-US @@ -20,15 +20,11 @@ - + - - - - - - - + + + @@ -43,8 +39,6 @@ - - @@ -53,9 +47,15 @@ - - - + + + + + + + + + diff --git a/nuget/create-packages.cmd b/nuget/create-packages.cmd index fddd916a..42e7be8f 100644 --- a/nuget/create-packages.cmd +++ b/nuget/create-packages.cmd @@ -2,4 +2,5 @@ del *.nupkg .\nuget.exe pack .\Caliburn.Micro.Core.nuspec -symbols .\nuget.exe pack .\Caliburn.Micro.nuspec -symbols +.\nuget.exe pack .\Caliburn.Micro.Xamarin.Forms.nuspec -symbols .\nuget.exe pack .\Caliburn.Micro.Start.nuspec diff --git a/nuget/nuget.exe b/nuget/nuget.exe index 8dd7e45a..324daa84 100644 Binary files a/nuget/nuget.exe and b/nuget/nuget.exe differ diff --git a/samples/CM.HelloUniversal/CM.HelloUniversal/CM.HelloUniversal.Windows/CM.HelloUniversal.Windows.csproj b/samples/CM.HelloUniversal/CM.HelloUniversal/CM.HelloUniversal.Windows/CM.HelloUniversal.Windows.csproj index 094759bb..2d4297ce 100644 --- a/samples/CM.HelloUniversal/CM.HelloUniversal/CM.HelloUniversal.Windows/CM.HelloUniversal.Windows.csproj +++ b/samples/CM.HelloUniversal/CM.HelloUniversal/CM.HelloUniversal.Windows/CM.HelloUniversal.Windows.csproj @@ -124,12 +124,12 @@ ..\..\..\..\bin\win81\Debug\Caliburn.Micro.dll - - ..\..\..\..\bin\win81\Debug\Caliburn.Micro.Extensions.dll - ..\..\..\..\bin\win81\Debug\Caliburn.Micro.Platform.dll + + ..\..\..\..\bin\win81\Debug\Caliburn.Micro.Platform.Core.dll + ..\..\..\..\bin\win81\Debug\Microsoft.Xaml.Interactions.dll diff --git a/samples/CM.HelloUniversal/CM.HelloUniversal/CM.HelloUniversal.WindowsPhone/CM.HelloUniversal.WindowsPhone.csproj b/samples/CM.HelloUniversal/CM.HelloUniversal/CM.HelloUniversal.WindowsPhone/CM.HelloUniversal.WindowsPhone.csproj index 2ad619a1..6fd85ea1 100644 --- a/samples/CM.HelloUniversal/CM.HelloUniversal/CM.HelloUniversal.WindowsPhone/CM.HelloUniversal.WindowsPhone.csproj +++ b/samples/CM.HelloUniversal/CM.HelloUniversal/CM.HelloUniversal.WindowsPhone/CM.HelloUniversal.WindowsPhone.csproj @@ -102,12 +102,12 @@ ..\..\..\..\bin\wpa81\Debug\Caliburn.Micro.dll - - ..\..\..\..\bin\wpa81\Debug\Caliburn.Micro.Extensions.dll - ..\..\..\..\bin\wpa81\Debug\Caliburn.Micro.Platform.dll + + ..\..\..\..\bin\wpa81\Debug\Caliburn.Micro.Platform.Core.dll + ..\..\..\..\bin\wpa81\Debug\Microsoft.Xaml.Interactions.dll diff --git a/samples/Caliburn.Micro.Coroutines/nuget.config b/samples/Caliburn.Micro.Coroutines/nuget.config index 9d72990c..7c08678d 100644 --- a/samples/Caliburn.Micro.Coroutines/nuget.config +++ b/samples/Caliburn.Micro.Coroutines/nuget.config @@ -1,3 +1,6 @@ - - ..\packages - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/samples/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable.Windows/Caliburn.Micro.HelloPortable.Windows.csproj b/samples/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable.Windows/Caliburn.Micro.HelloPortable.Windows.csproj index acc24e7b..497a0810 100644 --- a/samples/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable.Windows/Caliburn.Micro.HelloPortable.Windows.csproj +++ b/samples/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable.Windows/Caliburn.Micro.HelloPortable.Windows.csproj @@ -128,12 +128,13 @@ ..\..\..\..\bin\win81\Debug\Caliburn.Micro.dll - - ..\..\..\..\bin\win81\Debug\Caliburn.Micro.Extensions.dll - ..\..\..\..\bin\win81\Debug\Caliburn.Micro.Platform.dll + + False + ..\..\..\..\bin\win81\Debug\Caliburn.Micro.Platform.Core.dll + ..\..\..\..\bin\win81\Debug\Microsoft.Xaml.Interactions.dll diff --git a/samples/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable.WindowsPhone/Caliburn.Micro.HelloPortable.WindowsPhone.csproj b/samples/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable.WindowsPhone/Caliburn.Micro.HelloPortable.WindowsPhone.csproj index b72dcdeb..d7c0890e 100644 --- a/samples/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable.WindowsPhone/Caliburn.Micro.HelloPortable.WindowsPhone.csproj +++ b/samples/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable/Caliburn.Micro.HelloPortable.WindowsPhone/Caliburn.Micro.HelloPortable.WindowsPhone.csproj @@ -90,12 +90,13 @@ ..\..\..\..\bin\wpa81\Debug\Caliburn.Micro.dll - - ..\..\..\..\bin\wpa81\Debug\Caliburn.Micro.Extensions.dll - ..\..\..\..\bin\wpa81\Debug\Caliburn.Micro.Platform.dll + + False + ..\..\..\..\bin\wpa81\Debug\Caliburn.Micro.Platform.Core.dll + ..\..\..\..\bin\wpa81\Debug\Microsoft.Xaml.Interactions.dll diff --git a/samples/Caliburn.Micro.HelloPortable/nuget.config b/samples/Caliburn.Micro.HelloPortable/nuget.config index 30506bca..7c08678d 100644 --- a/samples/Caliburn.Micro.HelloPortable/nuget.config +++ b/samples/Caliburn.Micro.HelloPortable/nuget.config @@ -1,3 +1,6 @@ - - ..\packages - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/samples/Caliburn.Micro.HelloScreens/nuget.config b/samples/Caliburn.Micro.HelloScreens/nuget.config index 9d72990c..7c08678d 100644 --- a/samples/Caliburn.Micro.HelloScreens/nuget.config +++ b/samples/Caliburn.Micro.HelloScreens/nuget.config @@ -1,3 +1,6 @@ - - ..\packages - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP.sln b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP.sln new file mode 100644 index 00000000..5d3db699 --- /dev/null +++ b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP.sln @@ -0,0 +1,40 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Caliburn.Micro.HelloUWP", "Caliburn.Micro.HelloUWP\Caliburn.Micro.HelloUWP.csproj", "{E1B2D496-64AF-445E-A43E-82A92D152A39}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Debug|ARM.ActiveCfg = Debug|ARM + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Debug|ARM.Build.0 = Debug|ARM + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Debug|ARM.Deploy.0 = Debug|ARM + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Debug|x64.ActiveCfg = Debug|x64 + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Debug|x64.Build.0 = Debug|x64 + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Debug|x64.Deploy.0 = Debug|x64 + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Debug|x86.ActiveCfg = Debug|x86 + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Debug|x86.Build.0 = Debug|x86 + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Debug|x86.Deploy.0 = Debug|x86 + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Release|ARM.ActiveCfg = Release|ARM + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Release|ARM.Build.0 = Release|ARM + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Release|ARM.Deploy.0 = Release|ARM + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Release|x64.ActiveCfg = Release|x64 + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Release|x64.Build.0 = Release|x64 + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Release|x64.Deploy.0 = Release|x64 + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Release|x86.ActiveCfg = Release|x86 + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Release|x86.Build.0 = Release|x86 + {E1B2D496-64AF-445E-A43E-82A92D152A39}.Release|x86.Deploy.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/App.xaml b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/App.xaml new file mode 100644 index 00000000..cdd5dce9 --- /dev/null +++ b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/App.xaml @@ -0,0 +1,8 @@ + + + diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/App.xaml.cs b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/App.xaml.cs new file mode 100644 index 00000000..ec22c690 --- /dev/null +++ b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/App.xaml.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Caliburn.Micro.HelloUWP.Messages; +using Caliburn.Micro.HelloUWP.ViewModels; + +namespace Caliburn.Micro.HelloUWP +{ + public sealed partial class App + { + private WinRTContainer _container; + private IEventAggregator _eventAggregator; + + public App() + { + InitializeComponent(); + } + + protected override void Configure() + { + _container = new WinRTContainer(); + _container.RegisterWinRTServices(); + + _container + .PerRequest() + .PerRequest(); + + _eventAggregator = _container.GetInstance(); + } + + protected override void OnLaunched(LaunchActivatedEventArgs args) + { + // Note we're using DisplayRootViewFor (which is view model first) + // this means we're not creating a root frame and just directly + // inserting ShellView as the Window.Content + + DisplayRootViewFor(); + + // It's kinda of weird having to use the event aggregator to pass + // a value to ShellViewModel, could be an argument for allowing + // parameters or launch arguments + + if (args.PreviousExecutionState == ApplicationExecutionState.Terminated) + { + _eventAggregator.PublishOnUIThread(new ResumeStateMessage()); + } + } + + protected override void OnSuspending(object sender, SuspendingEventArgs e) + { + _eventAggregator.PublishOnUIThread(new SuspendStateMessage(e.SuspendingOperation)); + } + + protected override object GetInstance(Type service, string key) + { + return _container.GetInstance(service, key); + } + + protected override IEnumerable GetAllInstances(Type service) + { + return _container.GetAllInstances(service); + } + + protected override void BuildUp(object instance) + { + _container.BuildUp(instance); + } + } +} diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/LockScreenLogo.scale-200.png b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 00000000..735f57ad Binary files /dev/null and b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/LockScreenLogo.scale-200.png differ diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/SplashScreen.scale-200.png b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/SplashScreen.scale-200.png new file mode 100644 index 00000000..023e7f1f Binary files /dev/null and b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/SplashScreen.scale-200.png differ diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/Square150x150Logo.scale-200.png b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 00000000..af49fec1 Binary files /dev/null and b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/Square150x150Logo.scale-200.png differ diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/Square44x44Logo.scale-200.png b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 00000000..ce342a2e Binary files /dev/null and b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/Square44x44Logo.scale-200.png differ diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 00000000..f6c02ce9 Binary files /dev/null and b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/StoreLogo.png b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/StoreLogo.png new file mode 100644 index 00000000..7385b56c Binary files /dev/null and b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/StoreLogo.png differ diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/Wide310x150Logo.scale-200.png b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 00000000..288995b3 Binary files /dev/null and b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Assets/Wide310x150Logo.scale-200.png differ diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP.csproj b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP.csproj new file mode 100644 index 00000000..ee580729 --- /dev/null +++ b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP.csproj @@ -0,0 +1,170 @@ + + + + + Debug + x86 + {E1B2D496-64AF-445E-A43E-82A92D152A39} + AppContainerExe + Properties + Caliburn.Micro.HelloUWP + Caliburn.Micro.HelloUWP + en-US + UAP + 10.0.10240.0 + 10.0.10240.0 + 14 + true + 512 + {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Caliburn.Micro.HelloUWP_TemporaryKey.pfx + + + true + bin\ARM\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + ARM + false + prompt + true + + + bin\ARM\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + ARM + false + prompt + true + true + + + true + bin\x64\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x64 + false + prompt + true + + + bin\x64\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x64 + false + prompt + true + true + + + true + bin\x86\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x86 + false + prompt + true + + + bin\x86\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x86 + false + prompt + true + true + + + + + + + + App.xaml + + + + + + + + DeviceView.xaml + + + ShellView.xaml + + + + + Designer + + + + + + + + + + + + + + + + MSBuild:Compile + Designer + + + + + ..\..\..\bin\uwp\Debug\Caliburn.Micro.dll + + + ..\..\..\bin\uwp\Debug\Caliburn.Micro.Platform.Core.dll + + + ..\..\..\bin\uwp\Debug\Caliburn.Micro.Platform.UWP.dll + + + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + + + 14.0 + + + + \ No newline at end of file diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP_TemporaryKey.pfx b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP_TemporaryKey.pfx new file mode 100644 index 00000000..30d45e32 Binary files /dev/null and b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP_TemporaryKey.pfx differ diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Messages/ResumeStateMessage.cs b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Messages/ResumeStateMessage.cs new file mode 100644 index 00000000..106a68fc --- /dev/null +++ b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Messages/ResumeStateMessage.cs @@ -0,0 +1,8 @@ +using System; + +namespace Caliburn.Micro.HelloUWP.Messages +{ + public class ResumeStateMessage + { + } +} diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Messages/SuspendStateMessage.cs b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Messages/SuspendStateMessage.cs new file mode 100644 index 00000000..a4da3e85 --- /dev/null +++ b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Messages/SuspendStateMessage.cs @@ -0,0 +1,15 @@ +using System; +using Windows.ApplicationModel; + +namespace Caliburn.Micro.HelloUWP.Messages +{ + public class SuspendStateMessage + { + public SuspendStateMessage(SuspendingOperation operation) + { + Operation = operation; + } + + public SuspendingOperation Operation { get; } + } +} diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Package.appxmanifest b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Package.appxmanifest new file mode 100644 index 00000000..5ebea481 --- /dev/null +++ b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Package.appxmanifest @@ -0,0 +1,49 @@ + + + + + + + + + + Caliburn.Micro.HelloUWP + nigel + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Properties/AssemblyInfo.cs b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..f65f2e3e --- /dev/null +++ b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/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("Caliburn.Micro.HelloUWP")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Caliburn.Micro.HelloUWP")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[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/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Properties/Default.rd.xml b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Properties/Default.rd.xml new file mode 100644 index 00000000..80a960ce --- /dev/null +++ b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Properties/Default.rd.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/ViewModels/DeviceViewModel.cs b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/ViewModels/DeviceViewModel.cs new file mode 100644 index 00000000..e8d7a32f --- /dev/null +++ b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/ViewModels/DeviceViewModel.cs @@ -0,0 +1,8 @@ +using System; + +namespace Caliburn.Micro.HelloUWP.ViewModels +{ + public class DeviceViewModel : Screen + { + } +} diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/ViewModels/ShellViewModel.cs b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/ViewModels/ShellViewModel.cs new file mode 100644 index 00000000..647a841b --- /dev/null +++ b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/ViewModels/ShellViewModel.cs @@ -0,0 +1,53 @@ +using System; +using Windows.UI.Xaml.Controls; +using Caliburn.Micro.HelloUWP.Messages; + +namespace Caliburn.Micro.HelloUWP.ViewModels +{ + public class ShellViewModel : Screen, IHandle, IHandle + { + private readonly WinRTContainer _container; + private readonly IEventAggregator _eventAggregator; + private INavigationService _navigationService; + private bool _resume; + + public ShellViewModel(WinRTContainer container, IEventAggregator eventAggregator) + { + _container = container; + _eventAggregator = eventAggregator; + } + + protected override void OnActivate() + { + _eventAggregator.Subscribe(this); + } + + protected override void OnDeactivate(bool close) + { + _eventAggregator.Unsubscribe(this); + } + + public void SetupNavigationService(Frame frame) + { + _navigationService = _container.RegisterNavigationService(frame); + + if (_resume) + _navigationService.ResumeState(); + } + + public void ShowDevices() + { + _navigationService.For().Navigate(); + } + + public void Handle(SuspendStateMessage message) + { + _navigationService.SuspendState(); + } + + public void Handle(ResumeStateMessage message) + { + _resume = true; + } + } +} diff --git a/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Views/DeviceView.DeviceFamily-Mobile.xaml b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Views/DeviceView.DeviceFamily-Mobile.xaml new file mode 100644 index 00000000..c665bb09 --- /dev/null +++ b/samples/Caliburn.Micro.HelloUWP/Caliburn.Micro.HelloUWP/Views/DeviceView.DeviceFamily-Mobile.xaml @@ -0,0 +1,14 @@ + + + + +