From 3a8c84bff5d907b2917160d30a2c2ef51c8a12f3 Mon Sep 17 00:00:00 2001 From: brianlagunas_cp Date: Wed, 3 Aug 2011 17:41:13 +0000 Subject: [PATCH] Wizard: implemented default style --- .../Wizard/Implementation/Wizard.cs | 12 +++- .../Wizard/Implementation/WizardPage.cs | 31 +++++++- .../Wizard/Themes/Generic.xaml | 72 +++++++++++++------ 3 files changed, 90 insertions(+), 25 deletions(-) diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/Wizard.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/Wizard.cs index 3ff16afe..4fb02d0a 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/Wizard.cs +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/Wizard.cs @@ -9,7 +9,7 @@ namespace Microsoft.Windows.Controls { #region Properties - public static readonly DependencyProperty BackButtonContentProperty = DependencyProperty.Register("BackButtonContent", typeof(object), typeof(Wizard), new UIPropertyMetadata("Back")); + public static readonly DependencyProperty BackButtonContentProperty = DependencyProperty.Register("BackButtonContent", typeof(object), typeof(Wizard), new UIPropertyMetadata("< Back")); public object BackButtonContent { get { return (object)GetValue(BackButtonContentProperty); } @@ -102,6 +102,14 @@ namespace Microsoft.Windows.Controls #endregion //CurrentPage + public static readonly DependencyProperty ExteriorPanelMinWidthProperty = DependencyProperty.Register("ExteriorPanelMinWidth", typeof(double), typeof(Wizard), new UIPropertyMetadata(165.0)); + public double ExteriorPanelMinWidth + { + get { return (double)GetValue(ExteriorPanelMinWidthProperty); } + set { SetValue(ExteriorPanelMinWidthProperty, value); } + } + + public static readonly DependencyProperty FinishButtonClosesWindowProperty = DependencyProperty.Register("FinishButtonClosesWindow", typeof(bool), typeof(Wizard), new UIPropertyMetadata(true)); public bool FinishButtonClosesWindow { @@ -137,7 +145,7 @@ namespace Microsoft.Windows.Controls set { SetValue(HelpButtonVisibilityProperty, value); } } - public static readonly DependencyProperty NextButtonContentProperty = DependencyProperty.Register("NextButtonContent", typeof(object), typeof(Wizard), new UIPropertyMetadata("Next")); + public static readonly DependencyProperty NextButtonContentProperty = DependencyProperty.Register("NextButtonContent", typeof(object), typeof(Wizard), new UIPropertyMetadata("Next >")); public object NextButtonContent { get { return (object)GetValue(NextButtonContentProperty); } diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/WizardPage.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/WizardPage.cs index b737ae97..9c1ecac7 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/WizardPage.cs +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/WizardPage.cs @@ -1,6 +1,7 @@ using System; using System.Windows; using System.Windows.Controls; +using System.Windows.Media; namespace Microsoft.Windows.Controls { @@ -64,6 +65,20 @@ namespace Microsoft.Windows.Controls set { base.SetValue(DescriptionProperty, value); } } + public static readonly DependencyProperty ExteriorPanelBackgroundProperty = DependencyProperty.Register("ExteriorPanelBackground", typeof(Brush), typeof(WizardPage), new UIPropertyMetadata(null)); + public Brush ExteriorPanelBackground + { + get { return (Brush)GetValue(ExteriorPanelBackgroundProperty); } + set { SetValue(ExteriorPanelBackgroundProperty, value); } + } + + public static readonly DependencyProperty ExteriorPanelContentProperty = DependencyProperty.Register("ExteriorPanelContent", typeof(object), typeof(WizardPage), new UIPropertyMetadata(null)); + public object ExteriorPanelContent + { + get { return (object)GetValue(ExteriorPanelContentProperty); } + set { SetValue(ExteriorPanelContentProperty, value); } + } + public static readonly DependencyProperty FinishButtonVisibilityProperty = DependencyProperty.Register("FinishButtonVisibility", typeof(WizardPageButtonVisibility), typeof(WizardPage), new UIPropertyMetadata(WizardPageButtonVisibility.Inherit)); public WizardPageButtonVisibility FinishButtonVisibility { @@ -71,6 +86,20 @@ namespace Microsoft.Windows.Controls set { SetValue(FinishButtonVisibilityProperty, value); } } + public static readonly DependencyProperty HeaderBackgroundProperty = DependencyProperty.Register("HeaderBackground", typeof(Brush), typeof(WizardPage), new UIPropertyMetadata(Brushes.White)); + public Brush HeaderBackground + { + get { return (Brush)GetValue(HeaderBackgroundProperty); } + set { SetValue(HeaderBackgroundProperty, value); } + } + + public static readonly DependencyProperty HeaderImageProperty = DependencyProperty.Register("HeaderImage", typeof(ImageSource), typeof(WizardPage), new UIPropertyMetadata(null)); + public ImageSource HeaderImage + { + get { return (ImageSource)GetValue(HeaderImageProperty); } + set { SetValue(HeaderImageProperty, value); } + } + public static readonly DependencyProperty HelpButtonVisibilityProperty = DependencyProperty.Register("HelpButtonVisibility", typeof(WizardPageButtonVisibility), typeof(WizardPage), new UIPropertyMetadata(WizardPageButtonVisibility.Inherit)); public WizardPageButtonVisibility HelpButtonVisibility { @@ -97,7 +126,7 @@ namespace Microsoft.Windows.Controls { get { return (WizardPageType)GetValue(PageTypeProperty); } set { SetValue(PageTypeProperty, value); } - } + } public static readonly DependencyProperty PreviousPageProperty = DependencyProperty.Register("PreviousPage", typeof(WizardPage), typeof(WizardPage), new UIPropertyMetadata(null)); public WizardPage PreviousPage diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Themes/Generic.xaml index b6ac39c4..b1f474f1 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Themes/Generic.xaml @@ -106,46 +106,74 @@ - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + - + + + + + + +