diff --git a/Dapplo.CaliburnMicro.Demo/Dapplo.CaliburnMicro.Demo.csproj b/Dapplo.CaliburnMicro.Demo/Dapplo.CaliburnMicro.Demo.csproj index 81729d70..f0fa661b 100644 --- a/Dapplo.CaliburnMicro.Demo/Dapplo.CaliburnMicro.Demo.csproj +++ b/Dapplo.CaliburnMicro.Demo/Dapplo.CaliburnMicro.Demo.csproj @@ -86,15 +86,19 @@ ..\packages\Hardcodet.NotifyIcon.Wpf.1.0.8\lib\net451\Hardcodet.Wpf.TaskbarNotification.dll True - - ..\packages\MahApps.Metro.1.3.0-ALPHA179\lib\net45\MahApps.Metro.dll + + ..\packages\MahApps.Metro.1.3.0-ALPHA182\lib\net45\MahApps.Metro.dll + True + + + ..\packages\MahApps.Metro.IconPacks.Material.1.0.0\lib\net452\MahApps.Metro.IconPacks.Material.dll True - ..\packages\MahApps.Metro.1.3.0-ALPHA179\lib\net45\System.Windows.Interactivity.dll + ..\packages\MahApps.Metro.1.3.0-ALPHA182\lib\net45\System.Windows.Interactivity.dll True @@ -127,6 +131,7 @@ + @@ -178,6 +183,10 @@ Designer MSBuild:Compile + + MSBuild:Compile + Designer + Designer MSBuild:Compile diff --git a/Dapplo.CaliburnMicro.Demo/Languages/IWizardTranslations.cs b/Dapplo.CaliburnMicro.Demo/Languages/IWizardTranslations.cs index 85e52b16..0322333a 100644 --- a/Dapplo.CaliburnMicro.Demo/Languages/IWizardTranslations.cs +++ b/Dapplo.CaliburnMicro.Demo/Languages/IWizardTranslations.cs @@ -44,5 +44,6 @@ public interface IWizardTranslations : ILanguage, INotifyPropertyChanged string TitleStep2 { get; } string TitleStep3 { get; } string TitleStep4 { get; } + string TitleStep5 { get; } } } \ No newline at end of file diff --git a/Dapplo.CaliburnMicro.Demo/Languages/language-de-DE.xml b/Dapplo.CaliburnMicro.Demo/Languages/language-de-DE.xml index db963322..02b30402 100644 --- a/Dapplo.CaliburnMicro.Demo/Languages/language-de-DE.xml +++ b/Dapplo.CaliburnMicro.Demo/Languages/language-de-DE.xml @@ -45,5 +45,6 @@ Schritt 2 Schritt 3 Schritt 4 + Schritt 5 \ No newline at end of file diff --git a/Dapplo.CaliburnMicro.Demo/Languages/language-en-US.xml b/Dapplo.CaliburnMicro.Demo/Languages/language-en-US.xml index fff62770..85b80f48 100644 --- a/Dapplo.CaliburnMicro.Demo/Languages/language-en-US.xml +++ b/Dapplo.CaliburnMicro.Demo/Languages/language-en-US.xml @@ -45,5 +45,6 @@ Step 2 Step 3 Step 4 + Step 5 \ No newline at end of file diff --git a/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/ConfigMenuItem.cs b/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/ConfigMenuItem.cs index 5f9db46d..11f6be7b 100644 --- a/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/ConfigMenuItem.cs +++ b/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/ConfigMenuItem.cs @@ -33,7 +33,7 @@ using Dapplo.CaliburnMicro.Menu; using Dapplo.Log.Facade; using Dapplo.Utils; -using MahApps.Metro.Controls; +using MahApps.Metro.IconPacks; #endregion @@ -60,9 +60,9 @@ public void OnImportsSatisfied() { UiContext.RunOn(() => { - Icon = new PackIconModern + Icon = new PackIconMaterial { - Kind = PackIconModernKind.Settings + Kind = PackIconMaterialKind.Settings }; // automatically update the DisplayName this.BindDisplayName(ContextMenuTranslations, nameof(IContextMenuTranslations.Configure)); diff --git a/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/ExitMenuItem.cs b/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/ExitMenuItem.cs index f3eb837a..eeabab32 100644 --- a/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/ExitMenuItem.cs +++ b/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/ExitMenuItem.cs @@ -30,8 +30,8 @@ using Dapplo.CaliburnMicro.Extensions; using Dapplo.CaliburnMicro.Menu; using Dapplo.Utils; -using MahApps.Metro.Controls; using System.Windows; +using MahApps.Metro.IconPacks; #endregion diff --git a/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/SomeWindowMenuItem.cs b/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/SomeWindowMenuItem.cs index 8590bc57..028ca397 100644 --- a/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/SomeWindowMenuItem.cs +++ b/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/SomeWindowMenuItem.cs @@ -33,7 +33,7 @@ using Dapplo.CaliburnMicro.Menu; using Dapplo.Log.Facade; using Dapplo.Utils; -using MahApps.Metro.Controls; +using MahApps.Metro.IconPacks; #endregion @@ -60,9 +60,9 @@ public void OnImportsSatisfied() { UiContext.RunOn(() => { - Icon = new PackIconModern + Icon = new PackIconMaterial { - Kind = PackIconModernKind.List + Kind = PackIconMaterialKind.ViewList }; // automatically update the DisplayName this.BindDisplayName(ContextMenuTranslations, nameof(IContextMenuTranslations.SomeWindow)); diff --git a/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/WithChildrenMenuItem.cs b/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/WithChildrenMenuItem.cs index 4342fbe7..24713a95 100644 --- a/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/WithChildrenMenuItem.cs +++ b/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/WithChildrenMenuItem.cs @@ -33,7 +33,7 @@ using Dapplo.CaliburnMicro.Menu; using Dapplo.Log.Facade; using Dapplo.Utils; -using MahApps.Metro.Controls; +using MahApps.Metro.IconPacks; #endregion diff --git a/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/WizardMenuItem.cs b/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/WizardMenuItem.cs index d6c4ac0d..07588112 100644 --- a/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/WizardMenuItem.cs +++ b/Dapplo.CaliburnMicro.Demo/UseCases/ContextMenu/WizardMenuItem.cs @@ -33,6 +33,7 @@ using Dapplo.CaliburnMicro.Menu; using Dapplo.Utils; using MahApps.Metro.Controls; +using MahApps.Metro.IconPacks; #endregion @@ -59,9 +60,9 @@ public void OnImportsSatisfied() { // automatically update the DisplayName this.BindDisplayName(ContextMenuTranslations, nameof(IContextMenuTranslations.Wizard)); - Icon = new PackIconFontAwesome + Icon = new PackIconMaterial { - Kind = PackIconFontAwesomeKind.Magic + Kind = PackIconMaterialKind.Alarm }; }); } diff --git a/Dapplo.CaliburnMicro.Demo/UseCases/Menu/SaveAsMenuItem.cs b/Dapplo.CaliburnMicro.Demo/UseCases/Menu/SaveAsMenuItem.cs index d209ba4c..820c13d9 100644 --- a/Dapplo.CaliburnMicro.Demo/UseCases/Menu/SaveAsMenuItem.cs +++ b/Dapplo.CaliburnMicro.Demo/UseCases/Menu/SaveAsMenuItem.cs @@ -31,6 +31,7 @@ using Dapplo.CaliburnMicro.Menu; using Dapplo.Utils; using MahApps.Metro.Controls; +using MahApps.Metro.IconPacks; #endregion @@ -53,9 +54,9 @@ public void OnImportsSatisfied() { // automatically update the DisplayName this.BindDisplayName(MenuTranslations, nameof(IMenuTranslations.SaveAs)); - Icon = new PackIconEntypo + Icon = new PackIconMaterial { - Kind = PackIconEntypoKind.Save + Kind = PackIconMaterialKind.ContentSave }; }); } diff --git a/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/ViewModels/WizardExampleViewModel.cs b/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/ViewModels/WizardExampleViewModel.cs index c7cb216a..88b17a94 100644 --- a/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/ViewModels/WizardExampleViewModel.cs +++ b/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/ViewModels/WizardExampleViewModel.cs @@ -26,12 +26,14 @@ #region Usings using System.Collections.Generic; +using System.ComponentModel; using System.ComponentModel.Composition; using System.Linq; using Dapplo.CaliburnMicro.Demo.Languages; using Dapplo.CaliburnMicro.Extensions; using Dapplo.CaliburnMicro.Wizard; using Dapplo.CaliburnMicro.Wizard.ViewModels; +using Dapplo.CaliburnMicro.Collections; #endregion @@ -66,11 +68,11 @@ public bool IsStep2Enabled public void OnImportsSatisfied() { - WizardProgress = new WizardProgressViewModel(this); // automatically update the DisplayName this.BindDisplayName(WizardTranslations, nameof(IWizardTranslations.Title)); - // Set the WizardScreens by ordering them - WizardScreens = WizardItems.OrderBy(x => x.Order); + // Set the WizardScreens as TrulyObservableCollection (needed for the WizardProgressViewModel) and by ordering them + WizardScreens = new TrulyObservableCollection(WizardItems.OrderBy(x => x.Order)); + WizardProgress = new WizardProgressViewModel(this); } protected override void OnActivate() diff --git a/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/ViewModels/WizardStep3ViewModel.cs b/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/ViewModels/WizardStep3ViewModel.cs index 76cf6b74..a7da9a6a 100644 --- a/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/ViewModels/WizardStep3ViewModel.cs +++ b/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/ViewModels/WizardStep3ViewModel.cs @@ -52,6 +52,7 @@ public override void Initialize() { // automatically update the DisplayName _displayNameUpdater = this.BindDisplayName(WizardTranslations, nameof(IWizardTranslations.TitleStep3)); + IsVisible = false; } public override void Terminate() diff --git a/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/ViewModels/WizardStep5ViewModel.cs b/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/ViewModels/WizardStep5ViewModel.cs new file mode 100644 index 00000000..f37801eb --- /dev/null +++ b/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/ViewModels/WizardStep5ViewModel.cs @@ -0,0 +1,62 @@ +#region Dapplo 2016 - GNU Lesser General Public License + +// Dapplo - building blocks for .NET applications +// Copyright (C) 2016 Dapplo +// +// For more information see: http://dapplo.net/ +// Dapplo repositories are hosted on GitHub: https://github.com/dapplo +// +// This file is part of Dapplo.CaliburnMicro +// +// Dapplo.CaliburnMicro is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Dapplo.CaliburnMicro is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have a copy of the GNU Lesser General Public License +// along with Dapplo.CaliburnMicro. If not, see . + +#endregion + +#region Usings + +using System; +using System.ComponentModel.Composition; +using Dapplo.CaliburnMicro.Demo.Languages; +using Dapplo.CaliburnMicro.Extensions; +using Dapplo.CaliburnMicro.Wizard; + +#endregion + +namespace Dapplo.CaliburnMicro.Demo.UseCases.Wizard.ViewModels +{ + [Export(typeof(IWizardScreen))] + public sealed class WizardStep5ViewModel : WizardScreen + { + private IDisposable _displayNameUpdater; + + public WizardStep5ViewModel() + { + Order = 5; + } + + [Import] + private IWizardTranslations WizardTranslations { get; set; } + + public override void Initialize() + { + // automatically update the DisplayName + _displayNameUpdater = this.BindDisplayName(WizardTranslations, nameof(IWizardTranslations.TitleStep5)); + } + + public override void Terminate() + { + _displayNameUpdater?.Dispose(); + } + } +} \ No newline at end of file diff --git a/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/Views/WizardExampleView.xaml b/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/Views/WizardExampleView.xaml index bc19c4ff..0f76f532 100644 --- a/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/Views/WizardExampleView.xaml +++ b/Dapplo.CaliburnMicro.Demo/UseCases/Wizard/Views/WizardExampleView.xaml @@ -2,6 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" Icon="/Resources/icon.ico" Width="400" Height="400"> @@ -22,11 +23,11 @@