diff --git a/Samples/WpfMVVMSample/Readme.md b/Samples/WpfMVVMSample/Readme.md new file mode 100644 index 0000000000..87ea6d5656 --- /dev/null +++ b/Samples/WpfMVVMSample/Readme.md @@ -0,0 +1,13 @@ +## WPF MVVM Sample +This is a simple sample showing how UnitsNet can be used to create a WPF MVVM application. I have used this strategy in a few simple engineering apps and thought I would share it as a sample to see if others might offer improvements. + +It performs a simple calculation allowing flexibility in the units for parameters and results. Default units for each are specified in the settings drop down. + +A key feature enabling this sample is the [UnitToStringConverter](https://github.com/dayewah/UnitsNet/blob/master/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs) class +- If a parameter is entered as a number the unit is assigned automatically +- If a parameter is entered as a unit other than the default it is converted automatically +- If a non-compatible unit is used a validation error is triggered + +The default unit for each parameter and the result can be changed from the settings pull down. + +The number of significant digits displayed can also be changed from settings. \ No newline at end of file diff --git a/Samples/WpfMVVMSample/WpfMVVMSample.sln b/Samples/WpfMVVMSample/WpfMVVMSample.sln new file mode 100644 index 0000000000..f6924a3728 --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2010 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfMVVMSample", "WpfMVVMSample\WpfMVVMSample.csproj", "{B72F9215-70FF-4155-89BC-9A02CC550447}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B72F9215-70FF-4155-89BC-9A02CC550447}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B72F9215-70FF-4155-89BC-9A02CC550447}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B72F9215-70FF-4155-89BC-9A02CC550447}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B72F9215-70FF-4155-89BC-9A02CC550447}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D5FA6C7A-26EC-4F45-B539-F20AD40CE0A4} + EndGlobalSection +EndGlobal diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/App.config b/Samples/WpfMVVMSample/WpfMVVMSample/App.config new file mode 100644 index 0000000000..731f6de6c2 --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/App.xaml b/Samples/WpfMVVMSample/WpfMVVMSample/App.xaml new file mode 100644 index 0000000000..6efb0d471e --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/App.xaml.cs b/Samples/WpfMVVMSample/WpfMVVMSample/App.xaml.cs new file mode 100644 index 0000000000..030015fe02 --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/App.xaml.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace WpfMVVMSample +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + var bootstrapper = new Bootstrapper(); + bootstrapper.Run(); + } + } +} diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/Bootstrapper.cs b/Samples/WpfMVVMSample/WpfMVVMSample/Bootstrapper.cs new file mode 100644 index 0000000000..9602ee8336 --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/Bootstrapper.cs @@ -0,0 +1,43 @@ +using Microsoft.Practices.ServiceLocation; +using Microsoft.Practices.Unity; +using Prism.Unity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using WpfMVVMSample.Converters; +using WpfMVVMSample.Settings; + +namespace WpfMVVMSample +{ + public class Bootstrapper : UnityBootstrapper + { + protected override DependencyObject CreateShell() + { + return Container.TryResolve(); + } + + protected override void InitializeShell() + { + Application.Current.MainWindow.Show(); + } + + protected override void ConfigureContainer() + { + base.ConfigureContainer(); + + Container.RegisterType(new ContainerControlledLifetimeManager());//singleton + } + + protected override void ConfigureServiceLocator() + { + base.ConfigureServiceLocator(); + + var serviceLocator = new UnityServiceLocator(Container); + ServiceLocator.SetLocatorProvider(() => serviceLocator); + + } + } +} diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/Converters/EnumBindingSource.cs b/Samples/WpfMVVMSample/WpfMVVMSample/Converters/EnumBindingSource.cs new file mode 100644 index 0000000000..02d87b7737 --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/Converters/EnumBindingSource.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Markup; + +namespace WpfMVVMSample.Converters +{ + public class EnumBindingSourceExtension : MarkupExtension + { + private Type _enumType; + private Type EnumType + { + get { return this._enumType; } + set + { + if (value != this._enumType) + { + if (value != null) + { + Type enumType = Nullable.GetUnderlyingType(value) ?? value; + + if (!enumType.IsEnum) + throw new ArgumentException("Type must be for an Enum."); + } + + this._enumType = value; + } + } + } + + public EnumBindingSourceExtension() { } + + public EnumBindingSourceExtension(Type enumType) + { + this.EnumType = enumType; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + if (this._enumType== null) + throw new InvalidOperationException("The EnumType must be specified."); + + Type actualEnumType = Nullable.GetUnderlyingType(this._enumType) ?? this._enumType; + + //omits the first enum element, typically "undefined" + var enumValues = Enum.GetValues(actualEnumType).Cast().Skip(1); + + return enumValues; + } + } +} diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs b/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs new file mode 100644 index 0000000000..9038642b67 --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/Converters/UnitToStringConverter.cs @@ -0,0 +1,87 @@ +using Microsoft.Practices.ServiceLocation; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Markup; +using UnitsNet; +using WpfMVVMSample.Settings; + +namespace WpfMVVMSample.Converters +{ + public class UnitToStringConverter :MarkupExtension, IValueConverter + { + //http://www.thejoyofcode.com/WPF_Quick_Tip_Converters_as_MarkupExtensions.aspx + private SettingsManager _settings; + private static UnitToStringConverter _instance; + + public UnitToStringConverter() + { + if (!DesignerProperties.GetIsInDesignMode(new DependencyObject())) + { + _settings = ServiceLocator.Current.GetInstance(); + } + } + + + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + var unitType = value.GetType(); + var unitEnumType = unitType.GetProperty("BaseUnit").PropertyType; + var unitEnumValue = _settings.GetDefaultUnit(unitEnumType); + var significantDigits = _settings.SignificantDigits; + + var result = unitType + .GetMethod("ToString", new[] { unitEnumType, typeof(IFormatProvider), typeof(int) }) + .Invoke(value, new object[] { unitEnumValue, null, significantDigits }); + + return result; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + var unitEnumType = targetType.GetProperty("BaseUnit").PropertyType; + var unitEnumValue = _settings.GetDefaultUnit(unitEnumType); + + if ((string)value == "") return 0.0; + + double number; + if (double.TryParse((string)value, out number)) + return ParseDouble(targetType, number, unitEnumType, unitEnumValue); + + try + { + return ParseUnit(value, targetType); + } + catch (Exception e) + { + return new ValidationResult(false, e.InnerException.Message); + } + } + + + private static object ParseDouble(Type targetType, double number, Type unitEnumType, object unitEnumValue) + { + return targetType + .GetMethod("From", new[] { typeof(QuantityValue), unitEnumType }) + .Invoke(null, new object[] { (QuantityValue)number, unitEnumValue }); + } + private static object ParseUnit(object value, Type targetType) + { + return targetType + .GetMethod("Parse", new[] { typeof(string) }) + .Invoke(null, new object[] { value }); + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return _instance ?? (_instance = new UnitToStringConverter()); + } + } +} diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/MainWindow.xaml b/Samples/WpfMVVMSample/WpfMVVMSample/MainWindow.xaml new file mode 100644 index 0000000000..ce9546ce7e --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/MainWindow.xaml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/MainWindow.xaml.cs b/Samples/WpfMVVMSample/WpfMVVMSample/MainWindow.xaml.cs new file mode 100644 index 0000000000..e0d2d6299d --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/MainWindow.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace WpfMVVMSample +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/MainWindowViewModel.cs b/Samples/WpfMVVMSample/WpfMVVMSample/MainWindowViewModel.cs new file mode 100644 index 0000000000..bb9a26aafd --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/MainWindowViewModel.cs @@ -0,0 +1,72 @@ +using Prism.Commands; +using Prism.Mvvm; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnitsNet; +using UnitsNet.Units; +using WpfMVVMSample.Converters; +using WpfMVVMSample.Properties; +using WpfMVVMSample.Settings; + +namespace WpfMVVMSample +{ + public class MainWindowViewModel: BindableBase + { + public MainWindowViewModel(SettingsManager settings) + { + Settings = settings; + PropertyChanged += MainWindowViewModel_PropertyChanged; + Settings.PropertyChanged += Settings_PropertyChanged; + } + + private void Settings_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) + { + RaisePropertyChanged("");//refresh all bindings on this viewmodel + } + + private void MainWindowViewModel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) + { + if (e.PropertyName==nameof(ObjectMass)||e.PropertyName==nameof(G)) + { + Calculate(); + } + } + + private SettingsManager _settings; + public SettingsManager Settings + { + get { return _settings; } + set { SetProperty(ref _settings, value); } + } + + private Force _weight; + public Force Weight + { + get { return _weight; } + set { SetProperty(ref _weight, value); } + } + + private Mass _objectMass; + public Mass ObjectMass + { + get { return _objectMass; } + set { SetProperty(ref _objectMass, value); } + } + + private Acceleration _g; + public Acceleration G + { + get { return _g; } + set { SetProperty(ref _g, value); } + } + + void Calculate() + { + _weight = _objectMass*_g; + RaisePropertyChanged(nameof(Weight)); + } + } +} diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/Properties/AssemblyInfo.cs b/Samples/WpfMVVMSample/WpfMVVMSample/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..814762f31f --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// 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("WpfMVVMSample")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WpfMVVMSample")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[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)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// 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")] diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/Properties/Resources.Designer.cs b/Samples/WpfMVVMSample/WpfMVVMSample/Properties/Resources.Designer.cs new file mode 100644 index 0000000000..cd843896da --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WpfMVVMSample.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WpfMVVMSample.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/Properties/Resources.resx b/Samples/WpfMVVMSample/WpfMVVMSample/Properties/Resources.resx new file mode 100644 index 0000000000..af7dbebbac --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/Properties/Settings.Designer.cs b/Samples/WpfMVVMSample/WpfMVVMSample/Properties/Settings.Designer.cs new file mode 100644 index 0000000000..872d27fb1f --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WpfMVVMSample.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/Properties/Settings.settings b/Samples/WpfMVVMSample/WpfMVVMSample/Properties/Settings.settings new file mode 100644 index 0000000000..033d7a5e9e --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/Settings/SettingsManager.cs b/Samples/WpfMVVMSample/WpfMVVMSample/Settings/SettingsManager.cs new file mode 100644 index 0000000000..9aa777ebf0 --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/Settings/SettingsManager.cs @@ -0,0 +1,68 @@ +using Prism.Mvvm; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnitsNet.Units; + +namespace WpfMVVMSample.Settings +{ + public class SettingsManager : BindableBase + { + private Dictionary> _defaultUnitProviders; + public SettingsManager() + { + DefaultMassUnit = MassUnit.Kilogram; + DefaultAccelerationUnit = AccelerationUnit.MeterPerSecondSquared; + DefaultForceUnit = ForceUnit.Newton; + + _defaultUnitProviders = new Dictionary> + { + {typeof(MassUnit),()=> this.DefaultMassUnit }, + {typeof(AccelerationUnit),()=> this.DefaultAccelerationUnit }, + {typeof(ForceUnit),()=> this.DefaultForceUnit }, + }; + } + + private MassUnit _defaultMassUnit; + public MassUnit DefaultMassUnit + { + get { return _defaultMassUnit; } + set { SetProperty(ref _defaultMassUnit, value); } + } + + private AccelerationUnit _defaultAccelerationUnit; + public AccelerationUnit DefaultAccelerationUnit + { + get { return _defaultAccelerationUnit; } + set { SetProperty(ref _defaultAccelerationUnit, value); } + } + + private ForceUnit _defaultForceUnit; + public ForceUnit DefaultForceUnit + { + get { return _defaultForceUnit; } + set { SetProperty(ref _defaultForceUnit, value); } + } + + public object GetDefaultUnit(Type unitType) + { + if (_defaultUnitProviders.ContainsKey(unitType)) + { + var provider = _defaultUnitProviders[unitType]; + return provider(); + } + else + return null; + } + + private int _significantDigits = 1; + + public int SignificantDigits + { + get { return _significantDigits; } + set { SetProperty(ref _significantDigits, value); } + } + } +} diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/WpfMVVMSample.csproj b/Samples/WpfMVVMSample/WpfMVVMSample/WpfMVVMSample.csproj new file mode 100644 index 0000000000..a240bf2c02 --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/WpfMVVMSample.csproj @@ -0,0 +1,130 @@ + + + + + Debug + AnyCPU + {B72F9215-70FF-4155-89BC-9A02CC550447} + WinExe + WpfMVVMSample + WpfMVVMSample + v4.6.1 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll + + + ..\packages\Unity.4.0.1\lib\net45\Microsoft.Practices.Unity.dll + + + ..\packages\Unity.4.0.1\lib\net45\Microsoft.Practices.Unity.Configuration.dll + + + ..\packages\Unity.4.0.1\lib\net45\Microsoft.Practices.Unity.RegistrationByConvention.dll + + + ..\packages\Prism.Core.6.3.0\lib\net45\Prism.dll + + + ..\packages\Prism.Unity.6.3.0\lib\net45\Prism.Unity.Wpf.dll + + + ..\packages\Prism.Wpf.6.3.0\lib\net45\Prism.Wpf.dll + + + + + ..\packages\Prism.Wpf.6.3.0\lib\net45\System.Windows.Interactivity.dll + + + + + + + + + 4.0 + + + ..\packages\UnitsNet.3.85.0\lib\net40\UnitsNet.dll + + + + + + + + MSBuild:Compile + Designer + + + + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + + MainWindow.xaml + Code + + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + \ No newline at end of file diff --git a/Samples/WpfMVVMSample/WpfMVVMSample/packages.config b/Samples/WpfMVVMSample/WpfMVVMSample/packages.config new file mode 100644 index 0000000000..031bd6a760 --- /dev/null +++ b/Samples/WpfMVVMSample/WpfMVVMSample/packages.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file