From a14483e2698d3de35ca0079bba000303e492b792 Mon Sep 17 00:00:00 2001 From: brianlagunas_cp Date: Thu, 30 Jun 2011 18:23:10 +0000 Subject: [PATCH] Branched from $/wpftoolkit/Main/Source --- .../ExtendedWPFToolkit.sln | 54 ++ .../ExtendedWPFToolkit.vssscc | 10 + .../MetadataStore.cs | 52 ++ .../Properties/AssemblyInfo.cs | 55 ++ .../Properties/Resources.Designer.cs | 71 ++ .../Properties/Resources.resx | 117 +++ .../Properties/Settings.Designer.cs | 30 + .../Properties/Settings.settings | 7 + .../WPFToolkit.Extended.Design.csproj | 99 +++ .../WPFToolkit.Extended.Design.csproj.vspscc | 10 + .../Src/WPFToolkit.Extended.Samples/App.xaml | 8 + .../WPFToolkit.Extended.Samples/App.xaml.cs | 16 + .../MainWindow.xaml | 42 + .../MainWindow.xaml.cs | 128 +++ .../Properties/AssemblyInfo.cs | 55 ++ .../Properties/Resources.Designer.cs | 71 ++ .../Properties/Resources.resx | 117 +++ .../Properties/Settings.Designer.cs | 30 + .../Properties/Settings.settings | 7 + .../WPFToolkit.Extended.Samples.csproj | 113 +++ .../WPFToolkit.Extended.Samples.csproj.vspscc | 10 + .../Implementation/BusyIndicator.cs | 266 +++++++ .../VisualStates.BusyIndicator.cs | 37 + .../BusyIndicator/Themes/Generic.xaml | 144 ++++ .../Implementation/ButtonSpinner.cs | 231 ++++++ .../Implementation/SpinDirection.cs | 21 + .../Implementation/SpinEventArgs.cs | 28 + .../ButtonSpinner/Implementation/Spinner.cs | 75 ++ .../Implementation/ValidSpinDirections.cs | 26 + .../ButtonSpinner/Themes/Generic.xaml | 92 +++ .../Calculator/Implementation/Calculator.cs | 466 +++++++++++ .../Implementation/CalculatorCommands.cs | 14 + .../Calculator/Themes/Generic.xaml | 496 ++++++++++++ .../Implementation/CalculatorUpDown.cs | 165 ++++ .../CalculatorUpDown/Themes/Generic.xaml | 120 +++ .../Implementation/CheckListBox.cs | 150 ++++ .../Implementation/CheckListBoxItem.cs | 81 ++ .../CheckListBoxSelectionChangedEventArgs.cs | 17 + .../CheckListBox/Themes/Generic.xaml | 58 ++ .../ChildWindow/Implementation/ChildWindow.cs | 743 ++++++++++++++++++ .../Implementation/WindowStartupLocation.cs | 10 + .../ChildWindow/Implementation/WindowState.cs | 10 + .../ChildWindow/Themes/Generic.xaml | 211 +++++ .../Chromes/Implementation/ButtonChrome.cs | 208 +++++ .../Chromes/Themes/Generic.xaml | 266 +++++++ .../ColorCanvas/Implementation/ColorCanvas.cs | 365 +++++++++ .../Implementation/ColorSpectrumSlider.cs | 86 ++ .../ColorCanvas/Themes/Generic.xaml | 346 ++++++++ .../ColorPicker/Implementation/ColorItem.cs | 17 + .../ColorPicker/Implementation/ColorPicker.cs | 317 ++++++++ .../ColorPicker/Themes/Generic.xaml | 278 +++++++ .../CalculatorMemoryToVisibilityConverter.cs | 19 + .../ColorToSolidColorBrushConverter.cs | 51 ++ .../Core/Converters/InverseBoolConverter.cs | 22 + .../SolidColorBrushToColorConverter.cs | 33 + .../TimeFormatToDateTimeFormatConverter.cs | 33 + .../Core/Primitives/HsvColor.cs | 18 + .../Core/Primitives/InputBase.cs | 93 +++ .../Core/Primitives/UpDownBase.cs | 316 ++++++++ .../Core/UIElementAdorner.cs | 215 +++++ .../Core/Utilities/CalculatorUtilities.cs | 245 ++++++ .../Core/Utilities/ColorUtilities.cs | 177 +++++ .../Core/Utilities/ContextMenuUtilities.cs | 35 + .../Implementation/DateTimePicker.cs | 145 ++++ .../DateTimePicker/Themes/Generic.xaml | 124 +++ .../Implementation/DateTimeFormat.cs | 19 + .../Implementation/DateTimeInfo.cs | 14 + .../Implementation/DateTimeParser.cs | 134 ++++ .../Implementation/DateTimePart.cs | 22 + .../Implementation/DateTimeUpDown.cs | 563 +++++++++++++ .../DateTimeUpDown/Themes/Generic.xaml | 52 ++ ...rderThicknessToStrokeThicknessConverter.cs | 24 + .../Converters/RadiusConverter.cs | 22 + .../Magnifier/Implementation/Magnifier.cs | 166 ++++ .../Implementation/MagnifierAdorner.cs | 96 +++ .../Implementation/MagnifierManager.cs | 98 +++ .../Magnifier/Themes/Generic.xaml | 39 + .../Implementation/MaskedTextBox.cs | 506 ++++++++++++ .../MessageBox/Icons/Error48.png | Bin 0 -> 4170 bytes .../MessageBox/Icons/Information48.png | Bin 0 -> 5101 bytes .../MessageBox/Icons/Question48.png | Bin 0 -> 5492 bytes .../MessageBox/Icons/Warning48.png | Bin 0 -> 3281 bytes .../MessageBox/Implementation/MessageBox.cs | 517 ++++++++++++ .../Implementation/VisualStates.MessageBox.cs | 17 + .../MessageBox/Themes/Generic.xaml | 299 +++++++ .../Implementation/DecimalUpDown.cs | 102 +++ .../Implementation/DoubleUpDown.cs | 102 +++ .../Implementation/IntegerUpDown.cs | 103 +++ .../Implementation/NumericUpDown.cs | 149 ++++ .../NumericUpDown/Themes/Generic.xaml | 77 ++ .../Properties/AssemblyInfo.cs | 68 ++ .../Properties/Resources.Designer.cs | 63 ++ .../Properties/Resources.resx | 117 +++ .../Properties/Settings.Designer.cs | 26 + .../Properties/Settings.settings | 7 + .../Images/AdvancedProperties11.png | Bin 0 -> 156 bytes .../PropertyGrid/Images/Categorize16.png | Bin 0 -> 333 bytes .../PropertyGrid/Images/Database11.png | Bin 0 -> 201 bytes .../PropertyGrid/Images/Inheritance11.png | Bin 0 -> 205 bytes .../PropertyGrid/Images/Local11.png | Bin 0 -> 142 bytes .../PropertyGrid/Images/Resource11.png | Bin 0 -> 340 bytes .../PropertyGrid/Images/SortAscending16.png | Bin 0 -> 442 bytes .../PropertyGrid/Images/Style11.png | Bin 0 -> 303 bytes .../Commands/PropertyItemCommands.cs | 17 + .../ValueSourceToImagePathConverter.cs | 48 ++ .../ValueSourceToToolTipConverter.cs | 42 + .../CustomTypeEditorCollection.cs | 37 + .../Implementation/Editors/CheckBoxEditor.cs | 18 + .../Implementation/Editors/ColorEditor.cs | 12 + .../Implementation/Editors/ComboBoxEditor.cs | 26 + .../Editors/CustomTypeEditor.cs | 19 + .../Editors/DateTimeUpDownEditor.cs | 12 + .../Editors/DecimalUpDownEditor.cs | 12 + .../Editors/DoubleUpDownEditor.cs | 12 + .../Editors/EnumComboBoxEditor.cs | 38 + .../Editors/FontComboBoxEditor.cs | 75 ++ .../Editors/ICustomTypeEditor.cs | 12 + .../Implementation/Editors/ITypeEditor.cs | 10 + .../Editors/IntegerUpDownEditor.cs | 12 + .../Implementation/Editors/TextBlockEditor.cs | 18 + .../Implementation/Editors/TextBoxEditor.cs | 13 + .../Implementation/Editors/TypeEditor.cs | 70 ++ .../Implementation/PropertyCategoryItem.cs | 72 ++ .../Implementation/PropertyCollection.cs | 24 + .../Implementation/PropertyGrid.cs | 425 ++++++++++ .../Implementation/PropertyItem.cs | 258 ++++++ .../PropertyGrid/Themes/Generic.xaml | 368 +++++++++ .../RichTextBox/Formatters/ITextFormatter.cs | 11 + .../Formatters/PlainTextFormatter.cs | 21 + .../RichTextBox/Formatters/RtfFormatter.cs | 49 ++ .../RichTextBox/Formatters/XamlFormatter.cs | 49 ++ .../RichTextBox/RichTextBox.cs | 145 ++++ .../IRichTextBoxFormatBar.cs | 12 + .../RichTextBoxFormatBar/Images/Bold16.png | Bin 0 -> 175 bytes .../RichTextBoxFormatBar/Images/Bullets16.png | Bin 0 -> 209 bytes .../Images/CenterAlign16.png | Bin 0 -> 172 bytes .../Images/FontColorPicker16.png | Bin 0 -> 374 bytes .../RichTextBoxFormatBar/Images/Italic16.png | Bin 0 -> 183 bytes .../Images/JustifyAlign16.png | Bin 0 -> 169 bytes .../Images/LeftAlign16.png | Bin 0 -> 186 bytes .../Images/Numbering16.png | Bin 0 -> 269 bytes .../Images/RightAlign16.png | Bin 0 -> 181 bytes .../Images/TextHighlightColorPicker16.png | Bin 0 -> 374 bytes .../Images/Underline16.png | Bin 0 -> 197 bytes .../RichTextBoxFormatBar.xaml | 427 ++++++++++ .../RichTextBoxFormatBar.xaml.cs | 232 ++++++ .../RichTextBoxFormatBarManager.cs | 196 +++++ .../SplitButton/Implementation/SplitButton.cs | 283 +++++++ .../SplitButton/Themes/Generic.xaml | 104 +++ .../Themes/Common/Generic_Common.xaml | 99 +++ .../WPFToolkit.Extended/Themes/Generic.xaml | 24 + .../TimePicker/Implementation/TimeFormat.cs | 10 + .../TimePicker/Implementation/TimeItem.cs | 34 + .../TimePicker/Implementation/TimePicker.cs | 409 ++++++++++ .../TimePicker/Themes/Generic.xaml | 130 +++ .../Src/WPFToolkit.Extended/VisualStates.cs | 9 + .../WPFToolkit.Extended.csproj | 328 ++++++++ .../WPFToolkit.Extended.csproj.vspscc | 10 + .../Implementation/WatermarkTextBox.cs | 79 ++ .../WatermarkTextBox/Themes/Generic.xaml | 97 +++ .../Src/WPFToolkit.Extended/sn.snk | Bin 0 -> 596 bytes .../ExtendedWPFToolkit.sln | 38 + .../ExtendedWPFToolkit.vssscc | 10 + .../Src/WPFToolkit.Extended.Examples/App.xaml | 8 + .../WPFToolkit.Extended.Examples/App.xaml.cs | 16 + .../Properties/AssemblyInfo.cs | 55 ++ .../Properties/Resources.Designer.cs | 63 ++ .../Properties/Resources.resx | 117 +++ .../Properties/Settings.Designer.cs | 26 + .../Properties/Settings.settings | 7 + .../WPFToolkit.Extended.Examples.csproj | 122 +++ ...WPFToolkit.Extended.Examples.csproj.vspscc | 10 + .../WPFToolkit.Extended.Examples/Window1.xaml | 9 + .../Window1.xaml.cs | 33 + .../BusyIndicator/Themes/Generic.xaml | 144 ++++ .../ButtonSpinner/Themes/Generic.xaml | 92 +++ .../Calculator/Themes/Generic.xaml | 496 ++++++++++++ .../CalculatorUpDown/Themes/Generic.xaml | 120 +++ .../ChildWindow/Themes/Generic.xaml | 211 +++++ .../Chromes/Themes/Generic.xaml | 266 +++++++ .../ColorCanvas/Themes/Generic.xaml | 346 ++++++++ .../ColorPicker/Themes/Generic.xaml | 278 +++++++ .../DateTimePicker/Themes/Generic.xaml | 125 +++ .../DateTimeUpDown/Themes/Generic.xaml | 52 ++ .../Magnifier/Themes/Generic.xaml | 39 + .../MessageBox/Icons/Error48.png | Bin 0 -> 4170 bytes .../MessageBox/Icons/Information48.png | Bin 0 -> 5101 bytes .../MessageBox/Icons/Question48.png | Bin 0 -> 5492 bytes .../MessageBox/Icons/Warning48.png | Bin 0 -> 3281 bytes .../MessageBox/Themes/Generic.xaml | 299 +++++++ .../NumericUpDown/Themes/Generic.xaml | 77 ++ .../Properties/AssemblyInfo.cs | 66 ++ .../Properties/Resources.Designer.cs | 63 ++ .../Properties/Resources.resx | 117 +++ .../Properties/Settings.Designer.cs | 26 + .../Properties/Settings.settings | 7 + .../Images/AdvancedProperties11.png | Bin 0 -> 156 bytes .../PropertyGrid/Images/Categorize16.png | Bin 0 -> 333 bytes .../PropertyGrid/Images/Database11.png | Bin 0 -> 201 bytes .../PropertyGrid/Images/Inheritance11.png | Bin 0 -> 205 bytes .../PropertyGrid/Images/Local11.png | Bin 0 -> 142 bytes .../PropertyGrid/Images/Resource11.png | Bin 0 -> 340 bytes .../PropertyGrid/Images/SortAscending16.png | Bin 0 -> 442 bytes .../PropertyGrid/Images/Style11.png | Bin 0 -> 303 bytes .../PropertyGrid/Themes/Generic.xaml | 368 +++++++++ .../RichTextBoxFormatBar/Images/Bold16.png | Bin 0 -> 175 bytes .../RichTextBoxFormatBar/Images/Bullets16.png | Bin 0 -> 209 bytes .../Images/CenterAlign16.png | Bin 0 -> 172 bytes .../Images/FontColorPicker16.png | Bin 0 -> 374 bytes .../RichTextBoxFormatBar/Images/Italic16.png | Bin 0 -> 183 bytes .../Images/JustifyAlign16.png | Bin 0 -> 169 bytes .../Images/LeftAlign16.png | Bin 0 -> 186 bytes .../Images/Numbering16.png | Bin 0 -> 269 bytes .../Images/RightAlign16.png | Bin 0 -> 181 bytes .../Images/TextHighlightColorPicker16.png | Bin 0 -> 374 bytes .../Images/Underline16.png | Bin 0 -> 197 bytes .../SplitButton/Themes/Generic.xaml | 104 +++ .../Themes/Common/Generic_Common.xaml | 99 +++ .../WPFToolkit.Extended/Themes/Generic.xaml | 25 + .../TimePicker/Themes/Generic.xaml | 130 +++ .../WPFToolkit.Extended.csproj | 503 ++++++++++++ .../WPFToolkit.Extended.csproj.vspscc | 10 + .../WatermarkTextBox/Themes/Generic.xaml | 96 +++ 223 files changed, 20455 insertions(+) create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/MetadataStore.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/AssemblyInfo.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.Designer.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.resx create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.Designer.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.settings create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj.vspscc create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/AssemblyInfo.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.Designer.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.resx create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.Designer.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.settings create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj.vspscc create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/BusyIndicator.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/VisualStates.BusyIndicator.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ButtonSpinner.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinDirection.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinEventArgs.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/Spinner.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ValidSpinDirections.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/CalculatorCommands.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CalculatorUpDown/Implementation/CalculatorUpDown.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CalculatorUpDown/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CheckListBox/Implementation/CheckListBox.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CheckListBox/Implementation/CheckListBoxItem.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CheckListBox/Implementation/CheckListBoxSelectionChangedEventArgs.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CheckListBox/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/Implementation/ChildWindow.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/Implementation/WindowStartupLocation.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/Implementation/WindowState.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Chromes/Implementation/ButtonChrome.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Chromes/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Implementation/ColorCanvas.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Implementation/ColorSpectrumSlider.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/Implementation/ColorItem.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/Implementation/ColorPicker.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/CalculatorMemoryToVisibilityConverter.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/ColorToSolidColorBrushConverter.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/InverseBoolConverter.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/SolidColorBrushToColorConverter.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/TimeFormatToDateTimeFormatConverter.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/HsvColor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/UpDownBase.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/UIElementAdorner.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Utilities/CalculatorUtilities.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Utilities/ColorUtilities.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Utilities/ContextMenuUtilities.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Implementation/DateTimePicker.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeFormat.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeInfo.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeParser.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimePart.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeUpDown.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/Converters/BorderThicknessToStrokeThicknessConverter.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/Converters/RadiusConverter.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/Magnifier.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/MagnifierAdorner.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/MagnifierManager.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Implementation/MaskedTextBox.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Implementation/MessageBox.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Implementation/VisualStates.MessageBox.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/DecimalUpDown.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/DoubleUpDown.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/IntegerUpDown.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/NumericUpDown.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.resx create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.settings create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/AdvancedProperties11.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Categorize16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Database11.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Inheritance11.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Local11.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Resource11.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/SortAscending16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Style11.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Commands/PropertyItemCommands.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Converters/ValueSourceToImagePathConverter.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Converters/ValueSourceToToolTipConverter.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/CustomTypeEditorCollection.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/CheckBoxEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ColorEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ComboBoxEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/CustomTypeEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DateTimeUpDownEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DecimalUpDownEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DoubleUpDownEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/EnumComboBoxEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/FontComboBoxEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ICustomTypeEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ITypeEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/IntegerUpDownEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/TextBlockEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/TextBoxEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/TypeEditor.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyCategoryItem.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyCollection.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyItem.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/ITextFormatter.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/PlainTextFormatter.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/RtfFormatter.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/XamlFormatter.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/RichTextBox.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/IRichTextBoxFormatBar.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bullets16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/FontColorPicker16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Numbering16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBarManager.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/SplitButton/Implementation/SplitButton.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/SplitButton/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Common/Generic_Common.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Implementation/TimeFormat.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Implementation/TimeItem.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Implementation/TimePicker.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/VisualStates.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Implementation/WatermarkTextBox.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/sn.snk create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.vssscc create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/AssemblyInfo.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.Designer.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.resx create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.Designer.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.settings create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj.vspscc create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/CalculatorUpDown/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ChildWindow/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Chromes/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorCanvas/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/DateTimePicker/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/DateTimeUpDown/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Magnifier/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/NumericUpDown/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.resx create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.settings create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/AdvancedProperties11.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Categorize16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Database11.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Inheritance11.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Local11.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Resource11.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/SortAscending16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Style11.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bullets16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/FontColorPicker16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Numbering16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/SplitButton/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Common/Generic_Common.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/TimePicker/Themes/Generic.xaml create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc create mode 100644 Development/Feature - Theming/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WatermarkTextBox/Themes/Generic.xaml diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln b/Development/Feature - Theming/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln new file mode 100644 index 00000000..c062fd05 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln @@ -0,0 +1,54 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFToolkit.Extended", "Src\WPFToolkit.Extended\WPFToolkit.Extended.csproj", "{72E591D6-8F83-4D8C-8F67-9C325E623234}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFToolkit.Extended.Samples", "Src\WPFToolkit.Extended.Samples\WPFToolkit.Extended.Samples.csproj", "{47B3F3DF-FAB7-4D0A-9267-109D30BF387F}" +EndProject +Global + GlobalSection(TeamFoundationVersionControl) = preSolution + SccNumberOfProjects = 3 + SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} + SccTeamFoundationServer = https://tfs.codeplex.com/tfs/tfs02 + SccLocalPath0 = . + SccProjectUniqueName1 = Src\\WPFToolkit.Extended\\WPFToolkit.Extended.csproj + SccProjectName1 = Src/WPFToolkit.Extended + SccLocalPath1 = Src\\WPFToolkit.Extended + SccProjectUniqueName2 = Src\\WPFToolkit.Extended.Samples\\WPFToolkit.Extended.Samples.csproj + SccProjectName2 = Src/WPFToolkit.Extended.Samples + SccLocalPath2 = Src\\WPFToolkit.Extended.Samples + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {72E591D6-8F83-4D8C-8F67-9C325E623234}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {72E591D6-8F83-4D8C-8F67-9C325E623234}.Debug|Any CPU.Build.0 = Debug|Any CPU + {72E591D6-8F83-4D8C-8F67-9C325E623234}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {72E591D6-8F83-4D8C-8F67-9C325E623234}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {72E591D6-8F83-4D8C-8F67-9C325E623234}.Debug|x86.ActiveCfg = Debug|Any CPU + {72E591D6-8F83-4D8C-8F67-9C325E623234}.Release|Any CPU.ActiveCfg = Release|Any CPU + {72E591D6-8F83-4D8C-8F67-9C325E623234}.Release|Any CPU.Build.0 = Release|Any CPU + {72E591D6-8F83-4D8C-8F67-9C325E623234}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {72E591D6-8F83-4D8C-8F67-9C325E623234}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {72E591D6-8F83-4D8C-8F67-9C325E623234}.Release|x86.ActiveCfg = Release|Any CPU + {47B3F3DF-FAB7-4D0A-9267-109D30BF387F}.Debug|Any CPU.ActiveCfg = Debug|x86 + {47B3F3DF-FAB7-4D0A-9267-109D30BF387F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {47B3F3DF-FAB7-4D0A-9267-109D30BF387F}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {47B3F3DF-FAB7-4D0A-9267-109D30BF387F}.Debug|x86.ActiveCfg = Debug|x86 + {47B3F3DF-FAB7-4D0A-9267-109D30BF387F}.Debug|x86.Build.0 = Debug|x86 + {47B3F3DF-FAB7-4D0A-9267-109D30BF387F}.Release|Any CPU.ActiveCfg = Release|x86 + {47B3F3DF-FAB7-4D0A-9267-109D30BF387F}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {47B3F3DF-FAB7-4D0A-9267-109D30BF387F}.Release|Mixed Platforms.Build.0 = Release|x86 + {47B3F3DF-FAB7-4D0A-9267-109D30BF387F}.Release|x86.ActiveCfg = Release|x86 + {47B3F3DF-FAB7-4D0A-9267-109D30BF387F}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc b/Development/Feature - Theming/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc new file mode 100644 index 00000000..794f014c --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc @@ -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" = "PROJECT" +} diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/MetadataStore.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/MetadataStore.cs new file mode 100644 index 00000000..d59e48ab --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/MetadataStore.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Windows.Design.Metadata; +using Microsoft.Windows.Controls; +using Microsoft.Windows.Design.Features; +using System.ComponentModel; + +[assembly: ProvideMetadata(typeof(WPFToolkit.Extended.Design.MetadataStore))] + +namespace WPFToolkit.Extended.Design +{ + internal class MetadataStore : IProvideAttributeTable + { + public AttributeTable AttributeTable + { + get + { + AttributeTableBuilder builder = new AttributeTableBuilder(); + + + //builder.AddCustomAttributes(typeof(NumericUpDown), new FeatureAttribute(typeof(NumericUpDownEditor))); + builder.AddCustomAttributes(typeof(NumericUpDown), "Increment", + new DescriptionAttribute("Specifies the amount in which to increment the value."), + new DisplayNameAttribute("Increment")); + + builder.AddCustomAttributes(typeof(NumericUpDown), "IsEditable", + new DescriptionAttribute("Determines if direct entry is allowed in the text box."), + new DisplayNameAttribute("IsEditable")); + + builder.AddCustomAttributes(typeof(NumericUpDown), "Maximum", + new DescriptionAttribute("Gets/Sets the maximum allowed value."), + new DisplayNameAttribute("Maximum")); + + builder.AddCustomAttributes(typeof(NumericUpDown), "Minimum", + new DescriptionAttribute("Gets/Sets the minimum allowed value."), + new DisplayNameAttribute("Minimum")); + + builder.AddCustomAttributes(typeof(NumericUpDown), "Text", + new DescriptionAttribute("Gets/Sets the formated string representation of the value."), + new DisplayNameAttribute("Text")); + + builder.AddCustomAttributes(typeof(NumericUpDown), "Value", + new DescriptionAttribute("Gets/Sets the numeric value."), + new DisplayNameAttribute("Value")); + + return builder.CreateTable(); + } + } + } +} diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/AssemblyInfo.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..5b13e861 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/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("WPFToolkit.Extended.Design")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WPFToolkit.Extended.Design")] +[assembly: AssemblyCopyright("Copyright © 2010")] +[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/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.Designer.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.Designer.cs new file mode 100644 index 00000000..7ef72466 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WPFToolkit.Extended.Design.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("WPFToolkit.Extended.Design.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/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.resx b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.resx new file mode 100644 index 00000000..ffecec85 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/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/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.Designer.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.Designer.cs new file mode 100644 index 00000000..72d80d66 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WPFToolkit.Extended.Design.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/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.settings b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.settings new file mode 100644 index 00000000..8f2fd95d --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj new file mode 100644 index 00000000..fd0fa3fa --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj @@ -0,0 +1,99 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {FA6645C6-7CA5-427C-91F2-916D9FECD76C} + library + Properties + WPFToolkit.Extended.Design + WPFToolkit.Extended.Design + v4.0 + Client + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + SAK + SAK + SAK + SAK + + + true + full + false + ..\WPFToolkit.Extended\bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\WPFToolkit.Extended\bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + 4.0 + + + + + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + {72E591D6-8F83-4D8C-8F67-9C325E623234} + WPFToolkit.Extended + + + + + + + + \ No newline at end of file diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj.vspscc b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj.vspscc new file mode 100644 index 00000000..feffdeca --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.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/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml new file mode 100644 index 00000000..00767c6d --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml.cs new file mode 100644 index 00000000..f0cfc9e7 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Windows; + +namespace WPFToolkit.Extended.Samples +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml new file mode 100644 index 00000000..e61a28f8 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs new file mode 100644 index 00000000..688a567d --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs @@ -0,0 +1,128 @@ +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; +using System.ComponentModel; +using System.Collections.ObjectModel; +using Microsoft.Windows.Controls; +using System.Text.RegularExpressions; +using System.Diagnostics; + +namespace WPFToolkit.Extended.Samples +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + DataContext = new Data(); + Loaded += new RoutedEventHandler(MainWindow_Loaded); + } + + void MainWindow_Loaded(object sender, RoutedEventArgs e) + { + + } + + private void Calculator_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) + { + Debug.WriteLine(e.NewValue.HasValue ? e.NewValue.Value.ToString() : "NULL"); + } + + private void ColorCanvas_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) + { + Debug.WriteLine(e.NewValue); + } + } + + public class Data : System.ComponentModel.INotifyPropertyChanged + { + + protected string _Text = "C2"; + public string Text + { + get { return _Text; } + set + { + _Text = value; + NotifyPropertyChanged("Text"); + } + } + + private int? _integer = 5; + public int? Integer + { + get { return _integer; } + set + { + _integer = value; + NotifyPropertyChanged("Integer"); + } + } + + private double? _double = 5; + public double? Double + { + get { return _double; } + set + { + _double = value; + NotifyPropertyChanged("Double"); + } + } + + private decimal? _decimal = 5; + public decimal? Decimal + { + get { return _decimal; } + set + { + _decimal = value; + NotifyPropertyChanged("Decimal"); + } + } + + + private DateTime? _dueDate; + public DateTime? DueDate + { + get { return _dueDate; } + set + { + _dueDate = value; + NotifyPropertyChanged("DueDate"); + } + } + + + + public Data() + { + //Text = "testm"; + } + + #region PropertyChanged + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + private void NotifyPropertyChanged(string info) + { + if (PropertyChanged != null) + { + PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(info)); + } + } + #endregion + } +} diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/AssemblyInfo.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..35e4c7aa --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/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("WPFToolkit.Extended.Samples")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WPFToolkit.Extended.Samples")] +[assembly: AssemblyCopyright("Copyright © 2010")] +[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/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.Designer.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.Designer.cs new file mode 100644 index 00000000..3c757353 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WPFToolkit.Extended.Samples.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("WPFToolkit.Extended.Samples.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/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.resx b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.resx new file mode 100644 index 00000000..ffecec85 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/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/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.Designer.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.Designer.cs new file mode 100644 index 00000000..a353c3db --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WPFToolkit.Extended.Samples.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/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.settings b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.settings new file mode 100644 index 00000000..8f2fd95d --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj new file mode 100644 index 00000000..e49eab24 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj @@ -0,0 +1,113 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {47B3F3DF-FAB7-4D0A-9267-109D30BF387F} + WinExe + Properties + WPFToolkit.Extended.Samples + WPFToolkit.Extended.Samples + v4.0 + Client + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + SAK + SAK + SAK + SAK + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + 4.0 + + + + + + + + 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 + + + + + + {72E591D6-8F83-4D8C-8F67-9C325E623234} + WPFToolkit.Extended + + + + + \ No newline at end of file diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj.vspscc b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj.vspscc new file mode 100644 index 00000000..feffdeca --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.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/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/BusyIndicator.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/BusyIndicator.cs new file mode 100644 index 00000000..6a73cd8f --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/BusyIndicator.cs @@ -0,0 +1,266 @@ +using System; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Shapes; +using System.Windows.Threading; + +namespace Microsoft.Windows.Controls +{ + /// + /// A control to provide a visual indicator when an application is busy. + /// + [TemplateVisualState(Name = VisualStates.StateIdle, GroupName = VisualStates.GroupBusyStatus)] + [TemplateVisualState(Name = VisualStates.StateBusy, GroupName = VisualStates.GroupBusyStatus)] + [TemplateVisualState(Name = VisualStates.StateVisible, GroupName = VisualStates.GroupVisibility)] + [TemplateVisualState(Name = VisualStates.StateHidden, GroupName = VisualStates.GroupVisibility)] + [StyleTypedProperty(Property = "OverlayStyle", StyleTargetType = typeof(Rectangle))] + [StyleTypedProperty(Property = "ProgressBarStyle", StyleTargetType = typeof(ProgressBar))] + public class BusyIndicator : ContentControl + { + #region Private Members + + /// + /// Timer used to delay the initial display and avoid flickering. + /// + private DispatcherTimer _displayAfterTimer = new DispatcherTimer(); + + #endregion //Private Members + + #region Constructors + + static BusyIndicator() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(BusyIndicator), new FrameworkPropertyMetadata(typeof(BusyIndicator))); + } + + public BusyIndicator() + { + _displayAfterTimer.Tick += DisplayAfterTimerElapsed; + } + + #endregion //Constructors + + #region Base Class Overrides + + /// + /// Overrides the OnApplyTemplate method. + /// + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + ChangeVisualState(false); + } + + #endregion //Base Class Overrides + + #region Properties + + /// + /// Gets or sets a value indicating whether the BusyContent is visible. + /// + protected bool IsContentVisible { get; set; } + + #endregion //Properties + + #region Dependency Properties + + #region IsBusy + + /// + /// Identifies the IsBusy dependency property. + /// + public static readonly DependencyProperty IsBusyProperty = DependencyProperty.Register( + "IsBusy", + typeof(bool), + typeof(BusyIndicator), + new PropertyMetadata(false, new PropertyChangedCallback(OnIsBusyChanged))); + + /// + /// Gets or sets a value indicating whether the busy indicator should show. + /// + public bool IsBusy + { + get { return (bool)GetValue(IsBusyProperty); } + set { SetValue(IsBusyProperty, value); } + } + + /// + /// IsBusyProperty property changed handler. + /// + /// BusyIndicator that changed its IsBusy. + /// Event arguments. + private static void OnIsBusyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ((BusyIndicator)d).OnIsBusyChanged(e); + } + + /// + /// IsBusyProperty property changed handler. + /// + /// Event arguments. + protected virtual void OnIsBusyChanged(DependencyPropertyChangedEventArgs e) + { + if (IsBusy) + { + if (DisplayAfter.Equals(TimeSpan.Zero)) + { + // Go visible now + IsContentVisible = true; + } + else + { + // Set a timer to go visible + _displayAfterTimer.Interval = DisplayAfter; + _displayAfterTimer.Start(); + } + } + else + { + // No longer visible + _displayAfterTimer.Stop(); + IsContentVisible = false; + } + + ChangeVisualState(true); + } + + #endregion //IsBusy + + #region Busy Content + + /// + /// Identifies the BusyContent dependency property. + /// + public static readonly DependencyProperty BusyContentProperty = DependencyProperty.Register( + "BusyContent", + typeof(object), + typeof(BusyIndicator), + new PropertyMetadata(null)); + + /// + /// Gets or sets a value indicating the busy content to display to the user. + /// + public object BusyContent + { + get { return (object)GetValue(BusyContentProperty); } + set { SetValue(BusyContentProperty, value); } + } + + #endregion //Busy Content + + #region Busy Content Template + + /// + /// Identifies the BusyTemplate dependency property. + /// + public static readonly DependencyProperty BusyContentTemplateProperty = DependencyProperty.Register( + "BusyContentTemplate", + typeof(DataTemplate), + typeof(BusyIndicator), + new PropertyMetadata(null)); + + /// + /// Gets or sets a value indicating the template to use for displaying the busy content to the user. + /// + public DataTemplate BusyContentTemplate + { + get { return (DataTemplate)GetValue(BusyContentTemplateProperty); } + set { SetValue(BusyContentTemplateProperty, value); } + } + + #endregion //Busy Content Template + + #region Display After + + /// + /// Identifies the DisplayAfter dependency property. + /// + public static readonly DependencyProperty DisplayAfterProperty = DependencyProperty.Register( + "DisplayAfter", + typeof(TimeSpan), + typeof(BusyIndicator), + new PropertyMetadata(TimeSpan.FromSeconds(0.1))); + + /// + /// Gets or sets a value indicating how long to delay before displaying the busy content. + /// + public TimeSpan DisplayAfter + { + get { return (TimeSpan)GetValue(DisplayAfterProperty); } + set { SetValue(DisplayAfterProperty, value); } + } + + #endregion //Display After + + #region Overlay Style + + /// + /// Identifies the OverlayStyle dependency property. + /// + public static readonly DependencyProperty OverlayStyleProperty = DependencyProperty.Register( + "OverlayStyle", + typeof(Style), + typeof(BusyIndicator), + new PropertyMetadata(null)); + + /// + /// Gets or sets a value indicating the style to use for the overlay. + /// + public Style OverlayStyle + { + get { return (Style)GetValue(OverlayStyleProperty); } + set { SetValue(OverlayStyleProperty, value); } + } + #endregion //Overlay Style + + #region ProgressBar Style + + /// + /// Identifies the ProgressBarStyle dependency property. + /// + public static readonly DependencyProperty ProgressBarStyleProperty = DependencyProperty.Register( + "ProgressBarStyle", + typeof(Style), + typeof(BusyIndicator), + new PropertyMetadata(null)); + + /// + /// Gets or sets a value indicating the style to use for the progress bar. + /// + public Style ProgressBarStyle + { + get { return (Style)GetValue(ProgressBarStyleProperty); } + set { SetValue(ProgressBarStyleProperty, value); } + } + + #endregion //ProgressBar Style + + #endregion //Dependency Properties + + #region Methods + + /// + /// Handler for the DisplayAfterTimer. + /// + /// Event sender. + /// Event arguments. + private void DisplayAfterTimerElapsed(object sender, EventArgs e) + { + _displayAfterTimer.Stop(); + IsContentVisible = true; + ChangeVisualState(true); + } + + /// + /// Changes the control's visual state(s). + /// + /// True if state transitions should be used. + protected virtual void ChangeVisualState(bool useTransitions) + { + VisualStateManager.GoToState(this, IsBusy ? VisualStates.StateBusy : VisualStates.StateIdle, useTransitions); + VisualStateManager.GoToState(this, IsContentVisible ? VisualStates.StateVisible : VisualStates.StateHidden, useTransitions); + } + + #endregion //Methods + } +} diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/VisualStates.BusyIndicator.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/VisualStates.BusyIndicator.cs new file mode 100644 index 00000000..5d78d952 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/VisualStates.BusyIndicator.cs @@ -0,0 +1,37 @@ +using System; + +namespace Microsoft.Windows.Controls +{ + internal static partial class VisualStates + { + /// + /// Busyness group name. + /// + public const string GroupBusyStatus = "BusyStatusStates"; + + /// + /// Busy state for BusyIndicator. + /// + public const string StateBusy = "Busy"; + + /// + /// Idle state for BusyIndicator. + /// + public const string StateIdle = "Idle"; + + /// + /// BusyDisplay group. + /// + public const string GroupVisibility = "VisibilityStates"; + + /// + /// Visible state name for BusyIndicator. + /// + public const string StateVisible = "Visible"; + + /// + /// Hidden state name for BusyIndicator. + /// + public const string StateHidden = "Hidden"; + } +} diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml new file mode 100644 index 00000000..734bff5a --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Collapsed + + + + + + + Collapsed + + + + + + + + + + + Visible + + + + + + + Visible + + + + + + + + + + + + + True + + + + + + + + + + + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ButtonSpinner.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ButtonSpinner.cs new file mode 100644 index 00000000..fde872d8 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ButtonSpinner.cs @@ -0,0 +1,231 @@ +using System; +using System.Windows; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Controls.Primitives; + +namespace Microsoft.Windows.Controls +{ + /// + /// Represents a spinner control that includes two Buttons. + /// + [ContentProperty("Content")] + public class ButtonSpinner : Spinner + { + #region Properties + + #region AllowSpin + + public static readonly DependencyProperty AllowSpinProperty = DependencyProperty.Register("AllowSpin", typeof(bool), typeof(ButtonSpinner), new UIPropertyMetadata(true)); + public bool AllowSpin + { + get { return (bool)GetValue(AllowSpinProperty); } + set { SetValue(AllowSpinProperty, value); } + } + + #endregion //AllowSpin + + #region Content + + /// + /// Identifies the Content dependency property. + /// + public static readonly DependencyProperty ContentProperty = DependencyProperty.Register("Content", typeof(object), typeof(ButtonSpinner), new PropertyMetadata(null, OnContentPropertyChanged)); + public object Content + { + get { return GetValue(ContentProperty) as object; } + set { SetValue(ContentProperty, value); } + } + + /// + /// ContentProperty property changed handler. + /// + /// ButtonSpinner that changed its Content. + /// Event arguments. + private static void OnContentPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ButtonSpinner source = d as ButtonSpinner; + source.OnContentChanged(e.OldValue, e.NewValue); + } + + #endregion //Content + + #region DecreaseButton + + private ButtonBase _decreaseButton; + /// + /// Gets or sets the DecreaseButton template part. + /// + private ButtonBase DecreaseButton + { + get { return _decreaseButton; } + set + { + if (_decreaseButton != null) + { + _decreaseButton.Click -= OnButtonClick; + } + + _decreaseButton = value; + + if (_decreaseButton != null) + { + _decreaseButton.Click += OnButtonClick; + } + } + } + + #endregion //DecreaseButton + + #region IncreaseButton + + private ButtonBase _increaseButton; + /// + /// Gets or sets the IncreaseButton template part. + /// + private ButtonBase IncreaseButton + { + get { return _increaseButton; } + set + { + if (_increaseButton != null) + { + _increaseButton.Click -= OnButtonClick; + } + + _increaseButton = value; + + if (_increaseButton != null) + { + _increaseButton.Click += OnButtonClick; + } + } + } + + #endregion //IncreaseButton + + #region ShowButtonSpinner + + public static readonly DependencyProperty ShowButtonSpinnerProperty = DependencyProperty.Register("ShowButtonSpinner", typeof(bool), typeof(ButtonSpinner), new UIPropertyMetadata(true)); + public bool ShowButtonSpinner + { + get { return (bool)GetValue(ShowButtonSpinnerProperty); } + set { SetValue(ShowButtonSpinnerProperty, value); } + } + + #endregion //ShowButtonSpinner + + #endregion //Properties + + #region Constructors + + static ButtonSpinner() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(ButtonSpinner), new FrameworkPropertyMetadata(typeof(ButtonSpinner))); + } + + #endregion //Constructors + + #region Base Class Overrides + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + IncreaseButton = GetTemplateChild("IncreaseButton") as ButtonBase; + DecreaseButton = GetTemplateChild("DecreaseButton") as ButtonBase; + + SetButtonUsage(); + } + + /// + /// Cancel LeftMouseButtonUp events originating from a button that has + /// been changed to disabled. + /// + /// The data for the event. + protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e) + { + base.OnMouseLeftButtonUp(e); + + Point mousePosition; + if (IncreaseButton != null && IncreaseButton.IsEnabled == false) + { + mousePosition = e.GetPosition(IncreaseButton); + if (mousePosition.X > 0 && mousePosition.X < IncreaseButton.ActualWidth && + mousePosition.Y > 0 && mousePosition.Y < IncreaseButton.ActualHeight) + { + e.Handled = true; + } + } + + if (DecreaseButton != null && DecreaseButton.IsEnabled == false) + { + mousePosition = e.GetPosition(DecreaseButton); + if (mousePosition.X > 0 && mousePosition.X < DecreaseButton.ActualWidth && + mousePosition.Y > 0 && mousePosition.Y < DecreaseButton.ActualHeight) + { + e.Handled = true; + } + } + } + + /// + /// Called when valid spin direction changed. + /// + /// The old value. + /// The new value. + protected override void OnValidSpinDirectionChanged(ValidSpinDirections oldValue, ValidSpinDirections newValue) + { + SetButtonUsage(); + } + + #endregion //Base Class Overrides + + #region Event Handlers + + /// + /// Handle click event of IncreaseButton and DecreaseButton template parts, + /// translating Click to appropriate Spin event. + /// + /// Event sender, should be either IncreaseButton or DecreaseButton template part. + /// Event args. + private void OnButtonClick(object sender, RoutedEventArgs e) + { + if (AllowSpin) + { + SpinDirection direction = sender == IncreaseButton ? SpinDirection.Increase : SpinDirection.Decrease; + OnSpin(new SpinEventArgs(direction)); + } + } + + #endregion //Event Handlers + + #region Methods + + /// + /// Occurs when the Content property value changed. + /// + /// The old value of the Content property. + /// The new value of the Content property. + protected virtual void OnContentChanged(object oldValue, object newValue) { } + + /// + /// Disables or enables the buttons based on the valid spin direction. + /// + private void SetButtonUsage() + { + // buttonspinner adds buttons that spin, so disable accordingly. + if (IncreaseButton != null) + { + IncreaseButton.IsEnabled = ((ValidSpinDirection & ValidSpinDirections.Increase) == ValidSpinDirections.Increase); + } + + if (DecreaseButton != null) + { + DecreaseButton.IsEnabled = ((ValidSpinDirection & ValidSpinDirections.Decrease) == ValidSpinDirections.Decrease); + } + } + + #endregion //Methods + } +} diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinDirection.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinDirection.cs new file mode 100644 index 00000000..aaa121fb --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinDirection.cs @@ -0,0 +1,21 @@ +using System; + +namespace Microsoft.Windows.Controls +{ + /// + /// Represents spin directions that could be initiated by the end-user. + /// + /// Preview + public enum SpinDirection + { + /// + /// Represents a spin initiated by the end-user in order to Increase a value. + /// + Increase = 0, + + /// + /// Represents a spin initiated by the end-user in order to Decrease a value. + /// + Decrease = 1 + } +} diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinEventArgs.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinEventArgs.cs new file mode 100644 index 00000000..f8a89385 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinEventArgs.cs @@ -0,0 +1,28 @@ +using System; +using System.Windows; + +namespace Microsoft.Windows.Controls +{ + /// + /// Provides data for the Spinner.Spin event. + /// + /// Preview + public class SpinEventArgs : RoutedEventArgs + { + /// + /// Gets the SpinDirection for the spin that has been initiated by the + /// end-user. + /// + public SpinDirection Direction { get; private set; } + + /// + /// Initializes a new instance of the SpinEventArgs class. + /// + /// Spin direction. + public SpinEventArgs(SpinDirection direction) + : base() + { + Direction = direction; + } + } +} diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/Spinner.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/Spinner.cs new file mode 100644 index 00000000..63b2a22a --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/Spinner.cs @@ -0,0 +1,75 @@ +using System; +using System.Windows.Controls; +using System.Windows; + +namespace Microsoft.Windows.Controls +{ + /// + /// Base class for controls that represents controls that can spin. + /// + public abstract class Spinner : Control + { + #region Properties + + /// + /// Identifies the ValidSpinDirection dependency property. + /// + public static readonly DependencyProperty ValidSpinDirectionProperty = DependencyProperty.Register("ValidSpinDirection", typeof(ValidSpinDirections), typeof(Spinner), new PropertyMetadata(ValidSpinDirections.Increase | ValidSpinDirections.Decrease, OnValidSpinDirectionPropertyChanged)); + public ValidSpinDirections ValidSpinDirection + { + get { return (ValidSpinDirections)GetValue(ValidSpinDirectionProperty); } + set { SetValue(ValidSpinDirectionProperty, value); } + } + + /// + /// ValidSpinDirectionProperty property changed handler. + /// + /// ButtonSpinner that changed its ValidSpinDirection. + /// Event arguments. + private static void OnValidSpinDirectionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + Spinner source = (Spinner)d; + ValidSpinDirections oldvalue = (ValidSpinDirections)e.OldValue; + ValidSpinDirections newvalue = (ValidSpinDirections)e.NewValue; + source.OnValidSpinDirectionChanged(oldvalue, newvalue); + } + + #endregion //Properties + + /// + /// Occurs when spinning is initiated by the end-user. + /// + public event EventHandler Spin; + + /// + /// Initializes a new instance of the Spinner class. + /// + protected Spinner() { } + + /// + /// Raises the OnSpin event when spinning is initiated by the end-user. + /// + /// Spin event args. + protected virtual void OnSpin(SpinEventArgs e) + { + ValidSpinDirections valid = e.Direction == SpinDirection.Increase ? ValidSpinDirections.Increase : ValidSpinDirections.Decrease; + + //Only raise the event if spin is allowed. + if ((ValidSpinDirection & valid) == valid) + { + EventHandler handler = Spin; + if (handler != null) + { + handler(this, e); + } + } + } + + /// + /// Called when valid spin direction changed. + /// + /// The old value. + /// The new value. + protected virtual void OnValidSpinDirectionChanged(ValidSpinDirections oldValue, ValidSpinDirections newValue) { } + } +} diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ValidSpinDirections.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ValidSpinDirections.cs new file mode 100644 index 00000000..d744620d --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ValidSpinDirections.cs @@ -0,0 +1,26 @@ +using System; + +namespace Microsoft.Windows.Controls +{ + /// + /// Represents spin directions that are valid. + /// + [Flags] + public enum ValidSpinDirections + { + /// + /// Can not increase nor decrease. + /// + None = 0, + + /// + /// Can increase. + /// + Increase = 1, + + /// + /// Can decrease. + /// + Decrease = 2 + } +} diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml new file mode 100644 index 00000000..73c19ad1 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs new file mode 100644 index 00000000..b5ad89e6 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs @@ -0,0 +1,466 @@ +using System; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Threading; +using Microsoft.Windows.Controls.Core.Utilities; + +namespace Microsoft.Windows.Controls +{ + public class Calculator : Control + { + #region Members + + private ContentControl _buttonPanel; + private readonly DispatcherTimer _timer; + private Button _calculatorButton; + + private bool _showNewNumber = true; + private decimal _previousValue; + private Operation _lastOperation = Operation.None; + private CalculatorButtonType _lastButtonPressed; + + #endregion //Members + + #region Enumerations + + public enum CalculatorButtonType + { + Add, + Back, + Cancel, + Clear, + Decimal, + Divide, + Eight, + Equal, + Five, + Four, + Fraction, + MAdd, + MC, + MR, + MS, + MSub, + Multiply, + Negate, + Nine, + None, + One, + Percent, + Seven, + Six, + Sqrt, + Subtract, + Three, + Two, + Zero + } + + public enum Operation + { + Add, + Subtract, + Divide, + Multiply, + Percent, + Sqrt, + Fraction, + None, + Clear, + Negate + } + + #endregion //Enumerations + + #region Properties + + public ICommand CalculaterButtonClickCommand { get; private set; } + + #region CalculatorButtonType + + public static readonly DependencyProperty CalculatorButtonTypeProperty = DependencyProperty.RegisterAttached("CalculatorButtonType", typeof(CalculatorButtonType), typeof(Calculator), new UIPropertyMetadata(CalculatorButtonType.None, OnCalculatorButtonTypeChanged)); + public static CalculatorButtonType GetCalculatorButtonType(DependencyObject target) + { + return (CalculatorButtonType)target.GetValue(CalculatorButtonTypeProperty); + } + public static void SetCalculatorButtonType(DependencyObject target, CalculatorButtonType value) + { + target.SetValue(CalculatorButtonTypeProperty, value); + } + private static void OnCalculatorButtonTypeChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) + { + OnCalculatorButtonTypeChanged(o, (CalculatorButtonType)e.OldValue, (CalculatorButtonType)e.NewValue); + } + private static void OnCalculatorButtonTypeChanged(DependencyObject o, CalculatorButtonType oldValue, CalculatorButtonType newValue) + { + Button button = o as Button; + button.CommandParameter = newValue; + button.Content = CalculatorUtilities.GetCalculatorButtonContent(newValue); + } + + #endregion //CalculatorButtonType + + #region DisplayText + + public static readonly DependencyProperty DisplayTextProperty = DependencyProperty.Register("DisplayText", typeof(string), typeof(Calculator), new UIPropertyMetadata("0", OnDisplayTextChanged)); + public string DisplayText + { + get { return (string)GetValue(DisplayTextProperty); } + set { SetValue(DisplayTextProperty, value); } + } + + private static void OnDisplayTextChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) + { + Calculator calculator = o as Calculator; + if (calculator != null) + calculator.OnDisplayTextChanged((string)e.OldValue, (string)e.NewValue); + } + + protected virtual void OnDisplayTextChanged(string oldValue, string newValue) + { + // TODO: Add your property changed side-effects. Descendants can override as well. + } + + #endregion //DisplayText + + #region Memory + + public static readonly DependencyProperty MemoryProperty = DependencyProperty.Register("Memory", typeof(decimal), typeof(Calculator), new UIPropertyMetadata(default(decimal))); + public decimal Memory + { + get { return (decimal)GetValue(MemoryProperty); } + set { SetValue(MemoryProperty, value); } + } + + #endregion //Memory + + #region Precision + + public static readonly DependencyProperty PrecisionProperty = DependencyProperty.Register("Precision", typeof(int), typeof(Calculator), new UIPropertyMetadata(6)); + public int Precision + { + get { return (int)GetValue(PrecisionProperty); } + set { SetValue(PrecisionProperty, value); } + } + + #endregion //Precision + + #region Value + + public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(decimal?), typeof(Calculator), new FrameworkPropertyMetadata(default(decimal), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValueChanged)); + public decimal? Value + { + get { return (decimal?)GetValue(ValueProperty); } + set { SetValue(ValueProperty, value); } + } + + private static void OnValueChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) + { + Calculator calculator = o as Calculator; + if (calculator != null) + calculator.OnValueChanged((decimal?)e.OldValue, (decimal?)e.NewValue); + } + + protected virtual void OnValueChanged(decimal? oldValue, decimal? newValue) + { + if (newValue.HasValue) + DisplayText = newValue.ToString(); + else + DisplayText = "0"; + + RoutedPropertyChangedEventArgs args = new RoutedPropertyChangedEventArgs(oldValue, newValue); + args.RoutedEvent = ValueChangedEvent; + RaiseEvent(args); + } + + #endregion //Value + + #endregion //Properties + + #region Constructors + + static Calculator() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(Calculator), new FrameworkPropertyMetadata(typeof(Calculator))); + } + + public Calculator() + { + _timer = new DispatcherTimer(); + _timer.Interval = TimeSpan.FromMilliseconds(100); + _timer.Tick += Timer_Tick; + + CommandBindings.Add(new CommandBinding(CalculatorCommands.CalculatorButtonClick, ExecuteCalculatorButtonClick)); + AddHandler(MouseDownEvent, new MouseButtonEventHandler(Calculator_OnMouseDown), true); + } + + #endregion //Constructors + + #region Base Class Overrides + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + _buttonPanel = (ContentControl)GetTemplateChild("PART_CalculatorButtonPanel"); + } + + protected override void OnTextInput(TextCompositionEventArgs e) + { + var buttonType = CalculatorUtilities.GetCalculatorButtonTypeFromText(e.Text); + if (buttonType != CalculatorButtonType.None) + { + SimulateCalculatorButtonClick(buttonType); + ProcessCalculatorButton(buttonType); + } + } + + #endregion //Base Class Overrides + + #region Event Handlers + + private void Calculator_OnMouseDown(object sender, MouseButtonEventArgs e) + { + Focus(); + } + + void Timer_Tick(object sender, EventArgs e) + { + VisualStateManager.GoToState(_calculatorButton, _calculatorButton.IsMouseOver ? "MouseOver" : "Normal", true); + _timer.Stop(); + } + + #endregion //Event Handlers + + #region Methods + + private void Calculate() + { + if (_lastOperation == Operation.None) + return; + + try + { + Value = Decimal.Round(CalculateValue(_lastOperation), Precision); + } + catch + { + Value = null; + DisplayText = "ERROR"; + } + } + + private void Calculate(Operation newOperation) + { + if (!_showNewNumber) + Calculate(); + + _lastOperation = newOperation; + } + + private void Calculate(Operation currentOperation, Operation newOperation) + { + _lastOperation = currentOperation; + Calculate(); + _lastOperation = newOperation; + } + + private decimal CalculateValue(Operation operation) + { + decimal newValue = decimal.Zero; + decimal currentValue = CalculatorUtilities.ParseDecimal(DisplayText); + + switch (operation) + { + case Operation.Add: + newValue = CalculatorUtilities.Add(_previousValue, currentValue); + break; + case Operation.Subtract: + newValue = CalculatorUtilities.Subtract(_previousValue, currentValue); + break; + case Operation.Multiply: + newValue = CalculatorUtilities.Multiply(_previousValue, currentValue); + break; + case Operation.Divide: + newValue = CalculatorUtilities.Divide(_previousValue, currentValue); + break; + //case Operation.Percent: + // newValue = CalculatorUtilities.Percent(_previousValue, currentValue); + // break; + case Operation.Sqrt: + newValue = CalculatorUtilities.SquareRoot(currentValue); + break; + case Operation.Fraction: + newValue = CalculatorUtilities.Fraction(currentValue); + break; + case Operation.Negate: + newValue = CalculatorUtilities.Negate(currentValue); + break; + default: + newValue = decimal.Zero; + break; + } + + return newValue; + } + + void ProcessBackKey() + { + string displayText; + if (DisplayText.Length > 1 && !(DisplayText.Length == 2 && DisplayText[0] == '-')) + { + displayText = DisplayText.Remove(DisplayText.Length - 1, 1); + } + else + { + displayText = "0"; + _showNewNumber = true; + } + + DisplayText = displayText; + } + + private void ProcessCalculatorButton(CalculatorButtonType buttonType) + { + if (CalculatorUtilities.IsDigit(buttonType)) + ProcessDigitKey(buttonType); + else if ((CalculatorUtilities.IsMemory(buttonType))) + ProcessMemoryKey(buttonType); + else + ProcessOperationKey(buttonType); + + _lastButtonPressed = buttonType; + } + + private void ProcessDigitKey(CalculatorButtonType buttonType) + { + if (_showNewNumber) + DisplayText = CalculatorUtilities.GetCalculatorButtonContent(buttonType); + else + DisplayText += CalculatorUtilities.GetCalculatorButtonContent(buttonType); + + _showNewNumber = false; + } + + private void ProcessMemoryKey(Calculator.CalculatorButtonType buttonType) + { + decimal currentValue = CalculatorUtilities.ParseDecimal(DisplayText); + + switch (buttonType) + { + case Calculator.CalculatorButtonType.MAdd: + Memory += currentValue; + break; + case Calculator.CalculatorButtonType.MC: + Memory = decimal.Zero; + break; + case Calculator.CalculatorButtonType.MR: + DisplayText = Memory.ToString(); + break; + case Calculator.CalculatorButtonType.MS: + Memory = currentValue; + break; + case Calculator.CalculatorButtonType.MSub: + Memory -= currentValue; + break; + default: + break; + } + + _showNewNumber = true; + } + + private void ProcessOperationKey(CalculatorButtonType buttonType) + { + switch (buttonType) + { + case CalculatorButtonType.Add: + Calculate(Operation.Add); + break; + case CalculatorButtonType.Subtract: + Calculate(Operation.Subtract); + break; + case CalculatorButtonType.Multiply: + Calculate(Operation.Multiply); + break; + case CalculatorButtonType.Divide: + Calculate(Operation.Divide); + break; + case CalculatorButtonType.Percent: + if (_lastOperation != Operation.None) + { + decimal currentValue = CalculatorUtilities.ParseDecimal(DisplayText); + decimal newValue = CalculatorUtilities.Percent(_previousValue, currentValue); + DisplayText = newValue.ToString(); + } + else + { + DisplayText = "0"; + _showNewNumber = true; + } + return; + case CalculatorButtonType.Sqrt: + Calculate(Operation.Sqrt, Operation.None); + break; + case CalculatorButtonType.Fraction: + Calculate(Operation.Fraction, Operation.None); + break; + case CalculatorButtonType.Negate: + Calculate(Operation.Negate, Operation.None); + break; + case CalculatorButtonType.Equal: + Calculate(Operation.None); + break; + case CalculatorButtonType.Clear: + Calculate(Operation.Clear, Operation.None); + DisplayText = Value.ToString(); + break; + case CalculatorButtonType.Cancel: + DisplayText = _previousValue.ToString(); + _lastOperation = Operation.None; + _showNewNumber = true; + return; + case CalculatorButtonType.Back: + ProcessBackKey(); + return; + default: + break; + } + + Decimal.TryParse(DisplayText, out _previousValue); + _showNewNumber = true; + } + + private void SimulateCalculatorButtonClick(CalculatorButtonType buttonType) + { + _calculatorButton = CalculatorUtilities.FindButtonByCalculatorButtonType(_buttonPanel, buttonType); + VisualStateManager.GoToState(_calculatorButton, "Pressed", true); + _timer.Start(); + } + + #endregion //Methods + + #region Events + + //Due to a bug in Visual Studio, you cannot create event handlers for nullable args in XAML, so I have to use object instead. + public static readonly RoutedEvent ValueChangedEvent = EventManager.RegisterRoutedEvent("ValueChanged", RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler), typeof(Calculator)); + public event RoutedPropertyChangedEventHandler ValueChanged + { + add { AddHandler(ValueChangedEvent, value); } + remove { RemoveHandler(ValueChangedEvent, value); } + } + + #endregion //Events + + #region Commands + + private void ExecuteCalculatorButtonClick(object sender, ExecutedRoutedEventArgs e) + { + var buttonType = (CalculatorButtonType)e.Parameter; + ProcessCalculatorButton(buttonType); + } + + #endregion //Commands + } +} diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/CalculatorCommands.cs b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/CalculatorCommands.cs new file mode 100644 index 00000000..47fbc8df --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/CalculatorCommands.cs @@ -0,0 +1,14 @@ +using System; +using System.Windows.Input; + +namespace Microsoft.Windows.Controls +{ + public static class CalculatorCommands + { + private static RoutedCommand _calculatorButtonClickCommand = new RoutedCommand(); + public static RoutedCommand CalculatorButtonClick + { + get { return _calculatorButtonClickCommand; } + } + } +} diff --git a/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml new file mode 100644 index 00000000..37529ff7 --- /dev/null +++ b/Development/Feature - Theming/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml @@ -0,0 +1,496 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +