From 817c85bd615d083c3bd29c10e5d9564e2c85f805 Mon Sep 17 00:00:00 2001 From: brianlagunas_cp Date: Fri, 29 Jul 2011 03:26:37 +0000 Subject: [PATCH] initial checkin of Wizard control and sample module. Nothing usable yet, just mainly stubbing out the code. --- .../ExtendedWPFToolkit.sln | 19 ++- .../Properties/AssemblyInfo.cs | 55 ++++++++ .../Properties/Resources.Designer.cs | 71 ++++++++++ .../Properties/Resources.resx | 117 ++++++++++++++++ .../Properties/Settings.Designer.cs | 30 +++++ .../Properties/Settings.settings | 7 + .../Samples.Modules.Wizard.csproj | 125 ++++++++++++++++++ .../Samples.Modules.Wizard.csproj.vspscc | 10 ++ .../Views/HomeView.xaml | 11 ++ .../Views/HomeView.xaml.cs | 27 ++++ .../Views/NavigationView.xaml | 7 + .../Views/NavigationView.xaml.cs | 27 ++++ .../Samples.Modules.Wizard/WizardModule.cs | 25 ++++ .../Src/Samples/Samples/App.config | 1 + .../WPFToolkit.Extended/Themes/Generic.xaml | 4 +- .../WPFToolkit.Extended.csproj | 7 + .../Wizard/Implementation/Wizard.cs | 107 +++++++++++++++ .../Wizard/Implementation/WizardCommands.cs | 45 +++++++ .../Wizard/Implementation/WizardPage.cs | 57 ++++++++ .../Wizard/Themes/Generic.xaml | 66 +++++++++ 20 files changed, 815 insertions(+), 3 deletions(-) create mode 100644 ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/AssemblyInfo.cs create mode 100644 ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Resources.Designer.cs create mode 100644 ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Resources.resx create mode 100644 ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Settings.Designer.cs create mode 100644 ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Settings.settings create mode 100644 ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.csproj create mode 100644 ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.csproj.vspscc create mode 100644 ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/HomeView.xaml create mode 100644 ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/HomeView.xaml.cs create mode 100644 ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/NavigationView.xaml create mode 100644 ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/NavigationView.xaml.cs create mode 100644 ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/WizardModule.cs create mode 100644 ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/Wizard.cs create mode 100644 ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/WizardCommands.cs create mode 100644 ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/WizardPage.cs create mode 100644 ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Themes/Generic.xaml diff --git a/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln b/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln index 2966fe9c..90ba96c7 100644 --- a/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln +++ b/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln @@ -40,9 +40,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.Button", "S EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.PropertyGrid", "Src\Samples\Modules\Samples.Modules.PropertyGrid\Samples.Modules.PropertyGrid.csproj", "{511FB369-57D2-430B-9002-F367DF165E70}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.Wizard", "Src\Samples\Modules\Samples.Modules.Wizard\Samples.Modules.Wizard.csproj", "{DB0F7672-AFCC-4152-A231-7DCFDD5F219F}" +EndProject Global GlobalSection(TeamFoundationVersionControl) = preSolution - SccNumberOfProjects = 13 + SccNumberOfProjects = 14 SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} SccTeamFoundationServer = https://tfs.codeplex.com/tfs/tfs02 SccLocalPath0 = . @@ -93,6 +95,10 @@ Global SccProjectTopLevelParentUniqueName12 = ExtendedWPFToolkit.sln SccProjectName12 = Src/Samples/Modules/Samples.Modules.Caclulator SccLocalPath12 = Src\\Samples\\Modules\\Samples.Modules.Caclulator + SccProjectUniqueName13 = Src\\Samples\\Modules\\Samples.Modules.Wizard\\Samples.Modules.Wizard.csproj + SccProjectTopLevelParentUniqueName13 = ExtendedWPFToolkit.sln + SccProjectName13 = Src/Samples/Modules/Samples.Modules.Wizard + SccLocalPath13 = Src\\Samples\\Modules\\Samples.Modules.Wizard EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -223,6 +229,16 @@ Global {511FB369-57D2-430B-9002-F367DF165E70}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {511FB369-57D2-430B-9002-F367DF165E70}.Release|Mixed Platforms.Build.0 = Release|Any CPU {511FB369-57D2-430B-9002-F367DF165E70}.Release|x86.ActiveCfg = Release|Any CPU + {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Debug|x86.ActiveCfg = Debug|Any CPU + {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Release|Any CPU.Build.0 = Release|Any CPU + {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -240,5 +256,6 @@ Global {10EFEFC6-F2CC-4C6E-955C-668B17F7F342} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE} {22F36E4A-98E6-4A1C-96CA-52CA46F19274} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE} {511FB369-57D2-430B-9002-F367DF165E70} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE} + {DB0F7672-AFCC-4152-A231-7DCFDD5F219F} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE} EndGlobalSection EndGlobal diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/AssemblyInfo.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..99b84eaa --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/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("Samples.Modules.Wizard")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Samples.Modules.Wizard")] +[assembly: AssemblyCopyright("Copyright © 2011")] +[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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Resources.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Resources.Designer.cs new file mode 100644 index 00000000..8f2ac69f --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.235 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Samples.Modules.Wizard.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("Samples.Modules.Wizard.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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Resources.resx new file mode 100644 index 00000000..ffecec85 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Settings.Designer.cs new file mode 100644 index 00000000..0dce97b4 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.235 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Samples.Modules.Wizard.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Settings.settings b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Settings.settings new file mode 100644 index 00000000..8f2fd95d --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.csproj new file mode 100644 index 00000000..28a3d5c6 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.csproj @@ -0,0 +1,125 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {DB0F7672-AFCC-4152-A231-7DCFDD5F219F} + library + Properties + Samples.Modules.Wizard + Samples.Modules.Wizard + v4.0 + Client + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + SAK + SAK + SAK + SAK + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\Libs\Prism\Microsoft.Practices.Prism.dll + + + False + ..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll + + + + + + + + + + 4.0 + + + + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + HomeView.xaml + + + NavigationView.xaml + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + {72E591D6-8F83-4D8C-8F67-9C325E623234} + WPFToolkit.Extended + + + {A4A049A4-665A-4651-9046-7D06E9D0CCDC} + Samples.Infrastructure + + + + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + + + xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y + + + \ No newline at end of file diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.csproj.vspscc new file mode 100644 index 00000000..feffdeca --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.csproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" +} diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/HomeView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/HomeView.xaml new file mode 100644 index 00000000..1e6fd79f --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/HomeView.xaml @@ -0,0 +1,11 @@ + + + + + diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/HomeView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/HomeView.xaml.cs new file mode 100644 index 00000000..7ba5d5e6 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/HomeView.xaml.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +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 Samples.Modules.Wizard.Views +{ + /// + /// Interaction logic for HomeView.xaml + /// + public partial class HomeView : UserControl + { + public HomeView() + { + InitializeComponent(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/NavigationView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/NavigationView.xaml new file mode 100644 index 00000000..a9c81b0e --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/NavigationView.xaml @@ -0,0 +1,7 @@ + + + diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/NavigationView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/NavigationView.xaml.cs new file mode 100644 index 00000000..37a2b692 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Views/NavigationView.xaml.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +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 Samples.Modules.Wizard.Views +{ + /// + /// Interaction logic for NavigationView.xaml + /// + public partial class NavigationView : TreeViewItem + { + public NavigationView() + { + InitializeComponent(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/WizardModule.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/WizardModule.cs new file mode 100644 index 00000000..1c569d73 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/WizardModule.cs @@ -0,0 +1,25 @@ +using System; +using Samples.Infrastructure; +using Samples.Infrastructure.Extensions; +using Microsoft.Practices.Prism.Regions; +using Microsoft.Practices.Unity; +using Samples.Modules.Wizard.Views; + +namespace Samples.Modules.Wizard +{ + public class WizardModule : ModuleBase + { + public WizardModule(IUnityContainer container, IRegionManager regionManager) + : base(container, regionManager) { } + + protected override void InitializeModule() + { + RegionManager.RegisterViewWithRegion(RegionNames.NavigationRegion, typeof(NavigationView)); + } + + protected override void RegisterViewsAndTypes() + { + Container.RegisterNavigationType(typeof(HomeView)); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.config b/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.config index 8bd6352a..cc9cb69d 100644 --- a/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.config +++ b/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.config @@ -14,5 +14,6 @@ + \ No newline at end of file diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml index 5eb96a10..621168ba 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml @@ -20,6 +20,6 @@ - - + + diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj index 31576e21..adacb2eb 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj @@ -155,6 +155,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + @@ -267,6 +271,9 @@ + + + ResXFileCodeGenerator Resources.Designer.cs diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/Wizard.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/Wizard.cs new file mode 100644 index 00000000..092e705b --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/Wizard.cs @@ -0,0 +1,107 @@ +using System; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; + +namespace Microsoft.Windows.Controls +{ + public class Wizard : ItemsControl + { + #region Constructors + + static Wizard() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(Wizard), new FrameworkPropertyMetadata(typeof(Wizard))); + } + + public Wizard() + { + CommandBindings.Add(new CommandBinding(WizardCommands.Cancel, Cancel, CanCancel)); + CommandBindings.Add(new CommandBinding(WizardCommands.Finish, Finish, CanFinish)); + CommandBindings.Add(new CommandBinding(WizardCommands.Help, Help, CanHelp)); + CommandBindings.Add(new CommandBinding(WizardCommands.NextPage, SelectNextPage, CanSelectNextPage)); + CommandBindings.Add(new CommandBinding(WizardCommands.PreviousPage, SelectPreviousPage, CanSelectPreviousPage)); + CommandBindings.Add(new CommandBinding(WizardCommands.SelectPage, SelectPage, CanSelectPage)); + } + + #endregion //Constructors + + #region Base Class Overrides + + protected override DependencyObject GetContainerForItemOverride() + { + return new WizardPage(); + } + + protected override bool IsItemItsOwnContainerOverride(object item) + { + return (item is WizardPage); + } + + #endregion //Base Class Overrides + + #region Commands + + private void Cancel(object sender, ExecutedRoutedEventArgs e) + { + throw new NotImplementedException(); + } + + private void CanCancel(object sender, CanExecuteRoutedEventArgs e) + { + throw new NotImplementedException(); + } + + private void Finish(object sender, ExecutedRoutedEventArgs e) + { + throw new NotImplementedException(); + } + + private void CanFinish(object sender, CanExecuteRoutedEventArgs e) + { + throw new NotImplementedException(); + } + + private void Help(object sender, ExecutedRoutedEventArgs e) + { + throw new NotImplementedException(); + } + + private void CanHelp(object sender, CanExecuteRoutedEventArgs e) + { + throw new NotImplementedException(); + } + + private void SelectNextPage(object sender, ExecutedRoutedEventArgs e) + { + throw new NotImplementedException(); + } + + private void CanSelectNextPage(object sender, CanExecuteRoutedEventArgs e) + { + throw new NotImplementedException(); + } + + private void SelectPreviousPage(object sender, ExecutedRoutedEventArgs e) + { + throw new NotImplementedException(); + } + + private void CanSelectPreviousPage(object sender, CanExecuteRoutedEventArgs e) + { + throw new NotImplementedException(); + } + + private void SelectPage(object sender, ExecutedRoutedEventArgs e) + { + throw new NotImplementedException(); + } + + private void CanSelectPage(object sender, CanExecuteRoutedEventArgs e) + { + throw new NotImplementedException(); + } + + #endregion //Commands + } +} diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/WizardCommands.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/WizardCommands.cs new file mode 100644 index 00000000..e90a948c --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/WizardCommands.cs @@ -0,0 +1,45 @@ +using System; +using System.Windows.Input; + +namespace Microsoft.Windows.Controls +{ + public static class WizardCommands + { + + private static RoutedCommand _cancelCommand = new RoutedCommand(); + public static RoutedCommand Cancel + { + get { return _cancelCommand; } + } + + private static RoutedCommand _finishCommand = new RoutedCommand(); + public static RoutedCommand Finish + { + get { return _finishCommand; } + } + + private static RoutedCommand _helpCommand = new RoutedCommand(); + public static RoutedCommand Help + { + get { return _helpCommand; } + } + + private static RoutedCommand _nextPageCommand = new RoutedCommand(); + public static RoutedCommand NextPage + { + get { return _nextPageCommand; } + } + + private static RoutedCommand _previousPageCommand = new RoutedCommand(); + public static RoutedCommand PreviousPage + { + get { return _previousPageCommand; } + } + + private static RoutedCommand _selectPageCommand = new RoutedCommand(); + public static RoutedCommand SelectPage + { + get { return _selectPageCommand; } + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/WizardPage.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/WizardPage.cs new file mode 100644 index 00000000..fdfda10e --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/WizardPage.cs @@ -0,0 +1,57 @@ +using System; +using System.Windows; +using System.Windows.Controls; + +namespace Microsoft.Windows.Controls +{ + public class WizardPage : ContentControl + { + #region Properties + + public static readonly DependencyProperty CaptionProperty = DependencyProperty.Register("Caption", typeof(string), typeof(WizardPage)); + public string Caption + { + get { return (string)base.GetValue(CaptionProperty); } + set { base.SetValue(CaptionProperty, value); } + } + + public static readonly DependencyProperty DescriptionProperty = DependencyProperty.Register("Description", typeof(string), typeof(WizardPage)); + public string Description + { + get { return (string)base.GetValue(DescriptionProperty); } + set { base.SetValue(DescriptionProperty, value); } + } + + public static readonly DependencyProperty NextPageProperty = DependencyProperty.Register("NextPage", typeof(WizardPage), typeof(WizardPage), new UIPropertyMetadata(null)); + public WizardPage NextPage + { + get { return (WizardPage)GetValue(NextPageProperty); } + set { SetValue(NextPageProperty, value); } + } + + public static readonly DependencyProperty PreviousPageProperty = DependencyProperty.Register("PreviousPage", typeof(WizardPage), typeof(WizardPage), new UIPropertyMetadata(null)); + public WizardPage PreviousPage + { + get { return (WizardPage)GetValue(PreviousPageProperty); } + set { SetValue(PreviousPageProperty, value); } + } + + public static readonly DependencyProperty TitleProperty = DependencyProperty.Register("Title", typeof(string), typeof(WizardPage)); + public string Title + { + get { return (string)base.GetValue(TitleProperty); } + set { base.SetValue(TitleProperty, value); } + } + + #endregion //Properties + + #region Constructors + + static WizardPage() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(WizardPage), new FrameworkPropertyMetadata(typeof(WizardPage))); + } + + #endregion //Constructors + } +} diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Themes/Generic.xaml new file mode 100644 index 00000000..d98a5b15 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Themes/Generic.xaml @@ -0,0 +1,66 @@ + + + + + + + \ No newline at end of file