diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln b/Release/v1.3.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln
new file mode 100644
index 00000000..ffc559c3
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln
@@ -0,0 +1,69 @@
+
+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
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFToolkit.Extended.Design", "Src\WPFToolkit.Extended.Design\WPFToolkit.Extended.Design.csproj", "{FA6645C6-7CA5-427C-91F2-916D9FECD76C}"
+EndProject
+Global
+ GlobalSection(TeamFoundationVersionControl) = preSolution
+ SccNumberOfProjects = 4
+ 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
+ SccProjectUniqueName3 = Src\\WPFToolkit.Extended.Design\\WPFToolkit.Extended.Design.csproj
+ SccProjectName3 = Src/WPFToolkit.Extended.Design
+ SccLocalPath3 = Src\\WPFToolkit.Extended.Design
+ 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
+ {FA6645C6-7CA5-427C-91F2-916D9FECD76C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FA6645C6-7CA5-427C-91F2-916D9FECD76C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FA6645C6-7CA5-427C-91F2-916D9FECD76C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {FA6645C6-7CA5-427C-91F2-916D9FECD76C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {FA6645C6-7CA5-427C-91F2-916D9FECD76C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FA6645C6-7CA5-427C-91F2-916D9FECD76C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FA6645C6-7CA5-427C-91F2-916D9FECD76C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FA6645C6-7CA5-427C-91F2-916D9FECD76C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {FA6645C6-7CA5-427C-91F2-916D9FECD76C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {FA6645C6-7CA5-427C-91F2-916D9FECD76C}.Release|x86.ActiveCfg = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc b/Release/v1.3.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc
new file mode 100644
index 00000000..794f014c
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/MetadataStore.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/MetadataStore.cs
new file mode 100644
index 00000000..d59e48ab
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/AssemblyInfo.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..5b13e861
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.Designer.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.Designer.cs
new file mode 100644
index 00000000..7ef72466
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.resx b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.resx
new file mode 100644
index 00000000..ffecec85
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.Designer.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.Designer.cs
new file mode 100644
index 00000000..72d80d66
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.settings b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.settings
new file mode 100644
index 00000000..8f2fd95d
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj
new file mode 100644
index 00000000..fd0fa3fa
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj.vspscc b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj.vspscc
new file mode 100644
index 00000000..feffdeca
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml
new file mode 100644
index 00000000..00767c6d
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml.cs
new file mode 100644
index 00000000..f0cfc9e7
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml
new file mode 100644
index 00000000..0f66d220
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs
new file mode 100644
index 00000000..f28170f3
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace WPFToolkit.Extended.Samples
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/AssemblyInfo.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..35e4c7aa
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.Designer.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.Designer.cs
new file mode 100644
index 00000000..3c757353
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.resx b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.resx
new file mode 100644
index 00000000..ffecec85
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.Designer.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.Designer.cs
new file mode 100644
index 00000000..a353c3db
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.settings b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.settings
new file mode 100644
index 00000000..8f2fd95d
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj
new file mode 100644
index 00000000..e49eab24
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj.vspscc b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj.vspscc
new file mode 100644
index 00000000..feffdeca
--- /dev/null
+++ b/Release/v1.3.0/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/BusyIndicator.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/BusyIndicator.cs
new file mode 100644
index 00000000..6a73cd8f
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/VisualStates.BusyIndicator.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/VisualStates.BusyIndicator.cs
new file mode 100644
index 00000000..5d78d952
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/ButtonSpinner.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/ButtonSpinner.cs
new file mode 100644
index 00000000..b2c2ad99
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/ButtonSpinner.cs
@@ -0,0 +1,191 @@
+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 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
+
+ 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;
+ }
+ }
+ }
+
+
+ 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 //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();
+ }
+
+ #endregion //Base Class Overrides
+
+ ///
+ /// 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) { }
+
+ ///
+ /// 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)
+ {
+ SpinDirection direction = sender == IncreaseButton ? SpinDirection.Increase : SpinDirection.Decrease;
+ OnSpin(new SpinEventArgs(direction));
+ }
+
+ ///
+ /// 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();
+ }
+
+ ///
+ /// 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);
+ }
+ }
+ }
+}
diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/SpinDirection.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/SpinDirection.cs
new file mode 100644
index 00000000..aaa121fb
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/SpinEventArgs.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/SpinEventArgs.cs
new file mode 100644
index 00000000..f8a89385
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Spinner.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Spinner.cs
new file mode 100644
index 00000000..63b2a22a
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/ValidSpinDirections.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/ValidSpinDirections.cs
new file mode 100644
index 00000000..d744620d
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/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/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/ChildWindow.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/ChildWindow.cs
new file mode 100644
index 00000000..74b9842e
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/ChildWindow.cs
@@ -0,0 +1,539 @@
+using System;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Controls.Primitives;
+using System.ComponentModel;
+using System.Windows.Shapes;
+
+namespace Microsoft.Windows.Controls
+{
+ [TemplateVisualState(GroupName = VisualStates.WindowStatesGroup, Name = VisualStates.Open)]
+ [TemplateVisualState(GroupName = VisualStates.WindowStatesGroup, Name = VisualStates.Closed)]
+ public class ChildWindow : ContentControl
+ {
+ #region Private Members
+
+ private Grid _root;
+ private TranslateTransform _moveTransform = new TranslateTransform();
+ private bool _startupPositionInitialized;
+ private bool _isMouseCaptured;
+ private Point _clickPoint;
+ private Point _oldPosition;
+ private Border _dragWidget;
+ private FrameworkElement _parentContainer;
+ private Rectangle _modalLayer = new Rectangle();
+ private Canvas _modalLayerPanel = new Canvas();
+
+ #endregion //Private Members
+
+ #region Constructors
+
+ static ChildWindow()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata(typeof(ChildWindow), new FrameworkPropertyMetadata(typeof(ChildWindow)));
+ }
+
+ public ChildWindow()
+ {
+ _modalLayer.Fill = new SolidColorBrush(Colors.Gray);
+ _modalLayer.Opacity = 0.5;
+ }
+
+ #endregion //Constructors
+
+ #region Base Class Overrides
+
+ public override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ _dragWidget = (Border)GetTemplateChild("PART_DragWidget");
+ if (_dragWidget != null)
+ {
+ _dragWidget.AddHandler(UIElement.MouseLeftButtonDownEvent, new MouseButtonEventHandler(HeaderLeftMouseButtonDown), true);
+ _dragWidget.AddHandler(UIElement.MouseLeftButtonUpEvent, new MouseButtonEventHandler(HeaderMouseLeftButtonUp), true);
+ _dragWidget.MouseMove += (o, e) => HeaderMouseMove(e);
+ }
+
+ CloseButton = (Button)GetTemplateChild("PART_CloseButton");
+ if (CloseButton != null)
+ CloseButton.Click += (o, e) => Close();
+
+ //Overlay = GetTemplateChild("PART_Overlay") as Panel;
+ WindowRoot = GetTemplateChild("PART_WindowRoot") as Grid;
+
+ WindowRoot.RenderTransform = _moveTransform;
+
+
+ _parentContainer = VisualTreeHelper.GetParent(this) as FrameworkElement;
+
+ //this is for XBAP applications only. When inside an XBAP the parent container has no height or width until it has loaded. Therefore
+ //we need to handle the loaded event and reposition the window.
+ if (System.Windows.Interop.BrowserInteropHelper.IsBrowserHosted)
+ {
+ _parentContainer.Loaded += (o, e) =>
+ {
+ CenterChildWindow();
+ };
+ }
+
+ _parentContainer.LayoutUpdated += ParentContainer_LayoutUpdated;
+ _parentContainer.SizeChanged += (o, ea) =>
+ {
+ _modalLayer.Height = ea.NewSize.Height;
+ _modalLayer.Width = ea.NewSize.Width;
+ };
+
+ _root = GetTemplateChild("Root") as Grid;
+ _root.Children.Add(_modalLayerPanel);
+
+ ChangeVisualState();
+ }
+
+
+
+ #endregion //Base Class Overrides
+
+ #region Properties
+
+ #region Internal Properties
+
+ internal Grid WindowRoot { get; private set; }
+ internal Thumb DragWidget { get; private set; }
+ internal Button MinimizeButton { get; private set; }
+ internal Button MaximizeButton { get; private set; }
+ internal Button CloseButton { get; private set; }
+
+ #endregion //Internal Properties
+
+ #region Dependency Properties
+
+ public static readonly DependencyProperty CaptionProperty = DependencyProperty.Register("Caption", typeof(string), typeof(ChildWindow), new UIPropertyMetadata(String.Empty));
+ public string Caption
+ {
+ get { return (string)GetValue(CaptionProperty); }
+ set { SetValue(CaptionProperty, value); }
+ }
+
+ public static readonly DependencyProperty CaptionForegroundProperty = DependencyProperty.Register("CaptionForeground", typeof(Brush), typeof(ChildWindow), new UIPropertyMetadata(null));
+ public Brush CaptionForeground
+ {
+ get { return (Brush)GetValue(CaptionForegroundProperty); }
+ set { SetValue(CaptionForegroundProperty, value); }
+ }
+
+ public static readonly DependencyProperty CloseButtonStyleProperty = DependencyProperty.Register("CloseButtonStyle", typeof(Style), typeof(ChildWindow), new PropertyMetadata(null));
+ public Style CloseButtonStyle
+ {
+ get { return (Style)GetValue(CloseButtonStyleProperty); }
+ set { SetValue(CloseButtonStyleProperty, value); }
+ }
+
+ public static readonly DependencyProperty CloseButtonVisibilityProperty = DependencyProperty.Register("CloseButtonVisibility", typeof(Visibility), typeof(ChildWindow), new PropertyMetadata(Visibility.Visible));
+ public Visibility CloseButtonVisibility
+ {
+ get { return (Visibility)GetValue(CloseButtonVisibilityProperty); }
+ set { SetValue(CloseButtonVisibilityProperty, value); }
+ }
+
+ public static readonly DependencyProperty IconSourceProperty = DependencyProperty.Register("Icon", typeof(ImageSource), typeof(ChildWindow), new UIPropertyMetadata(default(ImageSource)));
+ public ImageSource Icon
+ {
+ get { return (ImageSource)GetValue(IconSourceProperty); }
+ set { SetValue(IconSourceProperty, value); }
+ }
+
+ public static readonly DependencyProperty IsModalProperty = DependencyProperty.Register("IsModal", typeof(bool), typeof(ChildWindow), new UIPropertyMetadata(false, new PropertyChangedCallback(OnIsModalPropertyChanged)));
+ public bool IsModal
+ {
+ get { return (bool)GetValue(IsModalProperty); }
+ set { SetValue(IsModalProperty, value); }
+ }
+
+ private static void OnIsModalPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ ChildWindow childWindow = (ChildWindow)d;
+ if ((bool)e.NewValue)
+ childWindow.ShowModalLayer();
+ else
+ childWindow.HideModalLayer();
+ }
+
+ #region Left
+
+ public static readonly DependencyProperty LeftProperty = DependencyProperty.Register("Left", typeof(double), typeof(ChildWindow), new PropertyMetadata(0.0, new PropertyChangedCallback(OnLeftPropertyChanged)));
+ public double Left
+ {
+ get { return (double)GetValue(LeftProperty); }
+ set { SetValue(LeftProperty, value); }
+ }
+
+ private static void OnLeftPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
+ {
+ ChildWindow window = (ChildWindow)obj;
+ window.Left = window.GetRestrictedLeft();
+ window.ProcessMove((double)e.NewValue - (double)e.OldValue, 0);
+ }
+
+ #endregion //Left
+
+ #region OverlayBrush
+
+ public static readonly DependencyProperty OverlayBrushProperty = DependencyProperty.Register("OverlayBrush", typeof(Brush), typeof(ChildWindow));
+ public Brush OverlayBrush
+ {
+ get { return (Brush)GetValue(OverlayBrushProperty); }
+ set { SetValue(OverlayBrushProperty, value); }
+ }
+
+ #endregion //OverlayBrush
+
+ #region OverlayOpacity
+
+ public static readonly DependencyProperty OverlayOpacityProperty = DependencyProperty.Register("OverlayOpacity", typeof(double), typeof(ChildWindow));
+ public double OverlayOpacity
+ {
+ get { return (double)GetValue(OverlayOpacityProperty); }
+ set { SetValue(OverlayOpacityProperty, value); }
+ }
+
+ #endregion //OverlayOpacity
+
+ #region Top
+
+ public static readonly DependencyProperty TopProperty = DependencyProperty.Register("Top", typeof(double), typeof(ChildWindow), new PropertyMetadata(0.0, new PropertyChangedCallback(OnTopPropertyChanged)));
+ public double Top
+ {
+ get { return (double)GetValue(TopProperty); }
+ set { SetValue(TopProperty, value); }
+ }
+
+ private static void OnTopPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
+ {
+ ChildWindow window = (ChildWindow)obj;
+ window.Top = window.GetRestrictedTop();
+ window.ProcessMove(0, (double)e.NewValue - (double)e.OldValue);
+ }
+
+ #endregion //TopProperty
+
+ public static readonly DependencyProperty WindowBackgroundProperty = DependencyProperty.Register("WindowBackground", typeof(Brush), typeof(ChildWindow), new PropertyMetadata(null));
+ public Brush WindowBackground
+ {
+ get { return (Brush)GetValue(WindowBackgroundProperty); }
+ set { SetValue(WindowBackgroundProperty, value); }
+ }
+
+ public static readonly DependencyProperty WindowBorderBrushProperty = DependencyProperty.Register("WindowBorderBrush", typeof(Brush), typeof(ChildWindow), new PropertyMetadata(null));
+ public Brush WindowBorderBrush
+ {
+ get { return (Brush)GetValue(WindowBorderBrushProperty); }
+ set { SetValue(WindowBorderBrushProperty, value); }
+ }
+
+ public static readonly DependencyProperty WindowOpacityProperty = DependencyProperty.Register("WindowOpacity", typeof(double), typeof(ChildWindow), new PropertyMetadata(null));
+ public double WindowOpacity
+ {
+ get { return (double)GetValue(WindowOpacityProperty); }
+ set { SetValue(WindowOpacityProperty, value); }
+ }
+
+ #region WindowState
+
+ public static readonly DependencyProperty WindowStateProperty = DependencyProperty.Register("WindowState", typeof(WindowState), typeof(ChildWindow), new PropertyMetadata(WindowState.Open, new PropertyChangedCallback(OnWindowStatePropertyChanged)));
+ public WindowState WindowState
+ {
+ get { return (WindowState)GetValue(WindowStateProperty); }
+ set { SetValue(WindowStateProperty, value); }
+ }
+
+ private static void OnWindowStatePropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
+ {
+ ChildWindow window = (ChildWindow)obj;
+ window.SetWindowState((WindowState)e.NewValue);
+ }
+
+ #endregion //WindowState
+
+ #endregion //Dependency Properties
+
+ private bool? _dialogResult;
+ ///
+ /// Gets or sets a value indicating whether the ChildWindow was accepted or canceled.
+ ///
+ ///
+ /// True if the child window was accepted; false if the child window was
+ /// canceled. The default is null.
+ ///
+ [TypeConverter(typeof(NullableBoolConverter))]
+ public bool? DialogResult
+ {
+ get { return _dialogResult; }
+ set
+ {
+ if (_dialogResult != value)
+ {
+ _dialogResult = value;
+ Close();
+ }
+ }
+ }
+
+ #endregion //Properties
+
+ #region Event Handlers
+
+ void HeaderLeftMouseButtonDown(object sender, MouseButtonEventArgs e)
+ {
+ e.Handled = true;
+ Focus();
+ _dragWidget.CaptureMouse();
+ _isMouseCaptured = true;
+ _clickPoint = e.GetPosition(null); //save off the mouse position
+ _oldPosition = new Point(Left, Top); //save off our original window position
+ }
+
+ private void HeaderMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
+ {
+ e.Handled = true;
+ _dragWidget.ReleaseMouseCapture();
+ _isMouseCaptured = false;
+ }
+
+ private void HeaderMouseMove(MouseEventArgs e)
+ {
+ if (_isMouseCaptured && Visibility == Visibility.Visible)
+ {
+ Point currentPosition = e.GetPosition(null); //our current mouse position
+
+ Left = _oldPosition.X + (currentPosition.X - _clickPoint.X);
+ Top = _oldPosition.Y + (currentPosition.Y - _clickPoint.Y);
+
+ //this helps keep our mouse position in sync with the drag widget position
+ Point dragWidgetPosition = e.GetPosition(_dragWidget);
+ if (dragWidgetPosition.X < 0 || dragWidgetPosition.X > _dragWidget.ActualWidth || dragWidgetPosition.Y < 0 || dragWidgetPosition.Y > _dragWidget.ActualHeight)
+ {
+ return;
+ }
+
+ _oldPosition = new Point(Left, Top);
+ _clickPoint = e.GetPosition(Window.GetWindow(this)); //store the point where we are relative to the window
+ }
+ }
+
+ private void ParentContainer_LayoutUpdated(object sender, EventArgs e)
+ {
+ if (DesignerProperties.GetIsInDesignMode(this))
+ return;
+
+ //we only want to set the start position if this is the first time the control has bee initialized
+ if (!_startupPositionInitialized)
+ {
+ SetStartupPosition();
+ _startupPositionInitialized = true;
+ }
+ }
+
+ #endregion //Event Handlers
+
+ #region Methods
+
+ #region Private
+
+ private double GetRestrictedLeft()
+ {
+ if (_parentContainer != null)
+ {
+ if (Left < 0)
+ {
+ return 0;
+ }
+
+ if (Left + WindowRoot.ActualWidth > _parentContainer.ActualWidth && _parentContainer.ActualWidth != 0)
+ {
+ return _parentContainer.ActualWidth - WindowRoot.ActualWidth;
+ }
+ }
+
+ return Left;
+ }
+
+ private double GetRestrictedTop()
+ {
+ if (_parentContainer != null )
+ {
+ if (Top < 0)
+ {
+ return 0;
+ }
+
+ if (Top + WindowRoot.ActualHeight > _parentContainer.ActualHeight && _parentContainer.ActualHeight != 0)
+ {
+ return _parentContainer.ActualHeight - WindowRoot.ActualHeight;
+ }
+ }
+
+ return Top;
+ }
+
+ private void SetWindowState(WindowState state)
+ {
+ switch (state)
+ {
+ case WindowState.Closed:
+ {
+ ExecuteClose();
+ break;
+ }
+ case WindowState.Open:
+ {
+ ExecuteOpen();
+ break;
+ }
+ }
+
+ ChangeVisualState();
+ }
+
+ private void ExecuteClose()
+ {
+ CancelEventArgs e = new CancelEventArgs();
+ OnClosing(e);
+
+ if (!e.Cancel)
+ {
+ if (!_dialogResult.HasValue)
+ _dialogResult = false;
+
+ OnClosed(EventArgs.Empty);
+ }
+ else
+ {
+ _dialogResult = null; //if the Close is cancelled, DialogResult should always be NULL:
+ }
+ }
+
+ private void ExecuteOpen()
+ {
+ _dialogResult = null; //reset the dialogResult to null each time the window is opened
+ BringToFront();
+ }
+
+ private void BringToFront()
+ {
+ int index = 0;
+
+ if (_parentContainer != null)
+ {
+ index = (int)_parentContainer.GetValue(Canvas.ZIndexProperty);
+ }
+
+ this.SetValue(Canvas.ZIndexProperty, ++index);
+
+ if (IsModal)
+ {
+ Canvas.SetZIndex(_modalLayerPanel, -1);
+ }
+ }
+
+ private void SetStartupPosition()
+ {
+ CenterChildWindow();
+ BringToFront();
+ }
+
+ private void CenterChildWindow()
+ {
+ _moveTransform.X = _moveTransform.Y = 0;
+
+ if (_parentContainer != null)
+ {
+ Left = (_parentContainer.ActualWidth - WindowRoot.ActualWidth) / 2.0;
+ Top = (_parentContainer.ActualHeight - WindowRoot.ActualHeight) / 2.0;
+ }
+ }
+
+ protected virtual void ChangeVisualState()
+ {
+ if (WindowState == WindowState.Closed)
+ {
+ VisualStateManager.GoToState(this, VisualStates.Closed, true);
+ }
+ else
+ {
+ VisualStateManager.GoToState(this, VisualStates.Open, true);
+ }
+ }
+
+ private void ShowModalLayer()
+ {
+ if (!DesignerProperties.GetIsInDesignMode(this))
+ {
+ if (!_modalLayerPanel.Children.Contains(_modalLayer))
+ _modalLayerPanel.Children.Add(_modalLayer);
+
+ BringToFront();
+ }
+ }
+
+ private void HideModalLayer()
+ {
+ if (_modalLayerPanel.Children.Contains(_modalLayer))
+ _modalLayerPanel.Children.Remove(_modalLayer);
+ }
+
+ #endregion //Private
+
+ #region Protected
+
+ protected void ProcessMove(double x, double y)
+ {
+ _moveTransform.X += x;
+ _moveTransform.Y += y;
+ }
+
+ #endregion //Protected
+
+ #region Public
+
+ public void Show()
+ {
+ WindowState = WindowState.Open;
+ }
+
+ public void Close()
+ {
+ WindowState = WindowState.Closed;
+ }
+
+ #endregion //Public
+
+ #endregion //Methods
+
+ #region Events
+
+ ///
+ /// Occurs when the ChildWindow is closed.
+ ///
+ public event EventHandler Closed;
+ protected virtual void OnClosed(EventArgs e)
+ {
+ if (Closed != null)
+ Closed(this, e);
+ }
+
+ ///
+ /// Occurs when the ChildWindow is closing.
+ ///
+ public event EventHandler Closing;
+ protected virtual void OnClosing(CancelEventArgs e)
+ {
+ if (Closing != null)
+ Closing(this, e);
+ }
+
+ #endregion //Events
+ }
+}
diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/VisualStates.ChildWindow.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/VisualStates.ChildWindow.cs
new file mode 100644
index 00000000..eb3a4ea9
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/VisualStates.ChildWindow.cs
@@ -0,0 +1,22 @@
+using System;
+
+namespace Microsoft.Windows.Controls
+{
+ internal static partial class VisualStates
+ {
+ ///
+ /// Window State group name.
+ ///
+ public const string WindowStatesGroup = "WindowStatesGroup";
+
+ ///
+ /// Open state name for ChildWindow.
+ ///
+ public const string Open = "Open";
+
+ ///
+ /// Closed state name for ChildWindow.
+ ///
+ public const string Closed = "Closed";
+ }
+}
diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/WindowState.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/WindowState.cs
new file mode 100644
index 00000000..cc001a25
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/WindowState.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Microsoft.Windows.Controls
+{
+ public enum WindowState
+ {
+ Closed,
+ Open
+ }
+}
diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorItem.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorItem.cs
new file mode 100644
index 00000000..0f846a9a
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorItem.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Windows.Media;
+
+namespace Microsoft.Windows.Controls
+{
+ public class ColorItem
+ {
+ public Color Color { get; set; }
+ public string Name { get; set; }
+
+ public ColorItem(Color color, string name)
+ {
+ Color = color;
+ Name = name;
+ }
+ }
+}
diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.cs
new file mode 100644
index 00000000..610cea70
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.cs
@@ -0,0 +1,221 @@
+using System;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media;
+using System.Windows.Controls.Primitives;
+using System.Collections.ObjectModel;
+using System.Reflection;
+
+namespace Microsoft.Windows.Controls
+{
+ public class ColorPicker : Control
+ {
+ #region Members
+
+ ToggleButton _colorPickerToggleButton;
+ Popup _colorPickerCanvasPopup;
+ ListBox _availableColors;
+ ListBox _standardColors;
+ ListBox _recentColors;
+
+ #endregion //Members
+
+ #region Properties
+
+ #region AvailableColors
+
+ public static readonly DependencyProperty AvailableColorsProperty = DependencyProperty.Register("AvailableColors", typeof(ObservableCollection), typeof(ColorPicker), new UIPropertyMetadata(CreateAvailableColors()));
+ public ObservableCollection AvailableColors
+ {
+ get { return (ObservableCollection)GetValue(AvailableColorsProperty); }
+ set { SetValue(AvailableColorsProperty, value); }
+ }
+
+ #endregion //AvailableColors
+
+ #region ButtonStyle
+
+ public static readonly DependencyProperty ButtonStyleProperty = DependencyProperty.Register("ButtonStyle", typeof(Style), typeof(ColorPicker));
+ public Style ButtonStyle
+ {
+ get { return (Style)GetValue(ButtonStyleProperty); }
+ set { SetValue(ButtonStyleProperty, value); }
+ }
+
+ #endregion //ButtonStyle
+
+ #region RecenColors
+
+ public static readonly DependencyProperty RecentColorsProperty = DependencyProperty.Register("RecentColors", typeof(ObservableCollection), typeof(ColorPicker), new UIPropertyMetadata(null));
+ public ObservableCollection RecentColors
+ {
+ get { return (ObservableCollection)GetValue(RecentColorsProperty); }
+ set { SetValue(RecentColorsProperty, value); }
+ }
+
+ #endregion //RecentColors
+
+ #region SelectedColor
+
+ public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register("SelectedColor", typeof(Color), typeof(ColorPicker), new FrameworkPropertyMetadata(Colors.Black, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback(OnSelectedColorPropertyChanged)));
+ public Color SelectedColor
+ {
+ get { return (Color)GetValue(SelectedColorProperty); }
+ set { SetValue(SelectedColorProperty, value); }
+ }
+
+ private static void OnSelectedColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ ColorPicker colorPicker = (ColorPicker)d;
+ if (colorPicker != null)
+ colorPicker.OnSelectedColorChanged((Color)e.OldValue, (Color)e.NewValue);
+ }
+
+ private void OnSelectedColorChanged(Color oldValue, Color newValue)
+ {
+ RoutedPropertyChangedEventArgs args = new RoutedPropertyChangedEventArgs(oldValue, newValue);
+ args.RoutedEvent = ColorPicker.SelectedColorChangedEvent;
+ RaiseEvent(args);
+ }
+
+ #endregion //SelectedColor
+
+ #region StandardColors
+
+ public static readonly DependencyProperty StandardColorsProperty = DependencyProperty.Register("StandardColors", typeof(ObservableCollection), typeof(ColorPicker), new UIPropertyMetadata(CreateStandardColors()));
+ public ObservableCollection StandardColors
+ {
+ get { return (ObservableCollection)GetValue(StandardColorsProperty); }
+ set { SetValue(StandardColorsProperty, value); }
+ }
+
+ #endregion //StandardColors
+
+ #endregion //Properties
+
+ #region Constructors
+
+ static ColorPicker()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata(typeof(ColorPicker), new FrameworkPropertyMetadata(typeof(ColorPicker)));
+ }
+
+ public ColorPicker()
+ {
+ RecentColors = new ObservableCollection();
+ }
+
+ #endregion //Constructors
+
+ #region Base Class Overrides
+
+ public override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ _colorPickerToggleButton = (ToggleButton)GetTemplateChild("PART_ColorPickerToggleButton");
+ _colorPickerToggleButton.Click += ColorPickerToggleButton_Clicked;
+
+ _colorPickerCanvasPopup = (Popup)GetTemplateChild("PART_ColorPickerPalettePopup");
+
+ _availableColors = (ListBox)GetTemplateChild("PART_AvailableColors");
+ _availableColors.SelectionChanged += Color_SelectionChanged;
+
+ _standardColors = (ListBox)GetTemplateChild("PART_StandardColors");
+ _standardColors.SelectionChanged += Color_SelectionChanged;
+
+ _recentColors = (ListBox)GetTemplateChild("PART_RecentColors");
+ _recentColors.SelectionChanged += Color_SelectionChanged;
+ }
+
+ #endregion //Base Class Overrides
+
+ #region Event Handlers
+
+ void ColorPickerToggleButton_Clicked(object sender, RoutedEventArgs e)
+ {
+ _colorPickerCanvasPopup.IsOpen = _colorPickerToggleButton.IsChecked ?? false;
+ }
+
+ private void Color_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ ListBox lb = (ListBox)sender;
+
+ if (e.AddedItems.Count > 0)
+ {
+ var colorItem = (ColorItem)e.AddedItems[0];
+ SelectedColor = colorItem.Color;
+ UpdateRecentColors(colorItem);
+ CloseColorPicker();
+ lb.SelectedIndex = -1; //for now I don't care about keeping track of the selected color
+ }
+ }
+
+ #endregion //Event Handlers
+
+ #region Events
+
+ public static readonly RoutedEvent SelectedColorChangedEvent = EventManager.RegisterRoutedEvent("SelectedColorChanged", RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler), typeof(ColorPicker));
+ public event RoutedPropertyChangedEventHandler SelectedColorChanged
+ {
+ add { AddHandler(SelectedColorChangedEvent, value); }
+ remove { RemoveHandler(SelectedColorChangedEvent, value); }
+ }
+
+ #endregion //Events
+
+ #region Methods
+
+ private void CloseColorPicker()
+ {
+ _colorPickerToggleButton.IsChecked = false;
+ _colorPickerCanvasPopup.IsOpen = false;
+ }
+
+ private void UpdateRecentColors(ColorItem colorItem)
+ {
+ if (!RecentColors.Contains(colorItem))
+ RecentColors.Add(colorItem);
+
+ if (RecentColors.Count > 10) //don't allow more than ten, maybe make a property that can be set by the user.
+ RecentColors.RemoveAt(0);
+ }
+
+ private static ObservableCollection CreateStandardColors()
+ {
+ ObservableCollection _standardColors = new ObservableCollection();
+ _standardColors.Add(new ColorItem(Colors.White, "White"));
+ _standardColors.Add(new ColorItem(Colors.Gray, "Gray"));
+ _standardColors.Add(new ColorItem(Colors.Black, "Black"));
+ _standardColors.Add(new ColorItem(Colors.Red, "Red"));
+ _standardColors.Add(new ColorItem(Colors.Green, "Geen"));
+ _standardColors.Add(new ColorItem(Colors.Blue, "Blue"));
+ _standardColors.Add(new ColorItem(Colors.Yellow, "Yellow"));
+ _standardColors.Add(new ColorItem(Colors.Orange, "Orange"));
+ _standardColors.Add(new ColorItem(Colors.Brown, "Brown"));
+ _standardColors.Add(new ColorItem(Colors.Purple, "Purple"));
+ return _standardColors;
+ }
+
+ private static ObservableCollection CreateAvailableColors()
+ {
+ ObservableCollection _standardColors = new ObservableCollection();
+
+ PropertyInfo[] properties = typeof(Colors).GetProperties(BindingFlags.Static | BindingFlags.Public);
+ foreach (PropertyInfo info in properties)
+ {
+ if (String.Compare(info.Name, "Transparent", false) != 0)
+ {
+ Color c = (Color)info.GetValue(typeof(Colors), null);
+ var colorItem = new ColorItem(c, info.Name);
+ if (!_standardColors.Contains(colorItem))
+ _standardColors.Add(colorItem);
+ }
+ }
+
+ return _standardColors;
+ }
+
+ #endregion //Methods
+ }
+}
diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/InverseBoolConverter.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/InverseBoolConverter.cs
new file mode 100644
index 00000000..10684dcb
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/InverseBoolConverter.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Windows.Data;
+
+namespace Microsoft.Windows.Controls.Core.Converters
+{
+ public class InverseBoolConverter : IValueConverter
+ {
+ #region IValueConverter Members
+
+ public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ return !(bool)value;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+ }
+}
diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs
new file mode 100644
index 00000000..58c656be
--- /dev/null
+++ b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs
@@ -0,0 +1,186 @@
+using System;
+using System.Windows.Controls;
+using System.Windows;
+
+namespace Microsoft.Windows.Controls.Primitives
+{
+ public abstract class InputBase : Control
+ {
+ #region Members
+
+ ///
+ /// Flags if the Text and Value properties are in the process of being sync'd
+ ///
+ private bool _isSyncingTextAndValueProperties;
+ private bool _isInitialized;
+
+ #endregion //Members
+
+ #region Properties
+
+ public virtual object PreviousValue { get; internal set; }
+
+ #region IsEditable
+
+ public static readonly DependencyProperty IsEditableProperty = DependencyProperty.Register("IsEditable", typeof(bool), typeof(InputBase), new PropertyMetadata(true));
+ public bool IsEditable
+ {
+ get { return (bool)GetValue(IsEditableProperty); }
+ set { SetValue(IsEditableProperty, value); }
+ }
+
+ #endregion //IsEditable
+
+ #region Text
+
+ public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(InputBase), new FrameworkPropertyMetadata(default(String), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnTextPropertyChanged));
+ public string Text
+ {
+ get { return (string)this.GetValue(TextProperty); }
+ set { this.SetValue(TextProperty, value); }
+ }
+
+ private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ InputBase input = (InputBase)d;
+ input.OnTextChanged((string)e.OldValue, (string)e.NewValue);
+ if (input._isInitialized)
+ input.SyncTextAndValueProperties(e.Property, e.NewValue);
+ }
+
+ protected virtual void OnTextChanged(string previousValue, string currentValue)
+ {
+
+ }
+
+ #endregion //Text
+
+ #region Value
+
+ public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(object), typeof(InputBase), new FrameworkPropertyMetadata(default(object), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValuePropertyChanged, OnCoerceValuePropertyCallback));
+ public virtual object Value
+ {
+ get { return (object)GetValue(ValueProperty); }
+ set { SetValue(ValueProperty, value); }
+ }
+
+ private static void OnValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ InputBase input = (InputBase)d;
+
+ if (e.OldValue != e.NewValue)
+ {
+ input.PreviousValue = e.OldValue;
+ input.OnValueChanged(e.OldValue, e.NewValue);
+
+ if (input._isInitialized)
+ input.SyncTextAndValueProperties(e.Property, e.NewValue);
+ }
+ }
+
+ protected virtual void OnValueChanged(object oldValue, object newValue)
+ {
+ RoutedPropertyChangedEventArgs