diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..bdb0cab --- /dev/null +++ b/.gitattributes @@ -0,0 +1,17 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.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 new file mode 100644 index 0000000..78b49ee --- /dev/null +++ b/.gitignore @@ -0,0 +1,231 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Roslyn cache directories +*.ide/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +#NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding addin-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# If using the old MSBuild-Integrated Package Restore, uncomment this: +#!**/packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear on external disk +.Spotlight-V100 +.Trashes + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# Windows +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk diff --git a/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81.sln b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81.sln new file mode 100644 index 0000000..165a481 --- /dev/null +++ b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81.sln @@ -0,0 +1,99 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bratched.Tools.RatingControl", "Bratched.Tools.RatingControl", "{AB898A76-4C60-4603-B1C7-C74B3BAE069B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RatingControlDemo_ua81", "RatingControlDemo_ua81", "{FB6216F5-9FF2-4A75-AB2D-E17FC1955618}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "RatingControlDemo_ua81.Shared", "RatingControlDemo_ua81\RatingControlDemo_ua81.Shared\RatingControlDemo_ua81.Shared.shproj", "{E5974D57-BBB1-4346-BACA-72200C4927CC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RatingControlDemo_ua81.Windows", "RatingControlDemo_ua81\RatingControlDemo_ua81.Windows\RatingControlDemo_ua81.Windows.csproj", "{EC9529D1-E569-400A-A639-67EC2C946552}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RatingControlDemo_ua81.WindowsPhone", "RatingControlDemo_ua81\RatingControlDemo_ua81.WindowsPhone\RatingControlDemo_ua81.WindowsPhone.csproj", "{0AAABEBA-0096-44C5-B7C4-4159838020D2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bratched.Tools.RatingControl_ua81", "..\..\Projects\Bratched.Tools.RatingControl_ua81\Bratched.Tools.RatingControl_ua81.csproj", "{A10694BE-F389-41D9-9699-FDEAC1B0A21D}" +EndProject +Global + GlobalSection(SharedMSBuildProjectFiles) = preSolution + RatingControlDemo_ua81\RatingControlDemo_ua81.Shared\RatingControlDemo_ua81.Shared.projitems*{e5974d57-bbb1-4346-baca-72200c4927cc}*SharedItemsImports = 13 + RatingControlDemo_ua81\RatingControlDemo_ua81.Shared\RatingControlDemo_ua81.Shared.projitems*{0aaabeba-0096-44c5-b7c4-4159838020d2}*SharedItemsImports = 4 + RatingControlDemo_ua81\RatingControlDemo_ua81.Shared\RatingControlDemo_ua81.Shared.projitems*{ec9529d1-e569-400a-a639-67ec2c946552}*SharedItemsImports = 4 + EndGlobalSection + 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 + {EC9529D1-E569-400A-A639-67EC2C946552}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC9529D1-E569-400A-A639-67EC2C946552}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC9529D1-E569-400A-A639-67EC2C946552}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {EC9529D1-E569-400A-A639-67EC2C946552}.Debug|ARM.ActiveCfg = Debug|ARM + {EC9529D1-E569-400A-A639-67EC2C946552}.Debug|ARM.Build.0 = Debug|ARM + {EC9529D1-E569-400A-A639-67EC2C946552}.Debug|ARM.Deploy.0 = Debug|ARM + {EC9529D1-E569-400A-A639-67EC2C946552}.Debug|x64.ActiveCfg = Debug|x64 + {EC9529D1-E569-400A-A639-67EC2C946552}.Debug|x64.Build.0 = Debug|x64 + {EC9529D1-E569-400A-A639-67EC2C946552}.Debug|x64.Deploy.0 = Debug|x64 + {EC9529D1-E569-400A-A639-67EC2C946552}.Debug|x86.ActiveCfg = Debug|x86 + {EC9529D1-E569-400A-A639-67EC2C946552}.Debug|x86.Build.0 = Debug|x86 + {EC9529D1-E569-400A-A639-67EC2C946552}.Debug|x86.Deploy.0 = Debug|x86 + {EC9529D1-E569-400A-A639-67EC2C946552}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC9529D1-E569-400A-A639-67EC2C946552}.Release|Any CPU.Build.0 = Release|Any CPU + {EC9529D1-E569-400A-A639-67EC2C946552}.Release|Any CPU.Deploy.0 = Release|Any CPU + {EC9529D1-E569-400A-A639-67EC2C946552}.Release|ARM.ActiveCfg = Release|ARM + {EC9529D1-E569-400A-A639-67EC2C946552}.Release|ARM.Build.0 = Release|ARM + {EC9529D1-E569-400A-A639-67EC2C946552}.Release|ARM.Deploy.0 = Release|ARM + {EC9529D1-E569-400A-A639-67EC2C946552}.Release|x64.ActiveCfg = Release|x64 + {EC9529D1-E569-400A-A639-67EC2C946552}.Release|x64.Build.0 = Release|x64 + {EC9529D1-E569-400A-A639-67EC2C946552}.Release|x64.Deploy.0 = Release|x64 + {EC9529D1-E569-400A-A639-67EC2C946552}.Release|x86.ActiveCfg = Release|x86 + {EC9529D1-E569-400A-A639-67EC2C946552}.Release|x86.Build.0 = Release|x86 + {EC9529D1-E569-400A-A639-67EC2C946552}.Release|x86.Deploy.0 = Release|x86 + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Debug|ARM.ActiveCfg = Debug|ARM + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Debug|ARM.Build.0 = Debug|ARM + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Debug|ARM.Deploy.0 = Debug|ARM + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Debug|x64.ActiveCfg = Debug|Any CPU + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Debug|x86.ActiveCfg = Debug|x86 + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Debug|x86.Build.0 = Debug|x86 + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Debug|x86.Deploy.0 = Debug|x86 + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Release|Any CPU.Build.0 = Release|Any CPU + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Release|Any CPU.Deploy.0 = Release|Any CPU + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Release|ARM.ActiveCfg = Release|ARM + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Release|ARM.Build.0 = Release|ARM + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Release|ARM.Deploy.0 = Release|ARM + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Release|x64.ActiveCfg = Release|Any CPU + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Release|x86.ActiveCfg = Release|x86 + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Release|x86.Build.0 = Release|x86 + {0AAABEBA-0096-44C5-B7C4-4159838020D2}.Release|x86.Deploy.0 = Release|x86 + {A10694BE-F389-41D9-9699-FDEAC1B0A21D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A10694BE-F389-41D9-9699-FDEAC1B0A21D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A10694BE-F389-41D9-9699-FDEAC1B0A21D}.Debug|ARM.ActiveCfg = Debug|Any CPU + {A10694BE-F389-41D9-9699-FDEAC1B0A21D}.Debug|x64.ActiveCfg = Debug|Any CPU + {A10694BE-F389-41D9-9699-FDEAC1B0A21D}.Debug|x86.ActiveCfg = Debug|Any CPU + {A10694BE-F389-41D9-9699-FDEAC1B0A21D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A10694BE-F389-41D9-9699-FDEAC1B0A21D}.Release|Any CPU.Build.0 = Release|Any CPU + {A10694BE-F389-41D9-9699-FDEAC1B0A21D}.Release|ARM.ActiveCfg = Release|Any CPU + {A10694BE-F389-41D9-9699-FDEAC1B0A21D}.Release|x64.ActiveCfg = Release|Any CPU + {A10694BE-F389-41D9-9699-FDEAC1B0A21D}.Release|x86.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {E5974D57-BBB1-4346-BACA-72200C4927CC} = {FB6216F5-9FF2-4A75-AB2D-E17FC1955618} + {EC9529D1-E569-400A-A639-67EC2C946552} = {FB6216F5-9FF2-4A75-AB2D-E17FC1955618} + {0AAABEBA-0096-44C5-B7C4-4159838020D2} = {FB6216F5-9FF2-4A75-AB2D-E17FC1955618} + {A10694BE-F389-41D9-9699-FDEAC1B0A21D} = {AB898A76-4C60-4603-B1C7-C74B3BAE069B} + EndGlobalSection +EndGlobal diff --git a/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/App.xaml b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/App.xaml new file mode 100644 index 0000000..c78939f --- /dev/null +++ b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/App.xaml @@ -0,0 +1,7 @@ + + + diff --git a/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/App.xaml.cs b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/App.xaml.cs new file mode 100644 index 0000000..a74cf9d --- /dev/null +++ b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/App.xaml.cs @@ -0,0 +1,137 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Media.Animation; +using Windows.UI.Xaml.Navigation; + +// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227 + +namespace RatingControlDemo_ua81 +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + public sealed partial class App : Application + { +#if WINDOWS_PHONE_APP + private TransitionCollection transitions; +#endif + + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + this.Suspending += this.OnSuspending; + } + + /// + /// Invoked when the application is launched normally by the end user. Other entry points + /// will be used when the application is launched to open a specific file, to display + /// search results, and so forth. + /// + /// Details about the launch request and process. + protected override void OnLaunched(LaunchActivatedEventArgs e) + { +#if DEBUG + if (System.Diagnostics.Debugger.IsAttached) + { + this.DebugSettings.EnableFrameRateCounter = true; + } +#endif + + Frame rootFrame = Window.Current.Content as Frame; + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active + if (rootFrame == null) + { + // Create a Frame to act as the navigation context and navigate to the first page + rootFrame = new Frame(); + + // TODO: change this value to a cache size that is appropriate for your application + rootFrame.CacheSize = 1; + + if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) + { + // TODO: Load state from previously suspended application + } + + // Place the frame in the current Window + Window.Current.Content = rootFrame; + } + + if (rootFrame.Content == null) + { +#if WINDOWS_PHONE_APP + // Removes the turnstile navigation for startup. + if (rootFrame.ContentTransitions != null) + { + this.transitions = new TransitionCollection(); + foreach (var c in rootFrame.ContentTransitions) + { + this.transitions.Add(c); + } + } + + rootFrame.ContentTransitions = null; + rootFrame.Navigated += this.RootFrame_FirstNavigated; +#endif + + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter + if (!rootFrame.Navigate(typeof(MainPage), e.Arguments)) + { + throw new Exception("Failed to create initial page"); + } + } + + // Ensure the current window is active + Window.Current.Activate(); + } + +#if WINDOWS_PHONE_APP + /// + /// Restores the content transitions after the app has launched. + /// + /// The object where the handler is attached. + /// Details about the navigation event. + private void RootFrame_FirstNavigated(object sender, NavigationEventArgs e) + { + var rootFrame = sender as Frame; + rootFrame.ContentTransitions = this.transitions ?? new TransitionCollection() { new NavigationThemeTransition() }; + rootFrame.Navigated -= this.RootFrame_FirstNavigated; + } +#endif + + /// + /// Invoked when application execution is being suspended. Application state is saved + /// without knowing whether the application will be terminated or resumed with the contents + /// of memory still intact. + /// + /// The source of the suspend request. + /// Details about the suspend request. + private void OnSuspending(object sender, SuspendingEventArgs e) + { + var deferral = e.SuspendingOperation.GetDeferral(); + + // TODO: Save application state and stop any background activity + deferral.Complete(); + } + } +} \ No newline at end of file diff --git a/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/RatingControlDemo_ua81.Shared.projitems b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/RatingControlDemo_ua81.Shared.projitems new file mode 100644 index 0000000..426f765 --- /dev/null +++ b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/RatingControlDemo_ua81.Shared.projitems @@ -0,0 +1,51 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + e5974d57-bbb1-4346-baca-72200c4927cc + + + RatingControlDemo_ua81 + + + + Designer + + + App.xaml + + + + + MainPage.xaml + + + MVVMPage.xaml + + + OverrideLimitsSamplePage.xaml + + + SimpleSamplesPage.xaml + + + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + \ No newline at end of file diff --git a/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/RatingControlDemo_ua81.Shared.shproj b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/RatingControlDemo_ua81.Shared.shproj new file mode 100644 index 0000000..77551d5 --- /dev/null +++ b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/RatingControlDemo_ua81.Shared.shproj @@ -0,0 +1,12 @@ + + + + e5974d57-bbb1-4346-baca-72200c4927cc + + + + + + + + diff --git a/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/Tools/RelayCommand.cs b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/Tools/RelayCommand.cs new file mode 100644 index 0000000..18b4e5c --- /dev/null +++ b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/Tools/RelayCommand.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Input; + +namespace RatingControlDemo_ua81.Tools +{ + public class RelayCommand : ICommand + { + private Action execute; + + private Predicate canExecute; + + private event EventHandler CanExecuteChangedInternal; + + public RelayCommand(Action execute) + : this(execute, DefaultCanExecute) + { + } + + public RelayCommand(Action execute, Predicate canExecute) + { + if (execute == null) + { + throw new ArgumentNullException("execute"); + } + + if (canExecute == null) + { + throw new ArgumentNullException("canExecute"); + } + + this.execute = execute; + this.canExecute = canExecute; + } + + public event EventHandler CanExecuteChanged + { + add + { + //CommandManager.RequerySuggested += value; + this.CanExecuteChangedInternal += value; + } + + remove + { + // CommandManager.RequerySuggested -= value; + this.CanExecuteChangedInternal -= value; + } + } + + public bool CanExecute(object parameter) + { + return this.canExecute != null && this.canExecute(parameter); + } + + public void Execute(object parameter) + { + this.execute(parameter); + } + + public void OnCanExecuteChanged() + { + EventHandler handler = this.CanExecuteChangedInternal; + if (handler != null) + { + //DispatcherHelper.BeginInvokeOnUIThread(() => handler.Invoke(this, EventArgs.Empty)); + handler.Invoke(this, EventArgs.Empty); + } + } + + public void Destroy() + { + this.canExecute = _ => false; + this.execute = _ => { return; }; + } + + private static bool DefaultCanExecute(object parameter) + { + return true; + } + } +} diff --git a/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/View/MVVMPage.xaml b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/View/MVVMPage.xaml new file mode 100644 index 0000000..f798976 --- /dev/null +++ b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/View/MVVMPage.xaml @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/View/MVVMPage.xaml.cs b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/View/MVVMPage.xaml.cs new file mode 100644 index 0000000..86a5441 --- /dev/null +++ b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/View/MVVMPage.xaml.cs @@ -0,0 +1,32 @@ +using RatingControlDemo_ua81.ViewModel; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 + +namespace RatingControlDemo_ua81 +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class MVVMPage : Page + { + public MVVMPage() + { + this.InitializeComponent(); + DataContext = new RatingControlExampleViewModel(); + } + } +} diff --git a/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/View/MainPage.xaml b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/View/MainPage.xaml new file mode 100644 index 0000000..46711dc --- /dev/null +++ b/Demos/RatingControlDemo_ua8/RatingControlDemo_ua81/RatingControlDemo_ua81.Shared/View/MainPage.xaml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + +