diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln b/Release/v1.2.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln deleted file mode 100644 index ffc559c3..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln +++ /dev/null @@ -1,69 +0,0 @@ - -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.2.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc b/Release/v1.2.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc deleted file mode 100644 index 794f014c..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/MetadataStore.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/MetadataStore.cs deleted file mode 100644 index d59e48ab..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/MetadataStore.cs +++ /dev/null @@ -1,52 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/AssemblyInfo.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/AssemblyInfo.cs deleted file mode 100644 index 5b13e861..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.Designer.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.Designer.cs deleted file mode 100644 index 7ef72466..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.resx b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.resx deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.Designer.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.Designer.cs deleted file mode 100644 index 72d80d66..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.settings b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.settings deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj deleted file mode 100644 index fd0fa3fa..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj +++ /dev/null @@ -1,99 +0,0 @@ - - - - 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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj.vspscc b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj.vspscc deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml deleted file mode 100644 index 00767c6d..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml.cs deleted file mode 100644 index f0cfc9e7..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml.cs +++ /dev/null @@ -1,16 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml deleted file mode 100644 index 0f66d220..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs deleted file mode 100644 index f28170f3..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs +++ /dev/null @@ -1,27 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/AssemblyInfo.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/AssemblyInfo.cs deleted file mode 100644 index 35e4c7aa..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.Designer.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.Designer.cs deleted file mode 100644 index 3c757353..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.resx b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.resx deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.Designer.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.Designer.cs deleted file mode 100644 index a353c3db..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.settings b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.settings deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj deleted file mode 100644 index e49eab24..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj +++ /dev/null @@ -1,113 +0,0 @@ - - - - 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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj.vspscc b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj.vspscc deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/BusyIndicator.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/BusyIndicator.cs deleted file mode 100644 index 6a73cd8f..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/BusyIndicator.cs +++ /dev/null @@ -1,266 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/VisualStates.BusyIndicator.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/VisualStates.BusyIndicator.cs deleted file mode 100644 index 5d78d952..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/VisualStates.BusyIndicator.cs +++ /dev/null @@ -1,37 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/ButtonSpinner.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/ButtonSpinner.cs deleted file mode 100644 index b2c2ad99..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/ButtonSpinner.cs +++ /dev/null @@ -1,191 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/SpinDirection.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/SpinDirection.cs deleted file mode 100644 index aaa121fb..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/SpinDirection.cs +++ /dev/null @@ -1,21 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/SpinEventArgs.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/SpinEventArgs.cs deleted file mode 100644 index f8a89385..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/SpinEventArgs.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Spinner.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Spinner.cs deleted file mode 100644 index 20b8d1cb..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Spinner.cs +++ /dev/null @@ -1,77 +0,0 @@ -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; - - if ((ValidSpinDirection & valid) != valid) - { - // spin is not allowed. - throw new InvalidOperationException("Spin action is not valid at this moment."); - } - - 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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/ValidSpinDirections.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/ValidSpinDirections.cs deleted file mode 100644 index d744620d..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/ValidSpinDirections.cs +++ /dev/null @@ -1,26 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/ChildWindow.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/ChildWindow.cs deleted file mode 100644 index 8a44695d..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/ChildWindow.cs +++ /dev/null @@ -1,482 +0,0 @@ -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; - -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 TranslateTransform _moveTransform = new TranslateTransform(); - private bool _startupPositionInitialized; - private bool _isMouseCaptured; - private Point _clickPoint; - private Point _oldPosition; - private Border _dragWidget; - private FrameworkElement _parent; - - #endregion //Private Members - - #region Constructors - - static ChildWindow() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(ChildWindow), new FrameworkPropertyMetadata(typeof(ChildWindow))); - } - - public ChildWindow() - { - LayoutUpdated += (o, e) => - { - //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 //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; - - //TODO: move somewhere else - _parent = VisualTreeHelper.GetParent(this) as FrameworkElement; - _parent.SizeChanged += (o, ea) => - { - Overlay.Height = ea.NewSize.Height; - Overlay.Width = ea.NewSize.Width; - }; - - ChangeVisualState(); - } - - #endregion //Base Class Overrides - - #region Properties - - #region Internal Properties - - internal Panel Overlay { get; private set; } - 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(true)); - public bool IsModal - { - get { return (bool)GetValue(IsModalProperty); } - set { SetValue(IsModalProperty, value); } - } - - #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 - } - } - - #endregion //Event Handlers - - #region Methods - - #region Private - - private double GetRestrictedLeft() - { - if (_parent != null) - { - if (Left < 0) - { - return 0; - } - - if (Left + WindowRoot.ActualWidth > _parent.ActualWidth) - { - return _parent.ActualWidth - WindowRoot.ActualWidth; - } - } - - return Left; - } - - private double GetRestrictedTop() - { - if (_parent != null) - { - if (Top < 0) - { - return 0; - } - - if (Top + WindowRoot.ActualHeight > _parent.ActualHeight) - { - return _parent.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 - SetZIndex(); - } - - private void SetZIndex() - { - if (_parent != null) - { - int parentIndex = (int)_parent.GetValue(Canvas.ZIndexProperty); - this.SetValue(Canvas.ZIndexProperty, ++parentIndex); - } - else - { - this.SetValue(Canvas.ZIndexProperty, 1); - } - } - - private void SetStartupPosition() - { - CenterChildWindow(); - } - - private void CenterChildWindow() - { - _moveTransform.X = _moveTransform.Y = 0; - - if (_parent != null) - { - Left = (_parent.ActualWidth - WindowRoot.ActualWidth) / 2.0; - Top = (_parent.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); - } - } - - #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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/VisualStates.ChildWindow.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/VisualStates.ChildWindow.cs deleted file mode 100644 index eb3a4ea9..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/VisualStates.ChildWindow.cs +++ /dev/null @@ -1,22 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/WindowState.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/WindowState.cs deleted file mode 100644 index cc001a25..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/WindowState.cs +++ /dev/null @@ -1,13 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.cs deleted file mode 100644 index 03b31965..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.cs +++ /dev/null @@ -1,396 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Controls.Primitives; - -namespace Microsoft.Windows.Controls -{ - public class ColorPicker : Control - { - #region Private Members - - ToggleButton _colorPickerToggleButton; - Popup _colorPickerCanvasPopup; - Button _okButton; - private TranslateTransform _colorShadeSelectorTransform = new TranslateTransform(); - private Canvas _colorShadingCanvas; - private Canvas _colorShadeSelector; - private ColorSpectrumSlider _spectrumSlider; - private Point? _currentColorPosition; - private Color _currentColor = Colors.White; - private bool _isLoaded; - - #endregion //Private Members - - #region Constructors - - static ColorPicker() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(ColorPicker), new FrameworkPropertyMetadata(typeof(ColorPicker))); - } - - public ColorPicker() - { - - } - - #endregion //Constructors - - #region Properties - - public static readonly DependencyProperty CurrentColorProperty = DependencyProperty.Register("CurrentColor", typeof(Color), typeof(ColorPicker), new PropertyMetadata(Colors.White)); - public Color CurrentColor - { - get { return (Color)GetValue(CurrentColorProperty); } - set { SetValue(CurrentColorProperty, value); } - } - - #region SelectedColor - - public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register("SelectedColor", typeof(Color), typeof(ColorPicker), new FrameworkPropertyMetadata(Colors.White, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback(SelectedColorPropertyChanged))); - public Color SelectedColor - { - get { return (Color)GetValue(SelectedColorProperty); } - set { SetValue(SelectedColorProperty, value); } - } - - private static void SelectedColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - ColorPicker colorPicker = (ColorPicker)d; - colorPicker.SetSelectedColor((Color)e.NewValue); - } - - #endregion //SelectedColor - - #region ScRGB - - #region ScA - - public static readonly DependencyProperty ScAProperty = DependencyProperty.Register("ScA", typeof(float), typeof(ColorPicker), new PropertyMetadata((float)1, new PropertyChangedCallback(OnScAPropertyChangedChanged))); - public float ScA - { - get { return (float)GetValue(ScAProperty); } - set { SetValue(ScAProperty, value); } - } - - private static void OnScAPropertyChangedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - ColorPicker c = (ColorPicker)d; - c.SetScA((float)e.NewValue); - } - - protected virtual void SetScA(float newValue) - { - _currentColor.ScA = newValue; - A = _currentColor.A; - CurrentColor = _currentColor; - HexadecimalString = _currentColor.ToString(); - } - - #endregion //ScA - - #region ScR - - public static readonly DependencyProperty ScRProperty = DependencyProperty.Register("ScR", typeof(float), typeof(ColorPicker), new PropertyMetadata((float)1, new PropertyChangedCallback(OnScRPropertyChanged))); - public float ScR - { - get { return (float)GetValue(ScRProperty); } - set { SetValue(RProperty, value); } - } - - private static void OnScRPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - - } - - #endregion //ScR - - #region ScG - - public static readonly DependencyProperty ScGProperty = DependencyProperty.Register("ScG", typeof(float), typeof(ColorPicker), new PropertyMetadata((float)1, new PropertyChangedCallback(OnScGPropertyChanged))); - public float ScG - { - get { return (float)GetValue(ScGProperty); } - set { SetValue(GProperty, value); } - } - - private static void OnScGPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - - } - - #endregion //ScG - - #region ScB - - public static readonly DependencyProperty ScBProperty = DependencyProperty.Register("ScB", typeof(float), typeof(ColorPicker), new PropertyMetadata((float)1, new PropertyChangedCallback(OnScBPropertyChanged))); - public float ScB - { - get { return (float)GetValue(BProperty); } - set { SetValue(BProperty, value); } - } - - private static void OnScBPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - - } - - #endregion //ScB - - #endregion //ScRGB - - #region RGB - - #region A - - public static readonly DependencyProperty AProperty = DependencyProperty.Register("A", typeof(byte), typeof(ColorPicker), new PropertyMetadata((byte)255, new PropertyChangedCallback(OnAPropertyChanged))); - public byte A - { - get { return (byte)GetValue(AProperty); } - set { SetValue(AProperty, value); } - } - - private static void OnAPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - ColorPicker c = (ColorPicker)d; - c.SetA((byte)e.NewValue); - } - - protected virtual void SetA(byte newValue) - { - _currentColor.A = newValue; - SetValue(CurrentColorProperty, _currentColor); - } - - #endregion //A - - #region R - - public static readonly DependencyProperty RProperty = DependencyProperty.Register("R", typeof(byte), typeof(ColorPicker), new PropertyMetadata((byte)255, new PropertyChangedCallback(OnRPropertyChanged))); - public byte R - { - get { return (byte)GetValue(RProperty); } - set { SetValue(RProperty, value); } - } - - private static void OnRPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - - } - - #endregion //R - - #region G - - public static readonly DependencyProperty GProperty = DependencyProperty.Register("G", typeof(byte), typeof(ColorPicker), new PropertyMetadata((byte)255, new PropertyChangedCallback(OnGPropertyChanged))); - public byte G - { - get { return (byte)GetValue(GProperty); } - set { SetValue(GProperty, value); } - } - - private static void OnGPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - - } - - #endregion //G - - #region B - - public static readonly DependencyProperty BProperty = DependencyProperty.Register("B", typeof(byte), typeof(ColorPicker), new PropertyMetadata((byte)255, new PropertyChangedCallback(OnBPropertyChanged))); - public byte B - { - get { return (byte)GetValue(BProperty); } - set { SetValue(BProperty, value); } - } - - private static void OnBPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - - } - - #endregion //B - - #endregion //RGB - - #region HexadecimalString - - public static readonly DependencyProperty HexadecimalStringProperty = DependencyProperty.Register("HexadecimalString", typeof(string), typeof(ColorPicker), new PropertyMetadata("#FFFFFFFF", new PropertyChangedCallback(OnHexadecimalStringPropertyChanged))); - public string HexadecimalString - { - get { return (string)GetValue(HexadecimalStringProperty); } - set { SetValue(HexadecimalStringProperty, value); } - } - - private static void OnHexadecimalStringPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - - } - - #endregion //HexadecimalString - - #endregion //Properties - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - _colorPickerToggleButton = (ToggleButton)GetTemplateChild("PART_ColorPickerToggleButton"); - _colorPickerToggleButton.Click += ColorPickerToggleButton_Clicked; - - _colorPickerCanvasPopup = (Popup)GetTemplateChild("PART_ColorPickerCanvasPopup"); - - _colorShadingCanvas = (Canvas)GetTemplateChild("PART_ColorShadingCanvas"); - _colorShadingCanvas.MouseLeftButtonDown += ColorShadingCanvas_MouseLeftButtonDown; - _colorShadingCanvas.MouseMove += ColorShadingCanvas_MouseMove; - _colorShadingCanvas.SizeChanged += ColorShadingCanvas_SizeChanged; - - _colorShadeSelector = (Canvas)GetTemplateChild("PART_ColorShadeSelector"); - _colorShadeSelector.RenderTransform = _colorShadeSelectorTransform; - - _spectrumSlider = (ColorSpectrumSlider)GetTemplateChild("PART_SpectrumSlider"); - _spectrumSlider.ValueChanged += SpectrumSlider_ValueChanged; - - _okButton = (Button)GetTemplateChild("PART_OkButton"); - _okButton.Click += OkButton_Click; - - SetSelectedColor(SelectedColor); - } - - #endregion //Base Class Overrides - - #region Event Handlers - - void ColorShadingCanvas_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) - { - Point p = e.GetPosition(_colorShadingCanvas); - UpdateColorShadeSelectorPositionAndCalculateColor(p); - } - - void ColorShadingCanvas_MouseMove(object sender, MouseEventArgs e) - { - if (e.LeftButton == MouseButtonState.Pressed) - { - Point p = e.GetPosition(_colorShadingCanvas); - UpdateColorShadeSelectorPositionAndCalculateColor(p); - Mouse.Synchronize(); - } - } - - void ColorShadingCanvas_SizeChanged(object sender, SizeChangedEventArgs e) - { - if (_currentColorPosition != null) - { - Point _newPoint = new Point - { - X = ((Point)_currentColorPosition).X * e.NewSize.Width, - Y = ((Point)_currentColorPosition).Y * e.NewSize.Height - }; - - UpdateColorShadeSelectorPositionAndCalculateColor(_newPoint, false); - } - } - - void SpectrumSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) - { - if (_currentColorPosition != null) - { - CalculateColor((Point)_currentColorPosition); - } - } - - void OkButton_Click(object sender, RoutedEventArgs e) - { - if (_colorPickerCanvasPopup.IsOpen || _colorPickerToggleButton.IsChecked == true) - { - CloseColorPicker(); - SelectedColor = CurrentColor; - } - } - - void ColorPickerToggleButton_Clicked(object sender, RoutedEventArgs e) - { - _colorPickerCanvasPopup.IsOpen = _colorPickerToggleButton.IsChecked ?? false; - } - - #endregion //Event Handlers - - #region Methods - - private void CloseColorPicker() - { - _colorPickerToggleButton.IsChecked = false; - _colorPickerCanvasPopup.IsOpen = false; - } - - private void SetSelectedColor(Color theColor) - { - _currentColor = theColor; - SetValue(AProperty, _currentColor.A); - SetValue(RProperty, _currentColor.R); - SetValue(GProperty, _currentColor.G); - SetValue(BProperty, _currentColor.B); - UpdateColorShadeSelectorPosition(_currentColor); - } - - private void UpdateColorShadeSelectorPositionAndCalculateColor(Point p, bool calculateColor = true) - { - if (p.Y < 0) - p.Y = 0; - - if (p.X < 0) - p.X = 0; - - if (p.X > _colorShadingCanvas.ActualWidth) - p.X = _colorShadingCanvas.ActualWidth; - - if (p.Y > _colorShadingCanvas.ActualHeight) - p.Y = _colorShadingCanvas.ActualHeight; - - _colorShadeSelectorTransform.X = p.X - (_colorShadeSelector.Width / 2); - _colorShadeSelectorTransform.Y = p.Y - (_colorShadeSelector.Height / 2); - - p.X = p.X / _colorShadingCanvas.ActualWidth; - p.Y = p.Y / _colorShadingCanvas.ActualHeight; - - _currentColorPosition = p; - - if (calculateColor) - CalculateColor(p); - } - - private void UpdateColorShadeSelectorPosition(Color color) - { - if (_spectrumSlider == null || _colorShadingCanvas == null) - return; - - _currentColorPosition = null; - - HsvColor hsv = ColorUtilities.ConvertRgbToHsv(color.R, color.G, color.B); - _spectrumSlider.Value = hsv.H; - - Point p = new Point(hsv.S, 1 - hsv.V); - - _currentColorPosition = p; - - _colorShadeSelectorTransform.X = (p.X * _colorShadingCanvas.Width) - 5; - _colorShadeSelectorTransform.Y = (p.Y * _colorShadingCanvas.Height) - 5; - } - - private void CalculateColor(Point p) - { - HsvColor hsv = new HsvColor(360 - _spectrumSlider.Value, 1, 1) { S = p.X, V = 1 - p.Y }; - _currentColor = ColorUtilities.ConvertHsvToRgb(hsv.H, hsv.S, hsv.V); ; - _currentColor.ScA = ScA; - CurrentColor = _currentColor; - HexadecimalString = _currentColor.ToString(); - } - - #endregion //Methods - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorSpectrumSlider.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorSpectrumSlider.cs deleted file mode 100644 index c4eac2d8..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorSpectrumSlider.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Shapes; - -namespace Microsoft.Windows.Controls -{ - internal class ColorSpectrumSlider : Slider - { - #region Private Members - - private Rectangle _spectrumDisplay; - private LinearGradientBrush _pickerBrush; - - #endregion //Private Members - - #region Constructors - - static ColorSpectrumSlider() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(ColorSpectrumSlider), new FrameworkPropertyMetadata(typeof(ColorSpectrumSlider))); - } - - #endregion //Constructors - - #region Dependency Properties - - public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register("SelectedColor", typeof(Color), typeof(ColorSpectrumSlider), new PropertyMetadata(System.Windows.Media.Colors.Transparent)); - public Color SelectedColor - { - get { return (Color)GetValue(SelectedColorProperty); } - set { SetValue(SelectedColorProperty, value); } - } - - #endregion //Dependency Properties - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - _spectrumDisplay = (Rectangle)GetTemplateChild("PART_SpectrumDisplay"); - CreateSpectrum(); - OnValueChanged(Double.NaN, Value); - } - - protected override void OnValueChanged(double oldValue, double newValue) - { - base.OnValueChanged(oldValue, newValue); - - Color color = ColorUtilities.ConvertHsvToRgb(360 - newValue, 1, 1); - SelectedColor = color; - } - - #endregion //Base Class Overrides - - #region Methods - - private void CreateSpectrum() - { - _pickerBrush = new LinearGradientBrush(); - _pickerBrush.StartPoint = new Point(0.5, 0); - _pickerBrush.EndPoint = new Point(0.5, 1); - _pickerBrush.ColorInterpolationMode = ColorInterpolationMode.SRgbLinearInterpolation; - - List colorsList = ColorUtilities.GenerateHsvSpectrum(); - - double stopIncrement = (double)1 / colorsList.Count; - - int i; - for (i = 0; i < colorsList.Count; i++) - { - _pickerBrush.GradientStops.Add(new GradientStop(colorsList[i], i * stopIncrement)); - } - - _pickerBrush.GradientStops[i - 1].Offset = 1.0; - _spectrumDisplay.Fill = _pickerBrush; - } - - #endregion //Methods - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorUtilities.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorUtilities.cs deleted file mode 100644 index e621c22b..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorUtilities.cs +++ /dev/null @@ -1,156 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Media; - -namespace Microsoft.Windows.Controls -{ - internal static class ColorUtilities - { - /// - /// Converts an RGB color to an HSV color. - /// - /// - /// - /// - /// - public static HsvColor ConvertRgbToHsv(int r, int b, int g) - { - double delta, min; - double h = 0, s, v; - - min = Math.Min(Math.Min(r, g), b); - v = Math.Max(Math.Max(r, g), b); - delta = v - min; - - if (v == 0.0) - { - s = 0; - } - else - s = delta / v; - - if (s == 0) - h = 0.0; - - else - { - if (r == v) - h = (g - b) / delta; - else if (g == v) - h = 2 + (b - r) / delta; - else if (b == v) - h = 4 + (r - g) / delta; - - h *= 60; - if (h < 0.0) - h = h + 360; - - } - - return new HsvColor { H = h, S = s, V = v / 255 }; - } - - /// - /// Converts an HSV color to an RGB color. - /// - /// - /// - /// - /// - public static Color ConvertHsvToRgb(double h, double s, double v) - { - double r = 0, g = 0, b = 0; - - if (s == 0) - { - r = v; - g = v; - b = v; - } - else - { - int i; - double f, p, q, t; - - if (h == 360) - h = 0; - else - h = h / 60; - - i = (int)Math.Truncate(h); - f = h - i; - - p = v * (1.0 - s); - q = v * (1.0 - (s * f)); - t = v * (1.0 - (s * (1.0 - f))); - - switch (i) - { - case 0: - { - r = v; - g = t; - b = p; - break; - } - case 1: - { - r = q; - g = v; - b = p; - break; - } - case 2: - { - r = p; - g = v; - b = t; - break; - } - case 3: - { - r = p; - g = q; - b = v; - break; - } - case 4: - { - r = t; - g = p; - b = v; - break; - } - default: - { - r = v; - g = p; - b = q; - break; - } - } - - } - - return Color.FromArgb(255, (byte)(r * 255), (byte)(g * 255), (byte)(b * 255)); - } - - /// - /// Generates a list of colors with hues ranging from 0 360 and a saturation and value of 1. - /// - /// - public static List GenerateHsvSpectrum() - { - List colorsList = new List(8); - - for (int i = 0; i < 29; i++) - { - colorsList.Add(ColorUtilities.ConvertHsvToRgb(i * 12, 1, 1)); - } - - colorsList.Add(ColorUtilities.ConvertHsvToRgb(0, 1, 1)); - - return colorsList; - } - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/HsvColor.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/HsvColor.cs deleted file mode 100644 index eed5c3bd..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/HsvColor.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - internal struct HsvColor - { - public double H; - public double S; - public double V; - - public HsvColor(double h, double s, double v) - { - H = h; - S = s; - V = v; - } - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/UIElementAdorner.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/UIElementAdorner.cs deleted file mode 100644 index 263ca034..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/UIElementAdorner.cs +++ /dev/null @@ -1,215 +0,0 @@ -using System; -using System.Collections; -using System.Windows.Media; -using System.Windows.Documents; -using System.Windows; - -namespace Microsoft.Windows.Controls.Core -{ - /// - /// An adorner that can display one and only one UIElement. - /// That element can be a panel, which contains multiple other elements. - /// The element is added to the adorner's visual and logical trees, enabling it to - /// particpate in dependency property value inheritance, amongst other things. - /// - internal class UIElementAdorner - : Adorner - where TElement : UIElement - { - #region Fields - - TElement _child = null; - double _offsetLeft = 0; - double _offsetTop = 0; - - #endregion // Fields - - #region Constructor - - /// - /// Constructor. - /// - /// The element to which the adorner will be bound. - public UIElementAdorner(UIElement adornedElement) - : base(adornedElement) - { - } - - #endregion // Constructor - - #region Public Interface - - #region Child - - /// - /// Gets/sets the child element hosted in the adorner. - /// - public TElement Child - { - get { return _child; } - set - { - if (value == _child) - return; - - if (_child != null) - { - base.RemoveLogicalChild(_child); - base.RemoveVisualChild(_child); - } - - _child = value; - - if (_child != null) - { - base.AddLogicalChild(_child); - base.AddVisualChild(_child); - } - } - } - - #endregion // Child - - #region GetDesiredTransform - - /// - /// Override. - /// - /// - /// - public override GeneralTransform GetDesiredTransform(GeneralTransform transform) - { - GeneralTransformGroup result = new GeneralTransformGroup(); - result.Children.Add(base.GetDesiredTransform(transform)); - result.Children.Add(new TranslateTransform(_offsetLeft, _offsetTop)); - return result; - } - - #endregion // GetDesiredTransform - - #region OffsetLeft - - /// - /// Gets/sets the horizontal offset of the adorner. - /// - public double OffsetLeft - { - get { return _offsetLeft; } - set - { - _offsetLeft = value; - UpdateLocation(); - } - } - - #endregion // OffsetLeft - - #region SetOffsets - - /// - /// Updates the location of the adorner in one atomic operation. - /// - public void SetOffsets(double left, double top) - { - _offsetLeft = left; - _offsetTop = top; - this.UpdateLocation(); - } - - #endregion // SetOffsets - - #region OffsetTop - - /// - /// Gets/sets the vertical offset of the adorner. - /// - public double OffsetTop - { - get { return _offsetTop; } - set - { - _offsetTop = value; - UpdateLocation(); - } - } - - #endregion // OffsetTop - - #endregion // Public Interface - - #region Protected Overrides - - /// - /// Override. - /// - /// - /// - protected override Size MeasureOverride(Size constraint) - { - if (_child == null) - return base.MeasureOverride(constraint); - - _child.Measure(constraint); - return _child.DesiredSize; - } - - /// - /// Override. - /// - /// - /// - protected override Size ArrangeOverride(Size finalSize) - { - if (_child == null) - return base.ArrangeOverride(finalSize); - - _child.Arrange(new Rect(finalSize)); - return finalSize; - } - - /// - /// Override. - /// - protected override IEnumerator LogicalChildren - { - get - { - ArrayList list = new ArrayList(); - if (_child != null) - list.Add(_child); - return list.GetEnumerator(); - } - } - - /// - /// Override. - /// - /// - /// - protected override Visual GetVisualChild(int index) - { - return _child; - } - - /// - /// Override. - /// - protected override int VisualChildrenCount - { - get { return _child == null ? 0 : 1; } - } - - #endregion // Protected Overrides - - #region Private Helpers - - void UpdateLocation() - { - AdornerLayer adornerLayer = base.Parent as AdornerLayer; - if (adornerLayer != null) - adornerLayer.Update(base.AdornedElement); - } - - #endregion // Private Helpers - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png deleted file mode 100644 index 4304d43b..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png deleted file mode 100644 index 35075187..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png deleted file mode 100644 index dad7dd09..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png deleted file mode 100644 index ecb7fe86..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/MessageBox.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/MessageBox.cs deleted file mode 100644 index 317dd405..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/MessageBox.cs +++ /dev/null @@ -1,419 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Controls.Primitives; - -namespace Microsoft.Windows.Controls -{ - [TemplateVisualState(Name = VisualStates.OK, GroupName = VisualStates.MessageBoxButtonsGroup)] - [TemplateVisualState(Name = VisualStates.OKCancel, GroupName = VisualStates.MessageBoxButtonsGroup)] - [TemplateVisualState(Name = VisualStates.YesNo, GroupName = VisualStates.MessageBoxButtonsGroup)] - [TemplateVisualState(Name = VisualStates.YesNoCancel, GroupName = VisualStates.MessageBoxButtonsGroup)] - public class MessageBox : Control - { - #region Private Members - - /// - /// Tracks the MessageBoxButon value passed into the InitializeContainer method - /// - private MessageBoxButton _button = MessageBoxButton.OK; - - #endregion //Private Members - - #region Constructors - - static MessageBox() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(MessageBox), new FrameworkPropertyMetadata(typeof(MessageBox))); - } - - internal MessageBox() - { /*user cannot create instance */ } - - #endregion //Constructors - - #region Properties - - #region Protected Properties - - /// - /// A System.Windows.MessageBoxResult value that specifies which message box button was clicked by the user. - /// - protected MessageBoxResult MessageBoxResult = MessageBoxResult.None; - - protected Window Container { get; private set; } - protected Thumb DragWidget { get; private set; } - protected Button CloseButton { get; private set; } - - protected Button OkButton { get; private set; } - protected Button CancelButton { get; private set; } - protected Button YesButton { get; private set; } - protected Button NoButton { get; private set; } - - protected Button OkButton1 { get; private set; } - protected Button CancelButton1 { get; private set; } - protected Button YesButton1 { get; private set; } - protected Button NoButton1 { get; private set; } - - #endregion //Protected Properties - - #region Dependency Properties - - public static readonly DependencyProperty CaptionProperty = DependencyProperty.Register("Caption", typeof(string), typeof(MessageBox), 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(MessageBox), 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(MessageBox), new PropertyMetadata(null)); - public Style CloseButtonStyle - { - get { return (Style)GetValue(CloseButtonStyleProperty); } - set { SetValue(CloseButtonStyleProperty, value); } - } - - public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register("ImageSource", typeof(ImageSource), typeof(MessageBox), new UIPropertyMetadata(default(ImageSource))); - public ImageSource ImageSource - { - get { return (ImageSource)GetValue(ImageSourceProperty); } - set { SetValue(ImageSourceProperty, value); } - } - - public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(MessageBox), new UIPropertyMetadata(String.Empty)); - public string Text - { - get { return (string)GetValue(TextProperty); } - set { SetValue(TextProperty, value); } - } - - public static readonly DependencyProperty WindowBackgroundProperty = DependencyProperty.Register("WindowBackground", typeof(Brush), typeof(MessageBox), 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(MessageBox), 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(MessageBox), new PropertyMetadata(null)); - public double WindowOpacity - { - get { return (double)GetValue(WindowOpacityProperty); } - set { SetValue(WindowOpacityProperty, value); } - } - - #endregion //Dependency Properties - - #endregion //Properties - - #region Base Class Overrides - - /// - /// Overrides the OnApplyTemplate method. - /// - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - DragWidget = (Thumb)GetTemplateChild("PART_DragWidget"); - if (DragWidget != null) - DragWidget.DragDelta += (o, e) => ProcessMove(e); - - CloseButton = (Button)GetTemplateChild("PART_CloseButton"); - if (CloseButton != null) - CloseButton.Click += (o, e) => Close(); - - NoButton = (Button)GetTemplateChild("PART_NoButton"); - if (NoButton != null) - NoButton.Click += (o, e) => Button_Click(o, e); - - NoButton1 = (Button)GetTemplateChild("PART_NoButton1"); - if (NoButton1 != null) - NoButton1.Click += (o, e) => Button_Click(o, e); - - YesButton = (Button)GetTemplateChild("PART_YesButton"); - if (YesButton != null) - YesButton.Click += (o, e) => Button_Click(o, e); - - YesButton1 = (Button)GetTemplateChild("PART_YesButton1"); - if (YesButton1 != null) - YesButton1.Click += (o, e) => Button_Click(o, e); - - CancelButton = (Button)GetTemplateChild("PART_CancelButton"); - if (CancelButton != null) - CancelButton.Click += (o, e) => Button_Click(o, e); - - CancelButton1 = (Button)GetTemplateChild("PART_CancelButton1"); - if (CancelButton1 != null) - CancelButton1.Click += (o, e) => Button_Click(o, e); - - OkButton = (Button)GetTemplateChild("PART_OkButton"); - if (OkButton != null) - OkButton.Click += (o, e) => Button_Click(o, e); - - OkButton1 = (Button)GetTemplateChild("PART_OkButton1"); - if (OkButton1 != null) - OkButton1.Click += (o, e) => Button_Click(o, e); - - ChangeVisualState(_button.ToString(), true); - } - - #endregion //Base Class Overrides - - #region Methods - - #region Public Static - - /// - /// Displays a message box that has a message and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText) - { - return Show(messageText, string.Empty, MessageBoxButton.OK); - } - - /// - /// Displays a message box that has a message and title bar caption; and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.String that specifies the title bar caption to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText, string caption) - { - return Show(messageText, caption, MessageBoxButton.OK); - } - - /// - /// Displays a message box that has a message and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.String that specifies the title bar caption to display. - /// A System.Windows.MessageBoxButton value that specifies which button or buttons to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText, string caption, MessageBoxButton button) - { - return ShowCore(messageText, caption, button, MessageBoxImage.None); - } - - /// - /// Displays a message box that has a message and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.String that specifies the title bar caption to display. - /// A System.Windows.MessageBoxButton value that specifies which button or buttons to display. - /// A System.Windows.MessageBoxImage value that specifies the icon to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText, string caption, MessageBoxButton button, MessageBoxImage icon) - { - return ShowCore(messageText, caption, button, icon); - } - - #endregion //Public Static - - #region Private Static - - private static MessageBoxResult ShowCore(string messageText, string caption, MessageBoxButton button, MessageBoxImage icon) - { - MessageBox msgBox = new MessageBox(); - msgBox.InitializeMessageBox(messageText, caption, button, icon); - msgBox.Show(); - return msgBox.MessageBoxResult; - } - - /// - /// Resolves the owner Window of the MessageBox. - /// - /// - private static FrameworkElement ResolveOwner() - { - FrameworkElement owner = null; - if (Application.Current != null) - { - foreach (Window w in Application.Current.Windows) - { - if (w.IsActive) - { - owner = w; - break; - } - } - } - return owner; - } - - #endregion //Private Static - - #region Protected - - /// - /// Shows the MessageBox - /// - protected void Show() - { - Container.ShowDialog(); - } - - /// - /// Initializes the MessageBox. - /// - /// The text. - /// The caption. - /// The button. - /// The image. - protected void InitializeMessageBox(string text, string caption, MessageBoxButton button, MessageBoxImage image) - { - Text = text; - Caption = caption; - _button = button; - SetImageSource(image); - Container = CreateContainer(); - } - - /// - /// Changes the control's visual state(s). - /// - /// name of the state - /// True if state transitions should be used. - protected void ChangeVisualState(string name, bool useTransitions) - { - VisualStateManager.GoToState(this, name, useTransitions); - } - - #endregion //Protected - - #region Private - - /// - /// Sets the message image source. - /// - /// The image to show. - private void SetImageSource(MessageBoxImage image) - { - String iconName = String.Empty; - - switch (image) - { - case MessageBoxImage.Error: - { - iconName = "Error48.png"; - break; - } - case MessageBoxImage.Information: - { - iconName = "Information48.png"; - break; - } - case MessageBoxImage.Question: - { - iconName = "Question48.png"; - break; - } - case MessageBoxImage.Warning: - { - iconName = "Warning48.png"; - break; - } - case MessageBoxImage.None: - default: - { - return; - } - } - - ImageSource = (ImageSource)new ImageSourceConverter().ConvertFromString(String.Format("pack://application:,,,/WPFToolkit.Extended;component/MessageBox/Icons/{0}", iconName)); - } - - /// - /// Creates the container which will host the MessageBox control. - /// - /// - private Window CreateContainer() - { - return new Window() - { - AllowsTransparency = true, - Background = Brushes.Transparent, - Content = this, - Owner = Window.GetWindow(ResolveOwner()), - ShowInTaskbar = false, - SizeToContent = System.Windows.SizeToContent.WidthAndHeight, - ResizeMode = System.Windows.ResizeMode.NoResize, - WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner, - WindowStyle = System.Windows.WindowStyle.None - }; - } - - #endregion //Private - - #endregion //Methods - - #region Event Handlers - - /// - /// Processes the move of a drag operation on the header. - /// - /// The instance containing the event data. - private void ProcessMove(DragDeltaEventArgs e) - { - Container.Left = Container.Left + e.HorizontalChange; - Container.Top = Container.Top + e.VerticalChange; - } - - /// - /// Sets the MessageBoxResult according to the button pressed and then closes the MessageBox. - /// - /// The source of the event. - /// The instance containing the event data. - private void Button_Click(object sender, RoutedEventArgs e) - { - Button button = e.Source as Button; - switch (button.Name) - { - case "PART_NoButton": - case "PART_NoButton1": - MessageBoxResult = MessageBoxResult.No; - break; - case "PART_YesButton": - case "PART_YesButton1": - MessageBoxResult = MessageBoxResult.Yes; - break; - case "PART_CancelButton": - case "PART_CancelButton1": - MessageBoxResult = MessageBoxResult.Cancel; - break; - case "PART_OkButton": - case "PART_OkButton1": - MessageBoxResult = MessageBoxResult.OK; - break; - } - - Close(); - } - - /// - /// Closes the MessageBox. - /// - private void Close() - { - Container.Close(); - } - - #endregion //Event Handlers - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/VisualStates.MessageBox.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/VisualStates.MessageBox.cs deleted file mode 100644 index d47fcb08..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/VisualStates.MessageBox.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - internal static partial class VisualStates - { - public const string MessageBoxButtonsGroup = "MessageBoxButtonsGroup"; - - public const string OK = "OK"; - - public const string OKCancel = "OKCancel"; - - public const string YesNo = "YesNo"; - - public const string YesNoCancel = "YesNoCancel"; - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs deleted file mode 100644 index 4ae1e983..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.Windows; -using System.Globalization; - -namespace Microsoft.Windows.Controls -{ - public class NumericUpDown : UpDownBase - { - #region Properties - - #region Minimum - - public static readonly DependencyProperty MinimumProperty = DependencyProperty.Register("Minimum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(Double.MinValue, OnMinimumPropertyChanged)); - public double Minimum - { - get { return (double)GetValue(MinimumProperty); } - set { SetValue(MinimumProperty, value); } - } - - private static void OnMinimumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - } - - protected virtual void OnMinimumChanged(double oldValue, double newValue) - { - } - #endregion Minimum - - #region Maximum - - public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register("Maximum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(Double.MaxValue, OnMaximumPropertyChanged)); - public double Maximum - { - get { return (double)GetValue(MaximumProperty); } - set { SetValue(MaximumProperty, value); } - } - - private static void OnMaximumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - } - - protected virtual void OnMaximumChanged(double oldValue, double newValue) - { - } - #endregion Maximum - - #region Increment - - public static readonly DependencyProperty IncrementProperty = DependencyProperty.Register("Increment", typeof(double), typeof(NumericUpDown), new PropertyMetadata(1d, OnIncrementPropertyChanged)); - public double Increment - { - get { return (double)GetValue(IncrementProperty); } - set { SetValue(IncrementProperty, value); } - } - - private static void OnIncrementPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - } - - protected virtual void OnIncrementChanged(double oldValue, double newValue) - { - } - - #endregion - - #region FormatString - - public static readonly DependencyProperty StringFormatProperty = DependencyProperty.Register("FormatString", typeof(string), typeof(NumericUpDown), new PropertyMetadata("F0", OnStringFormatPropertyPropertyChanged)); - public string FormatString - { - get { return (string)GetValue(StringFormatProperty); } - set { SetValue(StringFormatProperty, value); } - } - - private static void OnStringFormatPropertyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - NumericUpDown nud = d as NumericUpDown; - nud.OnStringFormatChanged(e.OldValue.ToString(), e.NewValue.ToString()); - } - - protected virtual void OnStringFormatChanged(string oldValue, string newValue) - { - Text = FormatValue(); - } - - #endregion //FormatString - - #endregion - - #region Constructors - - static NumericUpDown() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(NumericUpDown), new FrameworkPropertyMetadata(typeof(NumericUpDown))); - } - - #endregion //Constructors - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - SetValidSpinDirection(); - } - - protected override void OnValueChanged(RoutedPropertyChangedEventArgs e) - { - SetValidSpinDirection(); - } - - protected override double ParseValue(string text) - { - NumberFormatInfo info = NumberFormatInfo.GetInstance(CultureInfo.CurrentCulture); - if (text.Contains(info.PercentSymbol)) - return TryParcePercent(text, info); - else - return TryParceDouble(text, info); - } - - protected internal override string FormatValue() - { - return Value.ToString(FormatString, CultureInfo.CurrentCulture); - } - - protected override void OnIncrement() - { - Value = (double)((decimal)Value + (decimal)Increment); - } - - protected override void OnDecrement() - { - Value = (double)((decimal)Value - (decimal)Increment); - } - - #endregion //Base Class Overrides - - #region Methods - - /// - /// Sets the valid spin direction based on current value, minimum and maximum. - /// - private void SetValidSpinDirection() - { - ValidSpinDirections validDirections = ValidSpinDirections.None; - - if (Value < Maximum) - { - validDirections = validDirections | ValidSpinDirections.Increase; - } - - if (Value > Minimum) - { - validDirections = validDirections | ValidSpinDirections.Decrease; - } - - if (Spinner != null) - { - Spinner.ValidSpinDirection = validDirections; - } - } - - private double TryParcePercent(string text, NumberFormatInfo info) - { - double result; - text = text.Replace(info.PercentSymbol, null); - result = TryParceDouble(text, info); - return result / 100; - } - - private double TryParceDouble(string text, NumberFormatInfo info) - { - double result; - if (!double.TryParse(text, NumberStyles.Any, info, out result)) - { - //an error occured now lets reset our value, text, and the text in the textbox - result = Value; - TextBox.Text = Text = FormatValue(); - } - return result; - } - - #endregion //Methods - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs deleted file mode 100644 index 3ce0496e..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Markup; - -// 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("Extended WPF Toolkit")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Extended WPF Toolkit")] -[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.2.0.0")] -[assembly: AssemblyFileVersion("1.2.0.0")] - -[assembly: XmlnsPrefix("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "extToolkit")] -[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "Microsoft.Windows.Controls")] diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs deleted file mode 100644 index eaf63633..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 Microsoft.Windows.Controls.Properties { - using System; - - - /// - /// 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 (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Windows.Controls.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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.resx b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.resx deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs deleted file mode 100644 index 4a0f1423..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 Microsoft.Windows.Controls.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.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.settings b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.settings deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/ITextFormatter.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/ITextFormatter.cs deleted file mode 100644 index f8e22d41..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/ITextFormatter.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Windows.Documents; - -namespace Microsoft.Windows.Controls -{ - public interface ITextFormatter - { - string GetText(FlowDocument document); - void SetText(FlowDocument document, string text); - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/PlainTextFormatter.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/PlainTextFormatter.cs deleted file mode 100644 index 1c792a32..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/PlainTextFormatter.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Windows.Documents; - -namespace Microsoft.Windows.Controls -{ - /// - /// Formats the RichTextBox text as plain text - /// - public class PlainTextFormatter : ITextFormatter - { - public string GetText(FlowDocument document) - { - return new TextRange(document.ContentStart, document.ContentEnd).Text; - } - - public void SetText(FlowDocument document, string text) - { - new TextRange(document.ContentStart, document.ContentEnd).Text = text; - } - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/RtfFormatter.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/RtfFormatter.cs deleted file mode 100644 index e5a1def6..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/RtfFormatter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Text; -using System.Windows.Documents; -using System.IO; -using System.Windows; - -namespace Microsoft.Windows.Controls -{ - /// - /// Formats the RichTextBox text as RTF - /// - public class RtfFormatter : ITextFormatter - { - public string GetText(FlowDocument document) - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream()) - { - tr.Save(ms, DataFormats.Rtf); - return ASCIIEncoding.Default.GetString(ms.ToArray()); - } - } - - public void SetText(FlowDocument document, string text) - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes(text))) - { - tr.Load(ms, DataFormats.Rtf); - } - } - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/XamlFormatter.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/XamlFormatter.cs deleted file mode 100644 index 07e1d31a..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/XamlFormatter.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Text; -using System.IO; -using System.Windows.Documents; -using System.Windows; - -namespace Microsoft.Windows.Controls -{ - /// - /// Formats the RichTextBox text as Xaml - /// - public class XamlFormatter : ITextFormatter - { - public string GetText(System.Windows.Documents.FlowDocument document) - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream()) - { - tr.Save(ms, DataFormats.Xaml); - return ASCIIEncoding.Default.GetString(ms.ToArray()); - } - } - - public void SetText(System.Windows.Documents.FlowDocument document, string text) - { - try - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes(text))) - { - tr.Load(ms, DataFormats.Xaml); - } - } - catch - { - throw new InvalidDataException("data provided is not in the correct Xaml format."); - } - } - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/RichTextBox.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/RichTextBox.cs deleted file mode 100644 index c8015e32..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/RichTextBox.cs +++ /dev/null @@ -1,135 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Data; -using System.Windows.Threading; - -namespace Microsoft.Windows.Controls -{ - public class RichTextBox : System.Windows.Controls.RichTextBox - { - #region Private Members - - private bool _textHasLoaded; - private bool isInvokePending; - - #endregion //Private Members - - #region Constructors - - public RichTextBox() - { - Loaded += RichTextBox_Loaded; - } - - public RichTextBox(System.Windows.Documents.FlowDocument document) - : base(document) - { - - } - - #endregion //Constructors - - #region Properties - - #region Text - - public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(RichTextBox), new FrameworkPropertyMetadata(String.Empty, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnTextPropertyChanged, CoerceTextProperty, true, UpdateSourceTrigger.LostFocus)); - public string Text - { - get { return (string)GetValue(TextProperty); } - set { SetValue(TextProperty, value); } - } - - private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - RichTextBox rtb = (RichTextBox)d; - - if (!rtb._textHasLoaded) - { - rtb.TextFormatter.SetText(rtb.Document, (string)e.NewValue); - rtb._textHasLoaded = true; - } - } - - private static object CoerceTextProperty(DependencyObject d, object value) - { - return value ?? ""; - } - - #endregion //Text - - #region TextFormatter - - private ITextFormatter _textFormatter; - /// - /// The ITextFormatter the is used to format the text of the RichTextBox. - /// Deafult formatter is the RtfFormatter - /// - public ITextFormatter TextFormatter - { - get - { - if (_textFormatter == null) - _textFormatter = new RtfFormatter(); //default is rtf - - return _textFormatter; - } - set - { - _textFormatter = value; - } - } - - #endregion //TextFormatter - - #endregion //Properties - - #region Methods - - private void InvokeUpdateText() - { - if (!isInvokePending) - { - Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(UpdateText)); - isInvokePending = true; - } - } - - private void UpdateText() - { - //when the Text is null and the Text hasn't been loaded, it indicates that the OnTextPropertyChanged event hasn't exceuted - //and since we are initializing the text from here, we don't want the OnTextPropertyChanged to execute, so set the loaded flag to true. - //this prevents the cursor to jumping to the front of the textbox after the first letter is typed. - if (!_textHasLoaded && string.IsNullOrEmpty(Text)) - _textHasLoaded = true; - - if (_textHasLoaded) - Text = TextFormatter.GetText(Document); - - isInvokePending = false; - } - - #endregion //Methods - - #region Event Hanlders - - private void RichTextBox_Loaded(object sender, RoutedEventArgs e) - { - Binding binding = BindingOperations.GetBinding(this, TextProperty); - - if (binding != null) - { - if (binding.UpdateSourceTrigger == UpdateSourceTrigger.Default || binding.UpdateSourceTrigger == UpdateSourceTrigger.LostFocus) - { - PreviewLostKeyboardFocus += (o, ea) => UpdateText(); //do this synchronously - } - else - { - TextChanged += (o, ea) => InvokeUpdateText(); //do this async - } - } - } - - #endregion //Event Hanlders - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/IRichTextBoxFormatBar.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/IRichTextBoxFormatBar.cs deleted file mode 100644 index 46c38afe..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/IRichTextBoxFormatBar.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - public interface IRichTextBoxFormatBar - { - /// - /// Represents the RichTextBox that will be the target for all text manipulations in the format bar. - /// - global::System.Windows.Controls.RichTextBox Target { get; set; } - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png deleted file mode 100644 index 8fb36a1a..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png deleted file mode 100644 index 1030a021..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png deleted file mode 100644 index 8259a9e1..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png deleted file mode 100644 index c5499bce..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png deleted file mode 100644 index 51dffb73..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png deleted file mode 100644 index cb8e400a..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png deleted file mode 100644 index 72689482..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml deleted file mode 100644 index 6d919c41..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs deleted file mode 100644 index 65e78914..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs +++ /dev/null @@ -1,162 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Controls.Primitives; -using Microsoft.Windows.Controls.Core; - -namespace Microsoft.Windows.Controls -{ - /// - /// Interaction logic for RichTextBoxFormatBar.xaml - /// - public partial class RichTextBoxFormatBar : UserControl, IRichTextBoxFormatBar - { - #region Properties - - #region RichTextBox - - public static readonly DependencyProperty TargetProperty = DependencyProperty.Register("Target", typeof(global::System.Windows.Controls.RichTextBox), typeof(RichTextBoxFormatBar), new PropertyMetadata(null, OnRichTextBoxPropertyChanged)); - public global::System.Windows.Controls.RichTextBox Target - { - get { return (global::System.Windows.Controls.RichTextBox)GetValue(TargetProperty); } - set { SetValue(TargetProperty, value); } - } - - private static void OnRichTextBoxPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - RichTextBoxFormatBar formatBar = d as RichTextBoxFormatBar; - formatBar.HookupRichTextBoxEvents(); - } - - private void HookupRichTextBoxEvents() - { - Target.SelectionChanged += RichTextBox_SelectionChanged; - } - - #endregion //RichTextBox - - public static double[] FontSizes - { - get - { - return new double[] { - 3.0, 4.0, 5.0, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, - 10.0, 10.5, 11.0, 11.5, 12.0, 12.5, 13.0, 13.5, 14.0, 15.0, - 16.0, 17.0, 18.0, 19.0, 20.0, 22.0, 24.0, 26.0, 28.0, 30.0, - 32.0, 34.0, 36.0, 38.0, 40.0, 44.0, 48.0, 52.0, 56.0, 60.0, 64.0, 68.0, 72.0, 76.0, - 80.0, 88.0, 96.0, 104.0, 112.0, 120.0, 128.0, 136.0, 144.0 - }; - } - } - - #endregion - - #region Constructors - - public RichTextBoxFormatBar() - { - InitializeComponent(); - Loaded += FormatToolbar_Loaded; - } - - #endregion //Constructors - - #region Event Hanlders - - void FormatToolbar_Loaded(object sender, RoutedEventArgs e) - { - _cmbFontFamilies.ItemsSource = Fonts.SystemFontFamilies; - _cmbFontSizes.ItemsSource = FontSizes; - } - - private void FontFamily_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (e.AddedItems.Count == 0) - return; - - FontFamily editValue = (FontFamily)e.AddedItems[0]; - ApplyPropertyValueToSelectedText(TextElement.FontFamilyProperty, editValue); - } - - private void FontSize_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (e.AddedItems.Count == 0) - return; - - ApplyPropertyValueToSelectedText(TextElement.FontSizeProperty, e.AddedItems[0]); - } - - void RichTextBox_SelectionChanged(object sender, RoutedEventArgs e) - { - UpdateVisualState(); - } - - private void DragWidget_DragDelta(object sender, DragDeltaEventArgs e) - { - ProcessMove(e); - } - - #endregion //Event Hanlders - - #region Methods - - private void UpdateVisualState() - { - UpdateToggleButtonState(); - UpdateSelectedFontFamily(); - UpdateSelectedFontSize(); - } - - private void UpdateToggleButtonState() - { - UpdateItemCheckedState(_btnBold, TextElement.FontWeightProperty, FontWeights.Bold); - UpdateItemCheckedState(_btnItalic, TextElement.FontStyleProperty, FontStyles.Italic); - UpdateItemCheckedState(_btnUnderline, Inline.TextDecorationsProperty, TextDecorations.Underline); - - UpdateItemCheckedState(_btnAlignLeft, Paragraph.TextAlignmentProperty, TextAlignment.Left); - UpdateItemCheckedState(_btnAlignCenter, Paragraph.TextAlignmentProperty, TextAlignment.Center); - UpdateItemCheckedState(_btnAlignRight, Paragraph.TextAlignmentProperty, TextAlignment.Right); - } - - void UpdateItemCheckedState(ToggleButton button, DependencyProperty formattingProperty, object expectedValue) - { - object currentValue = Target.Selection.GetPropertyValue(formattingProperty); - button.IsChecked = (currentValue == DependencyProperty.UnsetValue) ? false : currentValue != null && currentValue.Equals(expectedValue); - } - - private void UpdateSelectedFontFamily() - { - object value = Target.Selection.GetPropertyValue(TextElement.FontFamilyProperty); - FontFamily currentFontFamily = (FontFamily)((value == DependencyProperty.UnsetValue) ? null : value); - if (currentFontFamily != null) - { - _cmbFontFamilies.SelectedItem = currentFontFamily; - } - } - - private void UpdateSelectedFontSize() - { - object value = Target.Selection.GetPropertyValue(TextElement.FontSizeProperty); - _cmbFontSizes.SelectedValue = (value == DependencyProperty.UnsetValue) ? null : value; - } - - void ApplyPropertyValueToSelectedText(DependencyProperty formattingProperty, object value) - { - if (value == null) - return; - - Target.Selection.ApplyPropertyValue(formattingProperty, value); - } - - private void ProcessMove(DragDeltaEventArgs e) - { - AdornerLayer layer = AdornerLayer.GetAdornerLayer(Target); - UIElementAdorner adorner = layer.GetAdorners(Target)[0] as UIElementAdorner; - adorner.SetOffsets(adorner.OffsetLeft + e.HorizontalChange, adorner.OffsetTop + e.VerticalChange); - } - - #endregion //Methods - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBarManager.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBarManager.cs deleted file mode 100644 index d7553cf7..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBarManager.cs +++ /dev/null @@ -1,187 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using Microsoft.Windows.Controls.Core; -using System.Windows.Input; - -namespace Microsoft.Windows.Controls -{ - public class RichTextBoxFormatBarManager : DependencyObject - { - #region Members - - private global::System.Windows.Controls.RichTextBox _richTextBox; - private UIElementAdorner _adorner; - private IRichTextBoxFormatBar _toolbar; - - #endregion //Members - - #region Properties - - #region FormatBar - - public static readonly DependencyProperty FormatBarProperty = DependencyProperty.RegisterAttached("FormatBar", typeof(IRichTextBoxFormatBar), typeof(RichTextBox), new PropertyMetadata(null, OnFormatBarPropertyChanged)); - public static void SetFormatBar(UIElement element, IRichTextBoxFormatBar value) - { - element.SetValue(FormatBarProperty, value); - } - public static IRichTextBoxFormatBar GetFormatBar(UIElement element) - { - return (IRichTextBoxFormatBar)element.GetValue(FormatBarProperty); - } - - private static void OnFormatBarPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - global::System.Windows.Controls.RichTextBox rtb = d as global::System.Windows.Controls.RichTextBox; - if (rtb == null) - throw new Exception("A FormatBar can only be applied to a RichTextBox."); - - RichTextBoxFormatBarManager manager = new RichTextBoxFormatBarManager(); - manager.AttachFormatBarToRichtextBox(rtb, e.NewValue as IRichTextBoxFormatBar); - } - - #endregion //FormatBar - - bool AdornerIsVisible - { - get { return _adorner.Visibility == Visibility.Visible; } - } - - #endregion //Properties - - #region Event Handlers - - void RichTextBox_MouseButtonUp(object sender, MouseButtonEventArgs e) - { - if (e.LeftButton == MouseButtonState.Released) - { - TextRange selectedText = new TextRange(_richTextBox.Selection.Start, _richTextBox.Selection.End); - if (selectedText.Text.Length > 0 && !String.IsNullOrWhiteSpace(selectedText.Text)) - { - ShowAdorner(); - } - else - { - HideAdorner(); - } - } - - e.Handled = true; - } - - void RichTextBox_PreviewMouseMove(object sender, MouseEventArgs e) - { - //if the mouse moves outside the richtextbox bounds hide the adorner - //though this deosn't always work, especially if the user moves the mouse very quickly. - //need to find a better solution, but this will work for now. - Point p = e.GetPosition(_richTextBox); - if (p.X <= 5.0 || p.X >= _richTextBox.ActualWidth - 5 || p.Y <= 3.0 || p.Y >= _richTextBox.ActualHeight - 3) - HideAdorner(); - } - - void RichTextBox_TextChanged(object sender, TextChangedEventArgs e) - { - //this fixes the bug when applying text transformations the text would lose it's highlight. That was because the RichTextBox was losing focus - //so we just give it focus again and it seems to do the trick of re-highlighting it. - if (!_richTextBox.IsFocused) - _richTextBox.Focus(); - } - - #endregion //Event Handlers - - #region Methods - - /// - /// Attaches a FormatBar to a RichtextBox - /// - /// The RichtextBox to attach to. - /// The Formatbar to attach. - private void AttachFormatBarToRichtextBox(global::System.Windows.Controls.RichTextBox richTextBox, IRichTextBoxFormatBar formatBar) - { - _richTextBox = richTextBox; - _richTextBox.PreviewMouseMove += RichTextBox_PreviewMouseMove; - //we cannot use the PreviewMouseLeftButtonUp event because of selection bugs. - //we cannot use the MouseLeftButtonUp event because it is handled by the RichTextBox and does not bubble up to here, so we must - //add a hander to the MouseUpEvent using the Addhandler syntax, and specify to listen for handled events too. - _richTextBox.AddHandler(Mouse.MouseUpEvent, new MouseButtonEventHandler(RichTextBox_MouseButtonUp), true); - _richTextBox.TextChanged += RichTextBox_TextChanged; - - _adorner = new UIElementAdorner(_richTextBox); - - formatBar.Target = _richTextBox; - _toolbar = formatBar; - } - - /// - /// Shows the FormatBar - /// - void ShowAdorner() - { - VerifyAdornerLayer(); - - Control adorningEditor = _toolbar as Control; - _adorner.Child = adorningEditor; - _adorner.Visibility = Visibility.Visible; - - PositionFormatBar(adorningEditor); - } - - /// - /// Positions the FormatBar so that is does not go outside the bounds of the RichTextBox or covers the selected text - /// - /// - private void PositionFormatBar(Control adorningEditor) - { - Point mousePosition = Mouse.GetPosition(_richTextBox); - - double left = mousePosition.X; - double top = (mousePosition.Y - 15) - adorningEditor.ActualHeight; - - //top - if (top < 0) - { - top = mousePosition.Y + 10; - } - - //right boundary - if (left + adorningEditor.ActualWidth > _richTextBox.ActualWidth - 20) - { - left = left - (adorningEditor.ActualWidth - (_richTextBox.ActualWidth - left)); - } - - _adorner.SetOffsets(left, top); - } - - /// - /// Ensures that the IRichTextFormatBar is in the adorner layer. - /// - /// True if the IRichTextFormatBar is in the adorner layer, else false. - bool VerifyAdornerLayer() - { - if (_adorner.Parent != null) - return true; - - AdornerLayer layer = AdornerLayer.GetAdornerLayer(_richTextBox); - if (layer == null) - return false; - - layer.Add(_adorner); - return true; - } - - /// - /// Hides the IRichTextFormatBar that is in the adornor layer. - /// - void HideAdorner() - { - if (AdornerIsVisible) - { - _adorner.Visibility = Visibility.Collapsed; - _adorner.Child = null; - } - } - - #endregion //Methods - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml deleted file mode 100644 index b2b3f717..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml +++ /dev/null @@ -1,1109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Collapsed - - - - - - - Collapsed - - - - - - - - - - - Visible - - - - - - - Visible - - - - - - - - - - - - - True - - - - - - - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/UpDownBase/UpDownBase.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/UpDownBase/UpDownBase.cs deleted file mode 100644 index aed90390..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/UpDownBase/UpDownBase.cs +++ /dev/null @@ -1,321 +0,0 @@ -using System; -using System.Windows.Input; -using System.Windows.Controls; -using System.Windows; - -namespace Microsoft.Windows.Controls -{ - public abstract class UpDownBase : Control - { - #region Members - - /// - /// Name constant for Text template part. - /// - internal const string ElementTextName = "Text"; - - /// - /// Name constant for Spinner template part. - /// - internal const string ElementSpinnerName = "Spinner"; - - /// - /// Flags if the Text and Value properties are in the process of being sync'd - /// - bool _isSyncingTextAndValueProperties; - - #endregion //Members - - #region Properties - - #region Value - - public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(T), typeof(UpDownBase), new FrameworkPropertyMetadata(default(T), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValuePropertyChanged)); - public virtual T Value - { - get { return (T)GetValue(ValueProperty); } - set { SetValue(ValueProperty, value); } - } - - private static void OnValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - UpDownBase udb = (UpDownBase)d; - T oldValue = (T)e.OldValue; - T newValue = (T)e.NewValue; - - udb.SyncTextAndValueProperties(e.Property, e.NewValue); - - RoutedPropertyChangedEventArgs changedArgs = new RoutedPropertyChangedEventArgs(oldValue, newValue); - udb.OnValueChanged(changedArgs); - } - - protected virtual void OnValueChanged(RoutedPropertyChangedEventArgs e) - { - if (ValueChanged != null) - ValueChanged(this, e); - } - - #endregion //Value - - #region Text - - public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(UpDownBase), new FrameworkPropertyMetadata("0", FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnTextPropertyChanged)); - public string Text - { - get { return (string)GetValue(TextProperty); } - set { SetValue(TextProperty, value); } - } - - private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - UpDownBase udb = (UpDownBase)d; - udb.SyncTextAndValueProperties(e.Property, e.NewValue); - } - - #endregion //Text - - #region IsEditable - - public static readonly DependencyProperty IsEditableProperty = DependencyProperty.Register("IsEditable", typeof(bool), typeof(UpDownBase), new PropertyMetadata(true, OnIsEditablePropertyChanged)); - public bool IsEditable - { - get { return (bool)GetValue(IsEditableProperty); } - set { SetValue(IsEditableProperty, value); } - } - - private static void OnIsEditablePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - UpDownBase source = d as UpDownBase; - source.OnIsEditableChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnIsEditableChanged(bool oldValue, bool newValue) - { - if (TextBox != null) - TextBox.IsReadOnly = !IsEditable; - } - - #endregion //IsEditable - - internal TextBox TextBox { get; private set; } - - private Spinner _spinner; - internal Spinner Spinner - { - get { return _spinner; } - private set - { - _spinner = value; - _spinner.Spin += OnSpinnerSpin; - } - } - - #endregion //Properties - - #region Constructors - - protected UpDownBase() { } - - #endregion //Constructors - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - TextBox = GetTemplateChild(ElementTextName) as TextBox; - Spinner = GetTemplateChild(ElementSpinnerName) as Spinner; - - if (TextBox != null) - TextBox.IsReadOnly = !IsEditable; - } - - protected override void OnPreviewKeyDown(KeyEventArgs e) - { - switch (e.Key) - { - case Key.Up: - { - DoIncrement(); - e.Handled = true; - break; - } - case Key.Down: - { - DoDecrement(); - e.Handled = true; - break; - } - case Key.Enter: - { - SyncTextAndValueProperties(UpDownBase.TextProperty, TextBox.Text); - break; - } - } - } - - protected override void OnMouseWheel(MouseWheelEventArgs e) - { - base.OnMouseWheel(e); - - if (!e.Handled) - { - if (e.Delta < 0) - { - DoDecrement(); - } - else if (0 < e.Delta) - { - DoIncrement(); - } - - e.Handled = true; - } - } - - #endregion //Base Class Overrides - - #region Methods - - #region Abstract - - /// - /// Called by ApplyValue to parse user input. - /// - /// User input. - /// Value parsed from user input. - protected abstract T ParseValue(string text); - - /// - /// Renders the value property into the textbox text. - /// - /// Formatted Value. - protected internal abstract string FormatValue(); - - /// - /// Called by OnSpin when the spin direction is SpinDirection.Increase. - /// - protected abstract void OnIncrement(); - - /// - /// Called by OnSpin when the spin direction is SpinDirection.Descrease. - /// - protected abstract void OnDecrement(); - - #endregion //Abstract - - #region Protected - - /// - /// GetValue override to return Value property as object type. - /// - /// The Value property as object type. - protected object GetValue() - { - return Value; - } - - /// - /// SetValue override to set value to Value property. - /// - /// New value. - protected void SetValue(object value) - { - Value = (T)value; - } - - #endregion //Protected - - #region Private - - /// - /// Performs an increment if conditions allow it. - /// - private void DoDecrement() - { - if (Spinner == null || (Spinner.ValidSpinDirection & ValidSpinDirections.Decrease) == ValidSpinDirections.Decrease) - { - OnDecrement(); - } - } - - /// - /// Performs a decrement if conditions allow it. - /// - private void DoIncrement() - { - if (Spinner == null || (Spinner.ValidSpinDirection & ValidSpinDirections.Increase) == ValidSpinDirections.Increase) - { - OnIncrement(); - } - } - - protected void SyncTextAndValueProperties(DependencyProperty p, object newValue) - { - //prevents recursive syncing properties - if (_isSyncingTextAndValueProperties) - return; - - _isSyncingTextAndValueProperties = true; - - //this only occures when the user typed in the value - if (UpDownBase.TextProperty == p) - { - SetValue(UpDownBase.ValueProperty, ParseValue(newValue.ToString())); - } - - //we need to update the text no matter what because the user could have used the spin buttons to change dthe value - //or typed in the textbox so we need to reformat the entered value. - SetValue(UpDownBase.TextProperty, FormatValue()); - - _isSyncingTextAndValueProperties = false; - } - - #endregion //Private - - #region Virtual - - /// - /// Occurs when the spinner spins. - /// - /// Event args. - protected virtual void OnSpin(SpinEventArgs e) - { - if (e == null) - throw new ArgumentNullException("e"); - - if (e.Direction == SpinDirection.Increase) - DoIncrement(); - else - DoDecrement(); - } - - #endregion //Virtual - - #endregion //Methods - - #region Event Handlers - - /// - /// Event handler for Spinner template part's Spin event. - /// - /// The Spinner template part. - /// Event args. - private void OnSpinnerSpin(object sender, SpinEventArgs e) - { - OnSpin(e); - } - - #endregion //Event Handlers - - #region Events - - /// - /// Occurs when Value property has changed. - /// - public event RoutedPropertyChangedEventHandler ValueChanged; - - #endregion //Events - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/VisualStates.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/VisualStates.cs deleted file mode 100644 index 721a96e2..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/VisualStates.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - internal static partial class VisualStates - { - - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj deleted file mode 100644 index 738ae7e2..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj +++ /dev/null @@ -1,157 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {72E591D6-8F83-4D8C-8F67-9C325E623234} - library - Properties - Microsoft.Windows.Controls - WPFToolkit.Extended - v4.0 - Client - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - SAK - SAK - SAK - SAK - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - 4.0 - - - - - - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - - - - - - - - - - - - - - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - RichTextBoxFormatBar.xaml - - - - - - - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc b/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.2.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln deleted file mode 100644 index e1ed3032..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln +++ /dev/null @@ -1,29 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFToolkit.Extended", "Src\WPFToolkit.Extended\WPFToolkit.Extended.csproj", "{72E591D6-8F83-4D8C-8F67-9C325E623234}" -EndProject -Global - GlobalSection(TeamFoundationVersionControl) = preSolution - SccNumberOfProjects = 2 - 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 - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - 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}.Release|Any CPU.ActiveCfg = Release|Any CPU - {72E591D6-8F83-4D8C-8F67-9C325E623234}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.vssscc b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.vssscc deleted file mode 100644 index 794f014c..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.vssscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/BusyIndicator.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/BusyIndicator.cs deleted file mode 100644 index 6a73cd8f..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/BusyIndicator.cs +++ /dev/null @@ -1,266 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/VisualStates.BusyIndicator.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/VisualStates.BusyIndicator.cs deleted file mode 100644 index 5d78d952..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/VisualStates.BusyIndicator.cs +++ /dev/null @@ -1,37 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/ButtonSpinner.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/ButtonSpinner.cs deleted file mode 100644 index b2c2ad99..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/ButtonSpinner.cs +++ /dev/null @@ -1,191 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/SpinDirection.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/SpinDirection.cs deleted file mode 100644 index aaa121fb..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/SpinDirection.cs +++ /dev/null @@ -1,21 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/SpinEventArgs.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/SpinEventArgs.cs deleted file mode 100644 index f8a89385..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/SpinEventArgs.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Spinner.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Spinner.cs deleted file mode 100644 index 20b8d1cb..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Spinner.cs +++ /dev/null @@ -1,77 +0,0 @@ -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; - - if ((ValidSpinDirection & valid) != valid) - { - // spin is not allowed. - throw new InvalidOperationException("Spin action is not valid at this moment."); - } - - 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.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/ValidSpinDirections.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/ValidSpinDirections.cs deleted file mode 100644 index d744620d..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/ValidSpinDirections.cs +++ /dev/null @@ -1,26 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ChildWindow/ChildWindow.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ChildWindow/ChildWindow.cs deleted file mode 100644 index 8a44695d..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ChildWindow/ChildWindow.cs +++ /dev/null @@ -1,482 +0,0 @@ -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; - -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 TranslateTransform _moveTransform = new TranslateTransform(); - private bool _startupPositionInitialized; - private bool _isMouseCaptured; - private Point _clickPoint; - private Point _oldPosition; - private Border _dragWidget; - private FrameworkElement _parent; - - #endregion //Private Members - - #region Constructors - - static ChildWindow() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(ChildWindow), new FrameworkPropertyMetadata(typeof(ChildWindow))); - } - - public ChildWindow() - { - LayoutUpdated += (o, e) => - { - //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 //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; - - //TODO: move somewhere else - _parent = VisualTreeHelper.GetParent(this) as FrameworkElement; - _parent.SizeChanged += (o, ea) => - { - Overlay.Height = ea.NewSize.Height; - Overlay.Width = ea.NewSize.Width; - }; - - ChangeVisualState(); - } - - #endregion //Base Class Overrides - - #region Properties - - #region Internal Properties - - internal Panel Overlay { get; private set; } - 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(true)); - public bool IsModal - { - get { return (bool)GetValue(IsModalProperty); } - set { SetValue(IsModalProperty, value); } - } - - #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 - } - } - - #endregion //Event Handlers - - #region Methods - - #region Private - - private double GetRestrictedLeft() - { - if (_parent != null) - { - if (Left < 0) - { - return 0; - } - - if (Left + WindowRoot.ActualWidth > _parent.ActualWidth) - { - return _parent.ActualWidth - WindowRoot.ActualWidth; - } - } - - return Left; - } - - private double GetRestrictedTop() - { - if (_parent != null) - { - if (Top < 0) - { - return 0; - } - - if (Top + WindowRoot.ActualHeight > _parent.ActualHeight) - { - return _parent.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 - SetZIndex(); - } - - private void SetZIndex() - { - if (_parent != null) - { - int parentIndex = (int)_parent.GetValue(Canvas.ZIndexProperty); - this.SetValue(Canvas.ZIndexProperty, ++parentIndex); - } - else - { - this.SetValue(Canvas.ZIndexProperty, 1); - } - } - - private void SetStartupPosition() - { - CenterChildWindow(); - } - - private void CenterChildWindow() - { - _moveTransform.X = _moveTransform.Y = 0; - - if (_parent != null) - { - Left = (_parent.ActualWidth - WindowRoot.ActualWidth) / 2.0; - Top = (_parent.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); - } - } - - #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.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ChildWindow/VisualStates.ChildWindow.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ChildWindow/VisualStates.ChildWindow.cs deleted file mode 100644 index eb3a4ea9..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ChildWindow/VisualStates.ChildWindow.cs +++ /dev/null @@ -1,22 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ChildWindow/WindowState.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ChildWindow/WindowState.cs deleted file mode 100644 index cc001a25..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ChildWindow/WindowState.cs +++ /dev/null @@ -1,13 +0,0 @@ -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.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.cs deleted file mode 100644 index 0d767f6f..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.cs +++ /dev/null @@ -1,395 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Controls.Primitives; - -namespace Microsoft.Windows.Controls -{ - public class ColorPicker : Control - { - #region Private Members - - ToggleButton _colorPickerToggleButton; - Popup _colorPickerCanvasPopup; - Button _okButton; - private TranslateTransform _colorShadeSelectorTransform = new TranslateTransform(); - private Canvas _colorShadingCanvas; - private Canvas _colorShadeSelector; - private ColorSpectrumSlider _spectrumSlider; - private Point? _currentColorPosition; - private Color _currentColor = Colors.White; - - #endregion //Private Members - - #region Constructors - - static ColorPicker() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(ColorPicker), new FrameworkPropertyMetadata(typeof(ColorPicker))); - } - - public ColorPicker() - { - - } - - #endregion //Constructors - - #region Properties - - public static readonly DependencyProperty CurrentColorProperty = DependencyProperty.Register("CurrentColor", typeof(Color), typeof(ColorPicker), new PropertyMetadata(Colors.White)); - public Color CurrentColor - { - get { return (Color)GetValue(CurrentColorProperty); } - set { SetValue(CurrentColorProperty, value); } - } - - #region SelectedColor - - public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register("SelectedColor", typeof(Color), typeof(ColorPicker), new FrameworkPropertyMetadata(Colors.White, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback(SelectedColorPropertyChanged))); - public Color SelectedColor - { - get { return (Color)GetValue(SelectedColorProperty); } - set { SetValue(SelectedColorProperty, value); } - } - - private static void SelectedColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - ColorPicker colorPicker = (ColorPicker)d; - colorPicker.SetSelectedColor((Color)e.NewValue); - } - - #endregion //SelectedColor - - #region ScRGB - - #region ScA - - public static readonly DependencyProperty ScAProperty = DependencyProperty.Register("ScA", typeof(float), typeof(ColorPicker), new PropertyMetadata((float)1, new PropertyChangedCallback(OnScAPropertyChangedChanged))); - public float ScA - { - get { return (float)GetValue(ScAProperty); } - set { SetValue(ScAProperty, value); } - } - - private static void OnScAPropertyChangedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - ColorPicker c = (ColorPicker)d; - c.SetScA((float)e.NewValue); - } - - protected virtual void SetScA(float newValue) - { - _currentColor.ScA = newValue; - A = _currentColor.A; - CurrentColor = _currentColor; - HexadecimalString = _currentColor.ToString(); - } - - #endregion //ScA - - #region ScR - - public static readonly DependencyProperty ScRProperty = DependencyProperty.Register("ScR", typeof(float), typeof(ColorPicker), new PropertyMetadata((float)1, new PropertyChangedCallback(OnScRPropertyChanged))); - public float ScR - { - get { return (float)GetValue(ScRProperty); } - set { SetValue(RProperty, value); } - } - - private static void OnScRPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - - } - - #endregion //ScR - - #region ScG - - public static readonly DependencyProperty ScGProperty = DependencyProperty.Register("ScG", typeof(float), typeof(ColorPicker), new PropertyMetadata((float)1, new PropertyChangedCallback(OnScGPropertyChanged))); - public float ScG - { - get { return (float)GetValue(ScGProperty); } - set { SetValue(GProperty, value); } - } - - private static void OnScGPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - - } - - #endregion //ScG - - #region ScB - - public static readonly DependencyProperty ScBProperty = DependencyProperty.Register("ScB", typeof(float), typeof(ColorPicker), new PropertyMetadata((float)1, new PropertyChangedCallback(OnScBPropertyChanged))); - public float ScB - { - get { return (float)GetValue(BProperty); } - set { SetValue(BProperty, value); } - } - - private static void OnScBPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - - } - - #endregion //ScB - - #endregion //ScRGB - - #region RGB - - #region A - - public static readonly DependencyProperty AProperty = DependencyProperty.Register("A", typeof(byte), typeof(ColorPicker), new PropertyMetadata((byte)255, new PropertyChangedCallback(OnAPropertyChanged))); - public byte A - { - get { return (byte)GetValue(AProperty); } - set { SetValue(AProperty, value); } - } - - private static void OnAPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - ColorPicker c = (ColorPicker)d; - c.SetA((byte)e.NewValue); - } - - protected virtual void SetA(byte newValue) - { - _currentColor.A = newValue; - SetValue(CurrentColorProperty, _currentColor); - } - - #endregion //A - - #region R - - public static readonly DependencyProperty RProperty = DependencyProperty.Register("R", typeof(byte), typeof(ColorPicker), new PropertyMetadata((byte)255, new PropertyChangedCallback(OnRPropertyChanged))); - public byte R - { - get { return (byte)GetValue(RProperty); } - set { SetValue(RProperty, value); } - } - - private static void OnRPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - - } - - #endregion //R - - #region G - - public static readonly DependencyProperty GProperty = DependencyProperty.Register("G", typeof(byte), typeof(ColorPicker), new PropertyMetadata((byte)255, new PropertyChangedCallback(OnGPropertyChanged))); - public byte G - { - get { return (byte)GetValue(GProperty); } - set { SetValue(GProperty, value); } - } - - private static void OnGPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - - } - - #endregion //G - - #region B - - public static readonly DependencyProperty BProperty = DependencyProperty.Register("B", typeof(byte), typeof(ColorPicker), new PropertyMetadata((byte)255, new PropertyChangedCallback(OnBPropertyChanged))); - public byte B - { - get { return (byte)GetValue(BProperty); } - set { SetValue(BProperty, value); } - } - - private static void OnBPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - - } - - #endregion //B - - #endregion //RGB - - #region HexadecimalString - - public static readonly DependencyProperty HexadecimalStringProperty = DependencyProperty.Register("HexadecimalString", typeof(string), typeof(ColorPicker), new PropertyMetadata("#FFFFFFFF", new PropertyChangedCallback(OnHexadecimalStringPropertyChanged))); - public string HexadecimalString - { - get { return (string)GetValue(HexadecimalStringProperty); } - set { SetValue(HexadecimalStringProperty, value); } - } - - private static void OnHexadecimalStringPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - - } - - #endregion //HexadecimalString - - #endregion //Properties - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - _colorPickerToggleButton = (ToggleButton)GetTemplateChild("PART_ColorPickerToggleButton"); - _colorPickerToggleButton.Click += ColorPickerToggleButton_Clicked; - - _colorPickerCanvasPopup = (Popup)GetTemplateChild("PART_ColorPickerCanvasPopup"); - - _colorShadingCanvas = (Canvas)GetTemplateChild("PART_ColorShadingCanvas"); - _colorShadingCanvas.MouseLeftButtonDown += ColorShadingCanvas_MouseLeftButtonDown; - _colorShadingCanvas.MouseMove += ColorShadingCanvas_MouseMove; - _colorShadingCanvas.SizeChanged += ColorShadingCanvas_SizeChanged; - - _colorShadeSelector = (Canvas)GetTemplateChild("PART_ColorShadeSelector"); - _colorShadeSelector.RenderTransform = _colorShadeSelectorTransform; - - _spectrumSlider = (ColorSpectrumSlider)GetTemplateChild("PART_SpectrumSlider"); - _spectrumSlider.ValueChanged += SpectrumSlider_ValueChanged; - - _okButton = (Button)GetTemplateChild("PART_OkButton"); - _okButton.Click += OkButton_Click; - - SetSelectedColor(SelectedColor); - } - - #endregion //Base Class Overrides - - #region Event Handlers - - void ColorShadingCanvas_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) - { - Point p = e.GetPosition(_colorShadingCanvas); - UpdateColorShadeSelectorPositionAndCalculateColor(p, true); - } - - void ColorShadingCanvas_MouseMove(object sender, MouseEventArgs e) - { - if (e.LeftButton == MouseButtonState.Pressed) - { - Point p = e.GetPosition(_colorShadingCanvas); - UpdateColorShadeSelectorPositionAndCalculateColor(p, true); - Mouse.Synchronize(); - } - } - - void ColorShadingCanvas_SizeChanged(object sender, SizeChangedEventArgs e) - { - if (_currentColorPosition != null) - { - Point _newPoint = new Point - { - X = ((Point)_currentColorPosition).X * e.NewSize.Width, - Y = ((Point)_currentColorPosition).Y * e.NewSize.Height - }; - - UpdateColorShadeSelectorPositionAndCalculateColor(_newPoint, false); - } - } - - void SpectrumSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) - { - if (_currentColorPosition != null) - { - CalculateColor((Point)_currentColorPosition); - } - } - - void OkButton_Click(object sender, RoutedEventArgs e) - { - if (_colorPickerCanvasPopup.IsOpen || _colorPickerToggleButton.IsChecked == true) - { - CloseColorPicker(); - SelectedColor = CurrentColor; - } - } - - void ColorPickerToggleButton_Clicked(object sender, RoutedEventArgs e) - { - _colorPickerCanvasPopup.IsOpen = _colorPickerToggleButton.IsChecked ?? false; - } - - #endregion //Event Handlers - - #region Methods - - private void CloseColorPicker() - { - _colorPickerToggleButton.IsChecked = false; - _colorPickerCanvasPopup.IsOpen = false; - } - - private void SetSelectedColor(Color theColor) - { - _currentColor = theColor; - SetValue(AProperty, _currentColor.A); - SetValue(RProperty, _currentColor.R); - SetValue(GProperty, _currentColor.G); - SetValue(BProperty, _currentColor.B); - UpdateColorShadeSelectorPosition(theColor); - } - - private void UpdateColorShadeSelectorPositionAndCalculateColor(Point p, bool calculateColor) - { - if (p.Y < 0) - p.Y = 0; - - if (p.X < 0) - p.X = 0; - - if (p.X > _colorShadingCanvas.ActualWidth) - p.X = _colorShadingCanvas.ActualWidth; - - if (p.Y > _colorShadingCanvas.ActualHeight) - p.Y = _colorShadingCanvas.ActualHeight; - - _colorShadeSelectorTransform.X = p.X - (_colorShadeSelector.Width / 2); - _colorShadeSelectorTransform.Y = p.Y - (_colorShadeSelector.Height / 2); - - p.X = p.X / _colorShadingCanvas.ActualWidth; - p.Y = p.Y / _colorShadingCanvas.ActualHeight; - - _currentColorPosition = p; - - if (calculateColor) - CalculateColor(p); - } - - private void UpdateColorShadeSelectorPosition(Color color) - { - if (_spectrumSlider == null || _colorShadingCanvas == null) - return; - - _currentColorPosition = null; - - HsvColor hsv = ColorUtilities.ConvertRgbToHsv(color.R, color.G, color.B); - _spectrumSlider.Value = hsv.H; - - Point p = new Point(hsv.S, 1 - hsv.V); - - _currentColorPosition = p; - - _colorShadeSelectorTransform.X = (p.X * _colorShadingCanvas.Width) - 5; - _colorShadeSelectorTransform.Y = (p.Y * _colorShadingCanvas.Height) - 5; - } - - private void CalculateColor(Point p) - { - HsvColor hsv = new HsvColor(360 - _spectrumSlider.Value, 1, 1) { S = p.X, V = 1 - p.Y }; - _currentColor = ColorUtilities.ConvertHsvToRgb(hsv.H, hsv.S, hsv.V); ; - _currentColor.ScA = ScA; - CurrentColor = _currentColor; - HexadecimalString = _currentColor.ToString(); - } - - #endregion //Methods - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/ColorSpectrumSlider.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/ColorSpectrumSlider.cs deleted file mode 100644 index c4eac2d8..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/ColorSpectrumSlider.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Shapes; - -namespace Microsoft.Windows.Controls -{ - internal class ColorSpectrumSlider : Slider - { - #region Private Members - - private Rectangle _spectrumDisplay; - private LinearGradientBrush _pickerBrush; - - #endregion //Private Members - - #region Constructors - - static ColorSpectrumSlider() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(ColorSpectrumSlider), new FrameworkPropertyMetadata(typeof(ColorSpectrumSlider))); - } - - #endregion //Constructors - - #region Dependency Properties - - public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register("SelectedColor", typeof(Color), typeof(ColorSpectrumSlider), new PropertyMetadata(System.Windows.Media.Colors.Transparent)); - public Color SelectedColor - { - get { return (Color)GetValue(SelectedColorProperty); } - set { SetValue(SelectedColorProperty, value); } - } - - #endregion //Dependency Properties - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - _spectrumDisplay = (Rectangle)GetTemplateChild("PART_SpectrumDisplay"); - CreateSpectrum(); - OnValueChanged(Double.NaN, Value); - } - - protected override void OnValueChanged(double oldValue, double newValue) - { - base.OnValueChanged(oldValue, newValue); - - Color color = ColorUtilities.ConvertHsvToRgb(360 - newValue, 1, 1); - SelectedColor = color; - } - - #endregion //Base Class Overrides - - #region Methods - - private void CreateSpectrum() - { - _pickerBrush = new LinearGradientBrush(); - _pickerBrush.StartPoint = new Point(0.5, 0); - _pickerBrush.EndPoint = new Point(0.5, 1); - _pickerBrush.ColorInterpolationMode = ColorInterpolationMode.SRgbLinearInterpolation; - - List colorsList = ColorUtilities.GenerateHsvSpectrum(); - - double stopIncrement = (double)1 / colorsList.Count; - - int i; - for (i = 0; i < colorsList.Count; i++) - { - _pickerBrush.GradientStops.Add(new GradientStop(colorsList[i], i * stopIncrement)); - } - - _pickerBrush.GradientStops[i - 1].Offset = 1.0; - _spectrumDisplay.Fill = _pickerBrush; - } - - #endregion //Methods - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/ColorUtilities.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/ColorUtilities.cs deleted file mode 100644 index e621c22b..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/ColorUtilities.cs +++ /dev/null @@ -1,156 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Media; - -namespace Microsoft.Windows.Controls -{ - internal static class ColorUtilities - { - /// - /// Converts an RGB color to an HSV color. - /// - /// - /// - /// - /// - public static HsvColor ConvertRgbToHsv(int r, int b, int g) - { - double delta, min; - double h = 0, s, v; - - min = Math.Min(Math.Min(r, g), b); - v = Math.Max(Math.Max(r, g), b); - delta = v - min; - - if (v == 0.0) - { - s = 0; - } - else - s = delta / v; - - if (s == 0) - h = 0.0; - - else - { - if (r == v) - h = (g - b) / delta; - else if (g == v) - h = 2 + (b - r) / delta; - else if (b == v) - h = 4 + (r - g) / delta; - - h *= 60; - if (h < 0.0) - h = h + 360; - - } - - return new HsvColor { H = h, S = s, V = v / 255 }; - } - - /// - /// Converts an HSV color to an RGB color. - /// - /// - /// - /// - /// - public static Color ConvertHsvToRgb(double h, double s, double v) - { - double r = 0, g = 0, b = 0; - - if (s == 0) - { - r = v; - g = v; - b = v; - } - else - { - int i; - double f, p, q, t; - - if (h == 360) - h = 0; - else - h = h / 60; - - i = (int)Math.Truncate(h); - f = h - i; - - p = v * (1.0 - s); - q = v * (1.0 - (s * f)); - t = v * (1.0 - (s * (1.0 - f))); - - switch (i) - { - case 0: - { - r = v; - g = t; - b = p; - break; - } - case 1: - { - r = q; - g = v; - b = p; - break; - } - case 2: - { - r = p; - g = v; - b = t; - break; - } - case 3: - { - r = p; - g = q; - b = v; - break; - } - case 4: - { - r = t; - g = p; - b = v; - break; - } - default: - { - r = v; - g = p; - b = q; - break; - } - } - - } - - return Color.FromArgb(255, (byte)(r * 255), (byte)(g * 255), (byte)(b * 255)); - } - - /// - /// Generates a list of colors with hues ranging from 0 360 and a saturation and value of 1. - /// - /// - public static List GenerateHsvSpectrum() - { - List colorsList = new List(8); - - for (int i = 0; i < 29; i++) - { - colorsList.Add(ColorUtilities.ConvertHsvToRgb(i * 12, 1, 1)); - } - - colorsList.Add(ColorUtilities.ConvertHsvToRgb(0, 1, 1)); - - return colorsList; - } - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/HsvColor.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/HsvColor.cs deleted file mode 100644 index eed5c3bd..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/HsvColor.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - internal struct HsvColor - { - public double H; - public double S; - public double V; - - public HsvColor(double h, double s, double v) - { - H = h; - S = s; - V = v; - } - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Core/UIElementAdorner.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Core/UIElementAdorner.cs deleted file mode 100644 index 263ca034..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Core/UIElementAdorner.cs +++ /dev/null @@ -1,215 +0,0 @@ -using System; -using System.Collections; -using System.Windows.Media; -using System.Windows.Documents; -using System.Windows; - -namespace Microsoft.Windows.Controls.Core -{ - /// - /// An adorner that can display one and only one UIElement. - /// That element can be a panel, which contains multiple other elements. - /// The element is added to the adorner's visual and logical trees, enabling it to - /// particpate in dependency property value inheritance, amongst other things. - /// - internal class UIElementAdorner - : Adorner - where TElement : UIElement - { - #region Fields - - TElement _child = null; - double _offsetLeft = 0; - double _offsetTop = 0; - - #endregion // Fields - - #region Constructor - - /// - /// Constructor. - /// - /// The element to which the adorner will be bound. - public UIElementAdorner(UIElement adornedElement) - : base(adornedElement) - { - } - - #endregion // Constructor - - #region Public Interface - - #region Child - - /// - /// Gets/sets the child element hosted in the adorner. - /// - public TElement Child - { - get { return _child; } - set - { - if (value == _child) - return; - - if (_child != null) - { - base.RemoveLogicalChild(_child); - base.RemoveVisualChild(_child); - } - - _child = value; - - if (_child != null) - { - base.AddLogicalChild(_child); - base.AddVisualChild(_child); - } - } - } - - #endregion // Child - - #region GetDesiredTransform - - /// - /// Override. - /// - /// - /// - public override GeneralTransform GetDesiredTransform(GeneralTransform transform) - { - GeneralTransformGroup result = new GeneralTransformGroup(); - result.Children.Add(base.GetDesiredTransform(transform)); - result.Children.Add(new TranslateTransform(_offsetLeft, _offsetTop)); - return result; - } - - #endregion // GetDesiredTransform - - #region OffsetLeft - - /// - /// Gets/sets the horizontal offset of the adorner. - /// - public double OffsetLeft - { - get { return _offsetLeft; } - set - { - _offsetLeft = value; - UpdateLocation(); - } - } - - #endregion // OffsetLeft - - #region SetOffsets - - /// - /// Updates the location of the adorner in one atomic operation. - /// - public void SetOffsets(double left, double top) - { - _offsetLeft = left; - _offsetTop = top; - this.UpdateLocation(); - } - - #endregion // SetOffsets - - #region OffsetTop - - /// - /// Gets/sets the vertical offset of the adorner. - /// - public double OffsetTop - { - get { return _offsetTop; } - set - { - _offsetTop = value; - UpdateLocation(); - } - } - - #endregion // OffsetTop - - #endregion // Public Interface - - #region Protected Overrides - - /// - /// Override. - /// - /// - /// - protected override Size MeasureOverride(Size constraint) - { - if (_child == null) - return base.MeasureOverride(constraint); - - _child.Measure(constraint); - return _child.DesiredSize; - } - - /// - /// Override. - /// - /// - /// - protected override Size ArrangeOverride(Size finalSize) - { - if (_child == null) - return base.ArrangeOverride(finalSize); - - _child.Arrange(new Rect(finalSize)); - return finalSize; - } - - /// - /// Override. - /// - protected override IEnumerator LogicalChildren - { - get - { - ArrayList list = new ArrayList(); - if (_child != null) - list.Add(_child); - return list.GetEnumerator(); - } - } - - /// - /// Override. - /// - /// - /// - protected override Visual GetVisualChild(int index) - { - return _child; - } - - /// - /// Override. - /// - protected override int VisualChildrenCount - { - get { return _child == null ? 0 : 1; } - } - - #endregion // Protected Overrides - - #region Private Helpers - - void UpdateLocation() - { - AdornerLayer adornerLayer = base.Parent as AdornerLayer; - if (adornerLayer != null) - adornerLayer.Update(base.AdornedElement); - } - - #endregion // Private Helpers - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png deleted file mode 100644 index 4304d43b..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png deleted file mode 100644 index 35075187..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png deleted file mode 100644 index dad7dd09..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png deleted file mode 100644 index ecb7fe86..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/MessageBox.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/MessageBox.cs deleted file mode 100644 index 317dd405..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/MessageBox.cs +++ /dev/null @@ -1,419 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Controls.Primitives; - -namespace Microsoft.Windows.Controls -{ - [TemplateVisualState(Name = VisualStates.OK, GroupName = VisualStates.MessageBoxButtonsGroup)] - [TemplateVisualState(Name = VisualStates.OKCancel, GroupName = VisualStates.MessageBoxButtonsGroup)] - [TemplateVisualState(Name = VisualStates.YesNo, GroupName = VisualStates.MessageBoxButtonsGroup)] - [TemplateVisualState(Name = VisualStates.YesNoCancel, GroupName = VisualStates.MessageBoxButtonsGroup)] - public class MessageBox : Control - { - #region Private Members - - /// - /// Tracks the MessageBoxButon value passed into the InitializeContainer method - /// - private MessageBoxButton _button = MessageBoxButton.OK; - - #endregion //Private Members - - #region Constructors - - static MessageBox() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(MessageBox), new FrameworkPropertyMetadata(typeof(MessageBox))); - } - - internal MessageBox() - { /*user cannot create instance */ } - - #endregion //Constructors - - #region Properties - - #region Protected Properties - - /// - /// A System.Windows.MessageBoxResult value that specifies which message box button was clicked by the user. - /// - protected MessageBoxResult MessageBoxResult = MessageBoxResult.None; - - protected Window Container { get; private set; } - protected Thumb DragWidget { get; private set; } - protected Button CloseButton { get; private set; } - - protected Button OkButton { get; private set; } - protected Button CancelButton { get; private set; } - protected Button YesButton { get; private set; } - protected Button NoButton { get; private set; } - - protected Button OkButton1 { get; private set; } - protected Button CancelButton1 { get; private set; } - protected Button YesButton1 { get; private set; } - protected Button NoButton1 { get; private set; } - - #endregion //Protected Properties - - #region Dependency Properties - - public static readonly DependencyProperty CaptionProperty = DependencyProperty.Register("Caption", typeof(string), typeof(MessageBox), 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(MessageBox), 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(MessageBox), new PropertyMetadata(null)); - public Style CloseButtonStyle - { - get { return (Style)GetValue(CloseButtonStyleProperty); } - set { SetValue(CloseButtonStyleProperty, value); } - } - - public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register("ImageSource", typeof(ImageSource), typeof(MessageBox), new UIPropertyMetadata(default(ImageSource))); - public ImageSource ImageSource - { - get { return (ImageSource)GetValue(ImageSourceProperty); } - set { SetValue(ImageSourceProperty, value); } - } - - public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(MessageBox), new UIPropertyMetadata(String.Empty)); - public string Text - { - get { return (string)GetValue(TextProperty); } - set { SetValue(TextProperty, value); } - } - - public static readonly DependencyProperty WindowBackgroundProperty = DependencyProperty.Register("WindowBackground", typeof(Brush), typeof(MessageBox), 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(MessageBox), 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(MessageBox), new PropertyMetadata(null)); - public double WindowOpacity - { - get { return (double)GetValue(WindowOpacityProperty); } - set { SetValue(WindowOpacityProperty, value); } - } - - #endregion //Dependency Properties - - #endregion //Properties - - #region Base Class Overrides - - /// - /// Overrides the OnApplyTemplate method. - /// - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - DragWidget = (Thumb)GetTemplateChild("PART_DragWidget"); - if (DragWidget != null) - DragWidget.DragDelta += (o, e) => ProcessMove(e); - - CloseButton = (Button)GetTemplateChild("PART_CloseButton"); - if (CloseButton != null) - CloseButton.Click += (o, e) => Close(); - - NoButton = (Button)GetTemplateChild("PART_NoButton"); - if (NoButton != null) - NoButton.Click += (o, e) => Button_Click(o, e); - - NoButton1 = (Button)GetTemplateChild("PART_NoButton1"); - if (NoButton1 != null) - NoButton1.Click += (o, e) => Button_Click(o, e); - - YesButton = (Button)GetTemplateChild("PART_YesButton"); - if (YesButton != null) - YesButton.Click += (o, e) => Button_Click(o, e); - - YesButton1 = (Button)GetTemplateChild("PART_YesButton1"); - if (YesButton1 != null) - YesButton1.Click += (o, e) => Button_Click(o, e); - - CancelButton = (Button)GetTemplateChild("PART_CancelButton"); - if (CancelButton != null) - CancelButton.Click += (o, e) => Button_Click(o, e); - - CancelButton1 = (Button)GetTemplateChild("PART_CancelButton1"); - if (CancelButton1 != null) - CancelButton1.Click += (o, e) => Button_Click(o, e); - - OkButton = (Button)GetTemplateChild("PART_OkButton"); - if (OkButton != null) - OkButton.Click += (o, e) => Button_Click(o, e); - - OkButton1 = (Button)GetTemplateChild("PART_OkButton1"); - if (OkButton1 != null) - OkButton1.Click += (o, e) => Button_Click(o, e); - - ChangeVisualState(_button.ToString(), true); - } - - #endregion //Base Class Overrides - - #region Methods - - #region Public Static - - /// - /// Displays a message box that has a message and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText) - { - return Show(messageText, string.Empty, MessageBoxButton.OK); - } - - /// - /// Displays a message box that has a message and title bar caption; and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.String that specifies the title bar caption to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText, string caption) - { - return Show(messageText, caption, MessageBoxButton.OK); - } - - /// - /// Displays a message box that has a message and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.String that specifies the title bar caption to display. - /// A System.Windows.MessageBoxButton value that specifies which button or buttons to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText, string caption, MessageBoxButton button) - { - return ShowCore(messageText, caption, button, MessageBoxImage.None); - } - - /// - /// Displays a message box that has a message and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.String that specifies the title bar caption to display. - /// A System.Windows.MessageBoxButton value that specifies which button or buttons to display. - /// A System.Windows.MessageBoxImage value that specifies the icon to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText, string caption, MessageBoxButton button, MessageBoxImage icon) - { - return ShowCore(messageText, caption, button, icon); - } - - #endregion //Public Static - - #region Private Static - - private static MessageBoxResult ShowCore(string messageText, string caption, MessageBoxButton button, MessageBoxImage icon) - { - MessageBox msgBox = new MessageBox(); - msgBox.InitializeMessageBox(messageText, caption, button, icon); - msgBox.Show(); - return msgBox.MessageBoxResult; - } - - /// - /// Resolves the owner Window of the MessageBox. - /// - /// - private static FrameworkElement ResolveOwner() - { - FrameworkElement owner = null; - if (Application.Current != null) - { - foreach (Window w in Application.Current.Windows) - { - if (w.IsActive) - { - owner = w; - break; - } - } - } - return owner; - } - - #endregion //Private Static - - #region Protected - - /// - /// Shows the MessageBox - /// - protected void Show() - { - Container.ShowDialog(); - } - - /// - /// Initializes the MessageBox. - /// - /// The text. - /// The caption. - /// The button. - /// The image. - protected void InitializeMessageBox(string text, string caption, MessageBoxButton button, MessageBoxImage image) - { - Text = text; - Caption = caption; - _button = button; - SetImageSource(image); - Container = CreateContainer(); - } - - /// - /// Changes the control's visual state(s). - /// - /// name of the state - /// True if state transitions should be used. - protected void ChangeVisualState(string name, bool useTransitions) - { - VisualStateManager.GoToState(this, name, useTransitions); - } - - #endregion //Protected - - #region Private - - /// - /// Sets the message image source. - /// - /// The image to show. - private void SetImageSource(MessageBoxImage image) - { - String iconName = String.Empty; - - switch (image) - { - case MessageBoxImage.Error: - { - iconName = "Error48.png"; - break; - } - case MessageBoxImage.Information: - { - iconName = "Information48.png"; - break; - } - case MessageBoxImage.Question: - { - iconName = "Question48.png"; - break; - } - case MessageBoxImage.Warning: - { - iconName = "Warning48.png"; - break; - } - case MessageBoxImage.None: - default: - { - return; - } - } - - ImageSource = (ImageSource)new ImageSourceConverter().ConvertFromString(String.Format("pack://application:,,,/WPFToolkit.Extended;component/MessageBox/Icons/{0}", iconName)); - } - - /// - /// Creates the container which will host the MessageBox control. - /// - /// - private Window CreateContainer() - { - return new Window() - { - AllowsTransparency = true, - Background = Brushes.Transparent, - Content = this, - Owner = Window.GetWindow(ResolveOwner()), - ShowInTaskbar = false, - SizeToContent = System.Windows.SizeToContent.WidthAndHeight, - ResizeMode = System.Windows.ResizeMode.NoResize, - WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner, - WindowStyle = System.Windows.WindowStyle.None - }; - } - - #endregion //Private - - #endregion //Methods - - #region Event Handlers - - /// - /// Processes the move of a drag operation on the header. - /// - /// The instance containing the event data. - private void ProcessMove(DragDeltaEventArgs e) - { - Container.Left = Container.Left + e.HorizontalChange; - Container.Top = Container.Top + e.VerticalChange; - } - - /// - /// Sets the MessageBoxResult according to the button pressed and then closes the MessageBox. - /// - /// The source of the event. - /// The instance containing the event data. - private void Button_Click(object sender, RoutedEventArgs e) - { - Button button = e.Source as Button; - switch (button.Name) - { - case "PART_NoButton": - case "PART_NoButton1": - MessageBoxResult = MessageBoxResult.No; - break; - case "PART_YesButton": - case "PART_YesButton1": - MessageBoxResult = MessageBoxResult.Yes; - break; - case "PART_CancelButton": - case "PART_CancelButton1": - MessageBoxResult = MessageBoxResult.Cancel; - break; - case "PART_OkButton": - case "PART_OkButton1": - MessageBoxResult = MessageBoxResult.OK; - break; - } - - Close(); - } - - /// - /// Closes the MessageBox. - /// - private void Close() - { - Container.Close(); - } - - #endregion //Event Handlers - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/VisualStates.MessageBox.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/VisualStates.MessageBox.cs deleted file mode 100644 index d47fcb08..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/VisualStates.MessageBox.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - internal static partial class VisualStates - { - public const string MessageBoxButtonsGroup = "MessageBoxButtonsGroup"; - - public const string OK = "OK"; - - public const string OKCancel = "OKCancel"; - - public const string YesNo = "YesNo"; - - public const string YesNoCancel = "YesNoCancel"; - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs deleted file mode 100644 index 92640cc6..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.Windows; -using System.Globalization; - -namespace Microsoft.Windows.Controls -{ - public class NumericUpDown : UpDownBase - { - #region Properties - - #region Minimum - - public static readonly DependencyProperty MinimumProperty = DependencyProperty.Register("Minimum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(Double.MinValue, OnMinimumPropertyChanged)); - public double Minimum - { - get { return (double)GetValue(MinimumProperty); } - set { SetValue(MinimumProperty, value); } - } - - private static void OnMinimumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - } - - protected virtual void OnMinimumChanged(double oldValue, double newValue) - { - } - #endregion Minimum - - #region Maximum - - public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register("Maximum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(Double.MaxValue, OnMaximumPropertyChanged)); - public double Maximum - { - get { return (double)GetValue(MaximumProperty); } - set { SetValue(MaximumProperty, value); } - } - - private static void OnMaximumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - } - - protected virtual void OnMaximumChanged(double oldValue, double newValue) - { - } - #endregion Maximum - - #region Increment - - public static readonly DependencyProperty IncrementProperty = DependencyProperty.Register("Increment", typeof(double), typeof(NumericUpDown), new PropertyMetadata(1d, OnIncrementPropertyChanged)); - public double Increment - { - get { return (double)GetValue(IncrementProperty); } - set { SetValue(IncrementProperty, value); } - } - - private static void OnIncrementPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - } - - protected virtual void OnIncrementChanged(double oldValue, double newValue) - { - } - - #endregion - - #region FormatString - - public static readonly DependencyProperty StringFormatProperty = DependencyProperty.Register("FormatString", typeof(string), typeof(NumericUpDown), new PropertyMetadata("F0", OnStringFormatPropertyPropertyChanged)); - public string FormatString - { - get { return (string)GetValue(StringFormatProperty); } - set { SetValue(StringFormatProperty, value); } - } - - private static void OnStringFormatPropertyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - NumericUpDown nud = d as NumericUpDown; - nud.OnStringFormatChanged(e.OldValue.ToString(), e.NewValue.ToString()); - } - - protected virtual void OnStringFormatChanged(string oldValue, string newValue) - { - Text = FormatValue(); - } - - #endregion //FormatString - - #endregion - - #region Constructors - - static NumericUpDown() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(NumericUpDown), new FrameworkPropertyMetadata(typeof(NumericUpDown))); - } - - #endregion //Constructors - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - SetValidSpinDirection(); - } - - protected override void OnValueChanged(RoutedPropertyChangedEventArgs e) - { - SetValidSpinDirection(); - } - - protected override double ParseValue(string text) - { - NumberFormatInfo info = NumberFormatInfo.GetInstance(CultureInfo.CurrentCulture); - if (text.Contains(info.PercentSymbol)) - return TryParcePercent(text, info); - else - return TryParceDouble(text, info); - } - - protected internal override string FormatValue() - { - return Value.ToString(FormatString, CultureInfo.CurrentCulture); - } - - protected override void OnIncrement() - { - Value = (double)((decimal)Value + (decimal)Increment); - } - - protected override void OnDecrement() - { - Value = (double)((decimal)Value - (decimal)Increment); - } - - #endregion //Base Class Overrides - - #region Methods - - /// - /// Sets the valid spin direction based on current value, minimum and maximum. - /// - private void SetValidSpinDirection() - { - ValidSpinDirections validDirections = ValidSpinDirections.None; - - if (Value < Maximum) - { - validDirections = validDirections | ValidSpinDirections.Increase; - } - - if (Value > Minimum) - { - validDirections = validDirections | ValidSpinDirections.Decrease; - } - - if (Spinner != null) - { - Spinner.ValidSpinDirection = validDirections; - } - } - - private double TryParcePercent(string text, NumberFormatInfo info) - { - double result; - text = text.Replace(info.PercentSymbol, null); - result = TryParceDouble(text, info); - return result / 100; - } - - private double TryParceDouble(string text, NumberFormatInfo info) - { - double result; - if (!double.TryParse(text, NumberStyles.Any, info, out result)) - { - //an error occured now lets reset our value, text, and the text in the textbox - result = Value; - TextBox.Text = Text = FormatValue(); - } - return result; - } - - #endregion //Methods - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs deleted file mode 100644 index 0903bf68..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -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("Extended WPF Toolkit")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Extended WPF Toolkit")] -[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.2.0.0")] -[assembly: AssemblyFileVersion("1.2.0.0")] diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs deleted file mode 100644 index eaf63633..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 Microsoft.Windows.Controls.Properties { - using System; - - - /// - /// 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 (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Windows.Controls.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.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.resx b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.resx deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs deleted file mode 100644 index 4a0f1423..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 Microsoft.Windows.Controls.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.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.settings b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.settings deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/Formatters/ITextFormatter.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/Formatters/ITextFormatter.cs deleted file mode 100644 index f8e22d41..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/Formatters/ITextFormatter.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Windows.Documents; - -namespace Microsoft.Windows.Controls -{ - public interface ITextFormatter - { - string GetText(FlowDocument document); - void SetText(FlowDocument document, string text); - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/Formatters/PlainTextFormatter.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/Formatters/PlainTextFormatter.cs deleted file mode 100644 index 1c792a32..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/Formatters/PlainTextFormatter.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Windows.Documents; - -namespace Microsoft.Windows.Controls -{ - /// - /// Formats the RichTextBox text as plain text - /// - public class PlainTextFormatter : ITextFormatter - { - public string GetText(FlowDocument document) - { - return new TextRange(document.ContentStart, document.ContentEnd).Text; - } - - public void SetText(FlowDocument document, string text) - { - new TextRange(document.ContentStart, document.ContentEnd).Text = text; - } - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/Formatters/RtfFormatter.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/Formatters/RtfFormatter.cs deleted file mode 100644 index e5a1def6..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/Formatters/RtfFormatter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Text; -using System.Windows.Documents; -using System.IO; -using System.Windows; - -namespace Microsoft.Windows.Controls -{ - /// - /// Formats the RichTextBox text as RTF - /// - public class RtfFormatter : ITextFormatter - { - public string GetText(FlowDocument document) - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream()) - { - tr.Save(ms, DataFormats.Rtf); - return ASCIIEncoding.Default.GetString(ms.ToArray()); - } - } - - public void SetText(FlowDocument document, string text) - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes(text))) - { - tr.Load(ms, DataFormats.Rtf); - } - } - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/Formatters/XamlFormatter.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/Formatters/XamlFormatter.cs deleted file mode 100644 index 07e1d31a..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/Formatters/XamlFormatter.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Text; -using System.IO; -using System.Windows.Documents; -using System.Windows; - -namespace Microsoft.Windows.Controls -{ - /// - /// Formats the RichTextBox text as Xaml - /// - public class XamlFormatter : ITextFormatter - { - public string GetText(System.Windows.Documents.FlowDocument document) - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream()) - { - tr.Save(ms, DataFormats.Xaml); - return ASCIIEncoding.Default.GetString(ms.ToArray()); - } - } - - public void SetText(System.Windows.Documents.FlowDocument document, string text) - { - try - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes(text))) - { - tr.Load(ms, DataFormats.Xaml); - } - } - catch - { - throw new InvalidDataException("data provided is not in the correct Xaml format."); - } - } - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/RichTextBox.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/RichTextBox.cs deleted file mode 100644 index ab1c805a..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBox/RichTextBox.cs +++ /dev/null @@ -1,135 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Data; -using System.Windows.Threading; - -namespace Microsoft.Windows.Controls -{ - public class RichTextBox : System.Windows.Controls.RichTextBox - { - #region Private Members - - private bool _textHasLoaded; - private bool isInvokePending; - - #endregion //Private Members - - #region Constructors - - public RichTextBox() - { - Loaded += RichTextBox_Loaded; - } - - public RichTextBox(System.Windows.Documents.FlowDocument document) - : base(document) - { - - } - - #endregion //Constructors - - #region Properties - - #region Text - - public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(RichTextBox), new FrameworkPropertyMetadata(String.Empty, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnTextPropertyChanged, CoerceTextProperty, true, UpdateSourceTrigger.LostFocus)); - public string Text - { - get { return (string)GetValue(TextProperty); } - set { SetValue(TextProperty, value); } - } - - private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - RichTextBox rtb = (RichTextBox)d; - - if (!rtb._textHasLoaded) - { - rtb.TextFormatter.SetText(rtb.Document, (string)e.NewValue); - rtb._textHasLoaded = true; - } - } - - private static object CoerceTextProperty(DependencyObject d, object value) - { - return value ?? ""; - } - - #endregion //Text - - #region TextFormatter - - private ITextFormatter _textFormatter; - /// - /// The ITextFormatter the is used to format the text of the RichTextBox. - /// Deafult formatter is the RtfFormatter - /// - public ITextFormatter TextFormatter - { - get - { - if (_textFormatter == null) - _textFormatter = new RtfFormatter(); //default is rtf - - return _textFormatter; - } - set - { - _textFormatter = value; - } - } - - #endregion //TextFormatter - - #endregion //Properties - - #region Methods - - private void InvokeUpdateText() - { - if (!isInvokePending) - { - Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(UpdateText)); - isInvokePending = true; - } - } - - private void UpdateText() - { - //when the Text is null and the Text hasn't been loaded, it indicates that the OnTextPropertyChanged event hasn't exceuted - //and since we are initializing the text from here, we don't want the OnTextPropertyChanged to execute, so set the loaded flag to true. - //this prevents the cursor to jumping to the front of the textbox after the first letter is typed. - if (!_textHasLoaded && string.IsNullOrEmpty(Text)) - _textHasLoaded = true; - - if (_textHasLoaded) - Text = TextFormatter.GetText(Document); - - isInvokePending = false; - } - - #endregion //Methods - - #region Event Hanlders - - private void RichTextBox_Loaded(object sender, RoutedEventArgs e) - { - Binding binding = BindingOperations.GetBinding(this, TextProperty); - - if (binding != null) - { - if (binding.UpdateSourceTrigger == UpdateSourceTrigger.Default || binding.UpdateSourceTrigger == UpdateSourceTrigger.LostFocus) - { - PreviewLostKeyboardFocus += (o, ea) => UpdateText(); //do this synchronously - } - else - { - TextChanged += (o, ea) => InvokeUpdateText(); //do this async - } - } - } - - #endregion //Event Hanlders - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/IRichTextBoxFormatBar.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/IRichTextBoxFormatBar.cs deleted file mode 100644 index 46c38afe..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/IRichTextBoxFormatBar.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - public interface IRichTextBoxFormatBar - { - /// - /// Represents the RichTextBox that will be the target for all text manipulations in the format bar. - /// - global::System.Windows.Controls.RichTextBox Target { get; set; } - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png deleted file mode 100644 index 8fb36a1a..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png deleted file mode 100644 index 1030a021..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png deleted file mode 100644 index 8259a9e1..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png deleted file mode 100644 index c5499bce..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png deleted file mode 100644 index 51dffb73..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png deleted file mode 100644 index cb8e400a..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png deleted file mode 100644 index 72689482..00000000 Binary files a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png and /dev/null differ diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml deleted file mode 100644 index 6d919c41..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs deleted file mode 100644 index 65e78914..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs +++ /dev/null @@ -1,162 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Controls.Primitives; -using Microsoft.Windows.Controls.Core; - -namespace Microsoft.Windows.Controls -{ - /// - /// Interaction logic for RichTextBoxFormatBar.xaml - /// - public partial class RichTextBoxFormatBar : UserControl, IRichTextBoxFormatBar - { - #region Properties - - #region RichTextBox - - public static readonly DependencyProperty TargetProperty = DependencyProperty.Register("Target", typeof(global::System.Windows.Controls.RichTextBox), typeof(RichTextBoxFormatBar), new PropertyMetadata(null, OnRichTextBoxPropertyChanged)); - public global::System.Windows.Controls.RichTextBox Target - { - get { return (global::System.Windows.Controls.RichTextBox)GetValue(TargetProperty); } - set { SetValue(TargetProperty, value); } - } - - private static void OnRichTextBoxPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - RichTextBoxFormatBar formatBar = d as RichTextBoxFormatBar; - formatBar.HookupRichTextBoxEvents(); - } - - private void HookupRichTextBoxEvents() - { - Target.SelectionChanged += RichTextBox_SelectionChanged; - } - - #endregion //RichTextBox - - public static double[] FontSizes - { - get - { - return new double[] { - 3.0, 4.0, 5.0, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, - 10.0, 10.5, 11.0, 11.5, 12.0, 12.5, 13.0, 13.5, 14.0, 15.0, - 16.0, 17.0, 18.0, 19.0, 20.0, 22.0, 24.0, 26.0, 28.0, 30.0, - 32.0, 34.0, 36.0, 38.0, 40.0, 44.0, 48.0, 52.0, 56.0, 60.0, 64.0, 68.0, 72.0, 76.0, - 80.0, 88.0, 96.0, 104.0, 112.0, 120.0, 128.0, 136.0, 144.0 - }; - } - } - - #endregion - - #region Constructors - - public RichTextBoxFormatBar() - { - InitializeComponent(); - Loaded += FormatToolbar_Loaded; - } - - #endregion //Constructors - - #region Event Hanlders - - void FormatToolbar_Loaded(object sender, RoutedEventArgs e) - { - _cmbFontFamilies.ItemsSource = Fonts.SystemFontFamilies; - _cmbFontSizes.ItemsSource = FontSizes; - } - - private void FontFamily_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (e.AddedItems.Count == 0) - return; - - FontFamily editValue = (FontFamily)e.AddedItems[0]; - ApplyPropertyValueToSelectedText(TextElement.FontFamilyProperty, editValue); - } - - private void FontSize_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (e.AddedItems.Count == 0) - return; - - ApplyPropertyValueToSelectedText(TextElement.FontSizeProperty, e.AddedItems[0]); - } - - void RichTextBox_SelectionChanged(object sender, RoutedEventArgs e) - { - UpdateVisualState(); - } - - private void DragWidget_DragDelta(object sender, DragDeltaEventArgs e) - { - ProcessMove(e); - } - - #endregion //Event Hanlders - - #region Methods - - private void UpdateVisualState() - { - UpdateToggleButtonState(); - UpdateSelectedFontFamily(); - UpdateSelectedFontSize(); - } - - private void UpdateToggleButtonState() - { - UpdateItemCheckedState(_btnBold, TextElement.FontWeightProperty, FontWeights.Bold); - UpdateItemCheckedState(_btnItalic, TextElement.FontStyleProperty, FontStyles.Italic); - UpdateItemCheckedState(_btnUnderline, Inline.TextDecorationsProperty, TextDecorations.Underline); - - UpdateItemCheckedState(_btnAlignLeft, Paragraph.TextAlignmentProperty, TextAlignment.Left); - UpdateItemCheckedState(_btnAlignCenter, Paragraph.TextAlignmentProperty, TextAlignment.Center); - UpdateItemCheckedState(_btnAlignRight, Paragraph.TextAlignmentProperty, TextAlignment.Right); - } - - void UpdateItemCheckedState(ToggleButton button, DependencyProperty formattingProperty, object expectedValue) - { - object currentValue = Target.Selection.GetPropertyValue(formattingProperty); - button.IsChecked = (currentValue == DependencyProperty.UnsetValue) ? false : currentValue != null && currentValue.Equals(expectedValue); - } - - private void UpdateSelectedFontFamily() - { - object value = Target.Selection.GetPropertyValue(TextElement.FontFamilyProperty); - FontFamily currentFontFamily = (FontFamily)((value == DependencyProperty.UnsetValue) ? null : value); - if (currentFontFamily != null) - { - _cmbFontFamilies.SelectedItem = currentFontFamily; - } - } - - private void UpdateSelectedFontSize() - { - object value = Target.Selection.GetPropertyValue(TextElement.FontSizeProperty); - _cmbFontSizes.SelectedValue = (value == DependencyProperty.UnsetValue) ? null : value; - } - - void ApplyPropertyValueToSelectedText(DependencyProperty formattingProperty, object value) - { - if (value == null) - return; - - Target.Selection.ApplyPropertyValue(formattingProperty, value); - } - - private void ProcessMove(DragDeltaEventArgs e) - { - AdornerLayer layer = AdornerLayer.GetAdornerLayer(Target); - UIElementAdorner adorner = layer.GetAdorners(Target)[0] as UIElementAdorner; - adorner.SetOffsets(adorner.OffsetLeft + e.HorizontalChange, adorner.OffsetTop + e.VerticalChange); - } - - #endregion //Methods - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBarManager.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBarManager.cs deleted file mode 100644 index 1b03394f..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBarManager.cs +++ /dev/null @@ -1,187 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using Microsoft.Windows.Controls.Core; -using System.Windows.Input; - -namespace Microsoft.Windows.Controls -{ - public class RichTextBoxFormatBarManager : DependencyObject - { - #region Members - - private global::System.Windows.Controls.RichTextBox _richTextBox; - private UIElementAdorner _adorner; - private IRichTextBoxFormatBar _toolbar; - - #endregion //Members - - #region Properties - - #region FormatBar - - public static readonly DependencyProperty FormatBarProperty = DependencyProperty.RegisterAttached("FormatBar", typeof(IRichTextBoxFormatBar), typeof(RichTextBox), new PropertyMetadata(null, OnFormatBarPropertyChanged)); - public static void SetFormatBar(UIElement element, IRichTextBoxFormatBar value) - { - element.SetValue(FormatBarProperty, value); - } - public static IRichTextBoxFormatBar GetFormatBar(UIElement element) - { - return (IRichTextBoxFormatBar)element.GetValue(FormatBarProperty); - } - - private static void OnFormatBarPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - global::System.Windows.Controls.RichTextBox rtb = d as global::System.Windows.Controls.RichTextBox; - if (rtb == null) - throw new Exception("A FormatBar can only be applied to a RichTextBox."); - - RichTextBoxFormatBarManager manager = new RichTextBoxFormatBarManager(); - manager.AttachFormatBarToRichtextBox(rtb, e.NewValue as IRichTextBoxFormatBar); - } - - #endregion //FormatBar - - bool AdornerIsVisible - { - get { return _adorner.Visibility == Visibility.Visible; } - } - - #endregion //Properties - - #region Event Handlers - - void RichTextBox_MouseButtonUp(object sender, MouseButtonEventArgs e) - { - if (e.LeftButton == MouseButtonState.Released) - { - TextRange selectedText = new TextRange(_richTextBox.Selection.Start, _richTextBox.Selection.End); - if (selectedText.Text.Length > 0 && !String.IsNullOrEmpty(selectedText.Text)) - { - ShowAdorner(); - } - else - { - HideAdorner(); - } - } - - e.Handled = true; - } - - void RichTextBox_PreviewMouseMove(object sender, MouseEventArgs e) - { - //if the mouse moves outside the richtextbox bounds hide the adorner - //though this deosn't always work, especially if the user moves the mouse very quickly. - //need to find a better solution, but this will work for now. - Point p = e.GetPosition(_richTextBox); - if (p.X <= 5.0 || p.X >= _richTextBox.ActualWidth - 5 || p.Y <= 3.0 || p.Y >= _richTextBox.ActualHeight - 3) - HideAdorner(); - } - - void RichTextBox_TextChanged(object sender, TextChangedEventArgs e) - { - //this fixes the bug when applying text transformations the text would lose it's highlight. That was because the RichTextBox was losing focus - //so we just give it focus again and it seems to do the trick of re-highlighting it. - if (!_richTextBox.IsFocused) - _richTextBox.Focus(); - } - - #endregion //Event Handlers - - #region Methods - - /// - /// Attaches a FormatBar to a RichtextBox - /// - /// The RichtextBox to attach to. - /// The Formatbar to attach. - private void AttachFormatBarToRichtextBox(global::System.Windows.Controls.RichTextBox richTextBox, IRichTextBoxFormatBar formatBar) - { - _richTextBox = richTextBox; - _richTextBox.PreviewMouseMove += RichTextBox_PreviewMouseMove; - //we cannot use the PreviewMouseLeftButtonUp event because of selection bugs. - //we cannot use the MouseLeftButtonUp event because it is handled by the RichTextBox and does not bubble up to here, so we must - //add a hander to the MouseUpEvent using the Addhandler syntax, and specify to listen for handled events too. - _richTextBox.AddHandler(Mouse.MouseUpEvent, new MouseButtonEventHandler(RichTextBox_MouseButtonUp), true); - _richTextBox.TextChanged += RichTextBox_TextChanged; - - _adorner = new UIElementAdorner(_richTextBox); - - formatBar.Target = _richTextBox; - _toolbar = formatBar; - } - - /// - /// Shows the FormatBar - /// - void ShowAdorner() - { - VerifyAdornerLayer(); - - Control adorningEditor = _toolbar as Control; - _adorner.Child = adorningEditor; - _adorner.Visibility = Visibility.Visible; - - PositionFormatBar(adorningEditor); - } - - /// - /// Positions the FormatBar so that is does not go outside the bounds of the RichTextBox or covers the selected text - /// - /// - private void PositionFormatBar(Control adorningEditor) - { - Point mousePosition = Mouse.GetPosition(_richTextBox); - - double left = mousePosition.X; - double top = (mousePosition.Y - 15) - adorningEditor.ActualHeight; - - //top - if (top < 0) - { - top = mousePosition.Y + 10; - } - - //right boundary - if (left + adorningEditor.ActualWidth > _richTextBox.ActualWidth - 20) - { - left = left - (adorningEditor.ActualWidth - (_richTextBox.ActualWidth - left)); - } - - _adorner.SetOffsets(left, top); - } - - /// - /// Ensures that the IRichTextFormatBar is in the adorner layer. - /// - /// True if the IRichTextFormatBar is in the adorner layer, else false. - bool VerifyAdornerLayer() - { - if (_adorner.Parent != null) - return true; - - AdornerLayer layer = AdornerLayer.GetAdornerLayer(_richTextBox); - if (layer == null) - return false; - - layer.Add(_adorner); - return true; - } - - /// - /// Hides the IRichTextFormatBar that is in the adornor layer. - /// - void HideAdorner() - { - if (AdornerIsVisible) - { - _adorner.Visibility = Visibility.Collapsed; - _adorner.Child = null; - } - } - - #endregion //Methods - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Generic.xaml b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Generic.xaml deleted file mode 100644 index 7ad95cc4..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Generic.xaml +++ /dev/null @@ -1,1106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Collapsed - - - - - - - Collapsed - - - - - - - - - - - Visible - - - - - - - Visible - - - - - - - - - - - - - True - - - - - - - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/UpDownBase/UpDownBase.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/UpDownBase/UpDownBase.cs deleted file mode 100644 index aed90390..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/UpDownBase/UpDownBase.cs +++ /dev/null @@ -1,321 +0,0 @@ -using System; -using System.Windows.Input; -using System.Windows.Controls; -using System.Windows; - -namespace Microsoft.Windows.Controls -{ - public abstract class UpDownBase : Control - { - #region Members - - /// - /// Name constant for Text template part. - /// - internal const string ElementTextName = "Text"; - - /// - /// Name constant for Spinner template part. - /// - internal const string ElementSpinnerName = "Spinner"; - - /// - /// Flags if the Text and Value properties are in the process of being sync'd - /// - bool _isSyncingTextAndValueProperties; - - #endregion //Members - - #region Properties - - #region Value - - public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(T), typeof(UpDownBase), new FrameworkPropertyMetadata(default(T), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValuePropertyChanged)); - public virtual T Value - { - get { return (T)GetValue(ValueProperty); } - set { SetValue(ValueProperty, value); } - } - - private static void OnValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - UpDownBase udb = (UpDownBase)d; - T oldValue = (T)e.OldValue; - T newValue = (T)e.NewValue; - - udb.SyncTextAndValueProperties(e.Property, e.NewValue); - - RoutedPropertyChangedEventArgs changedArgs = new RoutedPropertyChangedEventArgs(oldValue, newValue); - udb.OnValueChanged(changedArgs); - } - - protected virtual void OnValueChanged(RoutedPropertyChangedEventArgs e) - { - if (ValueChanged != null) - ValueChanged(this, e); - } - - #endregion //Value - - #region Text - - public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(UpDownBase), new FrameworkPropertyMetadata("0", FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnTextPropertyChanged)); - public string Text - { - get { return (string)GetValue(TextProperty); } - set { SetValue(TextProperty, value); } - } - - private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - UpDownBase udb = (UpDownBase)d; - udb.SyncTextAndValueProperties(e.Property, e.NewValue); - } - - #endregion //Text - - #region IsEditable - - public static readonly DependencyProperty IsEditableProperty = DependencyProperty.Register("IsEditable", typeof(bool), typeof(UpDownBase), new PropertyMetadata(true, OnIsEditablePropertyChanged)); - public bool IsEditable - { - get { return (bool)GetValue(IsEditableProperty); } - set { SetValue(IsEditableProperty, value); } - } - - private static void OnIsEditablePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - UpDownBase source = d as UpDownBase; - source.OnIsEditableChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnIsEditableChanged(bool oldValue, bool newValue) - { - if (TextBox != null) - TextBox.IsReadOnly = !IsEditable; - } - - #endregion //IsEditable - - internal TextBox TextBox { get; private set; } - - private Spinner _spinner; - internal Spinner Spinner - { - get { return _spinner; } - private set - { - _spinner = value; - _spinner.Spin += OnSpinnerSpin; - } - } - - #endregion //Properties - - #region Constructors - - protected UpDownBase() { } - - #endregion //Constructors - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - TextBox = GetTemplateChild(ElementTextName) as TextBox; - Spinner = GetTemplateChild(ElementSpinnerName) as Spinner; - - if (TextBox != null) - TextBox.IsReadOnly = !IsEditable; - } - - protected override void OnPreviewKeyDown(KeyEventArgs e) - { - switch (e.Key) - { - case Key.Up: - { - DoIncrement(); - e.Handled = true; - break; - } - case Key.Down: - { - DoDecrement(); - e.Handled = true; - break; - } - case Key.Enter: - { - SyncTextAndValueProperties(UpDownBase.TextProperty, TextBox.Text); - break; - } - } - } - - protected override void OnMouseWheel(MouseWheelEventArgs e) - { - base.OnMouseWheel(e); - - if (!e.Handled) - { - if (e.Delta < 0) - { - DoDecrement(); - } - else if (0 < e.Delta) - { - DoIncrement(); - } - - e.Handled = true; - } - } - - #endregion //Base Class Overrides - - #region Methods - - #region Abstract - - /// - /// Called by ApplyValue to parse user input. - /// - /// User input. - /// Value parsed from user input. - protected abstract T ParseValue(string text); - - /// - /// Renders the value property into the textbox text. - /// - /// Formatted Value. - protected internal abstract string FormatValue(); - - /// - /// Called by OnSpin when the spin direction is SpinDirection.Increase. - /// - protected abstract void OnIncrement(); - - /// - /// Called by OnSpin when the spin direction is SpinDirection.Descrease. - /// - protected abstract void OnDecrement(); - - #endregion //Abstract - - #region Protected - - /// - /// GetValue override to return Value property as object type. - /// - /// The Value property as object type. - protected object GetValue() - { - return Value; - } - - /// - /// SetValue override to set value to Value property. - /// - /// New value. - protected void SetValue(object value) - { - Value = (T)value; - } - - #endregion //Protected - - #region Private - - /// - /// Performs an increment if conditions allow it. - /// - private void DoDecrement() - { - if (Spinner == null || (Spinner.ValidSpinDirection & ValidSpinDirections.Decrease) == ValidSpinDirections.Decrease) - { - OnDecrement(); - } - } - - /// - /// Performs a decrement if conditions allow it. - /// - private void DoIncrement() - { - if (Spinner == null || (Spinner.ValidSpinDirection & ValidSpinDirections.Increase) == ValidSpinDirections.Increase) - { - OnIncrement(); - } - } - - protected void SyncTextAndValueProperties(DependencyProperty p, object newValue) - { - //prevents recursive syncing properties - if (_isSyncingTextAndValueProperties) - return; - - _isSyncingTextAndValueProperties = true; - - //this only occures when the user typed in the value - if (UpDownBase.TextProperty == p) - { - SetValue(UpDownBase.ValueProperty, ParseValue(newValue.ToString())); - } - - //we need to update the text no matter what because the user could have used the spin buttons to change dthe value - //or typed in the textbox so we need to reformat the entered value. - SetValue(UpDownBase.TextProperty, FormatValue()); - - _isSyncingTextAndValueProperties = false; - } - - #endregion //Private - - #region Virtual - - /// - /// Occurs when the spinner spins. - /// - /// Event args. - protected virtual void OnSpin(SpinEventArgs e) - { - if (e == null) - throw new ArgumentNullException("e"); - - if (e.Direction == SpinDirection.Increase) - DoIncrement(); - else - DoDecrement(); - } - - #endregion //Virtual - - #endregion //Methods - - #region Event Handlers - - /// - /// Event handler for Spinner template part's Spin event. - /// - /// The Spinner template part. - /// Event args. - private void OnSpinnerSpin(object sender, SpinEventArgs e) - { - OnSpin(e); - } - - #endregion //Event Handlers - - #region Events - - /// - /// Occurs when Value property has changed. - /// - public event RoutedPropertyChangedEventHandler ValueChanged; - - #endregion //Events - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/VisualStates.cs b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/VisualStates.cs deleted file mode 100644 index 721a96e2..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/VisualStates.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - internal static partial class VisualStates - { - - } -} diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj deleted file mode 100644 index bd366366..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj +++ /dev/null @@ -1,144 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {72E591D6-8F83-4D8C-8F67-9C325E623234} - library - Properties - Microsoft.Windows.Controls - WPFToolkit.Extended - v3.5 - Client - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - SAK - SAK - SAK - SAK - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - 3.5 - - - - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - - - - - - - - - - - - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - RichTextBoxFormatBar.xaml - - - - - - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc b/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.2.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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/ExtendedWPFToolkit.sln b/Release/v1.3.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln deleted file mode 100644 index ffc559c3..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln +++ /dev/null @@ -1,69 +0,0 @@ - -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 deleted file mode 100644 index 794f014c..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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 deleted file mode 100644 index d59e48ab..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/MetadataStore.cs +++ /dev/null @@ -1,52 +0,0 @@ -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 deleted file mode 100644 index 5b13e861..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -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 deleted file mode 100644 index 7ef72466..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 deleted file mode 100644 index 72d80d66..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ 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 deleted file mode 100644 index fd0fa3fa..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj +++ /dev/null @@ -1,99 +0,0 @@ - - - - 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 deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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 deleted file mode 100644 index 00767c6d..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - 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 deleted file mode 100644 index f0cfc9e7..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml.cs +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 0f66d220..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 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 deleted file mode 100644 index f28170f3..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs +++ /dev/null @@ -1,27 +0,0 @@ -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 deleted file mode 100644 index 35e4c7aa..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -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 deleted file mode 100644 index 3c757353..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 deleted file mode 100644 index a353c3db..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ 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 deleted file mode 100644 index e49eab24..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj +++ /dev/null @@ -1,113 +0,0 @@ - - - - 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 deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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 deleted file mode 100644 index 6a73cd8f..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/BusyIndicator.cs +++ /dev/null @@ -1,266 +0,0 @@ -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 deleted file mode 100644 index 5d78d952..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/VisualStates.BusyIndicator.cs +++ /dev/null @@ -1,37 +0,0 @@ -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 deleted file mode 100644 index b2c2ad99..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/ButtonSpinner.cs +++ /dev/null @@ -1,191 +0,0 @@ -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 deleted file mode 100644 index aaa121fb..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/SpinDirection.cs +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index f8a89385..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/SpinEventArgs.cs +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 63b2a22a..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Spinner.cs +++ /dev/null @@ -1,75 +0,0 @@ -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 deleted file mode 100644 index d744620d..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/ValidSpinDirections.cs +++ /dev/null @@ -1,26 +0,0 @@ -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 deleted file mode 100644 index 74b9842e..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/ChildWindow.cs +++ /dev/null @@ -1,539 +0,0 @@ -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 deleted file mode 100644 index eb3a4ea9..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/VisualStates.ChildWindow.cs +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index cc001a25..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/WindowState.cs +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index 0f846a9a..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorItem.cs +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index 610cea70..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.cs +++ /dev/null @@ -1,221 +0,0 @@ -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 deleted file mode 100644 index 10684dcb..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/InverseBoolConverter.cs +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 58c656be..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs +++ /dev/null @@ -1,186 +0,0 @@ -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 args = new RoutedPropertyChangedEventArgs(oldValue, newValue); - args.RoutedEvent = InputBase.ValueChangedEvent; - RaiseEvent(args); - } - - private static object OnCoerceValuePropertyCallback(DependencyObject d, object baseValue) - { - InputBase inputBase = d as InputBase; - if (inputBase != null) - return inputBase.OnCoerceValue(baseValue); - else - return baseValue; - } - - protected virtual object OnCoerceValue(object value) - { - return value; - } - - #endregion //Value - - #region ValueType - - public static readonly DependencyProperty ValueTypeProperty = DependencyProperty.Register("ValueType", typeof(Type), typeof(InputBase), new FrameworkPropertyMetadata(typeof(String), FrameworkPropertyMetadataOptions.None, new PropertyChangedCallback(OnValueTypePropertyChanged))); - public Type ValueType - { - get { return (Type)GetValue(ValueTypeProperty); } - set { SetValue(ValueTypeProperty, value); } - } - - private static void OnValueTypePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - InputBase input = (InputBase)d; - input.OnValueTypeChanged((Type)e.OldValue, (Type)e.NewValue); - } - - protected virtual void OnValueTypeChanged(Type oldValue, Type newType) - { - if (_isInitialized) - SyncTextAndValueProperties(TextProperty, Text); - } - - #endregion //ValueType - - #endregion //Properties - - #region Base Class Overrides - - protected override void OnInitialized(EventArgs e) - { - base.OnInitialized(e); - - if (!_isInitialized) - { - _isInitialized = true; - SyncTextAndValueProperties(ValueProperty, Value); - } - } - - #endregion //Base Class Overrides - - #region Events - - public static readonly RoutedEvent ValueChangedEvent = EventManager.RegisterRoutedEvent("ValueChanged", RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler), typeof(InputBase)); - public event RoutedPropertyChangedEventHandler ValueChanged - { - add { AddHandler(ValueChangedEvent, value); } - remove { RemoveHandler(ValueChangedEvent, value); } - } - - #endregion //Events - - #region Methods - - protected void SyncTextAndValueProperties(DependencyProperty p, object newValue) - { - //prevents recursive syncing properties - if (_isSyncingTextAndValueProperties) - return; - - _isSyncingTextAndValueProperties = true; - - //this only occures when the user typed in the value - if (InputBase.TextProperty == p) - { - SetValue(InputBase.ValueProperty, ConvertTextToValue(newValue.ToString())); - } - - SetValue(InputBase.TextProperty, ConvertValueToText(newValue)); - - _isSyncingTextAndValueProperties = false; - } - - #endregion //Methods - - #region Abstract - - protected abstract object ConvertTextToValue(string text); - - protected abstract string ConvertValueToText(object value); - - #endregion //Abstract - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/UIElementAdorner.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/UIElementAdorner.cs deleted file mode 100644 index 263ca034..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/UIElementAdorner.cs +++ /dev/null @@ -1,215 +0,0 @@ -using System; -using System.Collections; -using System.Windows.Media; -using System.Windows.Documents; -using System.Windows; - -namespace Microsoft.Windows.Controls.Core -{ - /// - /// An adorner that can display one and only one UIElement. - /// That element can be a panel, which contains multiple other elements. - /// The element is added to the adorner's visual and logical trees, enabling it to - /// particpate in dependency property value inheritance, amongst other things. - /// - internal class UIElementAdorner - : Adorner - where TElement : UIElement - { - #region Fields - - TElement _child = null; - double _offsetLeft = 0; - double _offsetTop = 0; - - #endregion // Fields - - #region Constructor - - /// - /// Constructor. - /// - /// The element to which the adorner will be bound. - public UIElementAdorner(UIElement adornedElement) - : base(adornedElement) - { - } - - #endregion // Constructor - - #region Public Interface - - #region Child - - /// - /// Gets/sets the child element hosted in the adorner. - /// - public TElement Child - { - get { return _child; } - set - { - if (value == _child) - return; - - if (_child != null) - { - base.RemoveLogicalChild(_child); - base.RemoveVisualChild(_child); - } - - _child = value; - - if (_child != null) - { - base.AddLogicalChild(_child); - base.AddVisualChild(_child); - } - } - } - - #endregion // Child - - #region GetDesiredTransform - - /// - /// Override. - /// - /// - /// - public override GeneralTransform GetDesiredTransform(GeneralTransform transform) - { - GeneralTransformGroup result = new GeneralTransformGroup(); - result.Children.Add(base.GetDesiredTransform(transform)); - result.Children.Add(new TranslateTransform(_offsetLeft, _offsetTop)); - return result; - } - - #endregion // GetDesiredTransform - - #region OffsetLeft - - /// - /// Gets/sets the horizontal offset of the adorner. - /// - public double OffsetLeft - { - get { return _offsetLeft; } - set - { - _offsetLeft = value; - UpdateLocation(); - } - } - - #endregion // OffsetLeft - - #region SetOffsets - - /// - /// Updates the location of the adorner in one atomic operation. - /// - public void SetOffsets(double left, double top) - { - _offsetLeft = left; - _offsetTop = top; - this.UpdateLocation(); - } - - #endregion // SetOffsets - - #region OffsetTop - - /// - /// Gets/sets the vertical offset of the adorner. - /// - public double OffsetTop - { - get { return _offsetTop; } - set - { - _offsetTop = value; - UpdateLocation(); - } - } - - #endregion // OffsetTop - - #endregion // Public Interface - - #region Protected Overrides - - /// - /// Override. - /// - /// - /// - protected override Size MeasureOverride(Size constraint) - { - if (_child == null) - return base.MeasureOverride(constraint); - - _child.Measure(constraint); - return _child.DesiredSize; - } - - /// - /// Override. - /// - /// - /// - protected override Size ArrangeOverride(Size finalSize) - { - if (_child == null) - return base.ArrangeOverride(finalSize); - - _child.Arrange(new Rect(finalSize)); - return finalSize; - } - - /// - /// Override. - /// - protected override IEnumerator LogicalChildren - { - get - { - ArrayList list = new ArrayList(); - if (_child != null) - list.Add(_child); - return list.GetEnumerator(); - } - } - - /// - /// Override. - /// - /// - /// - protected override Visual GetVisualChild(int index) - { - return _child; - } - - /// - /// Override. - /// - protected override int VisualChildrenCount - { - get { return _child == null ? 0 : 1; } - } - - #endregion // Protected Overrides - - #region Private Helpers - - void UpdateLocation() - { - AdornerLayer adornerLayer = base.Parent as AdornerLayer; - if (adornerLayer != null) - adornerLayer.Update(base.AdornedElement); - } - - #endregion // Private Helpers - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeFormat.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeFormat.cs deleted file mode 100644 index 64591695..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeFormat.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - public enum DateTimeFormat - { - FullDateTime, - LongDate, - LongTime, - MonthDay, - RFC1123, - ShortDate, - ShortTime, - SortableDateTime, - UniversalSortableDateTime, - YearMonth - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeInfo.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeInfo.cs deleted file mode 100644 index 8f4f7765..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeInfo.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - internal class DateTimeInfo - { - public string Content { get; set; } - public string Format { get; set; } - public bool IsReadOnly { get; set; } - public int Length { get; set; } - public int StartPosition { get; set; } - public DateTimePart Type { get; set; } - } -} \ No newline at end of file diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimePart.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimePart.cs deleted file mode 100644 index d4ec352c..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimePart.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - public enum DateTimePart - { - Day, - DayName, - AmPmDesignator, - Millisecond, - Hour12, - Hour24, - Minute, - Month, - MonthName, - Other, - Period, - TimeZone, - Second, - Year - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeUpDown.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeUpDown.cs deleted file mode 100644 index 0af73e15..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeUpDown.cs +++ /dev/null @@ -1,445 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Windows; -using System.Windows.Input; - -namespace Microsoft.Windows.Controls -{ - public class DateTimeUpDown : UpDownBase - { - #region Members - - private List _dateTimeInfoList = new List(); - private DateTimeInfo _selectedDateTimeInfo; - private bool _fireSelectionChangedEvent = true; - - #endregion //Members - - #region Properties - - private DateTimeFormatInfo DateTimeFormatInfo { get; set; } - - #region Format - - public static readonly DependencyProperty FormatProperty = DependencyProperty.Register("Format", typeof(DateTimeFormat), typeof(DateTimeUpDown), new UIPropertyMetadata(DateTimeFormat.FullDateTime, OnFormatChanged)); - public DateTimeFormat Format - { - get { return (DateTimeFormat)GetValue(FormatProperty); } - set { SetValue(FormatProperty, value); } - } - - private static void OnFormatChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - DateTimeUpDown dateTimeUpDown = o as DateTimeUpDown; - if (dateTimeUpDown != null) - dateTimeUpDown.OnFormatChanged((DateTimeFormat)e.OldValue, (DateTimeFormat)e.NewValue); - } - - protected virtual void OnFormatChanged(DateTimeFormat oldValue, DateTimeFormat newValue) - { - InitializeDateTimeInfoList(); - } - - #endregion //Format - - #endregion //Properties - - #region Constructors - - static DateTimeUpDown() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(DateTimeUpDown), new FrameworkPropertyMetadata(typeof(DateTimeUpDown))); - ValueTypeProperty.OverrideMetadata(typeof(DateTimeUpDown), new FrameworkPropertyMetadata(typeof(Nullable))); - } - - public DateTimeUpDown() - { - DateTimeFormatInfo = DateTimeFormatInfo.GetInstance(CultureInfo.CurrentCulture); - InitializeDateTimeInfoList(); - } - - #endregion //Constructors - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - TextBox.SelectionChanged += TextBox_SelectionChanged; - } - - protected override void OnPreviewKeyDown(KeyEventArgs e) - { - if (e.Key == Key.Enter) - return; - - base.OnPreviewKeyDown(e); - } - - protected override void OnValueChanged(object oldValue, object newValue) - { - //whenever the value changes we need to parse out the value into out DateTimeInfo segments so we can keep track of the individual pieces - ParseValueIntoDateTimeInfo(); - - base.OnValueChanged(oldValue, newValue); - } - - protected override object OnCoerceValue(object value) - { - //if the user entered a string value to represent a date or time, we need to parse that string into a valid DatTime value - if (value != null && !(value is DateTime)) - { - return DateTime.Parse(value.ToString(), DateTimeFormatInfo); - } - - return base.OnCoerceValue(value); - } - - #endregion //Base Class Overrides - - #region Event Hanlders - - void TextBox_SelectionChanged(object sender, RoutedEventArgs e) - { - if (_fireSelectionChangedEvent) - SelectDateTimePart(); - else - _fireSelectionChangedEvent = true; - } - - #endregion //Event Hanlders - - #region Methods - - #region Abstract - - protected override void OnIncrement() - { - UpdateDateTime(1); - } - - protected override void OnDecrement() - { - UpdateDateTime(-1); - } - - protected override object ConvertTextToValue(string text) - { - throw new NotImplementedException("ConvertTextToValue"); - } - - protected override string ConvertValueToText(object value) - { - if (value == null) return string.Empty; - - DateTime? dt = DateTime.Parse(value.ToString(), CultureInfo.CurrentCulture); - - if (dt.HasValue) - return dt.Value.ToString(GetFormatString(Format), CultureInfo.CurrentCulture); - else - return string.Empty; - } - - #endregion //Abstract - - private void InitializeDateTimeInfoList() - { - _dateTimeInfoList.Clear(); - - string format = GetFormatString(Format); - while (format.Length > 0) - { - int elementLength = GetElementLengthByFormat(format); - DateTimeInfo info = null; - - switch (format[0]) - { - case '"': - case '\'': - { - int closingQuotePosition = format.IndexOf(format[0], 1); - info = new DateTimeInfo { IsReadOnly = true, Type = DateTimePart.Other, Length = 1, Content = format.Substring(1, Math.Max(1, closingQuotePosition - 1)).ToString() }; - elementLength = Math.Max(1, closingQuotePosition + 1); - break; - } - case 'D': - case 'd': - { - string d = format.Substring(0, elementLength); - if (elementLength == 1) - d = "%" + d; - - if (elementLength > 2) - info = new DateTimeInfo { IsReadOnly = true, Type = DateTimePart.DayName, Format = d }; - else - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Day, Format = d }; - break; - } - case 'F': - case 'f': - { - string f = format.Substring(0, elementLength); - if (elementLength == 1) - f = "%" + f; - - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Millisecond, Format = f }; - break; - } - case 'h': - { - string h = format.Substring(0, elementLength); - if (elementLength == 1) - h = "%" + h; - - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Hour12, Format = h }; - break; - } - case 'H': - { - string H = format.Substring(0, elementLength); - if (elementLength == 1) - H = "%" + H; - - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Hour24, Format = H }; - break; - } - case 'M': - { - string M = format.Substring(0, elementLength); - if (elementLength == 1) - M = "%" + M; - - if (elementLength >= 3) - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.MonthName, Format = M }; - else - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Month, Format = M }; - break; - } - case 'S': - case 's': - { - string s = format.Substring(0, elementLength); - if (elementLength == 1) - s = "%" + s; - - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Second, Format = s }; - break; - } - case 'T': - case 't': - { - string t = format.Substring(0, elementLength); - if (elementLength == 1) - t = "%" + t; - - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.AmPmDesignator, Format = t }; - break; - } - case 'Y': - case 'y': - { - string y = format.Substring(0, elementLength); - if (elementLength == 1) - y = "%" + y; - - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Year, Format = y }; - break; - } - case '\\': - { - if (format.Length >= 2) - { - info = new DateTimeInfo { IsReadOnly = true, Content = format.Substring(1, 1), Length = 1, Type = DateTimePart.Other }; - elementLength = 2; - } - break; - } - case 'g': - { - string g = format.Substring(0, elementLength); - if (elementLength == 1) - g = "%" + g; - - info = new DateTimeInfo { IsReadOnly = true, Type = DateTimePart.Period, Format = format.Substring(0, elementLength) }; - break; - } - case 'm': - { - string m = format.Substring(0, elementLength); - if (elementLength == 1) - m = "%" + m; - - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Minute, Format = m }; - break; - } - case 'z': - { - string z = format.Substring(0, elementLength); - if (elementLength == 1) - z = "%" + z; - - info = new DateTimeInfo { IsReadOnly = true, Type = DateTimePart.TimeZone, Format = z }; - break; - } - default: - { - elementLength = 1; - info = new DateTimeInfo { IsReadOnly = true, Length = 1, Content = format[0].ToString(), Type = DateTimePart.Other }; - break; - } - } - - _dateTimeInfoList.Add(info); - format = format.Substring(elementLength); - } - } - - private static int GetElementLengthByFormat(string format) - { - for (int i = 1; i < format.Length; i++) - { - if (String.Compare(format[i].ToString(), format[0].ToString(), false) != 0) - { - return i; - } - } - return format.Length; - } - - private void ParseValueIntoDateTimeInfo() - { - string text = string.Empty; - - _dateTimeInfoList.ForEach(info => - { - if (info.Format == null) - { - info.StartPosition = text.Length; - info.Length = info.Content.Length; - text += info.Content; - } - else - { - DateTime date = DateTime.Parse(Value.ToString()); - info.StartPosition = text.Length; - info.Content = date.ToString(info.Format, DateTimeFormatInfo); - info.Length = info.Content.Length; - text += info.Content; - } - }); - } - - private void SelectDateTimePart() - { - _dateTimeInfoList.ForEach(info => - { - if ((info.StartPosition <= TextBox.SelectionStart) && (TextBox.SelectionStart < (info.StartPosition + info.Length))) - { - _fireSelectionChangedEvent = false; - TextBox.Select(info.StartPosition, info.Length); - _fireSelectionChangedEvent = true; - _selectedDateTimeInfo = info; - return; - } - }); - } - - private string GetFormatString(DateTimeFormat dateTimeFormat) - { - switch (dateTimeFormat) - { - case DateTimeFormat.ShortDate: - return DateTimeFormatInfo.ShortDatePattern; - case DateTimeFormat.LongDate: - return DateTimeFormatInfo.LongDatePattern; - case DateTimeFormat.ShortTime: - return DateTimeFormatInfo.ShortTimePattern; - case DateTimeFormat.LongTime: - return DateTimeFormatInfo.LongTimePattern; - case DateTimeFormat.FullDateTime: - return DateTimeFormatInfo.FullDateTimePattern; - case DateTimeFormat.MonthDay: - return DateTimeFormatInfo.MonthDayPattern; - case DateTimeFormat.RFC1123: - return DateTimeFormatInfo.RFC1123Pattern; - case DateTimeFormat.SortableDateTime: - return DateTimeFormatInfo.SortableDateTimePattern; - case DateTimeFormat.UniversalSortableDateTime: - return DateTimeFormatInfo.UniversalSortableDateTimePattern; - case DateTimeFormat.YearMonth: - return DateTimeFormatInfo.YearMonthPattern; - default: - throw new ArgumentException("Not a supported format"); - } - } - - private void UpdateDateTime(int value) - { - _fireSelectionChangedEvent = false; - DateTimeInfo info = _selectedDateTimeInfo; - - //this only occurs when the user manually type in a value for the Value Property - if (info == null) - info = _dateTimeInfoList[0]; - - - switch (info.Type) - { - case DateTimePart.Year: - { - Value = ((DateTime)Value).AddYears(value); - break; - } - case DateTimePart.Month: - case DateTimePart.MonthName: - { - Value = ((DateTime)Value).AddMonths(value); - break; - } - case DateTimePart.Day: - case DateTimePart.DayName: - { - Value = ((DateTime)Value).AddDays(value); - break; - } - case DateTimePart.Hour12: - case DateTimePart.Hour24: - { - Value = ((DateTime)Value).AddHours(value); - break; - } - case DateTimePart.Minute: - { - Value = ((DateTime)Value).AddMinutes(value); - break; - } - case DateTimePart.Second: - { - Value = ((DateTime)Value).AddSeconds(value); - break; - } - case DateTimePart.Millisecond: - { - Value = ((DateTime)Value).AddMilliseconds(value); - break; - } - case DateTimePart.AmPmDesignator: - { - Value = ((DateTime)Value).AddHours(value * 12); - break; - } - default: - { - break; - } - } - - //we loose our selection when the Value is set so we need to reselect it without firing the selection changed event - TextBox.Select(info.StartPosition, info.Length); - _fireSelectionChangedEvent = true; - } - - #endregion //Methods - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Converters/BorderThicknessToStrokeThicknessConverter.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Converters/BorderThicknessToStrokeThicknessConverter.cs deleted file mode 100644 index 1f672cda..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Converters/BorderThicknessToStrokeThicknessConverter.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Windows.Data; -using System.Windows; - -namespace Microsoft.Windows.Controls.Mag.Converters -{ - internal class BorderThicknessToStrokeThicknessConverter : IValueConverter - { - #region IValueConverter Members - - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - Thickness thickness = (Thickness)value; - return (thickness.Bottom + thickness.Left + thickness.Right + thickness.Top) / 4; - } - - 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/Magnifier/Converters/RadiusConverter.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Converters/RadiusConverter.cs deleted file mode 100644 index 532a3552..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Converters/RadiusConverter.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Windows.Data; - -namespace Microsoft.Windows.Controls.Mag.Converters -{ - internal class RadiusConverter : IValueConverter - { - #region IValueConverter Members - - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - return (double)value * 2; - } - - 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/Magnifier/Magnifier.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Magnifier.cs deleted file mode 100644 index 2ea13e1b..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Magnifier.cs +++ /dev/null @@ -1,166 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; - -namespace Microsoft.Windows.Controls -{ - public class Magnifier : Control - { - #region Properties - - #region DefaultSize - - internal Size DefaultSize - { - get - { - return new Size(2 * Radius, 2 * Radius); - } - } - - #endregion //DefaultSize - - #region MagnifierWidth - - public static readonly DependencyProperty MagnifierWidthProperty = DependencyProperty.Register("MagnifierWidth", typeof(double), typeof(Magnifier), new UIPropertyMetadata(50.0)); - internal double MagnifierWidth - { - get { return (double)GetValue(MagnifierWidthProperty); } - set { SetValue(MagnifierWidthProperty, value); } - } - - #endregion //MagnifierWidth - - #region MagnifierHeight - - public static readonly DependencyProperty MagnifierHeightProperty = DependencyProperty.Register("MagnifierHeight", typeof(double), typeof(Magnifier), new UIPropertyMetadata(50.0)); - internal double MagnifierHeight - { - get { return (double)GetValue(MagnifierHeightProperty); } - set { SetValue(MagnifierHeightProperty, value); } - } - - #endregion //MagnifierWidth - - #region Radius - - public static readonly DependencyProperty RadiusProperty = DependencyProperty.Register("Radius", typeof(double), typeof(Magnifier), new FrameworkPropertyMetadata(50.0, new PropertyChangedCallback(OnRadiusPropertyChanged))); - public double Radius - { - get { return (double)GetValue(RadiusProperty); } - set { SetValue(RadiusProperty, value); } - } - - private static void OnRadiusPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - Magnifier m = (Magnifier)d; - m.OnRadiusChanged(e); - } - - protected virtual void OnRadiusChanged(DependencyPropertyChangedEventArgs e) - { - ResolveViewBox(); - } - - #endregion //Radius - - #region Target - - public static readonly DependencyProperty TargetProperty = DependencyProperty.Register("Target", typeof(UIElement), typeof(Magnifier)); - public UIElement Target - { - get { return (UIElement)GetValue(TargetProperty); } - set { SetValue(TargetProperty, value); } - } - - #endregion //Target - - #region ViewBox - - public static readonly DependencyProperty ViewBoxProperty = DependencyProperty.Register("ViewBox", typeof(Rect), typeof(Magnifier), new FrameworkPropertyMetadata(default(Rect))); - internal Rect ViewBox - { - get { return (Rect)GetValue(ViewBoxProperty); } - set { SetValue(ViewBoxProperty, value); } - } - - #endregion //ViewBox - - #region ZoomFactor - - public static readonly DependencyProperty ZoomFactorProperty = DependencyProperty.Register("ZoomFactor", typeof(double), typeof(Magnifier), new FrameworkPropertyMetadata(0.5, OnZoomFactorPropertyChanged, OnCoerceZoomFactorProperty)); - public double ZoomFactor - { - get { return (double)GetValue(ZoomFactorProperty); } - set { SetValue(ZoomFactorProperty, value); } - } - - private static void OnZoomFactorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - Magnifier m = (Magnifier)d; - m.OnZoomFactorChanged(e); - } - - protected virtual void OnZoomFactorChanged(DependencyPropertyChangedEventArgs e) - { - ResolveViewBox(); - } - - private static object OnCoerceZoomFactorProperty(DependencyObject d, object value) - { - Magnifier m = (Magnifier)d; - return m.OnCoerceZoomFactor(value); - } - - protected virtual object OnCoerceZoomFactor(object value) - { - double zoomFactor = (double)value; - - if (zoomFactor > 1) - zoomFactor = 1; - else if (zoomFactor < 0) - zoomFactor = 0; - - return zoomFactor; - } - - #endregion //ZoomFactor - - #endregion //Properties - - #region Constructors - - /// - /// Initializes static members of the class. - /// - static Magnifier() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(Magnifier), new FrameworkPropertyMetadata(typeof(Magnifier))); - } - - public Magnifier() - { - ResolveViewBox(); - } - - #endregion - - #region Methods - - private void ResolveViewBox() - { - double correction = (BorderThickness.Bottom + BorderThickness.Left + BorderThickness.Right + BorderThickness.Top == 0) ? 1 : 0; - - double width = DefaultSize.Width * ZoomFactor; - double height = DefaultSize.Height * ZoomFactor; - - MagnifierWidth = DefaultSize.Width - correction; - MagnifierHeight = DefaultSize.Height - correction; - - ViewBox = new Rect(ViewBox.Location, new Size(width, height)); - } - - #endregion //Methods - - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/MagnifierAdorner.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/MagnifierAdorner.cs deleted file mode 100644 index 2b31e80f..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/MagnifierAdorner.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Windows.Documents; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; - -namespace Microsoft.Windows.Controls -{ - public class MagnifierAdorner : Adorner - { - #region Members - - private Magnifier _magnifier; - private Point _currentMousePosition; - - #endregion - - #region Constructors - - public MagnifierAdorner(UIElement element, Magnifier magnifier) - : base(element) - { - InputManager.Current.PostProcessInput += Current_PostProcessInput; - _magnifier = magnifier; - UpdateViewBox(); - AddVisualChild(_magnifier); - } - - #endregion - - #region Private/Internal methods - - private void Current_PostProcessInput(object sender, ProcessInputEventArgs e) - { - Point pt = Mouse.GetPosition(this); - - if (_currentMousePosition == pt) - return; - - _currentMousePosition = pt; - UpdateViewBox(); - InvalidateArrange(); - } - - internal void UpdateViewBox() - { - var viewBoxLocation = CalculateViewBoxLocation(); - _magnifier.ViewBox = new Rect(viewBoxLocation, _magnifier.ViewBox.Size); - } - - private Point CalculateViewBoxLocation() - { - double offsetX = 0, offsetY = 0; - - Point adorner = Mouse.GetPosition(this); - Point element = Mouse.GetPosition(AdornedElement); - - offsetX = element.X - adorner.X; - offsetY = element.Y - adorner.Y; - - double left = _currentMousePosition.X - ((_magnifier.ViewBox.Width / 2) + offsetX); - double top = _currentMousePosition.Y - ((_magnifier.ViewBox.Height / 2) + offsetY); - return new Point(left, top); - } - - #endregion - - #region Overrides - - protected override Visual GetVisualChild(int index) - { - return _magnifier; - } - - protected override int VisualChildrenCount - { - get { return 1; } - } - - protected override Size MeasureOverride(Size constraint) - { - _magnifier.Measure(constraint); - return base.MeasureOverride(constraint); - } - - protected override Size ArrangeOverride(Size finalSize) - { - double x = _currentMousePosition.X - (_magnifier.DefaultSize.Width / 2); - double y = _currentMousePosition.Y - (_magnifier.DefaultSize.Height / 2); - _magnifier.Arrange(new Rect(x, y, _magnifier.DefaultSize.Width, _magnifier.DefaultSize.Height)); - return base.ArrangeOverride(finalSize); - } - - #endregion - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/MagnifierManager.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/MagnifierManager.cs deleted file mode 100644 index eaaa2c7e..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/MagnifierManager.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Documents; -using System.Windows.Input; - -namespace Microsoft.Windows.Controls -{ - public class MagnifierManager : DependencyObject - { - #region Members - - private MagnifierAdorner _adorner; - private UIElement _element; - - #endregion //Members - - #region Properties - - public static readonly DependencyProperty CurrentProperty = DependencyProperty.RegisterAttached("Magnifier", typeof(Magnifier), typeof(UIElement), new FrameworkPropertyMetadata(null, OnMagnifierChanged)); - public static void SetMagnifier(UIElement element, Magnifier value) - { - element.SetValue(CurrentProperty, value); - } - public static Magnifier GetMagnifier(UIElement element) - { - return (Magnifier)element.GetValue(CurrentProperty); - } - - private static void OnMagnifierChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - UIElement target = d as UIElement; - - if (target == null) - throw new ArgumentException("Magnifier can only be attached to a UIElement."); - - MagnifierManager manager = new MagnifierManager(); - manager.AttachToMagnifier(target, e.NewValue as Magnifier); - } - - #endregion //Properties - - #region Event Handlers - - void Element_MouseLeave(object sender, MouseEventArgs e) - { - HideAdorner(); - } - - void Element_MouseEnter(object sender, MouseEventArgs e) - { - ShowAdorner(); - } - - #endregion //Event Handlers - - #region Methods - - private void AttachToMagnifier(UIElement element, Magnifier magnifier) - { - _element = element; - _element.MouseEnter += Element_MouseEnter; - _element.MouseLeave += Element_MouseLeave; - - magnifier.Target = _element; - - _adorner = new MagnifierAdorner(_element, magnifier); - } - - void ShowAdorner() - { - VerifyAdornerLayer(); - _adorner.Visibility = Visibility.Visible; - } - - bool VerifyAdornerLayer() - { - if (_adorner.Parent != null) - return true; - - AdornerLayer layer = AdornerLayer.GetAdornerLayer(_element); - if (layer == null) - return false; - - layer.Add(_adorner); - return true; - } - - void HideAdorner() - { - if (_adorner.Visibility == Visibility.Visible) - { - _adorner.Visibility = Visibility.Collapsed; - } - } - - #endregion //Methods - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/MaskedTextBox.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/MaskedTextBox.cs deleted file mode 100644 index 18207980..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/MaskedTextBox.cs +++ /dev/null @@ -1,274 +0,0 @@ -using System; -using System.Windows.Controls; -using System.Windows; -using System.Windows.Input; -using System.ComponentModel; -using Microsoft.Windows.Controls.Primitives; - -namespace Microsoft.Windows.Controls -{ - - public class MaskedTextBox : InputBase - { - #region Properties - - protected MaskedTextProvider MaskProvider { get; set; } - private TextBox TextBox { get; set; } - - #region IncludePrompt - - public static readonly DependencyProperty IncludePromptProperty = DependencyProperty.Register("IncludePrompt", typeof(bool), typeof(MaskedTextBox), new UIPropertyMetadata(false, OnIncludePromptPropertyChanged)); - public bool IncludePrompt - { - get { return (bool)GetValue(IncludePromptProperty); } - set { SetValue(IncludePromptProperty, value); } - } - - private static void OnIncludePromptPropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - MaskedTextBox maskedTextBox = o as MaskedTextBox; - if (maskedTextBox != null) - maskedTextBox.OnIncludePromptChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnIncludePromptChanged(bool oldValue, bool newValue) - { - ResolveMaskProvider(Mask); - } - - #endregion //IncludePrompt - - #region IncludeLiterals - - public static readonly DependencyProperty IncludeLiteralsProperty = DependencyProperty.Register("IncludeLiterals", typeof(bool), typeof(MaskedTextBox), new UIPropertyMetadata(true, OnIncludeLiteralsPropertyChanged)); - public bool IncludeLiterals - { - get { return (bool)GetValue(IncludeLiteralsProperty); } - set { SetValue(IncludeLiteralsProperty, value); } - } - - private static void OnIncludeLiteralsPropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - MaskedTextBox maskedTextBox = o as MaskedTextBox; - if (maskedTextBox != null) - maskedTextBox.OnIncludeLiteralsChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnIncludeLiteralsChanged(bool oldValue, bool newValue) - { - ResolveMaskProvider(Mask); - } - - #endregion //IncludeLiterals - - #region Mask - - public static readonly DependencyProperty MaskProperty = DependencyProperty.Register("Mask", typeof(string), typeof(MaskedTextBox), new UIPropertyMetadata(default(String), OnMaskPropertyChanged)); - public string Mask - { - get { return (string)GetValue(MaskProperty); } - set { SetValue(MaskProperty, value); } - } - - private static void OnMaskPropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - MaskedTextBox maskedTextBox = o as MaskedTextBox; - if (maskedTextBox != null) - maskedTextBox.OnMaskChanged((string)e.OldValue, (string)e.NewValue); - } - - protected virtual void OnMaskChanged(string oldValue, string newValue) - { - ResolveMaskProvider(newValue); - UpdateText(MaskProvider, 0); - } - - #endregion //Mask - - #endregion //Properties - - #region Constructors - - static MaskedTextBox() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(MaskedTextBox), new FrameworkPropertyMetadata(typeof(MaskedTextBox))); - } - - #endregion //Constructors - - #region Overrides - - public override void OnApplyTemplate() - { - TextBox = GetTemplateChild("TextBox") as TextBox; - TextBox.PreviewTextInput += TextBox_PreviewTextInput; - TextBox.PreviewKeyDown += TextBox_PreviewKeyDown; - } - - protected override object ConvertTextToValue(string text) - { - object convertedValue = null; - - Type dataType = ValueType; - - string valueToConvert = MaskProvider.ToString(); - - if (valueToConvert.GetType() == dataType || dataType.IsInstanceOfType(valueToConvert)) - { - convertedValue = valueToConvert; - } -#if !VS2008 - else if (String.IsNullOrWhiteSpace(valueToConvert)) - { - convertedValue = Activator.CreateInstance(dataType); - } -#else - else if (String.IsNullOrEmpty(valueToConvert)) - { - convertedValue = Activator.CreateInstance(dataType); - } -#endif - else if (null == convertedValue && valueToConvert is IConvertible) - { - convertedValue = Convert.ChangeType(valueToConvert, dataType); - } - - return convertedValue; - } - - protected override string ConvertValueToText(object value) - { - if (value == null) - value = string.Empty; - - //I have only seen this occur while in Blend, but we need it here so the Blend designer doesn't crash. - if (MaskProvider == null) - return value.ToString(); - - MaskProvider.Set(value.ToString()); - return MaskProvider.ToDisplayString(); - } - - #endregion - - #region Event Handlers - - void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e) - { - //if the text is readonly do not add the text - if (TextBox.IsReadOnly) - { - e.Handled = true; - return; - } - - int position = TextBox.SelectionStart; - MaskedTextProvider provider = MaskProvider; - if (position < TextBox.Text.Length) - { - position = GetNextCharacterPosition(position); - - if (Keyboard.IsKeyToggled(Key.Insert)) - { - if (provider.Replace(e.Text, position)) - position++; - } - else - { - if (provider.InsertAt(e.Text, position)) - position++; - } - - position = GetNextCharacterPosition(position); - } - - UpdateText(provider, position); - e.Handled = true; - - base.OnPreviewTextInput(e); - } - - void TextBox_PreviewKeyDown(object sender, KeyEventArgs e) - { - base.OnPreviewKeyDown(e); - MaskedTextProvider provider = MaskProvider; - int position = TextBox.SelectionStart; - int selectionlength = TextBox.SelectionLength; - // If no selection use the start position else use end position - int endposition = (selectionlength == 0) ? position : position + selectionlength - 1; - - if (e.Key == Key.Delete && position < TextBox.Text.Length)//handle the delete key - { - if (provider.RemoveAt(position, endposition)) - UpdateText(provider, position); - - e.Handled = true; - } - else if (e.Key == Key.Space) - { - if (provider.InsertAt(" ", position)) - UpdateText(provider, position); - e.Handled = true; - } - else if (e.Key == Key.Back)//handle the back space - { - if ((position > 0) && (selectionlength == 0)) - { - position--; - if (provider.RemoveAt(position)) - UpdateText(provider, position); - } - - if (selectionlength != 0) - { - if (provider.RemoveAt(position, endposition)) - { - if (position > 0) - position--; - - UpdateText(provider, position); - } - } - - e.Handled = true; - } - } - - #endregion //Event Handlers - - #region Methods - - private void UpdateText(MaskedTextProvider provider, int position) - { - if (provider == null) - throw new ArgumentNullException("MaskedTextProvider", "Mask cannot be null."); - - Text = provider.ToDisplayString(); - - if (TextBox != null) - TextBox.SelectionStart = position; - } - - private int GetNextCharacterPosition(int startPosition) - { - int position = MaskProvider.FindEditPositionFrom(startPosition, true); - return position == -1 ? startPosition : position; - } - - private void ResolveMaskProvider(string mask) - { - //do not create a mask provider if the Mask is empty, which can occur if the IncludePrompt and IncludeLiterals properties - //are set prior to the Mask. - if (String.IsNullOrEmpty(mask)) - return; - - MaskProvider = new MaskedTextProvider(mask) - { - IncludePrompt = this.IncludePrompt, - IncludeLiterals = this.IncludeLiterals - }; - } - - #endregion //Methods - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png deleted file mode 100644 index 4304d43b..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png deleted file mode 100644 index 35075187..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png deleted file mode 100644 index dad7dd09..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png deleted file mode 100644 index ecb7fe86..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/MessageBox.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/MessageBox.cs deleted file mode 100644 index 1ef568e2..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/MessageBox.cs +++ /dev/null @@ -1,422 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Controls.Primitives; - -namespace Microsoft.Windows.Controls -{ - [TemplateVisualState(Name = VisualStates.OK, GroupName = VisualStates.MessageBoxButtonsGroup)] - [TemplateVisualState(Name = VisualStates.OKCancel, GroupName = VisualStates.MessageBoxButtonsGroup)] - [TemplateVisualState(Name = VisualStates.YesNo, GroupName = VisualStates.MessageBoxButtonsGroup)] - [TemplateVisualState(Name = VisualStates.YesNoCancel, GroupName = VisualStates.MessageBoxButtonsGroup)] - public class MessageBox : Control - { - #region Private Members - - /// - /// Tracks the MessageBoxButon value passed into the InitializeContainer method - /// - private MessageBoxButton _button = MessageBoxButton.OK; - - #endregion //Private Members - - #region Constructors - - static MessageBox() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(MessageBox), new FrameworkPropertyMetadata(typeof(MessageBox))); - } - - internal MessageBox() - { /*user cannot create instance */ } - - #endregion //Constructors - - #region Properties - - #region Protected Properties - - /// - /// A System.Windows.MessageBoxResult value that specifies which message box button was clicked by the user. - /// - protected MessageBoxResult MessageBoxResult = MessageBoxResult.None; - - protected Window Container { get; private set; } - protected Thumb DragWidget { get; private set; } - protected Button CloseButton { get; private set; } - - protected Button OkButton { get; private set; } - protected Button CancelButton { get; private set; } - protected Button YesButton { get; private set; } - protected Button NoButton { get; private set; } - - protected Button OkButton1 { get; private set; } - protected Button CancelButton1 { get; private set; } - protected Button YesButton1 { get; private set; } - protected Button NoButton1 { get; private set; } - - #endregion //Protected Properties - - #region Dependency Properties - - public static readonly DependencyProperty CaptionProperty = DependencyProperty.Register("Caption", typeof(string), typeof(MessageBox), 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(MessageBox), 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(MessageBox), new PropertyMetadata(null)); - public Style CloseButtonStyle - { - get { return (Style)GetValue(CloseButtonStyleProperty); } - set { SetValue(CloseButtonStyleProperty, value); } - } - - public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register("ImageSource", typeof(ImageSource), typeof(MessageBox), new UIPropertyMetadata(default(ImageSource))); - public ImageSource ImageSource - { - get { return (ImageSource)GetValue(ImageSourceProperty); } - set { SetValue(ImageSourceProperty, value); } - } - - public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(MessageBox), new UIPropertyMetadata(String.Empty)); - public string Text - { - get { return (string)GetValue(TextProperty); } - set { SetValue(TextProperty, value); } - } - - public static readonly DependencyProperty WindowBackgroundProperty = DependencyProperty.Register("WindowBackground", typeof(Brush), typeof(MessageBox), 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(MessageBox), 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(MessageBox), new PropertyMetadata(null)); - public double WindowOpacity - { - get { return (double)GetValue(WindowOpacityProperty); } - set { SetValue(WindowOpacityProperty, value); } - } - - #endregion //Dependency Properties - - #endregion //Properties - - #region Base Class Overrides - - /// - /// Overrides the OnApplyTemplate method. - /// - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - DragWidget = (Thumb)GetTemplateChild("PART_DragWidget"); - if (DragWidget != null) - DragWidget.DragDelta += (o, e) => ProcessMove(e); - - CloseButton = (Button)GetTemplateChild("PART_CloseButton"); - if (CloseButton != null) - CloseButton.Click += (o, e) => Close(); - - NoButton = (Button)GetTemplateChild("PART_NoButton"); - if (NoButton != null) - NoButton.Click += (o, e) => Button_Click(o, e); - - NoButton1 = (Button)GetTemplateChild("PART_NoButton1"); - if (NoButton1 != null) - NoButton1.Click += (o, e) => Button_Click(o, e); - - YesButton = (Button)GetTemplateChild("PART_YesButton"); - if (YesButton != null) - YesButton.Click += (o, e) => Button_Click(o, e); - - YesButton1 = (Button)GetTemplateChild("PART_YesButton1"); - if (YesButton1 != null) - YesButton1.Click += (o, e) => Button_Click(o, e); - - CancelButton = (Button)GetTemplateChild("PART_CancelButton"); - if (CancelButton != null) - CancelButton.Click += (o, e) => Button_Click(o, e); - - CancelButton1 = (Button)GetTemplateChild("PART_CancelButton1"); - if (CancelButton1 != null) - CancelButton1.Click += (o, e) => Button_Click(o, e); - - OkButton = (Button)GetTemplateChild("PART_OkButton"); - if (OkButton != null) - OkButton.Click += (o, e) => Button_Click(o, e); - - OkButton1 = (Button)GetTemplateChild("PART_OkButton1"); - if (OkButton1 != null) - OkButton1.Click += (o, e) => Button_Click(o, e); - - ChangeVisualState(_button.ToString(), true); - } - - #endregion //Base Class Overrides - - #region Methods - - #region Public Static - - /// - /// Displays a message box that has a message and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText) - { - return Show(messageText, string.Empty, MessageBoxButton.OK); - } - - /// - /// Displays a message box that has a message and title bar caption; and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.String that specifies the title bar caption to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText, string caption) - { - return Show(messageText, caption, MessageBoxButton.OK); - } - - /// - /// Displays a message box that has a message and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.String that specifies the title bar caption to display. - /// A System.Windows.MessageBoxButton value that specifies which button or buttons to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText, string caption, MessageBoxButton button) - { - return ShowCore(messageText, caption, button, MessageBoxImage.None); - } - - /// - /// Displays a message box that has a message and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.String that specifies the title bar caption to display. - /// A System.Windows.MessageBoxButton value that specifies which button or buttons to display. - /// A System.Windows.MessageBoxImage value that specifies the icon to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText, string caption, MessageBoxButton button, MessageBoxImage icon) - { - return ShowCore(messageText, caption, button, icon); - } - - #endregion //Public Static - - #region Private Static - - private static MessageBoxResult ShowCore(string messageText, string caption, MessageBoxButton button, MessageBoxImage icon) - { - MessageBox msgBox = new MessageBox(); - msgBox.InitializeMessageBox(messageText, caption, button, icon); - msgBox.Show(); - return msgBox.MessageBoxResult; - } - - /// - /// Resolves the owner Window of the MessageBox. - /// - /// - private static FrameworkElement ResolveOwner() - { - FrameworkElement owner = null; - if (Application.Current != null) - { - foreach (Window w in Application.Current.Windows) - { - if (w.IsActive) - { - owner = w; - break; - } - } - } - return owner; - } - - #endregion //Private Static - - #region Protected - - /// - /// Shows the MessageBox - /// - protected void Show() - { - Container.ShowDialog(); - } - - /// - /// Initializes the MessageBox. - /// - /// The text. - /// The caption. - /// The button. - /// The image. - protected void InitializeMessageBox(string text, string caption, MessageBoxButton button, MessageBoxImage image) - { - Text = text; - Caption = caption; - _button = button; - SetImageSource(image); - Container = CreateContainer(); - } - - /// - /// Changes the control's visual state(s). - /// - /// name of the state - /// True if state transitions should be used. - protected void ChangeVisualState(string name, bool useTransitions) - { - VisualStateManager.GoToState(this, name, useTransitions); - } - - #endregion //Protected - - #region Private - - /// - /// Sets the message image source. - /// - /// The image to show. - private void SetImageSource(MessageBoxImage image) - { - String iconName = String.Empty; - - switch (image) - { - case MessageBoxImage.Error: - { - iconName = "Error48.png"; - break; - } - case MessageBoxImage.Information: - { - iconName = "Information48.png"; - break; - } - case MessageBoxImage.Question: - { - iconName = "Question48.png"; - break; - } - case MessageBoxImage.Warning: - { - iconName = "Warning48.png"; - break; - } - case MessageBoxImage.None: - default: - { - return; - } - } - - ImageSource = (ImageSource)new ImageSourceConverter().ConvertFromString(String.Format("pack://application:,,,/WPFToolkit.Extended;component/MessageBox/Icons/{0}", iconName)); - } - - /// - /// Creates the container which will host the MessageBox control. - /// - /// - private Window CreateContainer() - { - var newWindow = new Window(); - newWindow.AllowsTransparency = true; - newWindow.Background = Brushes.Transparent; - newWindow.Content = this; - - var owner = ResolveOwner(); - if (owner != null) - newWindow.Owner = Window.GetWindow(owner); - - newWindow.ShowInTaskbar = false; - newWindow.SizeToContent = System.Windows.SizeToContent.WidthAndHeight; - newWindow.ResizeMode = System.Windows.ResizeMode.NoResize; - newWindow.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner; - newWindow.WindowStyle = System.Windows.WindowStyle.None; - return newWindow; - } - - #endregion //Private - - #endregion //Methods - - #region Event Handlers - - /// - /// Processes the move of a drag operation on the header. - /// - /// The instance containing the event data. - private void ProcessMove(DragDeltaEventArgs e) - { - Container.Left = Container.Left + e.HorizontalChange; - Container.Top = Container.Top + e.VerticalChange; - } - - /// - /// Sets the MessageBoxResult according to the button pressed and then closes the MessageBox. - /// - /// The source of the event. - /// The instance containing the event data. - private void Button_Click(object sender, RoutedEventArgs e) - { - Button button = e.Source as Button; - switch (button.Name) - { - case "PART_NoButton": - case "PART_NoButton1": - MessageBoxResult = MessageBoxResult.No; - break; - case "PART_YesButton": - case "PART_YesButton1": - MessageBoxResult = MessageBoxResult.Yes; - break; - case "PART_CancelButton": - case "PART_CancelButton1": - MessageBoxResult = MessageBoxResult.Cancel; - break; - case "PART_OkButton": - case "PART_OkButton1": - MessageBoxResult = MessageBoxResult.OK; - break; - } - - Close(); - } - - /// - /// Closes the MessageBox. - /// - private void Close() - { - Container.Close(); - } - - #endregion //Event Handlers - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/VisualStates.MessageBox.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/VisualStates.MessageBox.cs deleted file mode 100644 index d47fcb08..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/VisualStates.MessageBox.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - internal static partial class VisualStates - { - public const string MessageBoxButtonsGroup = "MessageBoxButtonsGroup"; - - public const string OK = "OK"; - - public const string OKCancel = "OKCancel"; - - public const string YesNo = "YesNo"; - - public const string YesNoCancel = "YesNoCancel"; - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs deleted file mode 100644 index a9e648cd..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs +++ /dev/null @@ -1,297 +0,0 @@ -using System; -using System.Windows; -using System.Globalization; -using System.Windows.Input; - -namespace Microsoft.Windows.Controls -{ - public class NumericUpDown : UpDownBase - { - #region Properties - - #region Minimum - - public static readonly DependencyProperty MinimumProperty = DependencyProperty.Register("Minimum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(Double.MinValue, OnMinimumPropertyChanged)); - public double Minimum - { - get { return (double)GetValue(MinimumProperty); } - set { SetValue(MinimumProperty, value); } - } - - private static void OnMinimumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - NumericUpDown nud = d as NumericUpDown; - nud.SetValidSpinDirection(); - } - - #endregion Minimum - - #region Maximum - - public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register("Maximum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(Double.MaxValue, OnMaximumPropertyChanged)); - public double Maximum - { - get { return (double)GetValue(MaximumProperty); } - set { SetValue(MaximumProperty, value); } - } - - private static void OnMaximumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - NumericUpDown nud = d as NumericUpDown; - nud.SetValidSpinDirection(); - } - - #endregion Maximum - - #region Increment - - public static readonly DependencyProperty IncrementProperty = DependencyProperty.Register("Increment", typeof(double), typeof(NumericUpDown), new PropertyMetadata(1.0)); - public double Increment - { - get { return (double)GetValue(IncrementProperty); } - set { SetValue(IncrementProperty, value); } - } - - #endregion - - #region FormatString - - public static readonly DependencyProperty StringFormatProperty = DependencyProperty.Register("FormatString", typeof(string), typeof(NumericUpDown), new PropertyMetadata("F0", OnStringFormatPropertyPropertyChanged)); - public string FormatString - { - get { return (string)GetValue(StringFormatProperty); } - set { SetValue(StringFormatProperty, value); } - } - - private static void OnStringFormatPropertyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - NumericUpDown nud = d as NumericUpDown; - nud.OnStringFormatChanged(e.OldValue.ToString(), e.NewValue.ToString()); - } - - protected virtual void OnStringFormatChanged(string oldValue, string newValue) - { - SyncTextAndValueProperties(NumericUpDown.TextProperty, Value); - } - - #endregion //FormatString - - #region SelectAllOnGotFocus - - public static readonly DependencyProperty SelectAllOnGotFocusProperty = DependencyProperty.Register("SelectAllOnGotFocus", typeof(bool), typeof(NumericUpDown), new PropertyMetadata(false)); - public bool SelectAllOnGotFocus - { - get { return (bool)GetValue(SelectAllOnGotFocusProperty); } - set { SetValue(SelectAllOnGotFocusProperty, value); } - } - - #endregion //SelectAllOnGotFocus - - #endregion - - #region Constructors - - static NumericUpDown() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(NumericUpDown), new FrameworkPropertyMetadata(typeof(NumericUpDown))); - ValueTypeProperty.OverrideMetadata(typeof(NumericUpDown), new FrameworkPropertyMetadata(typeof(double))); - ValueProperty.OverrideMetadata(typeof(NumericUpDown), new FrameworkPropertyMetadata(default(Double))); - } - - #endregion //Constructors - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - SetValidSpinDirection(); - - if (SelectAllOnGotFocus) - { - //in order to select all the text we must handle both the keybord (tabbing) and mouse (clicking) events - TextBox.GotKeyboardFocus += OnTextBoxGotKeyBoardFocus; - TextBox.PreviewMouseLeftButtonDown += OnTextBoxPreviewMouseLeftButtonDown; - } - } - - protected override void OnValueChanged(object oldValue, object newValue) - { - SetValidSpinDirection(); - base.OnValueChanged(oldValue, newValue); - } - - protected override object OnCoerceValue(object value) - { - if (value == null) return value; - - double val = Convert.ToDouble(value); - - if (val < Minimum) - { - return Minimum; - } - else if (val > Maximum) - { - return Maximum; - } - else - { - return value; - } - } - - protected override object ConvertTextToValue(string text) - { - object result = null; - - NumberFormatInfo info = NumberFormatInfo.GetInstance(CultureInfo.CurrentCulture); - - try - { - result = FormatString.Contains("P") ? ParsePercent(text, ValueType, info) : ParseDataValue(text, ValueType, info); - } - catch - { - TextBox.Text = Text = ConvertValueToText(Value); - return Value; - } - - return result; - } - - protected override string ConvertValueToText(object value) - { - return (Convert.ToDecimal(Value)).ToString(FormatString, CultureInfo.CurrentCulture); - } - - protected override void OnIncrement() - { - double newValue = (double)(Convert.ToDecimal(Value) + (decimal)Increment); - Value = ValueType != typeof(Double) ? Convert.ChangeType(newValue, ValueType) : newValue; - } - - protected override void OnDecrement() - { - double newValue = (double)(Convert.ToDecimal(Value) - (decimal)Increment); - Value = ValueType != typeof(Double) ? Convert.ChangeType(newValue, ValueType) : newValue; - } - - #endregion //Base Class Overrides - - #region Event Handlers - - private void OnTextBoxGotKeyBoardFocus(object sender, RoutedEventArgs e) - { - TextBox.SelectAll(); - } - - void OnTextBoxPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) - { - if (!TextBox.IsKeyboardFocused) - { - e.Handled = true; - TextBox.Focus(); - } - } - - #endregion //Event Handlers - - #region Methods - - /// - /// Sets the valid spin direction based on current value, minimum and maximum. - /// - private void SetValidSpinDirection() - { - ValidSpinDirections validDirections = ValidSpinDirections.None; - - if (Convert.ToDouble(Value) < Maximum) - { - validDirections = validDirections | ValidSpinDirections.Increase; - } - - if (Convert.ToDouble(Value) > Minimum) - { - validDirections = validDirections | ValidSpinDirections.Decrease; - } - - if (Spinner != null) - { - Spinner.ValidSpinDirection = validDirections; - } - } - - #region Parsing - - private static object ParseDataValue(string text, Type dataType, NumberFormatInfo info) - { - try - { - if (typeof(double) == dataType) - { - return ParseDouble(text, info); - } - else if (typeof(float) == dataType) - { - return ParseFloat(text, info); - } - else if (typeof(byte) == dataType || typeof(sbyte) == dataType || - typeof(short) == dataType || typeof(ushort) == dataType || typeof(Int16) == dataType || - typeof(int) == dataType || typeof(uint) == dataType || typeof(Int32) == dataType || - typeof(long) == dataType || typeof(ulong) == dataType || typeof(Int64) == dataType) - { - return ParseWholeNumber(text, dataType, info); - } - else if (typeof(decimal) == dataType) - { - return ParseDecimal(text, info); - } - else - { - throw new ArgumentException("Type not supported"); - } - } - catch (Exception ex) - { - throw; - } - } - - private static double ParseDouble(string text, NumberFormatInfo info) - { - return double.Parse(text, NumberStyles.Any, info); - } - - private static float ParseFloat(string text, NumberFormatInfo info) - { - double result = double.Parse(text, NumberStyles.Any, info); - return (float)result; - } - - private static decimal ParseDecimal(string text, NumberFormatInfo info) - { - return decimal.Parse(text, NumberStyles.Any, info); - } - - private static object ParseWholeNumber(string text, Type dataType, NumberFormatInfo info) - { - decimal result = decimal.Parse(text, NumberStyles.Any, info); - return Convert.ChangeType(result, dataType, info); - } - - private static object ParsePercent(string text, Type dataType, NumberFormatInfo info) - { - text = text.Replace(info.PercentSymbol, null); - - decimal result = decimal.Parse(text, NumberStyles.Any, info); - result = result / 100; - - return Convert.ChangeType(result, dataType, info); - } - - #endregion - - #endregion //Methods - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs deleted file mode 100644 index 60f0e673..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Markup; - -// 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("Extended WPF Toolkit")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Extended WPF Toolkit")] -[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.3.0.0")] -[assembly: AssemblyFileVersion("1.3.0.0")] - -[assembly: XmlnsPrefix("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "extToolkit")] -[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "Microsoft.Windows.Controls")] diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs deleted file mode 100644 index eaf63633..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 Microsoft.Windows.Controls.Properties { - using System; - - - /// - /// 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 (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Windows.Controls.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/Properties/Resources.resx b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.resx deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Properties/Settings.Designer.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs deleted file mode 100644 index 4a0f1423..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 Microsoft.Windows.Controls.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/Properties/Settings.settings b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.settings deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/ITextFormatter.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/ITextFormatter.cs deleted file mode 100644 index f8e22d41..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/ITextFormatter.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Windows.Documents; - -namespace Microsoft.Windows.Controls -{ - public interface ITextFormatter - { - string GetText(FlowDocument document); - void SetText(FlowDocument document, string text); - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/PlainTextFormatter.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/PlainTextFormatter.cs deleted file mode 100644 index 1c792a32..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/PlainTextFormatter.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Windows.Documents; - -namespace Microsoft.Windows.Controls -{ - /// - /// Formats the RichTextBox text as plain text - /// - public class PlainTextFormatter : ITextFormatter - { - public string GetText(FlowDocument document) - { - return new TextRange(document.ContentStart, document.ContentEnd).Text; - } - - public void SetText(FlowDocument document, string text) - { - new TextRange(document.ContentStart, document.ContentEnd).Text = text; - } - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/RtfFormatter.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/RtfFormatter.cs deleted file mode 100644 index e5a1def6..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/RtfFormatter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Text; -using System.Windows.Documents; -using System.IO; -using System.Windows; - -namespace Microsoft.Windows.Controls -{ - /// - /// Formats the RichTextBox text as RTF - /// - public class RtfFormatter : ITextFormatter - { - public string GetText(FlowDocument document) - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream()) - { - tr.Save(ms, DataFormats.Rtf); - return ASCIIEncoding.Default.GetString(ms.ToArray()); - } - } - - public void SetText(FlowDocument document, string text) - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes(text))) - { - tr.Load(ms, DataFormats.Rtf); - } - } - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/XamlFormatter.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/XamlFormatter.cs deleted file mode 100644 index 07e1d31a..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/XamlFormatter.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Text; -using System.IO; -using System.Windows.Documents; -using System.Windows; - -namespace Microsoft.Windows.Controls -{ - /// - /// Formats the RichTextBox text as Xaml - /// - public class XamlFormatter : ITextFormatter - { - public string GetText(System.Windows.Documents.FlowDocument document) - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream()) - { - tr.Save(ms, DataFormats.Xaml); - return ASCIIEncoding.Default.GetString(ms.ToArray()); - } - } - - public void SetText(System.Windows.Documents.FlowDocument document, string text) - { - try - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes(text))) - { - tr.Load(ms, DataFormats.Xaml); - } - } - catch - { - throw new InvalidDataException("data provided is not in the correct Xaml format."); - } - } - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/RichTextBox.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/RichTextBox.cs deleted file mode 100644 index 88246526..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/RichTextBox.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Data; - -namespace Microsoft.Windows.Controls -{ - public class RichTextBox : System.Windows.Controls.RichTextBox - { - #region Private Members - - private bool _textSetInternally; - - #endregion //Private Members - - #region Constructors - - public RichTextBox() - { - Loaded += RichTextBox_Loaded; - } - - public RichTextBox(System.Windows.Documents.FlowDocument document) - : base(document) - { - - } - - #endregion //Constructors - - #region Properties - - #region Text - - public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(RichTextBox), new FrameworkPropertyMetadata(String.Empty, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnTextPropertyChanged, CoerceTextProperty, true, UpdateSourceTrigger.LostFocus)); - public string Text - { - get { return (string)GetValue(TextProperty); } - set { SetValue(TextProperty, value); } - } - - private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - RichTextBox rtb = (RichTextBox)d; - - // if the text is not being set internally then load the text into the RichTextBox - if (!rtb._textSetInternally) - rtb.TextFormatter.SetText(rtb.Document, (string)e.NewValue); - } - - private static object CoerceTextProperty(DependencyObject d, object value) - { - return value ?? ""; - } - - #endregion //Text - - #region TextFormatter - - private ITextFormatter _textFormatter; - /// - /// The ITextFormatter the is used to format the text of the RichTextBox. - /// Deafult formatter is the RtfFormatter - /// - public ITextFormatter TextFormatter - { - get - { - if (_textFormatter == null) - _textFormatter = new RtfFormatter(); //default is rtf - - return _textFormatter; - } - set - { - _textFormatter = value; - } - } - - #endregion //TextFormatter - - #endregion //Properties - - #region Methods - - private void UpdateText() - { - _textSetInternally = true; - - Text = TextFormatter.GetText(Document); - - _textSetInternally = false; - } - - #endregion //Methods - - #region Event Hanlders - - private void RichTextBox_Loaded(object sender, RoutedEventArgs e) - { - Binding binding = BindingOperations.GetBinding(this, TextProperty); - - if (binding != null) - { - if (binding.UpdateSourceTrigger == UpdateSourceTrigger.Default || binding.UpdateSourceTrigger == UpdateSourceTrigger.LostFocus) - { - PreviewLostKeyboardFocus += (o, ea) => UpdateText(); - } - else - { - TextChanged += (o, ea) => UpdateText(); - } - } - } - - #endregion //Event Hanlders - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/IRichTextBoxFormatBar.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/IRichTextBoxFormatBar.cs deleted file mode 100644 index 46c38afe..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/IRichTextBoxFormatBar.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - public interface IRichTextBoxFormatBar - { - /// - /// Represents the RichTextBox that will be the target for all text manipulations in the format bar. - /// - global::System.Windows.Controls.RichTextBox Target { get; set; } - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png deleted file mode 100644 index 8fb36a1a..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bullets16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bullets16.png deleted file mode 100644 index 73e7c15e..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bullets16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png deleted file mode 100644 index 1030a021..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/FontColorPicker16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/FontColorPicker16.png deleted file mode 100644 index d9207308..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/FontColorPicker16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png deleted file mode 100644 index 8259a9e1..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png deleted file mode 100644 index c5499bce..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png deleted file mode 100644 index 51dffb73..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Numbering16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Numbering16.png deleted file mode 100644 index 03f6fde2..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Numbering16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png deleted file mode 100644 index cb8e400a..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png deleted file mode 100644 index 4a3783f2..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png deleted file mode 100644 index 72689482..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml deleted file mode 100644 index a2ebd824..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs deleted file mode 100644 index d7c65788..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs +++ /dev/null @@ -1,232 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Controls.Primitives; -using Microsoft.Windows.Controls.Core; - -namespace Microsoft.Windows.Controls -{ - /// - /// Interaction logic for RichTextBoxFormatBar.xaml - /// - public partial class RichTextBoxFormatBar : UserControl, IRichTextBoxFormatBar - { - #region Properties - - #region RichTextBox - - public static readonly DependencyProperty TargetProperty = DependencyProperty.Register("Target", typeof(global::System.Windows.Controls.RichTextBox), typeof(RichTextBoxFormatBar), new PropertyMetadata(null, OnRichTextBoxPropertyChanged)); - public global::System.Windows.Controls.RichTextBox Target - { - get { return (global::System.Windows.Controls.RichTextBox)GetValue(TargetProperty); } - set { SetValue(TargetProperty, value); } - } - - private static void OnRichTextBoxPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - RichTextBoxFormatBar formatBar = d as RichTextBoxFormatBar; - } - - #endregion //RichTextBox - - public static double[] FontSizes - { - get - { - return new double[] { - 3.0, 4.0, 5.0, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, - 10.0, 10.5, 11.0, 11.5, 12.0, 12.5, 13.0, 13.5, 14.0, 15.0, - 16.0, 17.0, 18.0, 19.0, 20.0, 22.0, 24.0, 26.0, 28.0, 30.0, - 32.0, 34.0, 36.0, 38.0, 40.0, 44.0, 48.0, 52.0, 56.0, 60.0, 64.0, 68.0, 72.0, 76.0, - 80.0, 88.0, 96.0, 104.0, 112.0, 120.0, 128.0, 136.0, 144.0 - }; - } - } - - #endregion - - #region Constructors - - public RichTextBoxFormatBar() - { - InitializeComponent(); - Loaded += FormatToolbar_Loaded; - - _cmbFontFamilies.ItemsSource = Fonts.SystemFontFamilies; - _cmbFontSizes.ItemsSource = FontSizes; - } - - #endregion //Constructors - - #region Event Hanlders - - void FormatToolbar_Loaded(object sender, RoutedEventArgs e) - { - UpdateVisualState(); - } - - private void FontFamily_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (e.AddedItems.Count == 0) - return; - - FontFamily editValue = (FontFamily)e.AddedItems[0]; - ApplyPropertyValueToSelectedText(TextElement.FontFamilyProperty, editValue); - } - - private void FontSize_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (e.AddedItems.Count == 0) - return; - - ApplyPropertyValueToSelectedText(TextElement.FontSizeProperty, e.AddedItems[0]); - } - - void FontColor_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) - { - Color selectedColor = (Color)e.NewValue; - ApplyPropertyValueToSelectedText(TextElement.ForegroundProperty, new SolidColorBrush(selectedColor)); - } - - private void FontBackgroundColor_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) - { - Color selectedColor = (Color)e.NewValue; - ApplyPropertyValueToSelectedText(TextElement.BackgroundProperty, new SolidColorBrush(selectedColor)); - } - - private void Bullets_Clicked(object sender, RoutedEventArgs e) - { - if (BothSelectionListsAreChecked()) - { - _btnNumbers.IsChecked = false; - } - } - - private void Numbers_Clicked(object sender, RoutedEventArgs e) - { - if (BothSelectionListsAreChecked()) - { - _btnBullets.IsChecked = false; - } - } - - private void DragWidget_DragDelta(object sender, DragDeltaEventArgs e) - { - ProcessMove(e); - } - - #endregion //Event Hanlders - - #region Methods - - private void UpdateVisualState() - { - UpdateToggleButtonState(); - UpdateSelectedFontFamily(); - UpdateSelectedFontSize(); - UpdateFontColor(); - UpdateFontBackgroundColor(); - UpdateSelectionListType(); - } - - private void UpdateToggleButtonState() - { - UpdateItemCheckedState(_btnBold, TextElement.FontWeightProperty, FontWeights.Bold); - UpdateItemCheckedState(_btnItalic, TextElement.FontStyleProperty, FontStyles.Italic); - UpdateItemCheckedState(_btnUnderline, Inline.TextDecorationsProperty, TextDecorations.Underline); - - UpdateItemCheckedState(_btnAlignLeft, Paragraph.TextAlignmentProperty, TextAlignment.Left); - UpdateItemCheckedState(_btnAlignCenter, Paragraph.TextAlignmentProperty, TextAlignment.Center); - UpdateItemCheckedState(_btnAlignRight, Paragraph.TextAlignmentProperty, TextAlignment.Right); - } - - void UpdateItemCheckedState(ToggleButton button, DependencyProperty formattingProperty, object expectedValue) - { - object currentValue = Target.Selection.GetPropertyValue(formattingProperty); - button.IsChecked = (currentValue == DependencyProperty.UnsetValue) ? false : currentValue != null && currentValue.Equals(expectedValue); - } - - private void UpdateSelectedFontFamily() - { - object value = Target.Selection.GetPropertyValue(TextElement.FontFamilyProperty); - FontFamily currentFontFamily = (FontFamily)((value == DependencyProperty.UnsetValue) ? null : value); - if (currentFontFamily != null) - { - _cmbFontFamilies.SelectedItem = currentFontFamily; - } - } - - private void UpdateSelectedFontSize() - { - object value = Target.Selection.GetPropertyValue(TextElement.FontSizeProperty); - _cmbFontSizes.SelectedValue = (value == DependencyProperty.UnsetValue) ? null : value; - } - - private void UpdateFontColor() - { - object value = Target.Selection.GetPropertyValue(TextElement.ForegroundProperty); - Color currentColor = (Color)((value == DependencyProperty.UnsetValue) ? Colors.Black : ((SolidColorBrush)value).Color); - _cmbFontColor.SelectedColor = currentColor; - } - - private void UpdateFontBackgroundColor() - { - object value = Target.Selection.GetPropertyValue(TextElement.BackgroundProperty); - Color currentColor = (Color)((value == null || value == DependencyProperty.UnsetValue) ? Colors.White : ((SolidColorBrush)value).Color); - _cmbFontBackgroundColor.SelectedColor = currentColor; - } - - /// - /// Updates the visual state of the List styles, such as Numbers and Bullets. - /// - private void UpdateSelectionListType() - { - //uncheck both - _btnBullets.IsChecked = false; - _btnNumbers.IsChecked = false; - - Paragraph startParagraph = Target.Selection.Start.Paragraph; - Paragraph endParagraph = Target.Selection.End.Paragraph; - if (startParagraph != null && endParagraph != null && (startParagraph.Parent is ListItem) && (endParagraph.Parent is ListItem) && object.ReferenceEquals(((ListItem)startParagraph.Parent).List, ((ListItem)endParagraph.Parent).List)) - { - TextMarkerStyle markerStyle = ((ListItem)startParagraph.Parent).List.MarkerStyle; - if (markerStyle == TextMarkerStyle.Disc) //bullets - { - _btnBullets.IsChecked = true; - } - else if (markerStyle == TextMarkerStyle.Decimal) //numbers - { - _btnNumbers.IsChecked = true; - } - } - } - - /// - /// Checks to see if both selection lists are checked. (Bullets and Numbers) - /// - /// - private bool BothSelectionListsAreChecked() - { - return _btnBullets.IsChecked == true && _btnNumbers.IsChecked == true; - } - - void ApplyPropertyValueToSelectedText(DependencyProperty formattingProperty, object value) - { - if (value == null) - return; - - Target.Selection.ApplyPropertyValue(formattingProperty, value); - } - - private void ProcessMove(DragDeltaEventArgs e) - { - AdornerLayer layer = AdornerLayer.GetAdornerLayer(Target); - UIElementAdorner adorner = layer.GetAdorners(Target)[0] as UIElementAdorner; - adorner.SetOffsets(adorner.OffsetLeft + e.HorizontalChange, adorner.OffsetTop + e.VerticalChange); - } - - #endregion //Methods - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBarManager.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBarManager.cs deleted file mode 100644 index 8fbc1e31..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBarManager.cs +++ /dev/null @@ -1,197 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using Microsoft.Windows.Controls.Core; -using System.Windows.Input; - -namespace Microsoft.Windows.Controls -{ - public class RichTextBoxFormatBarManager : DependencyObject - { - #region Members - - private global::System.Windows.Controls.RichTextBox _richTextBox; - private UIElementAdorner _adorner; - private IRichTextBoxFormatBar _toolbar; - - #endregion //Members - - #region Properties - - #region FormatBar - - public static readonly DependencyProperty FormatBarProperty = DependencyProperty.RegisterAttached("FormatBar", typeof(IRichTextBoxFormatBar), typeof(RichTextBox), new PropertyMetadata(null, OnFormatBarPropertyChanged)); - public static void SetFormatBar(UIElement element, IRichTextBoxFormatBar value) - { - element.SetValue(FormatBarProperty, value); - } - public static IRichTextBoxFormatBar GetFormatBar(UIElement element) - { - return (IRichTextBoxFormatBar)element.GetValue(FormatBarProperty); - } - - private static void OnFormatBarPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - global::System.Windows.Controls.RichTextBox rtb = d as global::System.Windows.Controls.RichTextBox; - if (rtb == null) - throw new Exception("A FormatBar can only be applied to a RichTextBox."); - - RichTextBoxFormatBarManager manager = new RichTextBoxFormatBarManager(); - manager.AttachFormatBarToRichtextBox(rtb, e.NewValue as IRichTextBoxFormatBar); - } - - #endregion //FormatBar - - public bool IsAdornerVisible - { - get { return _adorner.Visibility == Visibility.Visible; } - } - - #endregion //Properties - - #region Event Handlers - - void RichTextBox_MouseButtonUp(object sender, MouseButtonEventArgs e) - { - if (e.LeftButton == MouseButtonState.Released) - { - TextRange selectedText = new TextRange(_richTextBox.Selection.Start, _richTextBox.Selection.End); -#if !VS2008 - if (selectedText.Text.Length > 0 && !String.IsNullOrWhiteSpace(selectedText.Text)) - { - ShowAdorner(); - } -#else - if (selectedText.Text.Length > 0 && !String.IsNullOrEmpty(selectedText.Text)) - { - ShowAdorner(); - } -#endif - else - { - HideAdorner(); - } - } - - e.Handled = true; - } - - void RichTextBox_PreviewMouseMove(object sender, MouseEventArgs e) - { - //if the mouse moves outside the richtextbox bounds hide the adorner - //though this deosn't always work, especially if the user moves the mouse very quickly. - //need to find a better solution, but this will work for now. - Point p = e.GetPosition(_richTextBox); - if (p.X <= 5.0 || p.X >= _richTextBox.ActualWidth - 5 || p.Y <= 3.0 || p.Y >= _richTextBox.ActualHeight - 3) - HideAdorner(); - } - - void RichTextBox_TextChanged(object sender, TextChangedEventArgs e) - { - //this fixes the bug when applying text transformations the text would lose it's highlight. That was because the RichTextBox was losing focus - //so we just give it focus again and it seems to do the trick of re-highlighting it. - if (!_richTextBox.IsFocused && !_richTextBox.Selection.IsEmpty) - _richTextBox.Focus(); - } - - #endregion //Event Handlers - - #region Methods - - /// - /// Attaches a FormatBar to a RichtextBox - /// - /// The RichtextBox to attach to. - /// The Formatbar to attach. - private void AttachFormatBarToRichtextBox(global::System.Windows.Controls.RichTextBox richTextBox, IRichTextBoxFormatBar formatBar) - { - _richTextBox = richTextBox; - _richTextBox.PreviewMouseMove += RichTextBox_PreviewMouseMove; - //we cannot use the PreviewMouseLeftButtonUp event because of selection bugs. - //we cannot use the MouseLeftButtonUp event because it is handled by the RichTextBox and does not bubble up to here, so we must - //add a hander to the MouseUpEvent using the Addhandler syntax, and specify to listen for handled events too. - _richTextBox.AddHandler(Mouse.MouseUpEvent, new MouseButtonEventHandler(RichTextBox_MouseButtonUp), true); - _richTextBox.TextChanged += RichTextBox_TextChanged; - - _adorner = new UIElementAdorner(_richTextBox); - - formatBar.Target = _richTextBox; - _toolbar = formatBar; - } - - /// - /// Shows the FormatBar - /// - void ShowAdorner() - { - if (_adorner.Visibility == Visibility.Visible) - return; - - VerifyAdornerLayer(); - - Control adorningEditor = _toolbar as Control; - _adorner.Child = adorningEditor; - _adorner.Visibility = Visibility.Visible; - - PositionFormatBar(adorningEditor); - } - - /// - /// Positions the FormatBar so that is does not go outside the bounds of the RichTextBox or covers the selected text - /// - /// - private void PositionFormatBar(Control adorningEditor) - { - Point mousePosition = Mouse.GetPosition(_richTextBox); - - double left = mousePosition.X; - double top = (mousePosition.Y - 15) - adorningEditor.ActualHeight; - - //top - if (top < 0) - { - top = mousePosition.Y + 10; - } - - //right boundary - if (left + adorningEditor.ActualWidth > _richTextBox.ActualWidth - 20) - { - left = left - (adorningEditor.ActualWidth - (_richTextBox.ActualWidth - left)); - } - - _adorner.SetOffsets(left, top); - } - - /// - /// Ensures that the IRichTextFormatBar is in the adorner layer. - /// - /// True if the IRichTextFormatBar is in the adorner layer, else false. - bool VerifyAdornerLayer() - { - if (_adorner.Parent != null) - return true; - - AdornerLayer layer = AdornerLayer.GetAdornerLayer(_richTextBox); - if (layer == null) - return false; - - layer.Add(_adorner); - return true; - } - - /// - /// Hides the IRichTextFormatBar that is in the adornor layer. - /// - void HideAdorner() - { - if (IsAdornerVisible) - { - _adorner.Visibility = Visibility.Collapsed; - _adorner.Child = null; - } - } - - #endregion //Methods - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml deleted file mode 100644 index 96ac11a8..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml +++ /dev/null @@ -1,1073 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Collapsed - - - - - - - Collapsed - - - - - - - - - - - Visible - - - - - - - Visible - - - - - - - - - - - - - True - - - - - - - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/UpDownBase/UpDownBase.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/UpDownBase/UpDownBase.cs deleted file mode 100644 index fb62b610..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/UpDownBase/UpDownBase.cs +++ /dev/null @@ -1,162 +0,0 @@ -using System; -using System.Windows.Controls; -using Microsoft.Windows.Controls.Primitives; -using System.Windows.Input; - -namespace Microsoft.Windows.Controls -{ - public abstract class UpDownBase : InputBase - { - #region Members - - /// - /// Name constant for Text template part. - /// - internal const string ElementTextName = "TextBox"; - - /// - /// Name constant for Spinner template part. - /// - internal const string ElementSpinnerName = "Spinner"; - - #endregion //Members - - #region Properties - - protected TextBox TextBox { get; private set; } - - private Spinner _spinner; - internal Spinner Spinner - { - get { return _spinner; } - private set - { - _spinner = value; - _spinner.Spin += OnSpinnerSpin; - } - } - - #endregion //Properties - - #region Constructors - - internal UpDownBase() { } - - #endregion //Constructors - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - TextBox = GetTemplateChild(ElementTextName) as TextBox; - Spinner = GetTemplateChild(ElementSpinnerName) as Spinner; - } - - protected override void OnPreviewKeyDown(KeyEventArgs e) - { - switch (e.Key) - { - case Key.Up: - { - DoIncrement(); - e.Handled = true; - break; - } - case Key.Down: - { - DoDecrement(); - e.Handled = true; - break; - } - case Key.Enter: - { - SyncTextAndValueProperties(UpDownBase.TextProperty, TextBox.Text); - break; - } - } - } - - protected override void OnMouseWheel(MouseWheelEventArgs e) - { - base.OnMouseWheel(e); - - if (!e.Handled) - { - if (e.Delta < 0) - { - DoDecrement(); - } - else if (0 < e.Delta) - { - DoIncrement(); - } - - e.Handled = true; - } - } - - #endregion //Base Class Overrides - - #region Event Handlers - - private void OnSpinnerSpin(object sender, SpinEventArgs e) - { - OnSpin(e); - } - - #endregion //Event Handlers - - #region Methods - - protected virtual void OnSpin(SpinEventArgs e) - { - if (e == null) - throw new ArgumentNullException("e"); - - if (e.Direction == SpinDirection.Increase) - DoIncrement(); - else - DoDecrement(); - } - - /// - /// Performs an increment if conditions allow it. - /// - private void DoDecrement() - { - if (Spinner == null || (Spinner.ValidSpinDirection & ValidSpinDirections.Decrease) == ValidSpinDirections.Decrease) - { - OnDecrement(); - } - } - - /// - /// Performs a decrement if conditions allow it. - /// - private void DoIncrement() - { - if (Spinner == null || (Spinner.ValidSpinDirection & ValidSpinDirections.Increase) == ValidSpinDirections.Increase) - { - OnIncrement(); - } - } - - #region Abstract - - /// - /// Called by OnSpin when the spin direction is SpinDirection.Increase. - /// - protected abstract void OnIncrement(); - - /// - /// Called by OnSpin when the spin direction is SpinDirection.Descrease. - /// - protected abstract void OnDecrement(); - - #endregion //Abstract - - #endregion //Methods - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/VisualStates.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/VisualStates.cs deleted file mode 100644 index 721a96e2..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/VisualStates.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - internal static partial class VisualStates - { - - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj deleted file mode 100644 index f7b44fab..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj +++ /dev/null @@ -1,174 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {72E591D6-8F83-4D8C-8F67-9C325E623234} - library - Properties - Microsoft.Windows.Controls - WPFToolkit.Extended - v4.0 - Client - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - SAK - SAK - SAK - SAK - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - 4.0 - - - - - - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - RichTextBoxFormatBar.xaml - - - - - - - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc b/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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_35/ExtendedWPFToolkit.sln b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln deleted file mode 100644 index 3a8496f2..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln +++ /dev/null @@ -1,38 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -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.Examples", "Src\WPFToolkit.Extended.Examples\WPFToolkit.Extended.Examples.csproj", "{747652D0-6AA6-4F96-99F7-0C834274FAB2}" -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.Examples\\WPFToolkit.Extended.Examples.csproj - SccProjectName2 = Src/WPFToolkit.Extended.Examples - SccLocalPath2 = Src\\WPFToolkit.Extended.Examples - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - 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}.Release|Any CPU.ActiveCfg = Release|Any CPU - {72E591D6-8F83-4D8C-8F67-9C325E623234}.Release|Any CPU.Build.0 = Release|Any CPU - {747652D0-6AA6-4F96-99F7-0C834274FAB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {747652D0-6AA6-4F96-99F7-0C834274FAB2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {747652D0-6AA6-4F96-99F7-0C834274FAB2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {747652D0-6AA6-4F96-99F7-0C834274FAB2}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.vssscc b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.vssscc deleted file mode 100644 index 794f014c..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.vssscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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_35/Src/WPFToolkit.Extended.Examples/App.xaml b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml deleted file mode 100644 index b6483ed1..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml.cs deleted file mode 100644 index 490ee2d0..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Windows; - -namespace WPFToolkit.Extended.Examples -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/AssemblyInfo.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/AssemblyInfo.cs deleted file mode 100644 index af4eebe1..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -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.Examples")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("WPFToolkit.Extended.Examples")] -[assembly: AssemblyCopyright("Copyright © Microsoft 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_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.Designer.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.Designer.cs deleted file mode 100644 index 7a589ef7..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4952 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WPFToolkit.Extended.Examples.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", "2.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.Examples.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_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.resx b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.resx deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.Designer.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.Designer.cs deleted file mode 100644 index 604a14c1..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4952 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WPFToolkit.Extended.Examples.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.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_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.settings b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.settings deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj deleted file mode 100644 index 9150807f..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj +++ /dev/null @@ -1,113 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {747652D0-6AA6-4F96-99F7-0C834274FAB2} - WinExe - Properties - WPFToolkit.Extended.Examples - WPFToolkit.Extended.Examples - v3.5 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - SAK - SAK - SAK - SAK - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - Window1.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_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj.vspscc b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj.vspscc deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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_35/Src/WPFToolkit.Extended.Examples/Window1.xaml b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml deleted file mode 100644 index 78cc5db9..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml.cs deleted file mode 100644 index 009eb35f..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml.cs +++ /dev/null @@ -1,33 +0,0 @@ -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.Examples -{ - /// - /// Interaction logic for Window1.xaml - /// - public partial class Window1 : Window - { - public Window1() - { - InitializeComponent(); - Loaded += new RoutedEventHandler(Window1_Loaded); - } - - void Window1_Loaded(object sender, RoutedEventArgs e) - { - Microsoft.Windows.Controls.MessageBox.Show("MyStezt", "Test", MessageBoxButton.OKCancel, MessageBoxImage.Stop); - } - } -} diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png deleted file mode 100644 index 4304d43b..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png deleted file mode 100644 index 35075187..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png deleted file mode 100644 index dad7dd09..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png deleted file mode 100644 index ecb7fe86..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs deleted file mode 100644 index 60f0e673..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Markup; - -// 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("Extended WPF Toolkit")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Extended WPF Toolkit")] -[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.3.0.0")] -[assembly: AssemblyFileVersion("1.3.0.0")] - -[assembly: XmlnsPrefix("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "extToolkit")] -[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "Microsoft.Windows.Controls")] diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs deleted file mode 100644 index eaf63633..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 Microsoft.Windows.Controls.Properties { - using System; - - - /// - /// 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 (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Windows.Controls.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_35/Src/WPFToolkit.Extended/Properties/Resources.resx b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.resx deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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_35/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs deleted file mode 100644 index 4a0f1423..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 Microsoft.Windows.Controls.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_35/Src/WPFToolkit.Extended/Properties/Settings.settings b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.settings deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png deleted file mode 100644 index 8fb36a1a..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bullets16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bullets16.png deleted file mode 100644 index 73e7c15e..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bullets16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png deleted file mode 100644 index 1030a021..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/FontColorPicker16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/FontColorPicker16.png deleted file mode 100644 index d9207308..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/FontColorPicker16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png deleted file mode 100644 index 8259a9e1..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png deleted file mode 100644 index c5499bce..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png deleted file mode 100644 index 51dffb73..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Numbering16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Numbering16.png deleted file mode 100644 index 03f6fde2..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Numbering16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png deleted file mode 100644 index cb8e400a..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png deleted file mode 100644 index 4a3783f2..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png deleted file mode 100644 index 72689482..00000000 Binary files a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png and /dev/null differ diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Generic.xaml b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Generic.xaml deleted file mode 100644 index 452b0bf8..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Generic.xaml +++ /dev/null @@ -1,1070 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Collapsed - - - - - - - Collapsed - - - - - - - - - - - Visible - - - - - - - Visible - - - - - - - - - - - - - True - - - - - - - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj deleted file mode 100644 index a6c2a166..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj +++ /dev/null @@ -1,242 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {72E591D6-8F83-4D8C-8F67-9C325E623234} - library - Properties - Microsoft.Windows.Controls - WPFToolkit.Extended - v3.5 - Client - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - SAK - SAK - SAK - SAK - - - true - full - false - bin\Debug\ - TRACE;DEBUG;VS2008 - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE;VS2008 - prompt - 4 - - - - - - - 3.5 - - - - - 3.0 - - - 3.0 - - - 3.0 - - - 3.0 - - - - - - RichTextBoxFormatBar\RichTextBoxFormatBar.xaml - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - - - BusyIndicator\BusyIndicator.cs - - - BusyIndicator\VisualStates.BusyIndicator.cs - - - ButtonSpinner\ButtonSpinner.cs - - - ButtonSpinner\SpinDirection.cs - - - ButtonSpinner\SpinEventArgs.cs - - - ButtonSpinner\Spinner.cs - - - ButtonSpinner\ValidSpinDirections.cs - - - ChildWindow\ChildWindow.cs - - - ChildWindow\VisualStates.ChildWindow.cs - - - ChildWindow\WindowState.cs - - - ColorPicker\ColorItem.cs - - - ColorPicker\ColorPicker.cs - - - Core\Converters\InverseBoolConverter.cs - - - Core\Primitives\InputBase.cs - - - Core\UIElementAdorner.cs - - - DateTimeUpDown\DateTimeFormat.cs - - - DateTimeUpDown\DateTimeInfo.cs - - - DateTimeUpDown\DateTimePart.cs - - - DateTimeUpDown\DateTimeUpDown.cs - - - Magnifier\Converters\BorderThicknessToStrokeThicknessConverter.cs - - - Magnifier\Converters\RadiusConverter.cs - - - Magnifier\Magnifier.cs - - - Magnifier\MagnifierAdorner.cs - - - Magnifier\MagnifierManager.cs - - - MaskedTextBox\MaskedTextBox.cs - - - MessageBox\MessageBox.cs - - - MessageBox\VisualStates.MessageBox.cs - - - NumericUpDown\NumericUpDown.cs - - - RichTextBoxFormatBar\IRichTextBoxFormatBar.cs - - - RichTextBoxFormatBar\RichTextBoxFormatBar.xaml.cs - RichTextBoxFormatBar.xaml - - - RichTextBoxFormatBar\RichTextBoxFormatBarManager.cs - - - RichTextBox\Formatters\ITextFormatter.cs - - - RichTextBox\Formatters\PlainTextFormatter.cs - - - RichTextBox\Formatters\RtfFormatter.cs - - - RichTextBox\Formatters\XamlFormatter.cs - - - RichTextBox\RichTextBox.cs - - - UpDownBase\UpDownBase.cs - - - VisualStates.cs - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc b/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.3.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.4.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln b/Release/v1.4.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln deleted file mode 100644 index c062fd05..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln +++ /dev/null @@ -1,54 +0,0 @@ - -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/Release/v1.4.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc b/Release/v1.4.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc deleted file mode 100644 index 794f014c..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/MetadataStore.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/MetadataStore.cs deleted file mode 100644 index d59e48ab..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/MetadataStore.cs +++ /dev/null @@ -1,52 +0,0 @@ -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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/AssemblyInfo.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/AssemblyInfo.cs deleted file mode 100644 index 5b13e861..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.Designer.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.Designer.cs deleted file mode 100644 index 7ef72466..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.resx b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.resx deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.Designer.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.Designer.cs deleted file mode 100644 index 72d80d66..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.settings b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.settings deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj deleted file mode 100644 index fd0fa3fa..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj +++ /dev/null @@ -1,99 +0,0 @@ - - - - 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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj.vspscc b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj.vspscc deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Design/WPFToolkit.Extended.Design.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml deleted file mode 100644 index 00767c6d..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml.cs deleted file mode 100644 index f0cfc9e7..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/App.xaml.cs +++ /dev/null @@ -1,16 +0,0 @@ -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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml deleted file mode 100644 index e61a28f8..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs deleted file mode 100644 index 688a567d..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/MainWindow.xaml.cs +++ /dev/null @@ -1,128 +0,0 @@ -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/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/AssemblyInfo.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/AssemblyInfo.cs deleted file mode 100644 index 35e4c7aa..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.Designer.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.Designer.cs deleted file mode 100644 index 3c757353..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.resx b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.resx deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.Designer.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.Designer.cs deleted file mode 100644 index a353c3db..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.settings b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.settings deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj deleted file mode 100644 index e49eab24..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj +++ /dev/null @@ -1,113 +0,0 @@ - - - - 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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj.vspscc b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj.vspscc deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended.Samples/WPFToolkit.Extended.Samples.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/BusyIndicator.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/BusyIndicator.cs deleted file mode 100644 index 6a73cd8f..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/BusyIndicator.cs +++ /dev/null @@ -1,266 +0,0 @@ -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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/VisualStates.BusyIndicator.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/VisualStates.BusyIndicator.cs deleted file mode 100644 index 5d78d952..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/VisualStates.BusyIndicator.cs +++ /dev/null @@ -1,37 +0,0 @@ -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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml deleted file mode 100644 index 7966fe0f..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Collapsed - - - - - - - Collapsed - - - - - - - - - - - Visible - - - - - - - Visible - - - - - - - - - - - - - True - - - - - - - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ButtonSpinner.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ButtonSpinner.cs deleted file mode 100644 index fde872d8..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ButtonSpinner.cs +++ /dev/null @@ -1,231 +0,0 @@ -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/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinDirection.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinDirection.cs deleted file mode 100644 index aaa121fb..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinDirection.cs +++ /dev/null @@ -1,21 +0,0 @@ -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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinEventArgs.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinEventArgs.cs deleted file mode 100644 index f8a89385..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinEventArgs.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/Spinner.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/Spinner.cs deleted file mode 100644 index 63b2a22a..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/Spinner.cs +++ /dev/null @@ -1,75 +0,0 @@ -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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ValidSpinDirections.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ValidSpinDirections.cs deleted file mode 100644 index d744620d..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ValidSpinDirections.cs +++ /dev/null @@ -1,26 +0,0 @@ -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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml deleted file mode 100644 index 73c19ad1..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs deleted file mode 100644 index b5ad89e6..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs +++ /dev/null @@ -1,466 +0,0 @@ -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/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/CalculatorCommands.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/CalculatorCommands.cs deleted file mode 100644 index 47fbc8df..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/CalculatorCommands.cs +++ /dev/null @@ -1,14 +0,0 @@ -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/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml deleted file mode 100644 index 37529ff7..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml +++ /dev/null @@ -1,496 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Chromes/Implementation/ButtonChrome.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Chromes/Implementation/ButtonChrome.cs deleted file mode 100644 index b6c2b9e1..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Chromes/Implementation/ButtonChrome.cs +++ /dev/null @@ -1,208 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; - -namespace Microsoft.Windows.Controls.Chromes -{ - public class ButtonChrome : Control - { - #region CornerRadius - - public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(ButtonChrome), new UIPropertyMetadata(default(CornerRadius), new PropertyChangedCallback(OnCornerRadiusChanged))); - public CornerRadius CornerRadius - { - get { return (CornerRadius)GetValue(CornerRadiusProperty); } - set { SetValue(CornerRadiusProperty, value); } - } - - private static void OnCornerRadiusChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - ButtonChrome buttonChrome = o as ButtonChrome; - if (buttonChrome != null) - buttonChrome.OnCornerRadiusChanged((CornerRadius)e.OldValue, (CornerRadius)e.NewValue); - } - - protected virtual void OnCornerRadiusChanged(CornerRadius oldValue, CornerRadius newValue) - { - //we always want the InnerBorderRadius to be one less than the CornerRadius - CornerRadius newInnerCornerRadius = new CornerRadius(Math.Max(0, newValue.TopLeft - 1), - Math.Max(0, newValue.TopRight - 1), - Math.Max(0, newValue.BottomRight - 1), - Math.Max(0, newValue.BottomLeft - 1)); - - InnerCornerRadius = newInnerCornerRadius; - } - - #endregion //CornerRadius - - #region InnerCornerRadius - - public static readonly DependencyProperty InnerCornerRadiusProperty = DependencyProperty.Register("InnerCornerRadius", typeof(CornerRadius), typeof(ButtonChrome), new UIPropertyMetadata(default(CornerRadius), new PropertyChangedCallback(OnInnerCornerRadiusChanged))); - public CornerRadius InnerCornerRadius - { - get { return (CornerRadius)GetValue(InnerCornerRadiusProperty); } - set { SetValue(InnerCornerRadiusProperty, value); } - } - - private static void OnInnerCornerRadiusChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - ButtonChrome buttonChrome = o as ButtonChrome; - if (buttonChrome != null) - buttonChrome.OnInnerCornerRadiusChanged((CornerRadius)e.OldValue, (CornerRadius)e.NewValue); - } - - protected virtual void OnInnerCornerRadiusChanged(CornerRadius oldValue, CornerRadius newValue) - { - // TODO: Add your property changed side-effects. Descendants can override as well. - } - - #endregion //InnerCornerRadius - - #region RenderChecked - - public static readonly DependencyProperty RenderCheckedProperty = DependencyProperty.Register("RenderChecked", typeof(bool), typeof(ButtonChrome), new UIPropertyMetadata(false, OnRenderCheckedChanged)); - public bool RenderChecked - { - get { return (bool)GetValue(RenderCheckedProperty); } - set { SetValue(RenderCheckedProperty, value); } - } - - private static void OnRenderCheckedChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - ButtonChrome buttonChrome = o as ButtonChrome; - if (buttonChrome != null) - buttonChrome.OnRenderCheckedChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnRenderCheckedChanged(bool oldValue, bool newValue) - { - // TODO: Add your property changed side-effects. Descendants can override as well. - } - - #endregion //RenderChecked - - #region RenderEnabled - - public static readonly DependencyProperty RenderEnabledProperty = DependencyProperty.Register("RenderEnabled", typeof(bool), typeof(ButtonChrome), new UIPropertyMetadata(true, OnRenderEnabledChanged)); - public bool RenderEnabled - { - get { return (bool)GetValue(RenderEnabledProperty); } - set { SetValue(RenderEnabledProperty, value); } - } - - private static void OnRenderEnabledChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - ButtonChrome buttonChrome = o as ButtonChrome; - if (buttonChrome != null) - buttonChrome.OnRenderEnabledChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnRenderEnabledChanged(bool oldValue, bool newValue) - { - // TODO: Add your property changed side-effects. Descendants can override as well. - } - - #endregion //RenderEnabled - - #region RenderFocused - - public static readonly DependencyProperty RenderFocusedProperty = DependencyProperty.Register("RenderFocused", typeof(bool), typeof(ButtonChrome), new UIPropertyMetadata(false, OnRenderFocusedChanged)); - public bool RenderFocused - { - get { return (bool)GetValue(RenderFocusedProperty); } - set { SetValue(RenderFocusedProperty, value); } - } - - private static void OnRenderFocusedChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - ButtonChrome buttonChrome = o as ButtonChrome; - if (buttonChrome != null) - buttonChrome.OnRenderFocusedChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnRenderFocusedChanged(bool oldValue, bool newValue) - { - // TODO: Add your property changed side-effects. Descendants can override as well. - } - - #endregion //RenderFocused - - #region RenderMouseOver - - public static readonly DependencyProperty RenderMouseOverProperty = DependencyProperty.Register("RenderMouseOver", typeof(bool), typeof(ButtonChrome), new UIPropertyMetadata(false, OnRenderMouseOverChanged)); - public bool RenderMouseOver - { - get { return (bool)GetValue(RenderMouseOverProperty); } - set { SetValue(RenderMouseOverProperty, value); } - } - - private static void OnRenderMouseOverChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - ButtonChrome buttonChrome = o as ButtonChrome; - if (buttonChrome != null) - buttonChrome.OnRenderMouseOverChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnRenderMouseOverChanged(bool oldValue, bool newValue) - { - // TODO: Add your property changed side-effects. Descendants can override as well. - } - - #endregion //RenderMouseOver - - #region RenderNormal - - public static readonly DependencyProperty RenderNormalProperty = DependencyProperty.Register("RenderNormal", typeof(bool), typeof(ButtonChrome), new UIPropertyMetadata(true, OnRenderNormalChanged)); - public bool RenderNormal - { - get { return (bool)GetValue(RenderNormalProperty); } - set { SetValue(RenderNormalProperty, value); } - } - - private static void OnRenderNormalChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - ButtonChrome buttonChrome = o as ButtonChrome; - if (buttonChrome != null) - buttonChrome.OnRenderNormalChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnRenderNormalChanged(bool oldValue, bool newValue) - { - // TODO: Add your property changed side-effects. Descendants can override as well. - } - - #endregion //RenderNormal - - #region RenderPressed - - public static readonly DependencyProperty RenderPressedProperty = DependencyProperty.Register("RenderPressed", typeof(bool), typeof(ButtonChrome), new UIPropertyMetadata(false, OnRenderPressedChanged)); - public bool RenderPressed - { - get { return (bool)GetValue(RenderPressedProperty); } - set { SetValue(RenderPressedProperty, value); } - } - - private static void OnRenderPressedChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - ButtonChrome buttonChrome = o as ButtonChrome; - if (buttonChrome != null) - buttonChrome.OnRenderPressedChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnRenderPressedChanged(bool oldValue, bool newValue) - { - // TODO: Add your property changed side-effects. Descendants can override as well. - } - - #endregion //RenderPressed - - #region Contsructors - - static ButtonChrome() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(ButtonChrome), new FrameworkPropertyMetadata(typeof(ButtonChrome))); - } - - #endregion //Contsructors - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Chromes/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Chromes/Themes/Generic.xaml deleted file mode 100644 index 0f0fd301..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Chromes/Themes/Generic.xaml +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - 2.75 - 1.75 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Implementation/ColorCanvas.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Implementation/ColorCanvas.cs deleted file mode 100644 index c65ecc46..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Implementation/ColorCanvas.cs +++ /dev/null @@ -1,365 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using System.Windows.Media; -using Microsoft.Windows.Controls.Primitives; -using Microsoft.Windows.Controls.Core.Utilities; -using System.Windows.Data; - -namespace Microsoft.Windows.Controls -{ - public class ColorCanvas : Control - { - #region Private Members - - private TranslateTransform _colorShadeSelectorTransform = new TranslateTransform(); - private Canvas _colorShadingCanvas; - private Canvas _colorShadeSelector; - private ColorSpectrumSlider _spectrumSlider; - private Point? _currentColorPosition; - private bool _surpressPropertyChanged; - - #endregion //Private Members - - #region Properties - - #region SelectedColor - - public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register("SelectedColor", typeof(Color), typeof(ColorCanvas), new FrameworkPropertyMetadata(Colors.Black, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedColorChanged)); - public Color SelectedColor - { - get { return (Color)GetValue(SelectedColorProperty); } - set { SetValue(SelectedColorProperty, value); } - } - - private static void OnSelectedColorChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - ColorCanvas colorCanvas = o as ColorCanvas; - if (colorCanvas != null) - colorCanvas.OnSelectedColorChanged((Color)e.OldValue, (Color)e.NewValue); - } - - protected virtual void OnSelectedColorChanged(Color oldValue, Color newValue) - { - HexadecimalString = newValue.ToString(); - UpdateRGBValues(newValue); - UpdateColorShadeSelectorPosition(newValue); - - RoutedPropertyChangedEventArgs args = new RoutedPropertyChangedEventArgs(oldValue, newValue); - args.RoutedEvent = SelectedColorChangedEvent; - RaiseEvent(args); - } - - #endregion //SelectedColor - - #region RGB - - #region A - - public static readonly DependencyProperty AProperty = DependencyProperty.Register("A", typeof(byte), typeof(ColorCanvas), new UIPropertyMetadata((byte)255, OnAChanged)); - public byte A - { - get { return (byte)GetValue(AProperty); } - set { SetValue(AProperty, value); } - } - - private static void OnAChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - ColorCanvas colorCanvas = o as ColorCanvas; - if (colorCanvas != null) - colorCanvas.OnAChanged((byte)e.OldValue, (byte)e.NewValue); - } - - protected virtual void OnAChanged(byte oldValue, byte newValue) - { - if (!_surpressPropertyChanged) - UpdateSelectedColor(); - } - - #endregion //A - - #region R - - public static readonly DependencyProperty RProperty = DependencyProperty.Register("R", typeof(byte), typeof(ColorCanvas), new UIPropertyMetadata((byte)0, OnRChanged)); - public byte R - { - get { return (byte)GetValue(RProperty); } - set { SetValue(RProperty, value); } - } - - private static void OnRChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - ColorCanvas colorCanvas = o as ColorCanvas; - if (colorCanvas != null) - colorCanvas.OnRChanged((byte)e.OldValue, (byte)e.NewValue); - } - - protected virtual void OnRChanged(byte oldValue, byte newValue) - { - if (!_surpressPropertyChanged) - UpdateSelectedColor(); - } - - #endregion //R - - #region G - - public static readonly DependencyProperty GProperty = DependencyProperty.Register("G", typeof(byte), typeof(ColorCanvas), new UIPropertyMetadata((byte)0, OnGChanged)); - public byte G - { - get { return (byte)GetValue(GProperty); } - set { SetValue(GProperty, value); } - } - - private static void OnGChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - ColorCanvas colorCanvas = o as ColorCanvas; - if (colorCanvas != null) - colorCanvas.OnGChanged((byte)e.OldValue, (byte)e.NewValue); - } - - protected virtual void OnGChanged(byte oldValue, byte newValue) - { - if (!_surpressPropertyChanged) - UpdateSelectedColor(); - } - - #endregion //G - - #region B - - public static readonly DependencyProperty BProperty = DependencyProperty.Register("B", typeof(byte), typeof(ColorCanvas), new UIPropertyMetadata((byte)0, OnBChanged)); - public byte B - { - get { return (byte)GetValue(BProperty); } - set { SetValue(BProperty, value); } - } - - private static void OnBChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - ColorCanvas colorCanvas = o as ColorCanvas; - if (colorCanvas != null) - colorCanvas.OnBChanged((byte)e.OldValue, (byte)e.NewValue); - } - - protected virtual void OnBChanged(byte oldValue, byte newValue) - { - if (!_surpressPropertyChanged) - UpdateSelectedColor(); - } - - #endregion //B - - #endregion //RGB - - #region HexadecimalString - - public static readonly DependencyProperty HexadecimalStringProperty = DependencyProperty.Register("HexadecimalString", typeof(string), typeof(ColorCanvas), new UIPropertyMetadata("#FFFFFFFF", OnHexadecimalStringChanged)); - public string HexadecimalString - { - get { return (string)GetValue(HexadecimalStringProperty); } - set { SetValue(HexadecimalStringProperty, value); } - } - - private static void OnHexadecimalStringChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - ColorCanvas colorCanvas = o as ColorCanvas; - if (colorCanvas != null) - colorCanvas.OnHexadecimalStringChanged((string)e.OldValue, (string)e.NewValue); - } - - protected virtual void OnHexadecimalStringChanged(string oldValue, string newValue) - { - if (!SelectedColor.ToString().Equals(newValue)) - UpdateSelectedColor((Color)ColorConverter.ConvertFromString(newValue)); - } - - #endregion //HexadecimalString - - #endregion //Properties - - #region Constructors - - static ColorCanvas() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(ColorCanvas), new FrameworkPropertyMetadata(typeof(ColorCanvas))); - } - - #endregion //Constructors - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - _colorShadingCanvas = (Canvas)GetTemplateChild("PART_ColorShadingCanvas"); - _colorShadingCanvas.MouseLeftButtonDown += ColorShadingCanvas_MouseLeftButtonDown; - _colorShadingCanvas.MouseLeftButtonUp += ColorShadingCanvas_MouseLeftButtonUp; - _colorShadingCanvas.MouseMove += ColorShadingCanvas_MouseMove; - _colorShadingCanvas.SizeChanged += ColorShadingCanvas_SizeChanged; - - _colorShadeSelector = (Canvas)GetTemplateChild("PART_ColorShadeSelector"); - _colorShadeSelector.RenderTransform = _colorShadeSelectorTransform; - - _spectrumSlider = (ColorSpectrumSlider)GetTemplateChild("PART_SpectrumSlider"); - _spectrumSlider.ValueChanged += SpectrumSlider_ValueChanged; - - UpdateRGBValues(SelectedColor); - UpdateColorShadeSelectorPosition(SelectedColor); - } - - protected override void OnPreviewKeyDown(KeyEventArgs e) - { - //hitting enter on textbox will update value of underlying source - if (e.Key == Key.Enter && e.OriginalSource is TextBox) - { - BindingExpression be = ((TextBox)e.OriginalSource).GetBindingExpression(TextBox.TextProperty); - be.UpdateSource(); - } - } - - #endregion //Base Class Overrides - - #region Event Handlers - - void ColorShadingCanvas_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) - { - Point p = e.GetPosition(_colorShadingCanvas); - UpdateColorShadeSelectorPositionAndCalculateColor(p, true); - _colorShadingCanvas.CaptureMouse(); - } - - void ColorShadingCanvas_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) - { - _colorShadingCanvas.ReleaseMouseCapture(); - } - - void ColorShadingCanvas_MouseMove(object sender, MouseEventArgs e) - { - if (e.LeftButton == MouseButtonState.Pressed) - { - Point p = e.GetPosition(_colorShadingCanvas); - UpdateColorShadeSelectorPositionAndCalculateColor(p, true); - Mouse.Synchronize(); - } - } - - void ColorShadingCanvas_SizeChanged(object sender, SizeChangedEventArgs e) - { - if (_currentColorPosition != null) - { - Point _newPoint = new Point - { - X = ((Point)_currentColorPosition).X * e.NewSize.Width, - Y = ((Point)_currentColorPosition).Y * e.NewSize.Height - }; - - UpdateColorShadeSelectorPositionAndCalculateColor(_newPoint, false); - } - } - - void SpectrumSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) - { - if (_currentColorPosition != null) - { - CalculateColor((Point)_currentColorPosition); - } - } - - #endregion //Event Handlers - - #region Events - - public static readonly RoutedEvent SelectedColorChangedEvent = EventManager.RegisterRoutedEvent("SelectedColorChanged", RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler), typeof(ColorCanvas)); - public event RoutedPropertyChangedEventHandler SelectedColorChanged - { - add { AddHandler(SelectedColorChangedEvent, value); } - remove { RemoveHandler(SelectedColorChangedEvent, value); } - } - - #endregion //Events - - #region Methods - - private void UpdateSelectedColor() - { - SelectedColor = Color.FromArgb(A, R, G, B); - } - - private void UpdateSelectedColor(Color color) - { - SelectedColor = Color.FromArgb(color.A, color.R, color.G, color.B); - } - - private void UpdateRGBValues(Color color) - { - _surpressPropertyChanged = true; - - A = color.A; - R = color.R; - G = color.G; - B = color.B; - - _surpressPropertyChanged = false; - } - - private void UpdateColorShadeSelectorPositionAndCalculateColor(Point p, bool calculateColor) - { - if (p.Y < 0) - p.Y = 0; - - if (p.X < 0) - p.X = 0; - - if (p.X > _colorShadingCanvas.ActualWidth) - p.X = _colorShadingCanvas.ActualWidth; - - if (p.Y > _colorShadingCanvas.ActualHeight) - p.Y = _colorShadingCanvas.ActualHeight; - - _colorShadeSelectorTransform.X = p.X - (_colorShadeSelector.Width / 2); - _colorShadeSelectorTransform.Y = p.Y - (_colorShadeSelector.Height / 2); - - p.X = p.X / _colorShadingCanvas.ActualWidth; - p.Y = p.Y / _colorShadingCanvas.ActualHeight; - - _currentColorPosition = p; - - if (calculateColor) - CalculateColor(p); - } - - private void UpdateColorShadeSelectorPosition(Color color) - { - if (_spectrumSlider == null || _colorShadingCanvas == null) - return; - - _currentColorPosition = null; - - HsvColor hsv = ColorUtilities.ConvertRgbToHsv(color.R, color.G, color.B); - - if (!(color.R == color.G && color.R == color.B)) - _spectrumSlider.Value = hsv.H; - - Point p = new Point(hsv.S, 1 - hsv.V); - - _currentColorPosition = p; - - _colorShadeSelectorTransform.X = (p.X * _colorShadingCanvas.Width) - 5; - _colorShadeSelectorTransform.Y = (p.Y * _colorShadingCanvas.Height) - 5; - } - - private void CalculateColor(Point p) - { - HsvColor hsv = new HsvColor(360 - _spectrumSlider.Value, 1, 1) { S = p.X, V = 1 - p.Y }; - var currentColor = ColorUtilities.ConvertHsvToRgb(hsv.H, hsv.S, hsv.V); - currentColor.A = A; - SelectedColor = currentColor; - HexadecimalString = SelectedColor.ToString(); - } - - #endregion //Methods - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Implementation/ColorSpectrumSlider.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Implementation/ColorSpectrumSlider.cs deleted file mode 100644 index 54bb6e9e..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Implementation/ColorSpectrumSlider.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Shapes; -using Microsoft.Windows.Controls.Core.Utilities; - -namespace Microsoft.Windows.Controls -{ - internal class ColorSpectrumSlider : Slider - { - #region Private Members - - private Rectangle _spectrumDisplay; - private LinearGradientBrush _pickerBrush; - - #endregion //Private Members - - #region Constructors - - static ColorSpectrumSlider() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(ColorSpectrumSlider), new FrameworkPropertyMetadata(typeof(ColorSpectrumSlider))); - } - - #endregion //Constructors - - #region Dependency Properties - - public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register("SelectedColor", typeof(Color), typeof(ColorSpectrumSlider), new PropertyMetadata(System.Windows.Media.Colors.Transparent)); - public Color SelectedColor - { - get { return (Color)GetValue(SelectedColorProperty); } - set { SetValue(SelectedColorProperty, value); } - } - - #endregion //Dependency Properties - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - _spectrumDisplay = (Rectangle)GetTemplateChild("PART_SpectrumDisplay"); - CreateSpectrum(); - OnValueChanged(Double.NaN, Value); - } - - protected override void OnValueChanged(double oldValue, double newValue) - { - base.OnValueChanged(oldValue, newValue); - - Color color = ColorUtilities.ConvertHsvToRgb(360 - newValue, 1, 1); - SelectedColor = color; - } - - #endregion //Base Class Overrides - - #region Methods - - private void CreateSpectrum() - { - _pickerBrush = new LinearGradientBrush(); - _pickerBrush.StartPoint = new Point(0.5, 0); - _pickerBrush.EndPoint = new Point(0.5, 1); - _pickerBrush.ColorInterpolationMode = ColorInterpolationMode.SRgbLinearInterpolation; - - List colorsList = ColorUtilities.GenerateHsvSpectrum(); - - double stopIncrement = (double)1 / colorsList.Count; - - int i; - for (i = 0; i < colorsList.Count; i++) - { - _pickerBrush.GradientStops.Add(new GradientStop(colorsList[i], i * stopIncrement)); - } - - _pickerBrush.GradientStops[i - 1].Offset = 1.0; - _spectrumDisplay.Fill = _pickerBrush; - } - - #endregion //Methods - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Themes/Generic.xaml deleted file mode 100644 index 6cc8d243..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Themes/Generic.xaml +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/Implementation/ColorItem.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/Implementation/ColorItem.cs deleted file mode 100644 index 0f846a9a..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/Implementation/ColorItem.cs +++ /dev/null @@ -1,17 +0,0 @@ -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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/Implementation/ColorPicker.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/Implementation/ColorPicker.cs deleted file mode 100644 index aa87a36f..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/Implementation/ColorPicker.cs +++ /dev/null @@ -1,317 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Controls.Primitives; -using System.Collections.ObjectModel; -using System.Windows.Input; -using Microsoft.Windows.Controls.Core.Utilities; - -namespace Microsoft.Windows.Controls -{ - public class ColorPicker : Control - { - #region Members - - private Popup _colorPickerCanvasPopup; - private ListBox _availableColors; - private ListBox _standardColors; - private 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 DisplayColorAndName - - public static readonly DependencyProperty DisplayColorAndNameProperty = DependencyProperty.Register("DisplayColorAndName", typeof(bool), typeof(ColorPicker), new UIPropertyMetadata(false)); - public bool DisplayColorAndName - { - get { return (bool)GetValue(DisplayColorAndNameProperty); } - set { SetValue(DisplayColorAndNameProperty, value); } - } - - #endregion //DisplayColorAndName - - #region IsOpen - - public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register("IsOpen", typeof(bool), typeof(ColorPicker), new UIPropertyMetadata(false)); - public bool IsOpen - { - get { return (bool)GetValue(IsOpenProperty); } - set { SetValue(IsOpenProperty, value); } - } - - #endregion //IsOpen - - #region RecentColors - - 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) - { - SelectedColorText = newValue.GetColorName(); - - RoutedPropertyChangedEventArgs args = new RoutedPropertyChangedEventArgs(oldValue, newValue); - args.RoutedEvent = ColorPicker.SelectedColorChangedEvent; - RaiseEvent(args); - } - - #endregion //SelectedColor - - #region SelectedColorText - - public static readonly DependencyProperty SelectedColorTextProperty = DependencyProperty.Register("SelectedColorText", typeof(string), typeof(ColorPicker), new UIPropertyMetadata("Black")); - public string SelectedColorText - { - get { return (string)GetValue(SelectedColorTextProperty); } - protected set { SetValue(SelectedColorTextProperty, value); } - } - - #endregion //SelectedColorText - - #region ShowAdvancedButton - - public static readonly DependencyProperty ShowAdvancedButtonProperty = DependencyProperty.Register("ShowAdvancedButton", typeof(bool), typeof(ColorPicker), new UIPropertyMetadata(true)); - public bool ShowAdvancedButton - { - get { return (bool)GetValue(ShowAdvancedButtonProperty); } - set { SetValue(ShowAdvancedButtonProperty, value); } - } - - #endregion //ShowAdvancedButton - - #region ShowAvailableColors - - public static readonly DependencyProperty ShowAvailableColorsProperty = DependencyProperty.Register("ShowAvailableColors", typeof(bool), typeof(ColorPicker), new UIPropertyMetadata(true)); - public bool ShowAvailableColors - { - get { return (bool)GetValue(ShowAvailableColorsProperty); } - set { SetValue(ShowAvailableColorsProperty, value); } - } - - #endregion //ShowAvailableColors - - #region ShowRecentColors - - public static readonly DependencyProperty ShowRecentColorsProperty = DependencyProperty.Register("ShowRecentColors", typeof(bool), typeof(ColorPicker), new UIPropertyMetadata(false)); - public bool ShowRecentColors - { - get { return (bool)GetValue(ShowRecentColorsProperty); } - set { SetValue(ShowRecentColorsProperty, value); } - } - - #endregion //DisplayRecentColors - - #region ShowStandardColors - - public static readonly DependencyProperty ShowStandardColorsProperty = DependencyProperty.Register("ShowStandardColors", typeof(bool), typeof(ColorPicker), new UIPropertyMetadata(true)); - public bool ShowStandardColors - { - get { return (bool)GetValue(ShowStandardColorsProperty); } - set { SetValue(ShowStandardColorsProperty, value); } - } - - #endregion //DisplayStandardColors - - #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(); - Keyboard.AddKeyDownHandler(this, OnKeyDown); - Mouse.AddPreviewMouseDownOutsideCapturedElementHandler(this, OnMouseDownOutsideCapturedElement); - } - - #endregion //Constructors - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - _colorPickerCanvasPopup = (Popup)GetTemplateChild("PART_ColorPickerPalettePopup"); - //_colorPickerCanvasPopup.Opened += ColorPickerCanvasPopup_Opened; - - _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 ColorPickerCanvasPopup_Opened(object sender, EventArgs e) - { - - } - - private void OnKeyDown(object sender, KeyEventArgs e) - { - switch (e.Key) - { - case Key.Escape: - case Key.Tab: - { - CloseColorPicker(); - break; - } - } - } - - private void OnMouseDownOutsideCapturedElement(object sender, MouseButtonEventArgs e) - { - CloseColorPicker(); - } - - 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() - { - if (IsOpen) - IsOpen = false; - ReleaseMouseCapture(); - } - - 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.Transparent, "Transparent")); - _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, "Green")); - _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.Purple, "Purple")); - return _standardColors; - } - - private static ObservableCollection CreateAvailableColors() - { - ObservableCollection _standardColors = new ObservableCollection(); - - foreach (var item in ColorUtilities.KnownColors) - { - if (!String.Equals(item.Key, "Transparent")) - { - var colorItem = new ColorItem(item.Value, item.Key); - if (!_standardColors.Contains(colorItem)) - _standardColors.Add(colorItem); - } - } - - return _standardColors; - } - - #endregion //Methods - } -} \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/Themes/Generic.xaml deleted file mode 100644 index 12d36ca1..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/Themes/Generic.xaml +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/CalculatorMemoryToVisibilityConverter.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/CalculatorMemoryToVisibilityConverter.cs deleted file mode 100644 index 9b9b2b76..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/CalculatorMemoryToVisibilityConverter.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Windows.Data; -using System.Windows; - -namespace Microsoft.Windows.Controls.Core.Converters -{ - public class CalculatorMemoryToVisibilityConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - return (decimal)value == decimal.Zero ? Visibility.Hidden : Visibility.Visible; - } - - public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/ColorToSolidColorBrushConverter.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/ColorToSolidColorBrushConverter.cs deleted file mode 100644 index 6bb19191..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/ColorToSolidColorBrushConverter.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Windows.Data; -using System.Windows.Media; - -namespace Microsoft.Windows.Controls.Core.Converters -{ - public class ColorToSolidColorBrushConverter : IValueConverter - { - #region IValueConverter Members - - /// - /// Converts a Color to a SolidColorBrush. - /// - /// The Color produced by the binding source. - /// The type of the binding target property. - /// The converter parameter to use. - /// The culture to use in the converter. - /// - /// A converted SolidColorBrush. If the method returns null, the valid null value is used. - /// - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - if (value != null) - return new SolidColorBrush((Color)value); - - return value; - } - - - /// - /// Converts a SolidColorBrush to a Color. - /// - /// Currently not used in toolkit, but provided for developer use in their own projects - /// The SolidColorBrush that is produced by the binding target. - /// The type to convert to. - /// The converter parameter to use. - /// The culture to use in the converter. - /// - /// A converted value. If the method returns null, the valid null value is used. - /// - public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - if (value != null) - return ((SolidColorBrush)value).Color; - - return value; - } - - #endregion - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/InverseBoolConverter.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/InverseBoolConverter.cs deleted file mode 100644 index 2bcdc0fe..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/InverseBoolConverter.cs +++ /dev/null @@ -1,22 +0,0 @@ -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 - } -} \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/SolidColorBrushToColorConverter.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/SolidColorBrushToColorConverter.cs deleted file mode 100644 index 901f235b..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/SolidColorBrushToColorConverter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Windows.Data; -using System.Windows.Media; - -namespace Microsoft.Windows.Controls.Core.Converters -{ - public class SolidColorBrushToColorConverter : IValueConverter - { - #region IValueConverter Members - - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - SolidColorBrush brush = value as SolidColorBrush; - if (brush != null) - return brush.Color; - - return default(Color); - } - - public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - if (value != null) - { - Color color = (Color)value; - return new SolidColorBrush(color); - } - - return default(SolidColorBrush); - } - - #endregion - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/TimeFormatToDateTimeFormatConverter.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/TimeFormatToDateTimeFormatConverter.cs deleted file mode 100644 index 6eda8ab7..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/TimeFormatToDateTimeFormatConverter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Windows.Data; - -namespace Microsoft.Windows.Controls.Core.Converters -{ - public class TimeFormatToDateTimeFormatConverter : IValueConverter - { - #region IValueConverter Members - - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - TimeFormat timeFormat = (TimeFormat)value; - switch (timeFormat) - { - case TimeFormat.Custom: - return DateTimeFormat.Custom; - case TimeFormat.ShortTime: - return DateTimeFormat.ShortTime; - case TimeFormat.LongTime: - return DateTimeFormat.LongTime; - default: - return DateTimeFormat.ShortTime; - } - } - - public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - throw new NotImplementedException(); - } - - #endregion - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/HsvColor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/HsvColor.cs deleted file mode 100644 index 4756686c..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/HsvColor.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls.Primitives -{ - internal struct HsvColor - { - public double H; - public double S; - public double V; - - public HsvColor(double h, double s, double v) - { - H = h; - S = s; - V = v; - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs deleted file mode 100644 index f25633f2..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.Windows.Controls; -using System.Windows; -using System.Globalization; - -namespace Microsoft.Windows.Controls.Primitives -{ - public abstract class InputBase : Control - { - #region Properties - - #region CultureInfo - - public static readonly DependencyProperty CultureInfoProperty = DependencyProperty.Register("CultureInfo", typeof(CultureInfo), typeof(InputBase), new UIPropertyMetadata(CultureInfo.CurrentCulture)); - public CultureInfo CultureInfo - { - get { return (CultureInfo)GetValue(CultureInfoProperty); } - set { SetValue(CultureInfoProperty, value); } - } - - #endregion //CultureInfo - - #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 UIPropertyMetadata(default(String), OnTextChanged)); - public string Text - { - get { return (string)GetValue(TextProperty); } - set { SetValue(TextProperty, value); } - } - - private static void OnTextChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - InputBase inputBase = o as InputBase; - if (inputBase != null) - inputBase.OnTextChanged((string)e.OldValue, (string)e.NewValue); - } - - protected virtual void OnTextChanged(string oldValue, string newValue) - { - - } - - #endregion //Text - - #region TextAlignment - - public static readonly DependencyProperty TextAlignmentProperty = DependencyProperty.Register("TextAlignment", typeof(TextAlignment), typeof(InputBase), new UIPropertyMetadata(TextAlignment.Left)); - public TextAlignment TextAlignment - { - get { return (TextAlignment)GetValue(TextAlignmentProperty); } - set { SetValue(TextAlignmentProperty, value); } - } - - - #endregion //TextAlignment - - #region Watermark - - public static readonly DependencyProperty WatermarkProperty = DependencyProperty.Register("Watermark", typeof(object), typeof(InputBase), new UIPropertyMetadata(null)); - public object Watermark - { - get { return (object)GetValue(WatermarkProperty); } - set { SetValue(WatermarkProperty, value); } - } - - #endregion //Watermark - - #region WatermarkTemplate - - public static readonly DependencyProperty WatermarkTemplateProperty = DependencyProperty.Register("WatermarkTemplate", typeof(DataTemplate), typeof(InputBase), new UIPropertyMetadata(null)); - public DataTemplate WatermarkTemplate - { - get { return (DataTemplate)GetValue(WatermarkTemplateProperty); } - set { SetValue(WatermarkTemplateProperty, value); } - } - - #endregion //WatermarkTemplate - - #endregion //Properties - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/UpDownBase.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/UpDownBase.cs deleted file mode 100644 index b6ead64e..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/UpDownBase.cs +++ /dev/null @@ -1,305 +0,0 @@ -using System; -using System.Windows.Controls; -using Microsoft.Windows.Controls.Primitives; -using System.Windows.Input; -using System.Windows; -using System.Windows.Data; - -namespace Microsoft.Windows.Controls.Primitives -{ - public abstract class UpDownBase : InputBase - { - #region Members - - /// - /// Name constant for Text template part. - /// - internal const string ElementTextName = "TextBox"; - - /// - /// Name constant for Spinner template part. - /// - internal const string ElementSpinnerName = "Spinner"; - - /// - /// Flags if the Text and Value properties are in the process of being sync'd - /// - private bool _isSyncingTextAndValueProperties; - - #endregion //Members - - #region Properties - - protected Spinner Spinner { get; private set; } - protected TextBox TextBox { get; private set; } - - #region AllowSpin - - public static readonly DependencyProperty AllowSpinProperty = DependencyProperty.Register("AllowSpin", typeof(bool), typeof(UpDownBase), new UIPropertyMetadata(true)); - public bool AllowSpin - { - get { return (bool)GetValue(AllowSpinProperty); } - set { SetValue(AllowSpinProperty, value); } - } - - #endregion //AllowSpin - - #region ShowButtonSpinner - - public static readonly DependencyProperty ShowButtonSpinnerProperty = DependencyProperty.Register("ShowButtonSpinner", typeof(bool), typeof(UpDownBase), new UIPropertyMetadata(true)); - public bool ShowButtonSpinner - { - get { return (bool)GetValue(ShowButtonSpinnerProperty); } - set { SetValue(ShowButtonSpinnerProperty, value); } - } - - #endregion //ShowButtonSpinner - - #region Value - - public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(T), typeof(UpDownBase), new FrameworkPropertyMetadata(default(T), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValueChanged)); - public T Value - { - get { return (T)GetValue(ValueProperty); } - set { SetValue(ValueProperty, value); } - } - - private static void OnValueChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - UpDownBase upDownBase = o as UpDownBase; - if (upDownBase != null) - upDownBase.OnValueChanged((T)e.OldValue, (T)e.NewValue); - } - - protected virtual void OnValueChanged(T oldValue, T newValue) - { - ValidateValue(newValue); - - SyncTextAndValueProperties(ValueProperty, string.Empty); - - SetValidSpinDirection(); - - RoutedPropertyChangedEventArgs args = new RoutedPropertyChangedEventArgs(oldValue, newValue); - args.RoutedEvent = ValueChangedEvent; - RaiseEvent(args); - } - - #endregion //Value - - #endregion //Properties - - #region Constructors - - internal UpDownBase() { } - - #endregion //Constructors - - #region Base Class Overrides - - protected override void OnAccessKey(AccessKeyEventArgs e) - { - if (TextBox != null) - TextBox.Focus(); - - base.OnAccessKey(e); - } - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - TextBox = GetTemplateChild(ElementTextName) as TextBox; - Spinner = GetTemplateChild(ElementSpinnerName) as Spinner; - Spinner.Spin += OnSpinnerSpin; - - SetValidSpinDirection(); - } - - protected override void OnGotFocus(RoutedEventArgs e) - { - if (TextBox != null) - TextBox.Focus(); - } - - protected override void OnPreviewKeyDown(KeyEventArgs e) - { - switch (e.Key) - { - case Key.Up: - { - if (AllowSpin) - DoIncrement(); - e.Handled = true; - break; - } - case Key.Down: - { - if (AllowSpin) - DoDecrement(); - e.Handled = true; - break; - } - case Key.Enter: - { - if (IsEditable) - { - var binding = BindingOperations.GetBindingExpression(TextBox, System.Windows.Controls.TextBox.TextProperty); - binding.UpdateSource(); - } - break; - } - } - } - - protected override void OnMouseWheel(MouseWheelEventArgs e) - { - base.OnMouseWheel(e); - - if (!e.Handled && AllowSpin && TextBox.IsFocused) - { - if (e.Delta < 0) - { - DoDecrement(); - } - else if (0 < e.Delta) - { - DoIncrement(); - } - - e.Handled = true; - } - } - - protected override void OnTextChanged(string oldValue, string newValue) - { - SyncTextAndValueProperties(InputBase.TextProperty, newValue); - } - - #endregion //Base Class Overrides - - #region Event Handlers - - private void OnSpinnerSpin(object sender, SpinEventArgs e) - { - if (AllowSpin) - OnSpin(e); - } - - #endregion //Event Handlers - - #region Events - - //Due to a bug in Visual Studio, you cannot create event handlers for generic T args in XAML, so I have to use object instead. - public static readonly RoutedEvent ValueChangedEvent = EventManager.RegisterRoutedEvent("ValueChanged", RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler), typeof(UpDownBase)); - public event RoutedPropertyChangedEventHandler ValueChanged - { - add { AddHandler(ValueChangedEvent, value); } - remove { RemoveHandler(ValueChangedEvent, value); } - } - - #endregion //Events - - #region Methods - - protected virtual void OnSpin(SpinEventArgs e) - { - if (e == null) - throw new ArgumentNullException("e"); - - if (e.Direction == SpinDirection.Increase) - DoIncrement(); - else - DoDecrement(); - } - - /// - /// Performs an increment if conditions allow it. - /// - private void DoDecrement() - { - if (Spinner == null || (Spinner.ValidSpinDirection & ValidSpinDirections.Decrease) == ValidSpinDirections.Decrease) - { - OnDecrement(); - } - } - - /// - /// Performs a decrement if conditions allow it. - /// - private void DoIncrement() - { - if (Spinner == null || (Spinner.ValidSpinDirection & ValidSpinDirections.Increase) == ValidSpinDirections.Increase) - { - OnIncrement(); - } - } - - protected void SyncTextAndValueProperties(DependencyProperty p, string text) - { - //prevents recursive syncing properties - if (_isSyncingTextAndValueProperties) - return; - - _isSyncingTextAndValueProperties = true; - - //this only occures when the user typed in the value - if (InputBase.TextProperty == p) - { - Value = ConvertTextToValue(text); - } - - Text = ConvertValueToText(); - -#if VS2008 - //there is a bug in .NET 3.5 which will not correctly update the textbox text through binding. - if (TextBox != null) - TextBox.Text = Text; -#endif - - _isSyncingTextAndValueProperties = false; - } - - #region Abstract - - /// - /// Coerces the value. - /// - protected abstract T CoerceValue(T value); - - /// - /// Converts the formatted text to a value. - /// - protected abstract T ConvertTextToValue(string text); - - /// - /// Converts the value to formatted text. - /// - /// - protected abstract string ConvertValueToText(); - - /// - /// Called by OnSpin when the spin direction is SpinDirection.Increase. - /// - protected abstract void OnIncrement(); - - /// - /// Called by OnSpin when the spin direction is SpinDirection.Descrease. - /// - protected abstract void OnDecrement(); - - /// - /// Sets the valid spin directions. - /// - protected abstract void SetValidSpinDirection(); - - /// - /// Validates the value and keeps it between the Min and Max values. - /// - /// The value. - protected abstract void ValidateValue(T value); - - #endregion //Abstract - - #endregion //Methods - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/UIElementAdorner.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/UIElementAdorner.cs deleted file mode 100644 index 263ca034..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/UIElementAdorner.cs +++ /dev/null @@ -1,215 +0,0 @@ -using System; -using System.Collections; -using System.Windows.Media; -using System.Windows.Documents; -using System.Windows; - -namespace Microsoft.Windows.Controls.Core -{ - /// - /// An adorner that can display one and only one UIElement. - /// That element can be a panel, which contains multiple other elements. - /// The element is added to the adorner's visual and logical trees, enabling it to - /// particpate in dependency property value inheritance, amongst other things. - /// - internal class UIElementAdorner - : Adorner - where TElement : UIElement - { - #region Fields - - TElement _child = null; - double _offsetLeft = 0; - double _offsetTop = 0; - - #endregion // Fields - - #region Constructor - - /// - /// Constructor. - /// - /// The element to which the adorner will be bound. - public UIElementAdorner(UIElement adornedElement) - : base(adornedElement) - { - } - - #endregion // Constructor - - #region Public Interface - - #region Child - - /// - /// Gets/sets the child element hosted in the adorner. - /// - public TElement Child - { - get { return _child; } - set - { - if (value == _child) - return; - - if (_child != null) - { - base.RemoveLogicalChild(_child); - base.RemoveVisualChild(_child); - } - - _child = value; - - if (_child != null) - { - base.AddLogicalChild(_child); - base.AddVisualChild(_child); - } - } - } - - #endregion // Child - - #region GetDesiredTransform - - /// - /// Override. - /// - /// - /// - public override GeneralTransform GetDesiredTransform(GeneralTransform transform) - { - GeneralTransformGroup result = new GeneralTransformGroup(); - result.Children.Add(base.GetDesiredTransform(transform)); - result.Children.Add(new TranslateTransform(_offsetLeft, _offsetTop)); - return result; - } - - #endregion // GetDesiredTransform - - #region OffsetLeft - - /// - /// Gets/sets the horizontal offset of the adorner. - /// - public double OffsetLeft - { - get { return _offsetLeft; } - set - { - _offsetLeft = value; - UpdateLocation(); - } - } - - #endregion // OffsetLeft - - #region SetOffsets - - /// - /// Updates the location of the adorner in one atomic operation. - /// - public void SetOffsets(double left, double top) - { - _offsetLeft = left; - _offsetTop = top; - this.UpdateLocation(); - } - - #endregion // SetOffsets - - #region OffsetTop - - /// - /// Gets/sets the vertical offset of the adorner. - /// - public double OffsetTop - { - get { return _offsetTop; } - set - { - _offsetTop = value; - UpdateLocation(); - } - } - - #endregion // OffsetTop - - #endregion // Public Interface - - #region Protected Overrides - - /// - /// Override. - /// - /// - /// - protected override Size MeasureOverride(Size constraint) - { - if (_child == null) - return base.MeasureOverride(constraint); - - _child.Measure(constraint); - return _child.DesiredSize; - } - - /// - /// Override. - /// - /// - /// - protected override Size ArrangeOverride(Size finalSize) - { - if (_child == null) - return base.ArrangeOverride(finalSize); - - _child.Arrange(new Rect(finalSize)); - return finalSize; - } - - /// - /// Override. - /// - protected override IEnumerator LogicalChildren - { - get - { - ArrayList list = new ArrayList(); - if (_child != null) - list.Add(_child); - return list.GetEnumerator(); - } - } - - /// - /// Override. - /// - /// - /// - protected override Visual GetVisualChild(int index) - { - return _child; - } - - /// - /// Override. - /// - protected override int VisualChildrenCount - { - get { return _child == null ? 0 : 1; } - } - - #endregion // Protected Overrides - - #region Private Helpers - - void UpdateLocation() - { - AdornerLayer adornerLayer = base.Parent as AdornerLayer; - if (adornerLayer != null) - adornerLayer.Update(base.AdornedElement); - } - - #endregion // Private Helpers - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Utilities/CalculatorUtilities.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Utilities/CalculatorUtilities.cs deleted file mode 100644 index bb1337f1..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Utilities/CalculatorUtilities.cs +++ /dev/null @@ -1,245 +0,0 @@ -using System; -using System.Windows.Controls; -using System.Windows; -using System.Windows.Media; -using System.Globalization; - -namespace Microsoft.Windows.Controls.Core.Utilities -{ - static class CalculatorUtilities - { - public static Calculator.CalculatorButtonType GetCalculatorButtonTypeFromText(string text) - { - switch (text) - { - case "0": return Calculator.CalculatorButtonType.Zero; - case "1": return Calculator.CalculatorButtonType.One; - case "2": return Calculator.CalculatorButtonType.Two; - case "3": return Calculator.CalculatorButtonType.Three; - case "4": return Calculator.CalculatorButtonType.Four; - case "5": return Calculator.CalculatorButtonType.Five; - case "6": return Calculator.CalculatorButtonType.Six; - case "7": return Calculator.CalculatorButtonType.Seven; - case "8": return Calculator.CalculatorButtonType.Eight; - case "9": return Calculator.CalculatorButtonType.Nine; - case "+": return Calculator.CalculatorButtonType.Add; - case "-": return Calculator.CalculatorButtonType.Subtract; - case "*": return Calculator.CalculatorButtonType.Multiply; - case "/": return Calculator.CalculatorButtonType.Divide; - case "%": return Calculator.CalculatorButtonType.Percent; - case "\b": return Calculator.CalculatorButtonType.Back; - case "\r": - case "=": return Calculator.CalculatorButtonType.Equal; - } - - //the check for the decimal is not in the switch statement. To help localize we check against the current culture's decimal seperator - if (text == CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator) - return Calculator.CalculatorButtonType.Decimal; - - //check for the escape key - if (text == ((char)27).ToString()) - return Calculator.CalculatorButtonType.Clear; - - return Calculator.CalculatorButtonType.None; - } - - public static Button FindButtonByCalculatorButtonType(DependencyObject parent, Calculator.CalculatorButtonType type) - { - for (int i = 0; i < VisualTreeHelper.GetChildrenCount(parent); i++) - { - var child = VisualTreeHelper.GetChild(parent, i); - - object buttonType = child.GetValue(Button.CommandParameterProperty); - - if (buttonType != null && (Calculator.CalculatorButtonType)buttonType == type) - { - return child as Button; - } - else - { - var result = FindButtonByCalculatorButtonType(child, type); - - if (result != null) - return result; - } - } - return null; - } - - public static string GetCalculatorButtonContent(Calculator.CalculatorButtonType type) - { - string content = string.Empty; - switch (type) - { - case Calculator.CalculatorButtonType.Add: - content = "+"; - break; - case Calculator.CalculatorButtonType.Back: - content = "Back"; - break; - case Calculator.CalculatorButtonType.Cancel: - content = "CE"; - break; - case Calculator.CalculatorButtonType.Clear: - content = "C"; - break; - case Calculator.CalculatorButtonType.Decimal: - content = CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator; - break; - case Calculator.CalculatorButtonType.Divide: - content = "/"; - break; - case Calculator.CalculatorButtonType.Eight: - content = "8"; - break; - case Calculator.CalculatorButtonType.Equal: - content = "="; - break; - case Calculator.CalculatorButtonType.Five: - content = "5"; - break; - case Calculator.CalculatorButtonType.Four: - content = "4"; - break; - case Calculator.CalculatorButtonType.Fraction: - content = "1/x"; - break; - case Calculator.CalculatorButtonType.MAdd: - content = "M+"; - break; - case Calculator.CalculatorButtonType.MC: - content = "MC"; - break; - case Calculator.CalculatorButtonType.MR: - content = "MR"; - break; - case Calculator.CalculatorButtonType.MS: - content = "MS"; - break; - case Calculator.CalculatorButtonType.MSub: - content = "M-"; - break; - case Calculator.CalculatorButtonType.Multiply: - content = "*"; - break; - case Calculator.CalculatorButtonType.Nine: - content = "9"; - break; - case Calculator.CalculatorButtonType.None: - break; - case Calculator.CalculatorButtonType.One: - content = "1"; - break; - case Calculator.CalculatorButtonType.Percent: - content = "%"; - break; - case Calculator.CalculatorButtonType.Seven: - content = "7"; - break; - case Calculator.CalculatorButtonType.Negate: - content = "+/-"; - break; - case Calculator.CalculatorButtonType.Six: - content = "6"; - break; - case Calculator.CalculatorButtonType.Sqrt: - content = "Sqrt"; - break; - case Calculator.CalculatorButtonType.Subtract: - content = "-"; - break; - case Calculator.CalculatorButtonType.Three: - content = "3"; - break; - case Calculator.CalculatorButtonType.Two: - content = "2"; - break; - case Calculator.CalculatorButtonType.Zero: - content = "0"; - break; - } - return content; - } - - public static bool IsDigit(Calculator.CalculatorButtonType buttonType) - { - switch (buttonType) - { - case Calculator.CalculatorButtonType.Zero: - case Calculator.CalculatorButtonType.One: - case Calculator.CalculatorButtonType.Two: - case Calculator.CalculatorButtonType.Three: - case Calculator.CalculatorButtonType.Four: - case Calculator.CalculatorButtonType.Five: - case Calculator.CalculatorButtonType.Six: - case Calculator.CalculatorButtonType.Seven: - case Calculator.CalculatorButtonType.Eight: - case Calculator.CalculatorButtonType.Nine: - case Calculator.CalculatorButtonType.Decimal: - return true; - default: - return false; - } - } - - public static bool IsMemory(Calculator.CalculatorButtonType buttonType) - { - switch (buttonType) - { - case Calculator.CalculatorButtonType.MAdd: - case Calculator.CalculatorButtonType.MC: - case Calculator.CalculatorButtonType.MR: - case Calculator.CalculatorButtonType.MS: - case Calculator.CalculatorButtonType.MSub: - return true; - default: - return false; - } - } - - public static decimal ParseDecimal(string text) - { - return Decimal.Parse(text, CultureInfo.CurrentCulture); - } - - public static decimal Add(decimal firstNumber, decimal secondNumber) - { - return firstNumber + secondNumber; - } - - public static decimal Subtract(decimal firstNumber, decimal secondNumber) - { - return firstNumber - secondNumber; - } - - public static decimal Multiply(decimal firstNumber, decimal secondNumber) - { - return firstNumber * secondNumber; - } - - public static decimal Divide(decimal firstNumber, decimal secondNumber) - { - return firstNumber / secondNumber; - } - - public static decimal Percent(decimal firstNumber, decimal secondNumber) - { - return firstNumber * secondNumber / 100M; - } - - public static decimal SquareRoot(decimal operand) - { - return Convert.ToDecimal(Math.Sqrt(Convert.ToDouble(operand))); - } - - public static decimal Fraction(decimal operand) - { - return 1 / operand; - } - - public static decimal Negate(decimal operand) - { - return operand * -1M; - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Utilities/ColorUtilities.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Utilities/ColorUtilities.cs deleted file mode 100644 index cb2d7c18..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Utilities/ColorUtilities.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System; -using System.Linq; -using System.Windows.Media; -using System.Reflection; -using System.Collections.Generic; -using Microsoft.Windows.Controls.Primitives; - -namespace Microsoft.Windows.Controls.Core.Utilities -{ - static class ColorUtilities - { - public static readonly Dictionary KnownColors = GetKnownColors(); - - public static string GetColorName(this Color color) - { - string colorName = KnownColors.Where(kvp => kvp.Value.Equals(color)).Select(kvp => kvp.Key).FirstOrDefault(); - - if (String.IsNullOrEmpty(colorName)) - colorName = color.ToString(); - - return colorName; - } - - private static Dictionary GetKnownColors() - { - var colorProperties = typeof(Colors).GetProperties(BindingFlags.Static | BindingFlags.Public); - return colorProperties.ToDictionary(p => p.Name, p => (Color)p.GetValue(null, null)); - } - - /// - /// Converts an RGB color to an HSV color. - /// - /// - /// - /// - /// - public static HsvColor ConvertRgbToHsv(int r, int b, int g) - { - double delta, min; - double h = 0, s, v; - - min = Math.Min(Math.Min(r, g), b); - v = Math.Max(Math.Max(r, g), b); - delta = v - min; - - if (v == 0.0) - { - s = 0; - } - else - s = delta / v; - - if (s == 0) - h = 0.0; - - else - { - if (r == v) - h = (g - b) / delta; - else if (g == v) - h = 2 + (b - r) / delta; - else if (b == v) - h = 4 + (r - g) / delta; - - h *= 60; - if (h < 0.0) - h = h + 360; - - } - - return new HsvColor { H = h, S = s, V = v / 255 }; - } - - /// - /// Converts an HSV color to an RGB color. - /// - /// - /// - /// - /// - public static Color ConvertHsvToRgb(double h, double s, double v) - { - double r = 0, g = 0, b = 0; - - if (s == 0) - { - r = v; - g = v; - b = v; - } - else - { - int i; - double f, p, q, t; - - if (h == 360) - h = 0; - else - h = h / 60; - - i = (int)Math.Truncate(h); - f = h - i; - - p = v * (1.0 - s); - q = v * (1.0 - (s * f)); - t = v * (1.0 - (s * (1.0 - f))); - - switch (i) - { - case 0: - { - r = v; - g = t; - b = p; - break; - } - case 1: - { - r = q; - g = v; - b = p; - break; - } - case 2: - { - r = p; - g = v; - b = t; - break; - } - case 3: - { - r = p; - g = q; - b = v; - break; - } - case 4: - { - r = t; - g = p; - b = v; - break; - } - default: - { - r = v; - g = p; - b = q; - break; - } - } - - } - - return Color.FromArgb(255, (byte)(r * 255), (byte)(g * 255), (byte)(b * 255)); - } - - /// - /// Generates a list of colors with hues ranging from 0 360 and a saturation and value of 1. - /// - /// - public static List GenerateHsvSpectrum() - { - List colorsList = new List(8); - - for (int i = 0; i < 29; i++) - { - colorsList.Add(ColorUtilities.ConvertHsvToRgb(i * 12, 1, 1)); - } - - colorsList.Add(ColorUtilities.ConvertHsvToRgb(0, 1, 1)); - - return colorsList; - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Utilities/ContextMenuUtilities.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Utilities/ContextMenuUtilities.cs deleted file mode 100644 index 59b38f93..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Utilities/ContextMenuUtilities.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Windows; - -namespace Microsoft.Windows.Controls.Core.Utilities -{ - public class ContextMenuUtilities - { - public static readonly DependencyProperty OpenOnMouseLeftButtonClickProperty = DependencyProperty.RegisterAttached("OpenOnMouseLeftButtonClick", typeof(bool), typeof(ContextMenuUtilities), new FrameworkPropertyMetadata(false, OpenOnMouseLeftButtonClickChanged)); - public static void SetOpenOnMouseLeftButtonClick(FrameworkElement element, bool value) - { - element.SetValue(OpenOnMouseLeftButtonClickProperty, value); - } - public static bool GetOpenOnMouseLeftButtonClick(FrameworkElement element) - { - return (bool)element.GetValue(OpenOnMouseLeftButtonClickProperty); - } - - public static void OpenOnMouseLeftButtonClickChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) - { - var control = (FrameworkElement)sender; - if ((bool)e.NewValue) - { - control.PreviewMouseLeftButtonDown += (s, args) => - { - if (control.ContextMenu != null) - { - control.ContextMenu.PlacementTarget = control; - control.ContextMenu.IsOpen = true; - } - }; - } - //TODO: remove handler when set to false - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Implementation/DateTimePicker.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Implementation/DateTimePicker.cs deleted file mode 100644 index 763f383d..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Implementation/DateTimePicker.cs +++ /dev/null @@ -1,267 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -#if VS2008 -using Microsoft.Windows.Controls.Primitives; -#else -using System.Windows.Controls.Primitives; -#endif - -namespace Microsoft.Windows.Controls -{ - public class DateTimePicker : Control - { - #region Members - - private Calendar _calendar; - - #endregion //Members - - #region Properties - - #region AllowSpin - - public static readonly DependencyProperty AllowSpinProperty = DependencyProperty.Register("AllowSpin", typeof(bool), typeof(DateTimePicker), new UIPropertyMetadata(true)); - public bool AllowSpin - { - get { return (bool)GetValue(AllowSpinProperty); } - set { SetValue(AllowSpinProperty, value); } - } - - #endregion //AllowSpin - - #region Format - - public static readonly DependencyProperty FormatProperty = DependencyProperty.Register("Format", typeof(DateTimeFormat), typeof(DateTimePicker), new UIPropertyMetadata(DateTimeFormat.FullDateTime, OnFormatChanged)); - public DateTimeFormat Format - { - get { return (DateTimeFormat)GetValue(FormatProperty); } - set { SetValue(FormatProperty, value); } - } - - private static void OnFormatChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - DateTimePicker DateTimePicker = o as DateTimePicker; - if (DateTimePicker != null) - DateTimePicker.OnFormatChanged((DateTimeFormat)e.OldValue, (DateTimeFormat)e.NewValue); - } - - protected virtual void OnFormatChanged(DateTimeFormat oldValue, DateTimeFormat newValue) - { - - } - - #endregion //Format - - #region FormatString - - public static readonly DependencyProperty FormatStringProperty = DependencyProperty.Register("FormatString", typeof(string), typeof(DateTimePicker), new UIPropertyMetadata(default(String), OnFormatStringChanged)); - public string FormatString - { - get { return (string)GetValue(FormatStringProperty); } - set { SetValue(FormatStringProperty, value); } - } - - private static void OnFormatStringChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - DateTimePicker DateTimePicker = o as DateTimePicker; - if (DateTimePicker != null) - DateTimePicker.OnFormatStringChanged((string)e.OldValue, (string)e.NewValue); - } - - protected virtual void OnFormatStringChanged(string oldValue, string newValue) - { - if (string.IsNullOrEmpty(newValue)) - throw new ArgumentException("CustomFormat should be specified.", FormatString); - } - - #endregion //FormatString - - #region IsOpen - - public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register("IsOpen", typeof(bool), typeof(DateTimePicker), new UIPropertyMetadata(false)); - public bool IsOpen - { - get { return (bool)GetValue(IsOpenProperty); } - set { SetValue(IsOpenProperty, value); } - } - - #endregion //IsOpen - - #region ShowButtonSpinner - - public static readonly DependencyProperty ShowButtonSpinnerProperty = DependencyProperty.Register("ShowButtonSpinner", typeof(bool), typeof(DateTimePicker), new UIPropertyMetadata(true)); - public bool ShowButtonSpinner - { - get { return (bool)GetValue(ShowButtonSpinnerProperty); } - set { SetValue(ShowButtonSpinnerProperty, value); } - } - - #endregion //ShowButtonSpinner - - #region TimeWatermark - - public static readonly DependencyProperty TimeWatermarkProperty = DependencyProperty.Register("TimeWatermark", typeof(object), typeof(DateTimePicker), new UIPropertyMetadata(null)); - public object TimeWatermark - { - get { return (object)GetValue(TimeWatermarkProperty); } - set { SetValue(TimeWatermarkProperty, value); } - } - - #endregion //TimeWatermark - - #region TimeWatermarkTemplate - - public static readonly DependencyProperty TimeWatermarkTemplateProperty = DependencyProperty.Register("TimeWatermarkTemplate", typeof(DataTemplate), typeof(DateTimePicker), new UIPropertyMetadata(null)); - public DataTemplate TimeWatermarkTemplate - { - get { return (DataTemplate)GetValue(TimeWatermarkTemplateProperty); } - set { SetValue(TimeWatermarkTemplateProperty, value); } - } - - #endregion //TimeWatermarkTemplate - - #region Value - - public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(DateTime?), typeof(DateTimePicker), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValueChanged, OnCoerceValue)); - public DateTime? Value - { - get { return (DateTime?)GetValue(ValueProperty); } - set { SetValue(ValueProperty, value); } - } - - private static object OnCoerceValue(DependencyObject o, object value) - { - DateTimePicker dateTimePicker = o as DateTimePicker; - if (dateTimePicker != null) - return dateTimePicker.OnCoerceValue((DateTime?)value); - else - return value; - } - - private static void OnValueChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - DateTimePicker dateTimePicker = o as DateTimePicker; - if (dateTimePicker != null) - dateTimePicker.OnValueChanged((DateTime?)e.OldValue, (DateTime?)e.NewValue); - } - - protected virtual DateTime? OnCoerceValue(DateTime? value) - { - // TODO: Keep the proposed value within the desired range. - return value; - } - - protected virtual void OnValueChanged(DateTime? oldValue, DateTime? newValue) - { - if (_calendar != null && _calendar.SelectedDate.HasValue && newValue.HasValue && _calendar.SelectedDate.Value != newValue.Value) - { - _calendar.SelectedDate = newValue; - _calendar.DisplayDate = newValue.Value; - } - } - - #endregion //Value - - #region Watermark - - public static readonly DependencyProperty WatermarkProperty = DependencyProperty.Register("Watermark", typeof(object), typeof(DateTimePicker), new UIPropertyMetadata(null)); - public object Watermark - { - get { return (object)GetValue(WatermarkProperty); } - set { SetValue(WatermarkProperty, value); } - } - - #endregion //Watermark - - #region WatermarkTemplate - - public static readonly DependencyProperty WatermarkTemplateProperty = DependencyProperty.Register("WatermarkTemplate", typeof(DataTemplate), typeof(DateTimePicker), new UIPropertyMetadata(null)); - public DataTemplate WatermarkTemplate - { - get { return (DataTemplate)GetValue(WatermarkTemplateProperty); } - set { SetValue(WatermarkTemplateProperty, value); } - } - - #endregion //WatermarkTemplate - - #endregion //Properties - - #region Constructors - - static DateTimePicker() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(DateTimePicker), new FrameworkPropertyMetadata(typeof(DateTimePicker))); - } - - public DateTimePicker() - { - Keyboard.AddKeyDownHandler(this, OnKeyDown); - Mouse.AddPreviewMouseDownOutsideCapturedElementHandler(this, OnMouseDownOutsideCapturedElement); - } - - #endregion //Constructors - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - _calendar = (Calendar)GetTemplateChild("Part_Calendar"); - _calendar.SelectedDatesChanged += Calendar_SelectedDatesChanged; - _calendar.SelectedDate = Value ?? null; - } - - protected override void OnPreviewMouseUp(MouseButtonEventArgs e) - { - if (Mouse.Captured is CalendarItem) - Mouse.Capture(null); - } - - #endregion //Base Class Overrides - - #region Event Handlers - - private void OnKeyDown(object sender, KeyEventArgs e) - { - switch (e.Key) - { - case Key.Escape: - case Key.Tab: - { - CloseDateTimePicker(); - break; - } - } - } - - private void OnMouseDownOutsideCapturedElement(object sender, MouseButtonEventArgs e) - { - CloseDateTimePicker(); - } - - void Calendar_SelectedDatesChanged(object sender, SelectionChangedEventArgs e) - { - if (e.AddedItems.Count > 0) - { - var newDate = (DateTime?)e.AddedItems[0]; - Value = newDate; - } - } - - #endregion //Event Handlers - - #region Methods - - private void CloseDateTimePicker() - { - if (IsOpen) - IsOpen = false; - ReleaseMouseCapture(); - } - - #endregion //Methods - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Themes/Generic.xaml deleted file mode 100644 index 5c8f8122..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Themes/Generic.xaml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeFormat.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeFormat.cs deleted file mode 100644 index f6c54305..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeFormat.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - public enum DateTimeFormat - { - Custom, - FullDateTime, - LongDate, - LongTime, - MonthDay, - RFC1123, - ShortDate, - ShortTime, - SortableDateTime, - UniversalSortableDateTime, - YearMonth - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeInfo.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeInfo.cs deleted file mode 100644 index 8f4f7765..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeInfo.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - internal class DateTimeInfo - { - public string Content { get; set; } - public string Format { get; set; } - public bool IsReadOnly { get; set; } - public int Length { get; set; } - public int StartPosition { get; set; } - public DateTimePart Type { get; set; } - } -} \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeParser.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeParser.cs deleted file mode 100644 index 4a8050bd..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeParser.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Linq; -using System.Globalization; - -namespace Microsoft.Windows.Controls -{ - internal class DateTimeParser - { - #region Properties - - private DateTimeFormatInfo DateTimeFormatInfo { get; set; } - - public string Format { get; set; } - - #endregion //Properties - - #region Constructors - - public DateTimeParser(DateTimeFormatInfo dateTimeFormatInfo) - { - DateTimeFormatInfo = dateTimeFormatInfo; - } - - public DateTimeParser(DateTimeFormatInfo dateTimeFormatInfo, string format) - { - DateTimeFormatInfo = dateTimeFormatInfo; - Format = format; - } - - #endregion //Constructors - - #region Methods - - public bool TryParse(string value, out DateTime result, DateTime currentDate) - { - bool success = false; - result = currentDate; - - if (string.IsNullOrEmpty(value)) - return false; - - var dateTimeString = ResolveDateTimeString(value, currentDate); - - if (!String.IsNullOrEmpty(dateTimeString)) - success = DateTime.TryParse(dateTimeString, DateTimeFormatInfo, DateTimeStyles.None, out result); - - if (!success) - result = currentDate; - - return success; - } - - private string ResolveDateTimeString(string dateTime, DateTime currentDate) - { - // 1/1/0001 12:00:00 AM - string[] dateParts = new string[3] { currentDate.Month.ToString(), currentDate.Day.ToString(), currentDate.Year.ToString() }; - string[] timeParts = new string[3] { currentDate.Hour.ToString(), currentDate.Minute.ToString(), currentDate.Second.ToString() }; - string designator = "AM"; - - string[] dateTimeSeparators = new string[] { ",", " ", "-", DateTimeFormatInfo.DateSeparator, DateTimeFormatInfo.TimeSeparator }; - - var dateTimeParts = dateTime.Split(dateTimeSeparators, StringSplitOptions.RemoveEmptyEntries).ToList(); - var formats = Format.Split(dateTimeSeparators, StringSplitOptions.RemoveEmptyEntries).ToList(); - - //something went wrong - if (dateTimeParts.Count != formats.Count) - return string.Empty; - - for (int i = 0; i < formats.Count; i++) - { - var format = formats[i]; - if (!format.Contains("ddd") && !format.Contains("GMT")) - { - if (format.Contains("M")) - dateParts[0] = dateTimeParts[i]; - else if (format.Contains("d")) - dateParts[1] = dateTimeParts[i]; - else if (format.Contains("y")) - { - dateParts[2] = dateTimeParts[i]; - if (dateParts[2].Length == 2) - dateParts[2] = string.Format("{0}{1}", currentDate.Year / 100, dateParts[2]); - } - else if (format.Contains("h") || format.Contains("H")) - timeParts[0] = dateTimeParts[i]; - else if (format.Contains("m")) - timeParts[1] = dateTimeParts[i]; - else if (format.Contains("s")) - timeParts[2] = dateTimeParts[i]; - else if (format.Contains("t")) - designator = dateTimeParts[i]; - } - } - - var date = string.Join(DateTimeFormatInfo.DateSeparator, dateParts); - var time = string.Join(DateTimeFormatInfo.TimeSeparator, timeParts); - - return String.Format("{0} {1} {2}", date, time, designator); - } - - #endregion // Methods - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimePart.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimePart.cs deleted file mode 100644 index d4ec352c..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimePart.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - public enum DateTimePart - { - Day, - DayName, - AmPmDesignator, - Millisecond, - Hour12, - Hour24, - Minute, - Month, - MonthName, - Other, - Period, - TimeZone, - Second, - Year - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeUpDown.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeUpDown.cs deleted file mode 100644 index 09699b42..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeUpDown.cs +++ /dev/null @@ -1,559 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Windows; -using System.Windows.Input; -using Microsoft.Windows.Controls.Primitives; -using System.Windows.Data; - -namespace Microsoft.Windows.Controls -{ - public class DateTimeUpDown : UpDownBase - { - #region Members - - private List _dateTimeInfoList = new List(); - private DateTimeInfo _selectedDateTimeInfo; - private bool _fireSelectionChangedEvent = true; - - private DateTimeParser _dateTimeParser; - - #endregion //Members - - #region Properties - - private DateTimeFormatInfo DateTimeFormatInfo { get; set; } - - #region DefaultValue - - public static readonly DependencyProperty DefaultValueProperty = DependencyProperty.Register("DefaultValue", typeof(DateTime), typeof(DateTimeUpDown), new UIPropertyMetadata(DateTime.Now)); - public DateTime DefaultValue - { - get { return (DateTime)GetValue(DefaultValueProperty); } - set { SetValue(DefaultValueProperty, value); } - } - - #endregion //DefaultValue - - #region Format - - public static readonly DependencyProperty FormatProperty = DependencyProperty.Register("Format", typeof(DateTimeFormat), typeof(DateTimeUpDown), new UIPropertyMetadata(DateTimeFormat.FullDateTime, OnFormatChanged)); - public DateTimeFormat Format - { - get { return (DateTimeFormat)GetValue(FormatProperty); } - set { SetValue(FormatProperty, value); } - } - - private static void OnFormatChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - DateTimeUpDown dateTimeUpDown = o as DateTimeUpDown; - if (dateTimeUpDown != null) - dateTimeUpDown.OnFormatChanged((DateTimeFormat)e.OldValue, (DateTimeFormat)e.NewValue); - } - - protected virtual void OnFormatChanged(DateTimeFormat oldValue, DateTimeFormat newValue) - { - _dateTimeParser.Format = GetFormatString(newValue); - - //if using a CustomFormat then the initialization occurs on the CustomFormatString property - if (newValue != DateTimeFormat.Custom) - InitializeDateTimeInfoListAndParseValue(); - - Text = ConvertValueToText(); - } - - #endregion //Format - - #region FormatString - - public static readonly DependencyProperty FormatStringProperty = DependencyProperty.Register("FormatString", typeof(string), typeof(DateTimeUpDown), new UIPropertyMetadata(default(String), OnFormatStringChanged)); - public string FormatString - { - get { return (string)GetValue(FormatStringProperty); } - set { SetValue(FormatStringProperty, value); } - } - - private static void OnFormatStringChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - DateTimeUpDown dateTimeUpDown = o as DateTimeUpDown; - if (dateTimeUpDown != null) - dateTimeUpDown.OnFormatStringChanged((string)e.OldValue, (string)e.NewValue); - } - - protected virtual void OnFormatStringChanged(string oldValue, string newValue) - { - if (string.IsNullOrEmpty(newValue)) - throw new ArgumentException("CustomFormat should be specified.", FormatString); - - InitializeDateTimeInfoListAndParseValue(); - } - - #endregion //FormatString - - #region Maximum - - - - #endregion //Maximum - - #region Minimum - - - - #endregion //Minimum - - #endregion //Properties - - #region Constructors - - static DateTimeUpDown() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(DateTimeUpDown), new FrameworkPropertyMetadata(typeof(DateTimeUpDown))); - } - - public DateTimeUpDown() - { - DateTimeFormatInfo = DateTimeFormatInfo.GetInstance(CultureInfo); - _dateTimeParser = new DateTimeParser(DateTimeFormatInfo, GetFormatString(Format)); - InitializeDateTimeInfoList(); - } - - #endregion //Constructors - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - TextBox.SelectionChanged += TextBox_SelectionChanged; - } - - protected override DateTime? CoerceValue(DateTime? value) - { - //TODO: implement Minimum and Maximum - return value; - } - - protected override void OnIncrement() - { - if (Value.HasValue) - UpdateDateTime(1); - else - Value = DefaultValue; - } - - protected override void OnDecrement() - { - if (Value.HasValue) - UpdateDateTime(-1); - else - Value = DefaultValue; - } - - protected override void OnPreviewKeyDown(KeyEventArgs e) - { - switch (e.Key) - { - case Key.Enter: - { - if (IsEditable) - { - _fireSelectionChangedEvent = false; - BindingExpression binding = BindingOperations.GetBindingExpression(TextBox, System.Windows.Controls.TextBox.TextProperty); - binding.UpdateSource(); - _fireSelectionChangedEvent = true; - e.Handled = true; - } - return; - } - default: - { - _fireSelectionChangedEvent = false; - break; - } - } - - base.OnPreviewKeyDown(e); - } - - protected override void OnTextChanged(string previousValue, string currentValue) - { - //TODO: clean this up and make sure it doesn't fire recursively - if (String.IsNullOrEmpty(currentValue)) - { - Value = null; - return; - } - - DateTime current = Value.HasValue ? Value.Value : DateTime.Now; - DateTime result; - var success = _dateTimeParser.TryParse(currentValue, out result, current); - - SyncTextAndValueProperties(InputBase.TextProperty, result.ToString()); - } - - protected override DateTime? ConvertTextToValue(string text) - { - if (string.IsNullOrEmpty(text)) - return null; - - return DateTime.Parse(text, CultureInfo.CurrentCulture); - } - - protected override string ConvertValueToText() - { - if (Value == null) return string.Empty; - - DateTime dt = DateTime.Parse(Value.ToString(), CultureInfo); - return dt.ToString(GetFormatString(Format), CultureInfo); - } - - protected override void SetValidSpinDirection() - { - //TODO: implement Minimum and Maximum - } - - protected override void OnValueChanged(DateTime? oldValue, DateTime? newValue) - { - //whenever the value changes we need to parse out the value into out DateTimeInfo segments so we can keep track of the individual pieces - //but only if it is not null - if (newValue != null) - ParseValueIntoDateTimeInfo(); - - base.OnValueChanged(oldValue, newValue); - } - - protected override void ValidateValue(DateTime? value) - { - //TODO: implement min/max - } - - #endregion //Base Class Overrides - - #region Event Hanlders - - void TextBox_SelectionChanged(object sender, RoutedEventArgs e) - { - if (_fireSelectionChangedEvent) - PerformMouseSelection(); - else - _fireSelectionChangedEvent = true; - } - - #endregion //Event Hanlders - - #region Methods - - private void InitializeDateTimeInfoListAndParseValue() - { - InitializeDateTimeInfoList(); - if (Value != null) - ParseValueIntoDateTimeInfo(); - } - - private void InitializeDateTimeInfoList() - { - _dateTimeInfoList.Clear(); - - string format = GetFormatString(Format); - while (format.Length > 0) - { - int elementLength = GetElementLengthByFormat(format); - DateTimeInfo info = null; - - switch (format[0]) - { - case '"': - case '\'': - { - int closingQuotePosition = format.IndexOf(format[0], 1); - info = new DateTimeInfo { IsReadOnly = true, Type = DateTimePart.Other, Length = 1, Content = format.Substring(1, Math.Max(1, closingQuotePosition - 1)) }; - elementLength = Math.Max(1, closingQuotePosition + 1); - break; - } - case 'D': - case 'd': - { - string d = format.Substring(0, elementLength); - if (elementLength == 1) - d = "%" + d; - - if (elementLength > 2) - info = new DateTimeInfo { IsReadOnly = true, Type = DateTimePart.DayName, Format = d }; - else - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Day, Format = d }; - break; - } - case 'F': - case 'f': - { - string f = format.Substring(0, elementLength); - if (elementLength == 1) - f = "%" + f; - - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Millisecond, Format = f }; - break; - } - case 'h': - { - string h = format.Substring(0, elementLength); - if (elementLength == 1) - h = "%" + h; - - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Hour12, Format = h }; - break; - } - case 'H': - { - string H = format.Substring(0, elementLength); - if (elementLength == 1) - H = "%" + H; - - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Hour24, Format = H }; - break; - } - case 'M': - { - string M = format.Substring(0, elementLength); - if (elementLength == 1) - M = "%" + M; - - if (elementLength >= 3) - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.MonthName, Format = M }; - else - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Month, Format = M }; - break; - } - case 'S': - case 's': - { - string s = format.Substring(0, elementLength); - if (elementLength == 1) - s = "%" + s; - - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Second, Format = s }; - break; - } - case 'T': - case 't': - { - string t = format.Substring(0, elementLength); - if (elementLength == 1) - t = "%" + t; - - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.AmPmDesignator, Format = t }; - break; - } - case 'Y': - case 'y': - { - string y = format.Substring(0, elementLength); - if (elementLength == 1) - y = "%" + y; - - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Year, Format = y }; - break; - } - case '\\': - { - if (format.Length >= 2) - { - info = new DateTimeInfo { IsReadOnly = true, Content = format.Substring(1, 1), Length = 1, Type = DateTimePart.Other }; - elementLength = 2; - } - break; - } - case 'g': - { - string g = format.Substring(0, elementLength); - if (elementLength == 1) - g = "%" + g; - - info = new DateTimeInfo { IsReadOnly = true, Type = DateTimePart.Period, Format = format.Substring(0, elementLength) }; - break; - } - case 'm': - { - string m = format.Substring(0, elementLength); - if (elementLength == 1) - m = "%" + m; - - info = new DateTimeInfo { IsReadOnly = false, Type = DateTimePart.Minute, Format = m }; - break; - } - case 'z': - { - string z = format.Substring(0, elementLength); - if (elementLength == 1) - z = "%" + z; - - info = new DateTimeInfo { IsReadOnly = true, Type = DateTimePart.TimeZone, Format = z }; - break; - } - default: - { - elementLength = 1; - info = new DateTimeInfo { IsReadOnly = true, Length = 1, Content = format[0].ToString(), Type = DateTimePart.Other }; - break; - } - } - - _dateTimeInfoList.Add(info); - format = format.Substring(elementLength); - } - } - - private static int GetElementLengthByFormat(string format) - { - for (int i = 1; i < format.Length; i++) - { - if (String.Compare(format[i].ToString(), format[0].ToString(), false) != 0) - { - return i; - } - } - return format.Length; - } - - private void ParseValueIntoDateTimeInfo() - { - string text = string.Empty; - - _dateTimeInfoList.ForEach(info => - { - if (info.Format == null) - { - info.StartPosition = text.Length; - info.Length = info.Content.Length; - text += info.Content; - } - else - { - DateTime date = DateTime.Parse(Value.ToString()); - info.StartPosition = text.Length; - info.Content = date.ToString(info.Format, DateTimeFormatInfo); - info.Length = info.Content.Length; - text += info.Content; - } - }); - } - - private void PerformMouseSelection() - { - _dateTimeInfoList.ForEach(info => - { - if ((info.StartPosition <= TextBox.SelectionStart) && (TextBox.SelectionStart < (info.StartPosition + info.Length))) - { - Select(info); - return; - } - }); - } - - private void Select(DateTimeInfo info) - { - _fireSelectionChangedEvent = false; - TextBox.Select(info.StartPosition, info.Length); - _fireSelectionChangedEvent = true; - _selectedDateTimeInfo = info; - } - - private string GetFormatString(DateTimeFormat dateTimeFormat) - { - switch (dateTimeFormat) - { - case DateTimeFormat.ShortDate: - return DateTimeFormatInfo.ShortDatePattern; - case DateTimeFormat.LongDate: - return DateTimeFormatInfo.LongDatePattern; - case DateTimeFormat.ShortTime: - return DateTimeFormatInfo.ShortTimePattern; - case DateTimeFormat.LongTime: - return DateTimeFormatInfo.LongTimePattern; - case DateTimeFormat.FullDateTime: - return DateTimeFormatInfo.FullDateTimePattern; - case DateTimeFormat.MonthDay: - return DateTimeFormatInfo.MonthDayPattern; - case DateTimeFormat.RFC1123: - return DateTimeFormatInfo.RFC1123Pattern; - case DateTimeFormat.SortableDateTime: - return DateTimeFormatInfo.SortableDateTimePattern; - case DateTimeFormat.UniversalSortableDateTime: - return DateTimeFormatInfo.UniversalSortableDateTimePattern; - case DateTimeFormat.YearMonth: - return DateTimeFormatInfo.YearMonthPattern; - case DateTimeFormat.Custom: - return FormatString; - default: - throw new ArgumentException("Not a supported format"); - } - } - - private void UpdateDateTime(int value) - { - _fireSelectionChangedEvent = false; - DateTimeInfo info = _selectedDateTimeInfo; - - //this only occurs when the user manually type in a value for the Value Property - if (info == null) - info = _dateTimeInfoList[0]; - - switch (info.Type) - { - case DateTimePart.Year: - { - Value = ((DateTime)Value).AddYears(value); - break; - } - case DateTimePart.Month: - case DateTimePart.MonthName: - { - Value = ((DateTime)Value).AddMonths(value); - break; - } - case DateTimePart.Day: - case DateTimePart.DayName: - { - Value = ((DateTime)Value).AddDays(value); - break; - } - case DateTimePart.Hour12: - case DateTimePart.Hour24: - { - Value = ((DateTime)Value).AddHours(value); - break; - } - case DateTimePart.Minute: - { - Value = ((DateTime)Value).AddMinutes(value); - break; - } - case DateTimePart.Second: - { - Value = ((DateTime)Value).AddSeconds(value); - break; - } - case DateTimePart.Millisecond: - { - Value = ((DateTime)Value).AddMilliseconds(value); - break; - } - case DateTimePart.AmPmDesignator: - { - Value = ((DateTime)Value).AddHours(value * 12); - break; - } - default: - { - break; - } - } - - //we loose our selection when the Value is set so we need to reselect it without firing the selection changed event - TextBox.Select(info.StartPosition, info.Length); - _fireSelectionChangedEvent = true; - } - - #endregion //Methods - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Themes/Generic.xaml deleted file mode 100644 index 9d753485..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Themes/Generic.xaml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/Converters/BorderThicknessToStrokeThicknessConverter.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/Converters/BorderThicknessToStrokeThicknessConverter.cs deleted file mode 100644 index 1f672cda..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/Converters/BorderThicknessToStrokeThicknessConverter.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Windows.Data; -using System.Windows; - -namespace Microsoft.Windows.Controls.Mag.Converters -{ - internal class BorderThicknessToStrokeThicknessConverter : IValueConverter - { - #region IValueConverter Members - - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - Thickness thickness = (Thickness)value; - return (thickness.Bottom + thickness.Left + thickness.Right + thickness.Top) / 4; - } - - public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - throw new NotImplementedException(); - } - - #endregion - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/Converters/RadiusConverter.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/Converters/RadiusConverter.cs deleted file mode 100644 index 532a3552..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/Converters/RadiusConverter.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Windows.Data; - -namespace Microsoft.Windows.Controls.Mag.Converters -{ - internal class RadiusConverter : IValueConverter - { - #region IValueConverter Members - - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - return (double)value * 2; - } - - public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - throw new NotImplementedException(); - } - - #endregion - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/Magnifier.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/Magnifier.cs deleted file mode 100644 index 2ea13e1b..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/Magnifier.cs +++ /dev/null @@ -1,166 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; - -namespace Microsoft.Windows.Controls -{ - public class Magnifier : Control - { - #region Properties - - #region DefaultSize - - internal Size DefaultSize - { - get - { - return new Size(2 * Radius, 2 * Radius); - } - } - - #endregion //DefaultSize - - #region MagnifierWidth - - public static readonly DependencyProperty MagnifierWidthProperty = DependencyProperty.Register("MagnifierWidth", typeof(double), typeof(Magnifier), new UIPropertyMetadata(50.0)); - internal double MagnifierWidth - { - get { return (double)GetValue(MagnifierWidthProperty); } - set { SetValue(MagnifierWidthProperty, value); } - } - - #endregion //MagnifierWidth - - #region MagnifierHeight - - public static readonly DependencyProperty MagnifierHeightProperty = DependencyProperty.Register("MagnifierHeight", typeof(double), typeof(Magnifier), new UIPropertyMetadata(50.0)); - internal double MagnifierHeight - { - get { return (double)GetValue(MagnifierHeightProperty); } - set { SetValue(MagnifierHeightProperty, value); } - } - - #endregion //MagnifierWidth - - #region Radius - - public static readonly DependencyProperty RadiusProperty = DependencyProperty.Register("Radius", typeof(double), typeof(Magnifier), new FrameworkPropertyMetadata(50.0, new PropertyChangedCallback(OnRadiusPropertyChanged))); - public double Radius - { - get { return (double)GetValue(RadiusProperty); } - set { SetValue(RadiusProperty, value); } - } - - private static void OnRadiusPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - Magnifier m = (Magnifier)d; - m.OnRadiusChanged(e); - } - - protected virtual void OnRadiusChanged(DependencyPropertyChangedEventArgs e) - { - ResolveViewBox(); - } - - #endregion //Radius - - #region Target - - public static readonly DependencyProperty TargetProperty = DependencyProperty.Register("Target", typeof(UIElement), typeof(Magnifier)); - public UIElement Target - { - get { return (UIElement)GetValue(TargetProperty); } - set { SetValue(TargetProperty, value); } - } - - #endregion //Target - - #region ViewBox - - public static readonly DependencyProperty ViewBoxProperty = DependencyProperty.Register("ViewBox", typeof(Rect), typeof(Magnifier), new FrameworkPropertyMetadata(default(Rect))); - internal Rect ViewBox - { - get { return (Rect)GetValue(ViewBoxProperty); } - set { SetValue(ViewBoxProperty, value); } - } - - #endregion //ViewBox - - #region ZoomFactor - - public static readonly DependencyProperty ZoomFactorProperty = DependencyProperty.Register("ZoomFactor", typeof(double), typeof(Magnifier), new FrameworkPropertyMetadata(0.5, OnZoomFactorPropertyChanged, OnCoerceZoomFactorProperty)); - public double ZoomFactor - { - get { return (double)GetValue(ZoomFactorProperty); } - set { SetValue(ZoomFactorProperty, value); } - } - - private static void OnZoomFactorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - Magnifier m = (Magnifier)d; - m.OnZoomFactorChanged(e); - } - - protected virtual void OnZoomFactorChanged(DependencyPropertyChangedEventArgs e) - { - ResolveViewBox(); - } - - private static object OnCoerceZoomFactorProperty(DependencyObject d, object value) - { - Magnifier m = (Magnifier)d; - return m.OnCoerceZoomFactor(value); - } - - protected virtual object OnCoerceZoomFactor(object value) - { - double zoomFactor = (double)value; - - if (zoomFactor > 1) - zoomFactor = 1; - else if (zoomFactor < 0) - zoomFactor = 0; - - return zoomFactor; - } - - #endregion //ZoomFactor - - #endregion //Properties - - #region Constructors - - /// - /// Initializes static members of the class. - /// - static Magnifier() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(Magnifier), new FrameworkPropertyMetadata(typeof(Magnifier))); - } - - public Magnifier() - { - ResolveViewBox(); - } - - #endregion - - #region Methods - - private void ResolveViewBox() - { - double correction = (BorderThickness.Bottom + BorderThickness.Left + BorderThickness.Right + BorderThickness.Top == 0) ? 1 : 0; - - double width = DefaultSize.Width * ZoomFactor; - double height = DefaultSize.Height * ZoomFactor; - - MagnifierWidth = DefaultSize.Width - correction; - MagnifierHeight = DefaultSize.Height - correction; - - ViewBox = new Rect(ViewBox.Location, new Size(width, height)); - } - - #endregion //Methods - - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/MagnifierAdorner.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/MagnifierAdorner.cs deleted file mode 100644 index 2b31e80f..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/MagnifierAdorner.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Windows.Documents; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; - -namespace Microsoft.Windows.Controls -{ - public class MagnifierAdorner : Adorner - { - #region Members - - private Magnifier _magnifier; - private Point _currentMousePosition; - - #endregion - - #region Constructors - - public MagnifierAdorner(UIElement element, Magnifier magnifier) - : base(element) - { - InputManager.Current.PostProcessInput += Current_PostProcessInput; - _magnifier = magnifier; - UpdateViewBox(); - AddVisualChild(_magnifier); - } - - #endregion - - #region Private/Internal methods - - private void Current_PostProcessInput(object sender, ProcessInputEventArgs e) - { - Point pt = Mouse.GetPosition(this); - - if (_currentMousePosition == pt) - return; - - _currentMousePosition = pt; - UpdateViewBox(); - InvalidateArrange(); - } - - internal void UpdateViewBox() - { - var viewBoxLocation = CalculateViewBoxLocation(); - _magnifier.ViewBox = new Rect(viewBoxLocation, _magnifier.ViewBox.Size); - } - - private Point CalculateViewBoxLocation() - { - double offsetX = 0, offsetY = 0; - - Point adorner = Mouse.GetPosition(this); - Point element = Mouse.GetPosition(AdornedElement); - - offsetX = element.X - adorner.X; - offsetY = element.Y - adorner.Y; - - double left = _currentMousePosition.X - ((_magnifier.ViewBox.Width / 2) + offsetX); - double top = _currentMousePosition.Y - ((_magnifier.ViewBox.Height / 2) + offsetY); - return new Point(left, top); - } - - #endregion - - #region Overrides - - protected override Visual GetVisualChild(int index) - { - return _magnifier; - } - - protected override int VisualChildrenCount - { - get { return 1; } - } - - protected override Size MeasureOverride(Size constraint) - { - _magnifier.Measure(constraint); - return base.MeasureOverride(constraint); - } - - protected override Size ArrangeOverride(Size finalSize) - { - double x = _currentMousePosition.X - (_magnifier.DefaultSize.Width / 2); - double y = _currentMousePosition.Y - (_magnifier.DefaultSize.Height / 2); - _magnifier.Arrange(new Rect(x, y, _magnifier.DefaultSize.Width, _magnifier.DefaultSize.Height)); - return base.ArrangeOverride(finalSize); - } - - #endregion - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/MagnifierManager.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/MagnifierManager.cs deleted file mode 100644 index eaaa2c7e..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Implementation/MagnifierManager.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Documents; -using System.Windows.Input; - -namespace Microsoft.Windows.Controls -{ - public class MagnifierManager : DependencyObject - { - #region Members - - private MagnifierAdorner _adorner; - private UIElement _element; - - #endregion //Members - - #region Properties - - public static readonly DependencyProperty CurrentProperty = DependencyProperty.RegisterAttached("Magnifier", typeof(Magnifier), typeof(UIElement), new FrameworkPropertyMetadata(null, OnMagnifierChanged)); - public static void SetMagnifier(UIElement element, Magnifier value) - { - element.SetValue(CurrentProperty, value); - } - public static Magnifier GetMagnifier(UIElement element) - { - return (Magnifier)element.GetValue(CurrentProperty); - } - - private static void OnMagnifierChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - UIElement target = d as UIElement; - - if (target == null) - throw new ArgumentException("Magnifier can only be attached to a UIElement."); - - MagnifierManager manager = new MagnifierManager(); - manager.AttachToMagnifier(target, e.NewValue as Magnifier); - } - - #endregion //Properties - - #region Event Handlers - - void Element_MouseLeave(object sender, MouseEventArgs e) - { - HideAdorner(); - } - - void Element_MouseEnter(object sender, MouseEventArgs e) - { - ShowAdorner(); - } - - #endregion //Event Handlers - - #region Methods - - private void AttachToMagnifier(UIElement element, Magnifier magnifier) - { - _element = element; - _element.MouseEnter += Element_MouseEnter; - _element.MouseLeave += Element_MouseLeave; - - magnifier.Target = _element; - - _adorner = new MagnifierAdorner(_element, magnifier); - } - - void ShowAdorner() - { - VerifyAdornerLayer(); - _adorner.Visibility = Visibility.Visible; - } - - bool VerifyAdornerLayer() - { - if (_adorner.Parent != null) - return true; - - AdornerLayer layer = AdornerLayer.GetAdornerLayer(_element); - if (layer == null) - return false; - - layer.Add(_adorner); - return true; - } - - void HideAdorner() - { - if (_adorner.Visibility == Visibility.Visible) - { - _adorner.Visibility = Visibility.Collapsed; - } - } - - #endregion //Methods - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Themes/Generic.xaml deleted file mode 100644 index bcbf1567..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Magnifier/Themes/Generic.xaml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Implementation/MaskedTextBox.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Implementation/MaskedTextBox.cs deleted file mode 100644 index 6dd0f035..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Implementation/MaskedTextBox.cs +++ /dev/null @@ -1,432 +0,0 @@ -using System; -using System.ComponentModel; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using Microsoft.Windows.Controls.Primitives; - -namespace Microsoft.Windows.Controls -{ - public class MaskedTextBox : InputBase - { - #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 - - protected MaskedTextProvider MaskProvider { get; set; } - private TextBox TextBox { get; set; } - - #region IncludePrompt - - public static readonly DependencyProperty IncludePromptProperty = DependencyProperty.Register("IncludePrompt", typeof(bool), typeof(MaskedTextBox), new UIPropertyMetadata(false, OnIncludePromptPropertyChanged)); - public bool IncludePrompt - { - get { return (bool)GetValue(IncludePromptProperty); } - set { SetValue(IncludePromptProperty, value); } - } - - private static void OnIncludePromptPropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - MaskedTextBox maskedTextBox = o as MaskedTextBox; - if (maskedTextBox != null) - maskedTextBox.OnIncludePromptChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnIncludePromptChanged(bool oldValue, bool newValue) - { - ResolveMaskProvider(Mask); - } - - #endregion //IncludePrompt - - #region IncludeLiterals - - public static readonly DependencyProperty IncludeLiteralsProperty = DependencyProperty.Register("IncludeLiterals", typeof(bool), typeof(MaskedTextBox), new UIPropertyMetadata(true, OnIncludeLiteralsPropertyChanged)); - public bool IncludeLiterals - { - get { return (bool)GetValue(IncludeLiteralsProperty); } - set { SetValue(IncludeLiteralsProperty, value); } - } - - private static void OnIncludeLiteralsPropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - MaskedTextBox maskedTextBox = o as MaskedTextBox; - if (maskedTextBox != null) - maskedTextBox.OnIncludeLiteralsChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnIncludeLiteralsChanged(bool oldValue, bool newValue) - { - ResolveMaskProvider(Mask); - } - - #endregion //IncludeLiterals - - #region Mask - - public static readonly DependencyProperty MaskProperty = DependencyProperty.Register("Mask", typeof(string), typeof(MaskedTextBox), new UIPropertyMetadata(default(String), OnMaskPropertyChanged)); - public string Mask - { - get { return (string)GetValue(MaskProperty); } - set { SetValue(MaskProperty, value); } - } - - private static void OnMaskPropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - MaskedTextBox maskedTextBox = o as MaskedTextBox; - if (maskedTextBox != null) - maskedTextBox.OnMaskChanged((string)e.OldValue, (string)e.NewValue); - } - - protected virtual void OnMaskChanged(string oldValue, string newValue) - { - ResolveMaskProvider(newValue); - UpdateText(MaskProvider, 0); - } - - #endregion //Mask - - #region Value - - public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(object), typeof(MaskedTextBox), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValueChanged)); - public object Value - { - get { return (object)GetValue(ValueProperty); } - set { SetValue(ValueProperty, value); } - } - - private static void OnValueChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - MaskedTextBox maskedTextBox = o as MaskedTextBox; - if (maskedTextBox != null) - maskedTextBox.OnValueChanged((object)e.OldValue, (object)e.NewValue); - } - - protected virtual void OnValueChanged(object oldValue, object newValue) - { - if (_isInitialized) - SyncTextAndValueProperties(DateTimeUpDown.ValueProperty, newValue); - - RoutedPropertyChangedEventArgs args = new RoutedPropertyChangedEventArgs(oldValue, newValue); - args.RoutedEvent = MaskedTextBox.ValueChangedEvent; - RaiseEvent(args); - } - - #endregion //Value - - #region ValueType - - public static readonly DependencyProperty ValueTypeProperty = DependencyProperty.Register("ValueType", typeof(Type), typeof(MaskedTextBox), new UIPropertyMetadata(typeof(String), OnValueTypeChanged)); - public Type ValueType - { - get { return (Type)GetValue(ValueTypeProperty); } - set { SetValue(ValueTypeProperty, value); } - } - - private static void OnValueTypeChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - MaskedTextBox maskedTextBox = o as MaskedTextBox; - if (maskedTextBox != null) - maskedTextBox.OnValueTypeChanged((Type)e.OldValue, (Type)e.NewValue); - } - - protected virtual void OnValueTypeChanged(Type oldValue, Type newValue) - { - if (_isInitialized) - SyncTextAndValueProperties(InputBase.TextProperty, Text); - } - - #endregion //ValueType - - #endregion //Properties - - #region Constructors - - static MaskedTextBox() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(MaskedTextBox), new FrameworkPropertyMetadata(typeof(MaskedTextBox))); - } - - #endregion //Constructors - - #region Overrides - - public override void OnApplyTemplate() - { - TextBox = GetTemplateChild("TextBox") as TextBox; - TextBox.PreviewTextInput += TextBox_PreviewTextInput; - TextBox.PreviewKeyDown += TextBox_PreviewKeyDown; - - TextBox.CommandBindings.Add(new CommandBinding(ApplicationCommands.Paste, Paste)); //handle paste - TextBox.CommandBindings.Add(new CommandBinding(ApplicationCommands.Cut, null, CanCut)); //surpress cut - } - - protected override void OnAccessKey(AccessKeyEventArgs e) - { - if (TextBox != null) - TextBox.Focus(); - - base.OnAccessKey(e); - } - - protected override void OnGotFocus(RoutedEventArgs e) - { - if (TextBox != null) - TextBox.Focus(); - } - - protected override void OnInitialized(EventArgs e) - { - base.OnInitialized(e); - - if (!_isInitialized) - { - _isInitialized = true; - SyncTextAndValueProperties(ValueProperty, Value); - } - } - - protected override void OnTextChanged(string previousValue, string currentValue) - { - if (_isInitialized) - SyncTextAndValueProperties(InputBase.TextProperty, currentValue); - } - - #endregion - - #region Event Handlers - - void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e) - { - //if the text is readonly do not add the text - if (TextBox.IsReadOnly) - { - e.Handled = true; - return; - } - - int position = TextBox.SelectionStart; - MaskedTextProvider provider = MaskProvider; - if (position < TextBox.Text.Length) - { - position = GetNextCharacterPosition(position); - - if (Keyboard.IsKeyToggled(Key.Insert)) - { - if (provider.Replace(e.Text, position)) - position++; - } - else - { - if (provider.InsertAt(e.Text, position)) - position++; - } - - position = GetNextCharacterPosition(position); - } - - UpdateText(provider, position); - e.Handled = true; - - base.OnPreviewTextInput(e); - } - - void TextBox_PreviewKeyDown(object sender, KeyEventArgs e) - { - MaskedTextProvider provider = MaskProvider; - int position = TextBox.SelectionStart; - int selectionlength = TextBox.SelectionLength; - // If no selection use the start position else use end position - int endposition = (selectionlength == 0) ? position : position + selectionlength - 1; - - if (e.Key == Key.Delete && position < TextBox.Text.Length)//handle the delete key - { - if (provider.RemoveAt(position, endposition)) - UpdateText(provider, position); - - e.Handled = true; - } - else if (e.Key == Key.Space) - { - if (provider.InsertAt(" ", position)) - UpdateText(provider, position); - e.Handled = true; - } - else if (e.Key == Key.Back)//handle the back space - { - if ((position > 0) && (selectionlength == 0)) - { - position--; - if (provider.RemoveAt(position)) - UpdateText(provider, position); - } - - if (selectionlength != 0) - { - if (provider.RemoveAt(position, endposition)) - { - if (position > 0) - position--; - - UpdateText(provider, position); - } - } - - e.Handled = true; - } - - base.OnPreviewKeyDown(e); - } - - #endregion //Event Handlers - - #region Events - - public static readonly RoutedEvent ValueChangedEvent = EventManager.RegisterRoutedEvent("ValueChanged", RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler), typeof(MaskedTextBox)); - public event RoutedPropertyChangedEventHandler ValueChanged - { - add { AddHandler(ValueChangedEvent, value); } - remove { RemoveHandler(ValueChangedEvent, value); } - } - - #endregion //Events - - #region Methods - - #region Private - - private void UpdateText(MaskedTextProvider provider, int position) - { - if (provider == null) - throw new ArgumentNullException("MaskedTextProvider", "Mask cannot be null."); - - Text = provider.ToDisplayString(); - - if (TextBox != null) - TextBox.SelectionStart = position; - } - - private int GetNextCharacterPosition(int startPosition) - { - int position = MaskProvider.FindEditPositionFrom(startPosition, true); - return position == -1 ? startPosition : position; - } - - private void ResolveMaskProvider(string mask) - { - //do not create a mask provider if the Mask is empty, which can occur if the IncludePrompt and IncludeLiterals properties - //are set prior to the Mask. - if (String.IsNullOrEmpty(mask)) - return; - - MaskProvider = new MaskedTextProvider(mask) - { - IncludePrompt = this.IncludePrompt, - IncludeLiterals = this.IncludeLiterals - }; - } - - #endregion //Private - - private object ConvertTextToValue(string text) - { - object convertedValue = null; - - Type dataType = ValueType; - - string valueToConvert = MaskProvider.ToString().Trim(); - - if (valueToConvert.GetType() == dataType || dataType.IsInstanceOfType(valueToConvert)) - { - convertedValue = valueToConvert; - } -#if !VS2008 - else if (String.IsNullOrWhiteSpace(valueToConvert)) - { - convertedValue = Activator.CreateInstance(dataType); - } -#else - else if (String.IsNullOrEmpty(valueToConvert)) - { - convertedValue = Activator.CreateInstance(dataType); - } -#endif - else if (null == convertedValue && valueToConvert is IConvertible) - { - convertedValue = Convert.ChangeType(valueToConvert, dataType); - } - - return convertedValue; - } - - private string ConvertValueToText(object value) - { - if (value == null) - value = string.Empty; - - //I have only seen this occur while in Blend, but we need it here so the Blend designer doesn't crash. - if (MaskProvider == null) - return value.ToString(); - - MaskProvider.Set(value.ToString()); - return MaskProvider.ToDisplayString(); - } - - protected void SyncTextAndValueProperties(DependencyProperty p, object newValue) - { - //prevents recursive syncing properties - if (_isSyncingTextAndValueProperties) - return; - - _isSyncingTextAndValueProperties = true; - - //this only occures when the user typed in the value - if (InputBase.TextProperty == p) - { - if (newValue != null) - SetValue(MaskedTextBox.ValueProperty, ConvertTextToValue(newValue.ToString())); - } - - SetValue(InputBase.TextProperty, ConvertValueToText(newValue)); - - _isSyncingTextAndValueProperties = false; - } - - #endregion //Methods - - #region Commands - - private void Paste(object sender, RoutedEventArgs e) - { - MaskedTextProvider provider = MaskProvider; - int position = TextBox.SelectionStart; - - object data = Clipboard.GetData(DataFormats.Text); - if (data != null) - { - string text = data.ToString().Trim(); - if (text.Length > 0) - { - provider.Set(text); - UpdateText(provider, position); - } - } - } - - private void CanCut(object sender, CanExecuteRoutedEventArgs e) - { - e.CanExecute = false; - e.Handled = true; - } - - #endregion //Commands - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Themes/Generic.xaml deleted file mode 100644 index 4b44a502..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Themes/Generic.xaml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png deleted file mode 100644 index 4304d43b..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png deleted file mode 100644 index 35075187..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png deleted file mode 100644 index dad7dd09..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png deleted file mode 100644 index ecb7fe86..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Implementation/MessageBox.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Implementation/MessageBox.cs deleted file mode 100644 index 8b9de3df..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Implementation/MessageBox.cs +++ /dev/null @@ -1,517 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Controls.Primitives; - -namespace Microsoft.Windows.Controls -{ - [TemplateVisualState(Name = VisualStates.OK, GroupName = VisualStates.MessageBoxButtonsGroup)] - [TemplateVisualState(Name = VisualStates.OKCancel, GroupName = VisualStates.MessageBoxButtonsGroup)] - [TemplateVisualState(Name = VisualStates.YesNo, GroupName = VisualStates.MessageBoxButtonsGroup)] - [TemplateVisualState(Name = VisualStates.YesNoCancel, GroupName = VisualStates.MessageBoxButtonsGroup)] - public class MessageBox : Control - { - #region Private Members - - /// - /// Tracks the MessageBoxButon value passed into the InitializeContainer method - /// - private MessageBoxButton _button = MessageBoxButton.OK; - - /// - /// Tracks the MessageBoxResult to set as the default and focused button - /// - private MessageBoxResult _defaultResult = MessageBoxResult.None; - - /// - /// Tracks the owner of the MessageBox - /// - private Window _owner; - - #endregion //Private Members - - #region Constructors - - static MessageBox() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(MessageBox), new FrameworkPropertyMetadata(typeof(MessageBox))); - } - - internal MessageBox() - { /*user cannot create instance */ } - - #endregion //Constructors - - #region Properties - - #region Protected Properties - - /// - /// A System.Windows.MessageBoxResult value that specifies which message box button was clicked by the user. - /// - protected MessageBoxResult MessageBoxResult = MessageBoxResult.None; - - protected Window Container { get; private set; } - protected Thumb DragWidget { get; private set; } - - #endregion //Protected Properties - - #region Dependency Properties - - public static readonly DependencyProperty CaptionProperty = DependencyProperty.Register("Caption", typeof(string), typeof(MessageBox), 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(MessageBox), 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(MessageBox), new PropertyMetadata(null)); - public Style CloseButtonStyle - { - get { return (Style)GetValue(CloseButtonStyleProperty); } - set { SetValue(CloseButtonStyleProperty, value); } - } - - public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register("ImageSource", typeof(ImageSource), typeof(MessageBox), new UIPropertyMetadata(default(ImageSource))); - public ImageSource ImageSource - { - get { return (ImageSource)GetValue(ImageSourceProperty); } - set { SetValue(ImageSourceProperty, value); } - } - - public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(MessageBox), new UIPropertyMetadata(String.Empty)); - public string Text - { - get { return (string)GetValue(TextProperty); } - set { SetValue(TextProperty, value); } - } - - public static readonly DependencyProperty WindowBackgroundProperty = DependencyProperty.Register("WindowBackground", typeof(Brush), typeof(MessageBox), 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(MessageBox), 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(MessageBox), new PropertyMetadata(null)); - public double WindowOpacity - { - get { return (double)GetValue(WindowOpacityProperty); } - set { SetValue(WindowOpacityProperty, value); } - } - - #endregion //Dependency Properties - - #endregion //Properties - - #region Base Class Overrides - - /// - /// Overrides the OnApplyTemplate method. - /// - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - DragWidget = GetTemplateChild("PART_DragWidget") as Thumb; - if (DragWidget != null) - DragWidget.DragDelta += (o, e) => ProcessMove(e); - - AddHandler(ButtonBase.ClickEvent, new RoutedEventHandler(Button_Click)); - - ChangeVisualState(_button.ToString(), true); - - SetDefaultResult(); - } - - #endregion //Base Class Overrides - - #region Methods - - #region Public Static - - /// - /// Displays a message box that has a message and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText) - { - return Show(messageText, string.Empty, MessageBoxButton.OK); - } - - /// - /// Displays a message box that has a message and that returns a result. - /// - /// A System.Windows.Window that represents the owner of the MessageBox - /// A System.String that specifies the text to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(Window owner, string messageText) - { - return Show(owner, messageText, string.Empty, MessageBoxButton.OK); - } - - /// - /// Displays a message box that has a message and title bar caption; and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.String that specifies the title bar caption to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText, string caption) - { - return Show(messageText, caption, MessageBoxButton.OK); - } - - - public static MessageBoxResult Show(Window owner, string messageText, string caption) - { - return Show(owner, messageText, caption, MessageBoxButton.OK); - } - - /// - /// Displays a message box that has a message and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.String that specifies the title bar caption to display. - /// A System.Windows.MessageBoxButton value that specifies which button or buttons to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText, string caption, MessageBoxButton button) - { - return ShowCore(null, messageText, caption, button, MessageBoxImage.None, MessageBoxResult.None); - } - - - public static MessageBoxResult Show(Window owner, string messageText, string caption, MessageBoxButton button) - { - return ShowCore(owner, messageText, caption, button, MessageBoxImage.None, MessageBoxResult.None); - } - - /// - /// Displays a message box that has a message and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.String that specifies the title bar caption to display. - /// A System.Windows.MessageBoxButton value that specifies which button or buttons to display. - /// A System.Windows.MessageBoxImage value that specifies the icon to display. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText, string caption, MessageBoxButton button, MessageBoxImage icon) - { - return ShowCore(null, messageText, caption, button, icon, MessageBoxResult.None); - } - - - public static MessageBoxResult Show(Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon) - { - return ShowCore(owner, messageText, caption, button, icon, MessageBoxResult.None); - } - - /// - /// Displays a message box that has a message and that returns a result. - /// - /// A System.String that specifies the text to display. - /// A System.String that specifies the title bar caption to display. - /// A System.Windows.MessageBoxButton value that specifies which button or buttons to display. - /// A System.Windows.MessageBoxImage value that specifies the icon to display. - /// A System.Windows.MessageBoxResult value that specifies the default result of the MessageBox. - /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user. - public static MessageBoxResult Show(string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult) - { - return ShowCore(null, messageText, caption, button, icon, defaultResult); - } - - - public static MessageBoxResult Show(Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult) - { - return ShowCore(owner, messageText, caption, button, icon, defaultResult); - } - - #endregion //Public Static - - #region Protected - - /// - /// Shows the container which contains the MessageBox. - /// - protected void Show() - { - Container.ShowDialog(); - } - - /// - /// Initializes the MessageBox. - /// - /// The text. - /// The caption. - /// The button. - /// The image. - protected void InitializeMessageBox(Window owner, string text, string caption, MessageBoxButton button, MessageBoxImage image, MessageBoxResult defaultResult) - { - Text = text; - Caption = caption; - _button = button; - _defaultResult = defaultResult; - _owner = owner; - SetImageSource(image); - Container = CreateContainer(); - } - - /// - /// Changes the control's visual state(s). - /// - /// name of the state - /// True if state transitions should be used. - protected void ChangeVisualState(string name, bool useTransitions) - { - VisualStateManager.GoToState(this, name, useTransitions); - } - - #endregion //Protected - - #region Private - - /// - /// Sets the button that represents the _defaultResult to the default button and gives it focus. - /// - private void SetDefaultResult() - { - var defaultButton = GetDefaultButtonFromDefaultResult(); - if (defaultButton != null) - { - defaultButton.IsDefault = true; - defaultButton.Focus(); - } - } - - /// - /// Gets the default button from the _defaultResult. - /// - /// The default button that represents the defaultResult - private Button GetDefaultButtonFromDefaultResult() - { - Button defaultButton = null; - switch (_defaultResult) - { - case MessageBoxResult.Cancel: - defaultButton = GetMessageBoxButton("PART_CancelButton"); - break; - case MessageBoxResult.No: - defaultButton = GetMessageBoxButton("PART_NoButton"); - break; - case MessageBoxResult.OK: - defaultButton = GetMessageBoxButton("PART_OkButton"); - break; - case MessageBoxResult.Yes: - defaultButton = GetMessageBoxButton("PART_YesButton"); - break; - case MessageBoxResult.None: - defaultButton = GetDefaultButton(); - break; - } - return defaultButton; - } - - /// - /// Gets the default button. - /// - /// Used when the _defaultResult is set to None - /// The button to use as the default - private Button GetDefaultButton() - { - Button defaultButton = null; - switch (_button) - { - case MessageBoxButton.OK: - case MessageBoxButton.OKCancel: - defaultButton = GetMessageBoxButton("PART_OkButton"); - break; - case MessageBoxButton.YesNo: - case MessageBoxButton.YesNoCancel: - defaultButton = GetMessageBoxButton("PART_YesButton"); - break; - } - return defaultButton; - } - - /// - /// Gets a message box button. - /// - /// The name of the button to get. - /// The button - private Button GetMessageBoxButton(string name) - { - Button button = GetTemplateChild(name) as Button; - return button; - } - - /// - /// Shows the MessageBox. - /// - /// The message text. - /// The caption. - /// The button. - /// The icon. - /// The default result. - /// - private static MessageBoxResult ShowCore(Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult) - { - MessageBox msgBox = new MessageBox(); - msgBox.InitializeMessageBox(owner, messageText, caption, button, icon, defaultResult); - msgBox.Show(); - return msgBox.MessageBoxResult; - } - - /// - /// Resolves the owner Window of the MessageBox. - /// - /// the owner Window - private static Window ResolveOwnerWindow() - { - Window owner = null; - if (Application.Current != null) - { - foreach (Window w in Application.Current.Windows) - { - if (w.IsActive) - { - owner = w; - break; - } - } - } - return owner; - } - - /// - /// Sets the message image source. - /// - /// The image to show. - private void SetImageSource(MessageBoxImage image) - { - String iconName = String.Empty; - - switch (image) - { - case MessageBoxImage.Error: - { - iconName = "Error48.png"; - break; - } - case MessageBoxImage.Information: - { - iconName = "Information48.png"; - break; - } - case MessageBoxImage.Question: - { - iconName = "Question48.png"; - break; - } - case MessageBoxImage.Warning: - { - iconName = "Warning48.png"; - break; - } - case MessageBoxImage.None: - default: - { - return; - } - } - - ImageSource = (ImageSource)new ImageSourceConverter().ConvertFromString(String.Format("pack://application:,,,/WPFToolkit.Extended;component/MessageBox/Icons/{0}", iconName)); - } - - /// - /// Creates the container which will host the MessageBox control. - /// - /// - private Window CreateContainer() - { - var newWindow = new Window(); - newWindow.AllowsTransparency = true; - newWindow.Background = Brushes.Transparent; - newWindow.Content = this; - newWindow.Owner = _owner ?? ResolveOwnerWindow(); - - if (newWindow.Owner != null) - newWindow.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner; - else - newWindow.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; - - newWindow.ShowInTaskbar = false; - newWindow.SizeToContent = System.Windows.SizeToContent.WidthAndHeight; - newWindow.ResizeMode = System.Windows.ResizeMode.NoResize; - newWindow.WindowStyle = System.Windows.WindowStyle.None; - return newWindow; - } - - #endregion //Private - - #endregion //Methods - - #region Event Handlers - - /// - /// Processes the move of a drag operation on the header. - /// - /// The instance containing the event data. - private void ProcessMove(DragDeltaEventArgs e) - { - Container.Left = Container.Left + e.HorizontalChange; - Container.Top = Container.Top + e.VerticalChange; - } - - /// - /// Sets the MessageBoxResult according to the button pressed and then closes the MessageBox. - /// - /// The source of the event. - /// The instance containing the event data. - private void Button_Click(object sender, RoutedEventArgs e) - { - Button button = e.OriginalSource as Button; - switch (button.Name) - { - case "PART_NoButton": - MessageBoxResult = MessageBoxResult.No; - break; - case "PART_YesButton": - MessageBoxResult = MessageBoxResult.Yes; - break; - case "PART_CloseButton": - case "PART_CancelButton": - MessageBoxResult = MessageBoxResult.Cancel; - break; - case "PART_OkButton": - MessageBoxResult = MessageBoxResult.OK; - break; - } - - Close(); - } - - /// - /// Closes the MessageBox. - /// - private void Close() - { - Container.Close(); - } - - #endregion //Event Handlers - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Implementation/VisualStates.MessageBox.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Implementation/VisualStates.MessageBox.cs deleted file mode 100644 index d47fcb08..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Implementation/VisualStates.MessageBox.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - internal static partial class VisualStates - { - public const string MessageBoxButtonsGroup = "MessageBoxButtonsGroup"; - - public const string OK = "OK"; - - public const string OKCancel = "OKCancel"; - - public const string YesNo = "YesNo"; - - public const string YesNoCancel = "YesNoCancel"; - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Themes/Generic.xaml deleted file mode 100644 index efbd5084..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Themes/Generic.xaml +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/DecimalUpDown.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/DecimalUpDown.cs deleted file mode 100644 index 2d87b5b7..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/DecimalUpDown.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using System.Windows; - -namespace Microsoft.Windows.Controls -{ - public class DecimalUpDown : NumericUpDown - { - #region Constructors - - static DecimalUpDown() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(DecimalUpDown), new FrameworkPropertyMetadata(typeof(DecimalUpDown))); - DefaultValueProperty.OverrideMetadata(typeof(DecimalUpDown), new FrameworkPropertyMetadata(default(decimal))); - IncrementProperty.OverrideMetadata(typeof(DecimalUpDown), new FrameworkPropertyMetadata(1m)); - MaximumProperty.OverrideMetadata(typeof(DecimalUpDown), new FrameworkPropertyMetadata(decimal.MaxValue)); - MinimumProperty.OverrideMetadata(typeof(DecimalUpDown), new FrameworkPropertyMetadata(decimal.MinValue)); - } - - #endregion //Constructors - - #region Base Class Overrides - - protected override decimal? CoerceValue(decimal? value) - { - if (value < Minimum) - return Minimum; - else if (value > Maximum) - return Maximum; - else - return value; - } - - protected override void OnIncrement() - { - if (Value.HasValue) - Value += Increment; - else - Value = DefaultValue; - } - - protected override void OnDecrement() - { - if (Value.HasValue) - Value -= Increment; - else - Value = DefaultValue; - } - - protected override decimal? ConvertTextToValue(string text) - { - decimal? result = null; - - if (String.IsNullOrEmpty(text)) - return result; - - try - { - result = FormatString.Contains("P") ? ParsePercent(text, CultureInfo) : ParseDecimal(text, CultureInfo); - result = CoerceValue(result); - } - catch - { - Text = ConvertValueToText(); - return Value; - } - - return result; - } - - protected override string ConvertValueToText() - { - if (Value == null) - return string.Empty; - - return Value.Value.ToString(FormatString, CultureInfo); - } - - protected override void SetValidSpinDirection() - { - ValidSpinDirections validDirections = ValidSpinDirections.None; - - if (Value < Maximum || !Value.HasValue) - validDirections = validDirections | ValidSpinDirections.Increase; - - if (Value > Minimum || !Value.HasValue) - validDirections = validDirections | ValidSpinDirections.Decrease; - - if (Spinner != null) - Spinner.ValidSpinDirection = validDirections; - } - - protected override void ValidateValue(decimal? value) - { - if (value < Minimum) - Value = Minimum; - else if (value > Maximum) - Value = Maximum; - } - - #endregion //Base Class Overrides - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/DoubleUpDown.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/DoubleUpDown.cs deleted file mode 100644 index ab8e9e88..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/DoubleUpDown.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using System.Windows; - -namespace Microsoft.Windows.Controls -{ - public class DoubleUpDown : NumericUpDown - { - #region Constructors - - static DoubleUpDown() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(DoubleUpDown), new FrameworkPropertyMetadata(typeof(DoubleUpDown))); - DefaultValueProperty.OverrideMetadata(typeof(DoubleUpDown), new FrameworkPropertyMetadata(default(double))); - IncrementProperty.OverrideMetadata(typeof(DoubleUpDown), new FrameworkPropertyMetadata(1d)); - MaximumProperty.OverrideMetadata(typeof(DoubleUpDown), new FrameworkPropertyMetadata(double.MaxValue)); - MinimumProperty.OverrideMetadata(typeof(DoubleUpDown), new FrameworkPropertyMetadata(double.MinValue)); - } - - #endregion //Constructors - - #region Base Class Overrides - - protected override double? CoerceValue(double? value) - { - if (value < Minimum) - return Minimum; - else if (value > Maximum) - return Maximum; - else - return value; - } - - protected override void OnIncrement() - { - if (Value.HasValue) - Value += Increment; - else - Value = DefaultValue; - } - - protected override void OnDecrement() - { - if (Value.HasValue) - Value -= Increment; - else - Value = DefaultValue; - } - - protected override double? ConvertTextToValue(string text) - { - double? result = null; - - if (String.IsNullOrEmpty(text)) - return result; - - try - { - result = FormatString.Contains("P") ? Decimal.ToDouble(ParsePercent(text, CultureInfo)) : ParseDouble(text, CultureInfo); - result = CoerceValue(result); - } - catch - { - Text = ConvertValueToText(); - return Value; - } - - return result; - } - - protected override string ConvertValueToText() - { - if (Value == null) - return string.Empty; - - return Value.Value.ToString(FormatString, CultureInfo); - } - - protected override void SetValidSpinDirection() - { - ValidSpinDirections validDirections = ValidSpinDirections.None; - - if (Value < Maximum || !Value.HasValue) - validDirections = validDirections | ValidSpinDirections.Increase; - - if (Value > Minimum || !Value.HasValue) - validDirections = validDirections | ValidSpinDirections.Decrease; - - if (Spinner != null) - Spinner.ValidSpinDirection = validDirections; - } - - protected override void ValidateValue(double? value) - { - if (value < Minimum) - Value = Minimum; - else if (value > Maximum) - Value = Maximum; - } - - #endregion //Base Class Overrides - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/IntegerUpDown.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/IntegerUpDown.cs deleted file mode 100644 index 12430d38..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/IntegerUpDown.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Windows; - -namespace Microsoft.Windows.Controls -{ - public class IntegerUpDown : NumericUpDown - { - #region Constructors - - static IntegerUpDown() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(IntegerUpDown), new FrameworkPropertyMetadata(typeof(IntegerUpDown))); - DefaultValueProperty.OverrideMetadata(typeof(IntegerUpDown), new FrameworkPropertyMetadata(0)); - IncrementProperty.OverrideMetadata(typeof(IntegerUpDown), new FrameworkPropertyMetadata(1)); - MaximumProperty.OverrideMetadata(typeof(IntegerUpDown), new FrameworkPropertyMetadata(int.MaxValue)); - MinimumProperty.OverrideMetadata(typeof(IntegerUpDown), new FrameworkPropertyMetadata(int.MinValue)); - } - - #endregion //Constructors - - #region Base Class Overrides - - protected override int? CoerceValue(int? value) - { - if (value < Minimum) - return Minimum; - else if (value > Maximum) - return Maximum; - else - return value; - } - - protected override void OnIncrement() - { - if (Value.HasValue) - Value += Increment; - else - Value = DefaultValue; - } - - protected override void OnDecrement() - { - if (Value.HasValue) - Value -= Increment; - else - Value = DefaultValue; - } - - protected override int? ConvertTextToValue(string text) - { - int? result = null; - - if (String.IsNullOrEmpty(text)) - return result; - - try - { - //don't know why someone would format an integer as %, but just in case they do. - result = FormatString.Contains("P") ? Decimal.ToInt32(ParsePercent(text, CultureInfo)) : ParseInt(text, CultureInfo); - result = CoerceValue(result); - } - catch - { - Text = ConvertValueToText(); - return Value; - } - - return result; - } - - protected override string ConvertValueToText() - { - if (Value == null) - return string.Empty; - - return Value.Value.ToString(FormatString, CultureInfo); - } - - protected override void SetValidSpinDirection() - { - ValidSpinDirections validDirections = ValidSpinDirections.None; - - if (Value < Maximum || !Value.HasValue) - validDirections = validDirections | ValidSpinDirections.Increase; - - if (Value > Minimum || !Value.HasValue) - validDirections = validDirections | ValidSpinDirections.Decrease; - - if (Spinner != null) - Spinner.ValidSpinDirection = validDirections; - } - - protected override void ValidateValue(int? value) - { - if (value < Minimum) - Value = Minimum; - else if (value > Maximum) - Value = Maximum; - } - - #endregion //Base Class Overrides - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/NumericUpDown.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/NumericUpDown.cs deleted file mode 100644 index 5c9d2b6b..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Implementation/NumericUpDown.cs +++ /dev/null @@ -1,182 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Input; -using Microsoft.Windows.Controls.Primitives; -using System.Globalization; - -namespace Microsoft.Windows.Controls -{ - public abstract class NumericUpDown : UpDownBase - { - #region Properties - - #region DefaultValue - - public static readonly DependencyProperty DefaultValueProperty = DependencyProperty.Register("DefaultValue", typeof(T), typeof(NumericUpDown), new UIPropertyMetadata(default(T))); - public T DefaultValue - { - get { return (T)GetValue(DefaultValueProperty); } - set { SetValue(DefaultValueProperty, value); } - } - - #endregion //DefaultValue - - #region FormatString - - public static readonly DependencyProperty FormatStringProperty = DependencyProperty.Register("FormatString", typeof(string), typeof(NumericUpDown), new UIPropertyMetadata(String.Empty, OnFormatStringChanged)); - public string FormatString - { - get { return (string)GetValue(FormatStringProperty); } - set { SetValue(FormatStringProperty, value); } - } - - private static void OnFormatStringChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - NumericUpDown numericUpDown = o as NumericUpDown; - if (numericUpDown != null) - numericUpDown.OnFormatStringChanged((string)e.OldValue, (string)e.NewValue); - } - - protected virtual void OnFormatStringChanged(string oldValue, string newValue) - { - Text = ConvertValueToText(); - } - - #endregion //FormatString - - #region Increment - - public static readonly DependencyProperty IncrementProperty = DependencyProperty.Register("Increment", typeof(T), typeof(NumericUpDown), new PropertyMetadata(default(T))); - public T Increment - { - get { return (T)GetValue(IncrementProperty); } - set { SetValue(IncrementProperty, value); } - } - - #endregion - - #region Maximum - - public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register("Maximum", typeof(T), typeof(NumericUpDown), new UIPropertyMetadata(default(T), OnMaximumChanged)); - public T Maximum - { - get { return (T)GetValue(MaximumProperty); } - set { SetValue(MaximumProperty, value); } - } - - private static void OnMaximumChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - NumericUpDown numericUpDown = o as NumericUpDown; - if (numericUpDown != null) - numericUpDown.OnMaximumChanged((T)e.OldValue, (T)e.NewValue); - } - - protected virtual void OnMaximumChanged(T oldValue, T newValue) - { - SetValidSpinDirection(); - } - - #endregion //Maximum - - #region Minimum - - public static readonly DependencyProperty MinimumProperty = DependencyProperty.Register("Minimum", typeof(T), typeof(NumericUpDown), new UIPropertyMetadata(default(T), OnMinimumChanged)); - public T Minimum - { - get { return (T)GetValue(MinimumProperty); } - set { SetValue(MinimumProperty, value); } - } - - private static void OnMinimumChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - NumericUpDown numericUpDown = o as NumericUpDown; - if (numericUpDown != null) - numericUpDown.OnMinimumChanged((T)e.OldValue, (T)e.NewValue); - } - - protected virtual void OnMinimumChanged(T oldValue, T newValue) - { - SetValidSpinDirection(); - } - - #endregion //Minimum - - #region SelectAllOnGotFocus - - public static readonly DependencyProperty SelectAllOnGotFocusProperty = DependencyProperty.Register("SelectAllOnGotFocus", typeof(bool), typeof(NumericUpDown), new PropertyMetadata(false)); - public bool SelectAllOnGotFocus - { - get { return (bool)GetValue(SelectAllOnGotFocusProperty); } - set { SetValue(SelectAllOnGotFocusProperty, value); } - } - - #endregion //SelectAllOnGotFocus - - #endregion //Properties - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - if (SelectAllOnGotFocus) - { - //in order to select all the text we must handle both the keybord (tabbing) and mouse (clicking) events - TextBox.GotKeyboardFocus += OnTextBoxGotKeyBoardFocus; - TextBox.PreviewMouseLeftButtonDown += OnTextBoxPreviewMouseLeftButtonDown; - } - } - - #endregion //Base Class Overrides - - #region Event Handlers - - private void OnTextBoxGotKeyBoardFocus(object sender, RoutedEventArgs e) - { - TextBox.SelectAll(); - } - - void OnTextBoxPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) - { - if (!TextBox.IsKeyboardFocused) - { - e.Handled = true; - TextBox.Focus(); - } - } - - #endregion //Event Handlers - - #region Methods - - protected static decimal ParseDecimal(string text, IFormatProvider cultureInfo) - { - return Decimal.Parse(text, NumberStyles.Any, cultureInfo); - } - - protected static double ParseDouble(string text, IFormatProvider cultureInfo) - { - return Double.Parse(text, NumberStyles.Any, cultureInfo); - } - - protected static int ParseInt(string text, IFormatProvider cultureInfo) - { - return Int32.Parse(text, NumberStyles.Any, cultureInfo); - } - - protected static decimal ParsePercent(string text, IFormatProvider cultureInfo) - { - NumberFormatInfo info = NumberFormatInfo.GetInstance(cultureInfo); - - text = text.Replace(info.PercentSymbol, null); - - decimal result = Decimal.Parse(text, NumberStyles.Any, info); - result = result / 100; - - return result; - } - - #endregion //Methods - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Themes/Generic.xaml deleted file mode 100644 index 68f53135..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/Themes/Generic.xaml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs deleted file mode 100644 index 854114b6..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Markup; - -// 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("Extended WPF Toolkit")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Extended WPF Toolkit")] -[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)] - -[assembly: CLSCompliant(true)] - -//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.4.0.0")] -[assembly: AssemblyFileVersion("1.4.0.0")] - -[assembly: XmlnsPrefix("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "extToolkit")] -[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "Microsoft.Windows.Controls")] -[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "Microsoft.Windows.Controls.PropertyGrid")] diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs deleted file mode 100644 index eaf63633..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 Microsoft.Windows.Controls.Properties { - using System; - - - /// - /// 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 (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Windows.Controls.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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.resx b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.resx deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs deleted file mode 100644 index 4a0f1423..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 Microsoft.Windows.Controls.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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.settings b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.settings deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/AdvancedProperties11.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/AdvancedProperties11.png deleted file mode 100644 index 0146e932..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/AdvancedProperties11.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Categorize16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Categorize16.png deleted file mode 100644 index 51510df8..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Categorize16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Database11.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Database11.png deleted file mode 100644 index 0f523fbd..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Database11.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Inheritance11.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Inheritance11.png deleted file mode 100644 index 7dd3b491..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Inheritance11.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Local11.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Local11.png deleted file mode 100644 index ec521dd4..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Local11.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Resource11.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Resource11.png deleted file mode 100644 index 7275c981..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Resource11.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/SortAscending16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/SortAscending16.png deleted file mode 100644 index b3138ba3..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/SortAscending16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Style11.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Style11.png deleted file mode 100644 index 7a6005d6..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Images/Style11.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Commands/PropertyItemCommands.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Commands/PropertyItemCommands.cs deleted file mode 100644 index f1db5ce6..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Commands/PropertyItemCommands.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Windows.Input; - -namespace Microsoft.Windows.Controls.PropertyGrid.Commands -{ - public static class PropertyItemCommands - { - private static RoutedCommand _resetValueCommand = new RoutedCommand(); - public static RoutedCommand ResetValue - { - get - { - return _resetValueCommand; - } - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Converters/ValueSourceToImagePathConverter.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Converters/ValueSourceToImagePathConverter.cs deleted file mode 100644 index 51aadbb7..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Converters/ValueSourceToImagePathConverter.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Data; -using System.Windows.Media.Imaging; - -namespace Microsoft.Windows.Controls.PropertyGrid.Converters -{ - public class ValueSourceToImagePathConverter : IValueConverter - { - #region IValueConverter Members - - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - BaseValueSource bvs = (BaseValueSource)value; - - string uriPrefix = "/WPFToolkit.Extended;component/PropertyGrid/Images/"; - string imageName = "AdvancedProperties11"; - - switch (bvs) - { - case BaseValueSource.Inherited: - case BaseValueSource.DefaultStyle: - case BaseValueSource.ImplicitStyleReference: - imageName = "Inheritance11"; - break; - case BaseValueSource.DefaultStyleTrigger: - break; - case BaseValueSource.Style: - imageName = "Style11"; - break; - - case BaseValueSource.Local: - imageName = "Local11"; - break; - } - - - return new BitmapImage(new Uri(String.Format("{0}{1}.png", uriPrefix, imageName), UriKind.RelativeOrAbsolute)); - } - - public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - throw new NotImplementedException(); - } - - #endregion - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Converters/ValueSourceToToolTipConverter.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Converters/ValueSourceToToolTipConverter.cs deleted file mode 100644 index 2b70c134..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Converters/ValueSourceToToolTipConverter.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Data; - -namespace Microsoft.Windows.Controls.PropertyGrid.Converters -{ - class ValueSourceToToolTipConverter : IValueConverter - { - #region IValueConverter Members - - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - BaseValueSource bvs = (BaseValueSource)value; - string toolTip = "Advanced Properties"; - - switch (bvs) - { - case BaseValueSource.Inherited: - case BaseValueSource.DefaultStyle: - case BaseValueSource.ImplicitStyleReference: - toolTip = "Inheritance"; - break; - case BaseValueSource.Style: - toolTip = "Style Setter"; - break; - - case BaseValueSource.Local: - toolTip = "Local"; - break; - } - - return toolTip; - } - - public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - throw new NotImplementedException(); - } - - #endregion - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/CustomTypeEditorCollection.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/CustomTypeEditorCollection.cs deleted file mode 100644 index 585ba312..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/CustomTypeEditorCollection.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.ObjectModel; -using Microsoft.Windows.Controls.PropertyGrid.Editors; - -namespace Microsoft.Windows.Controls.PropertyGrid -{ - public class CustomTypeEditorCollection : ObservableCollection - { - public ICustomTypeEditor this[string propertyName] - { - get - { - foreach (var item in Items) - { - if (item.Properties.Contains(propertyName)) - return item; - } - - return null; - } - } - - public ICustomTypeEditor this[Type targetType] - { - get - { - foreach (var item in Items) - { - if (item.TargetType == targetType) - return item; - } - - return null; - } - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/CheckBoxEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/CheckBoxEditor.cs deleted file mode 100644 index 90e4ec02..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/CheckBoxEditor.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Windows; -using System.Windows.Controls; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public class CheckBoxEditor : TypeEditor - { - protected override void SetControlProperties() - { - Editor.Margin = new Thickness(5, 0, 0, 0); - } - - protected override void SetValueDependencyProperty() - { - ValueProperty = CheckBox.IsCheckedProperty; - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ColorEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ColorEditor.cs deleted file mode 100644 index a77ff2ce..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ColorEditor.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public class ColorEditor : TypeEditor - { - protected override void SetValueDependencyProperty() - { - ValueProperty = ColorPicker.SelectedColorProperty; - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ComboBoxEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ComboBoxEditor.cs deleted file mode 100644 index 20b8537d..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ComboBoxEditor.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Collections.Generic; -using System.Windows.Controls; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public abstract class ComboBoxEditor : TypeEditor - { - protected override void SetValueDependencyProperty() - { - ValueProperty = ComboBox.SelectedItemProperty; - } - - public override void Attach(PropertyItem propertyItem) - { - SetItemsSource(propertyItem); - base.Attach(propertyItem); - } - - protected abstract IList CreateItemsSource(PropertyItem propertyItem); - - private void SetItemsSource(PropertyItem propertyItem) - { - Editor.ItemsSource = CreateItemsSource(propertyItem); - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/CustomTypeEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/CustomTypeEditor.cs deleted file mode 100644 index 36ac5730..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/CustomTypeEditor.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Collections.Generic; -using System; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public class CustomTypeEditor : ICustomTypeEditor - { - public ITypeEditor Editor { get; set; } - - private IList _properties = new List(); - public IList Properties - { - get { return _properties; } - set { _properties = value; } - } - - public Type TargetType { get; set; } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DateTimeUpDownEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DateTimeUpDownEditor.cs deleted file mode 100644 index abe8ad77..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DateTimeUpDownEditor.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public class DateTimeUpDownEditor : TypeEditor - { - protected override void SetValueDependencyProperty() - { - ValueProperty = DateTimeUpDown.ValueProperty; - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DecimalUpDownEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DecimalUpDownEditor.cs deleted file mode 100644 index 7e8e9e28..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DecimalUpDownEditor.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public class DecimalUpDownEditor : TypeEditor - { - protected override void SetValueDependencyProperty() - { - ValueProperty = DecimalUpDown.ValueProperty; - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DoubleUpDownEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DoubleUpDownEditor.cs deleted file mode 100644 index 28551aea..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DoubleUpDownEditor.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public class DoubleUpDownEditor : TypeEditor - { - protected override void SetValueDependencyProperty() - { - ValueProperty = DoubleUpDown.ValueProperty; - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/EnumComboBoxEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/EnumComboBoxEditor.cs deleted file mode 100644 index fb5def1a..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/EnumComboBoxEditor.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public class EnumComboBoxEditor : ComboBoxEditor - { - protected override IList CreateItemsSource(PropertyItem propertyItem) - { - return GetValues(propertyItem.PropertyType); - } - - private static object[] GetValues(Type enumType) - { - List values = new List(); - - var fields = enumType.GetFields().Where(x => x.IsLiteral); - foreach (FieldInfo field in fields) - { - values.Add(field.GetValue(enumType)); - } - - return values.ToArray(); - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/FontComboBoxEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/FontComboBoxEditor.cs deleted file mode 100644 index 987e45d6..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/FontComboBoxEditor.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Linq; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Media; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public class FontComboBoxEditor : ComboBoxEditor - { - protected override IList CreateItemsSource(PropertyItem propertyItem) - { - if (propertyItem.PropertyType == typeof(FontFamily)) - return GetFontFamilies(); - else if (propertyItem.PropertyType == typeof(FontWeight)) - return GetFontWeights(); - else if (propertyItem.PropertyType == typeof(FontStyle)) - return GetFontStyles(); - else if (propertyItem.PropertyType == typeof(FontStretch)) - return GetFontStretches(); - - return null; - } - - private static IList GetFontFamilies() - { -#if !VS2008 - return Fonts.SystemFontFamilies.ToList(); -#else - return Fonts.SystemFontFamilies.Cast().ToList(); -#endif - } - - private static IList GetFontWeights() - { - return new List() - { - FontWeights.Black, - FontWeights.Bold, - FontWeights.ExtraBlack, - FontWeights.ExtraBold, - FontWeights.ExtraLight, - FontWeights.Light, - FontWeights.Medium, - FontWeights.Normal, - FontWeights.SemiBold, - FontWeights.Thin - }; - } - - private static IList GetFontStyles() - { - return new List() - { - FontStyles.Italic, - FontStyles.Normal - }; - } - - private static IList GetFontStretches() - { - return new List() - { - FontStretches.Condensed, - FontStretches.Expanded, - FontStretches.ExtraCondensed, - FontStretches.ExtraExpanded, - FontStretches.Normal, - FontStretches.SemiCondensed, - FontStretches.SemiExpanded, - FontStretches.UltraCondensed, - FontStretches.UltraExpanded - }; - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ICustomTypeEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ICustomTypeEditor.cs deleted file mode 100644 index 241d944c..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ICustomTypeEditor.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public interface ICustomTypeEditor - { - ITypeEditor Editor { get; set; } - IList Properties { get; set; } - Type TargetType { get; set; } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ITypeEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ITypeEditor.cs deleted file mode 100644 index 43cf6259..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/ITypeEditor.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Windows; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public interface ITypeEditor - { - void Attach(PropertyItem propertyItem); - FrameworkElement ResolveEditor(); - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/IntegerUpDownEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/IntegerUpDownEditor.cs deleted file mode 100644 index fede0db8..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/IntegerUpDownEditor.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public class IntegerUpDownEditor : TypeEditor - { - protected override void SetValueDependencyProperty() - { - ValueProperty = IntegerUpDown.ValueProperty; - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/TextBlockEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/TextBlockEditor.cs deleted file mode 100644 index 67505e9e..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/TextBlockEditor.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Windows.Controls; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public class TextBlockEditor : TypeEditor - { - protected override void SetValueDependencyProperty() - { - ValueProperty = TextBlock.TextProperty; - } - - protected override void SetControlProperties() - { - Editor.Margin = new System.Windows.Thickness(5, 0, 0, 0); - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/TextBoxEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/TextBoxEditor.cs deleted file mode 100644 index 5efae112..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/TextBoxEditor.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Windows.Controls; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public class TextBoxEditor : TypeEditor - { - protected override void SetValueDependencyProperty() - { - ValueProperty = TextBox.TextProperty; - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/TypeEditor.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/TypeEditor.cs deleted file mode 100644 index aa4e8eef..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/TypeEditor.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Data; - -namespace Microsoft.Windows.Controls.PropertyGrid.Editors -{ - public abstract class TypeEditor : ITypeEditor - where T : FrameworkElement, new() - { - #region Properties - - protected T Editor { get; set; } - protected DependencyProperty ValueProperty { get; set; } - - #endregion //Properties - - #region Constructors - - public TypeEditor() - { - Editor = new T(); - SetValueDependencyProperty(); - SetControlProperties(); - } - - #endregion //Constructors - - #region ITypeEditor Members - - public virtual void Attach(PropertyItem propertyItem) - { - ResolveValueBinding(propertyItem); - } - - public virtual FrameworkElement ResolveEditor() - { - return Editor; - } - - #endregion //ITypeEditor Members - - #region Methods - - protected virtual IValueConverter CreateValueConverter() - { - return null; - } - - protected virtual void ResolveValueBinding(PropertyItem propertyItem) - { - var _binding = new Binding("Value"); - _binding.Source = propertyItem; - _binding.ValidatesOnExceptions = true; - _binding.ValidatesOnDataErrors = true; - _binding.Mode = propertyItem.IsWriteable ? BindingMode.TwoWay : BindingMode.OneWay; - _binding.Converter = CreateValueConverter(); - BindingOperations.SetBinding(Editor, ValueProperty, _binding); - } - - protected virtual void SetControlProperties() - { - //TODO: implement in derived class - } - - protected abstract void SetValueDependencyProperty(); - - - #endregion //Methods - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyCategoryItem.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyCategoryItem.cs deleted file mode 100644 index 27089598..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyCategoryItem.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Controls; -using System.Windows; - -namespace Microsoft.Windows.Controls.PropertyGrid -{ - public class PropertyCategoryItem : Control - { - public static readonly DependencyProperty CategoryProperty = DependencyProperty.Register("Category", typeof(string), typeof(PropertyCategoryItem), new UIPropertyMetadata(String.Empty, new PropertyChangedCallback(OnCategoryChanged), new CoerceValueCallback(OnCoerceCategory))); - - private static object OnCoerceCategory(DependencyObject o, object value) - { - PropertyCategoryItem propertyCategoryItem = o as PropertyCategoryItem; - if (propertyCategoryItem != null) - return propertyCategoryItem.OnCoerceCategory((string)value); - else - return value; - } - - private static void OnCategoryChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - PropertyCategoryItem propertyCategoryItem = o as PropertyCategoryItem; - if (propertyCategoryItem != null) - propertyCategoryItem.OnCategoryChanged((string)e.OldValue, (string)e.NewValue); - } - - protected virtual string OnCoerceCategory(string value) - { - // TODO: Keep the proposed value within the desired range. - return value; - } - - protected virtual void OnCategoryChanged(string oldValue, string newValue) - { - // TODO: Add your property changed side-effects. Descendants can override as well. - } - - public string Category - { - // IMPORTANT: To maintain parity between setting a property in XAML and procedural code, do not touch the getter and setter inside this dependency property! - get - { - return (string)GetValue(CategoryProperty); - } - set - { - SetValue(CategoryProperty, value); - } - } - - - private List _Properties = new List(); - public List Properties - { - get - { - return _Properties; - } - set - { - _Properties = value; - } - } - - - static PropertyCategoryItem() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(PropertyCategoryItem), new FrameworkPropertyMetadata(typeof(PropertyCategoryItem))); - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyCollection.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyCollection.cs deleted file mode 100644 index 95834089..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyCollection.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; - -namespace Microsoft.Windows.Controls.PropertyGrid -{ - public class PropertyCollection : ObservableCollection - { - public PropertyCollection() - { - - } - public PropertyCollection(List list) - : base(list) - { - - } - public PropertyCollection(IEnumerable collection) - : base(collection) - { - - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs deleted file mode 100644 index 6ae1a563..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs +++ /dev/null @@ -1,425 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Media; -using System.Windows.Controls.Primitives; -using System.ComponentModel; -using System.Windows.Input; -using Microsoft.Windows.Controls.PropertyGrid.Editors; - -namespace Microsoft.Windows.Controls.PropertyGrid -{ - public class PropertyGrid : Control - { - #region Members - - private Thumb _dragThumb; - private List _propertyItemsCache; - - #endregion //Members - - #region Properties - - #region CustomTypeEditors - - public static readonly DependencyProperty CustomTypeEditorsProperty = DependencyProperty.Register("CustomTypeEditors", typeof(CustomTypeEditorCollection), typeof(PropertyGrid), new UIPropertyMetadata(new CustomTypeEditorCollection())); - public CustomTypeEditorCollection CustomTypeEditors - { - get { return (CustomTypeEditorCollection)GetValue(CustomTypeEditorsProperty); } - set { SetValue(CustomTypeEditorsProperty, value); } - } - - #endregion //CustomTypeEditors - - #region IsCategorized - - public static readonly DependencyProperty IsCategorizedProperty = DependencyProperty.Register("IsCategorized", typeof(bool), typeof(PropertyGrid), new UIPropertyMetadata(true, OnIsCategorizedChanged)); - public bool IsCategorized - { - get { return (bool)GetValue(IsCategorizedProperty); } - set { SetValue(IsCategorizedProperty, value); } - } - - private static void OnIsCategorizedChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - PropertyGrid propertyGrid = o as PropertyGrid; - if (propertyGrid != null) - propertyGrid.OnIsCategorizedChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnIsCategorizedChanged(bool oldValue, bool newValue) - { - InitializePropertyGrid(newValue); - } - - #endregion //IsCategorized - - #region NameColumnWidth - - public static readonly DependencyProperty NameColumnWidthProperty = DependencyProperty.Register("NameColumnWidth", typeof(double), typeof(PropertyGrid), new UIPropertyMetadata(150.0)); - public double NameColumnWidth - { - get { return (double)GetValue(NameColumnWidthProperty); } - set { SetValue(NameColumnWidthProperty, value); } - } - - #endregion //NameColumnWidth - - #region Properties - - public static readonly DependencyProperty PropertiesProperty = DependencyProperty.Register("Properties", typeof(PropertyCollection), typeof(PropertyGrid), new UIPropertyMetadata(null)); - public PropertyCollection Properties - { - get { return (PropertyCollection)GetValue(PropertiesProperty); } - private set { SetValue(PropertiesProperty, value); } - } - - #endregion //Properties - - #region SelectedObject - - public static readonly DependencyProperty SelectedObjectProperty = DependencyProperty.Register("SelectedObject", typeof(object), typeof(PropertyGrid), new UIPropertyMetadata(null, OnSelectedObjectChanged)); - public object SelectedObject - { - get { return (object)GetValue(SelectedObjectProperty); } - set { SetValue(SelectedObjectProperty, value); } - } - - private static void OnSelectedObjectChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - PropertyGrid propertyInspector = o as PropertyGrid; - if (propertyInspector != null) - propertyInspector.OnSelectedObjectChanged((object)e.OldValue, (object)e.NewValue); - } - - protected virtual void OnSelectedObjectChanged(object oldValue, object newValue) - { - SetSelectedObjectNameBinding(newValue); - - SelectedObjectType = newValue.GetType(); - - _propertyItemsCache = GetObjectProperties(newValue); - - InitializePropertyGrid(IsCategorized); - } - - #endregion //SelectedObject - - #region SelectedObjectType - - public static readonly DependencyProperty SelectedObjectTypeProperty = DependencyProperty.Register("SelectedObjectType", typeof(Type), typeof(PropertyGrid), new UIPropertyMetadata(null, OnSelectedObjectTypeChanged)); - public Type SelectedObjectType - { - get { return (Type)GetValue(SelectedObjectTypeProperty); } - private set { SetValue(SelectedObjectTypeProperty, value); } - } - - private static void OnSelectedObjectTypeChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - PropertyGrid propertyGrid = o as PropertyGrid; - if (propertyGrid != null) - propertyGrid.OnSelectedObjectTypeChanged((Type)e.OldValue, (Type)e.NewValue); - } - - protected virtual void OnSelectedObjectTypeChanged(Type oldValue, Type newValue) - { - SelectedObjectTypeName = newValue.Name; - } - - #endregion //SelectedObjectType - - #region SelectedObjectTypeName - - public static readonly DependencyProperty SelectedObjectTypeNameProperty = DependencyProperty.Register("SelectedObjectTypeName", typeof(string), typeof(PropertyGrid), new UIPropertyMetadata(string.Empty)); - public string SelectedObjectTypeName - { - get { return (string)GetValue(SelectedObjectTypeNameProperty); } - private set { SetValue(SelectedObjectTypeNameProperty, value); } - } - - #endregion //SelectedObjectTypeName - - #region SelectedObjectName - - public static readonly DependencyProperty SelectedObjectNameProperty = DependencyProperty.Register("SelectedObjectName", typeof(string), typeof(PropertyGrid), new UIPropertyMetadata(string.Empty, OnSelectedObjectNameChanged, OnCoerceSelectedObjectName)); - public string SelectedObjectName - { - get { return (string)GetValue(SelectedObjectNameProperty); } - private set { SetValue(SelectedObjectNameProperty, value); } - } - - private static object OnCoerceSelectedObjectName(DependencyObject o, object baseValue) - { - if (String.IsNullOrEmpty((String)baseValue)) - return ""; - - return baseValue; - } - - private static void OnSelectedObjectNameChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - PropertyGrid propertyGrid = o as PropertyGrid; - if (propertyGrid != null) - propertyGrid.SelectedObjectNameChanged((string)e.OldValue, (string)e.NewValue); - } - - protected virtual void SelectedObjectNameChanged(string oldValue, string newValue) - { - - } - - #endregion //SelectedObjectName - - #region SelectedProperty - - public static readonly DependencyProperty SelectedPropertyProperty = DependencyProperty.Register("SelectedProperty", typeof(PropertyItem), typeof(PropertyGrid), new UIPropertyMetadata(null, OnSelectedPropertyChanged)); - public PropertyItem SelectedProperty - { - get { return (PropertyItem)GetValue(SelectedPropertyProperty); } - internal set { SetValue(SelectedPropertyProperty, value); } - } - - private static void OnSelectedPropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - PropertyGrid propertyGrid = o as PropertyGrid; - if (propertyGrid != null) - propertyGrid.OnSelectedPropertyChanged((PropertyItem)e.OldValue, (PropertyItem)e.NewValue); - } - - protected virtual void OnSelectedPropertyChanged(PropertyItem oldValue, PropertyItem newValue) - { - if (oldValue != null) - oldValue.IsSelected = false; - - if (newValue != null) - newValue.IsSelected = true; - } - - #endregion //SelectedProperty - - #region DisplaySummary - - public static readonly DependencyProperty DisplaySummaryProperty = DependencyProperty.Register("DisplaySummary", typeof(bool), typeof(PropertyGrid), new UIPropertyMetadata(true)); - public bool DisplaySummary - { - get { return (bool)GetValue(DisplaySummaryProperty); } - set { SetValue(DisplaySummaryProperty, value); } - } - - #endregion //DisplaySummary - - #endregion //Properties - - #region Constructors - - static PropertyGrid() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(PropertyGrid), new FrameworkPropertyMetadata(typeof(PropertyGrid))); - } - - #endregion //Constructors - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - _dragThumb = (Thumb)GetTemplateChild("PART_DragThumb"); - _dragThumb.DragDelta += DragThumb_DragDelta; - } - - protected override void OnPreviewKeyDown(KeyEventArgs e) - { - //hitting enter on textbox will update value of underlying source - if (this.SelectedProperty != null && e.Key == Key.Enter && e.OriginalSource is TextBox) - { - BindingExpression be = ((TextBox)e.OriginalSource).GetBindingExpression(TextBox.TextProperty); - be.UpdateSource(); - } - } - - #endregion //Base Class Overrides - - #region Event Handlers - - void DragThumb_DragDelta(object sender, DragDeltaEventArgs e) - { - NameColumnWidth = Math.Max(0, NameColumnWidth + e.HorizontalChange); - } - - #endregion //Event Handlers - - #region Methods - - private void InitializePropertyGrid(bool isCategorized) - { - LoadProperties(isCategorized); - SetDragThumbMargin(isCategorized); - } - - private void LoadProperties(bool isCategorized) - { - if (isCategorized) - Properties = GetCategorizedProperties(_propertyItemsCache); - else - Properties = GetAlphabetizedProperties(_propertyItemsCache); - } - - private List GetObjectProperties(object instance) - { - var propertyItems = new List(); - if (instance == null) - return propertyItems; - - var properties = TypeDescriptor.GetProperties(instance.GetType(), new Attribute[] { new PropertyFilterAttribute(PropertyFilterOptions.All) }); - - try - { - - // Get all properties of the type - propertyItems.AddRange(properties.Cast(). - Where(p => p.IsBrowsable && p.Name != "GenericParameterAttributes"). - Select(property => CreatePropertyItem(property, instance, this))); - } - catch (Exception ex) - { - } - - return propertyItems; - } - - private PropertyItem CreatePropertyItem(PropertyDescriptor property, object instance, PropertyGrid grid) - { - PropertyItem propertyItem = new PropertyItem(instance, property, grid); - - var binding = new Binding(property.Name) - { - Source = instance, - ValidatesOnExceptions = true, - ValidatesOnDataErrors = true, - Mode = propertyItem.IsWriteable ? BindingMode.TwoWay : BindingMode.OneWay - }; - propertyItem.SetBinding(PropertyItem.ValueProperty, binding); - - ITypeEditor editor = null; - - //check for custom editor - if (CustomTypeEditors.Count > 0) - { - //first check if the custom editor is type based - ICustomTypeEditor customEditor = CustomTypeEditors[propertyItem.PropertyType]; - if (customEditor == null) - { - //must be property based - customEditor = CustomTypeEditors[propertyItem.Name]; - } - - if (customEditor != null) - editor = customEditor.Editor; - } - - try - { - //no custom editor found - if (editor == null) - { - if (propertyItem.IsReadOnly) - editor = new TextBlockEditor(); - else if (propertyItem.PropertyType == typeof(bool)) - editor = new CheckBoxEditor(); - else if (propertyItem.PropertyType == typeof(decimal) || propertyItem.PropertyType == typeof(decimal?)) - editor = new DecimalUpDownEditor(); - else if (propertyItem.PropertyType == typeof(double) || propertyItem.PropertyType == typeof(double?)) - editor = new DoubleUpDownEditor(); - else if (propertyItem.PropertyType == typeof(int) || propertyItem.PropertyType == typeof(int?)) - editor = new IntegerUpDownEditor(); - else if (propertyItem.PropertyType == typeof(DateTime)) - editor = new DateTimeUpDownEditor(); - else if (propertyItem.PropertyType.IsEnum) - editor = new EnumComboBoxEditor(); - else if (propertyItem.PropertyType == typeof(FontFamily) || propertyItem.PropertyType == typeof(FontWeight) || propertyItem.PropertyType == typeof(FontStyle) || propertyItem.PropertyType == typeof(FontStretch)) - editor = new FontComboBoxEditor(); - else - editor = new TextBoxEditor(); - } - } - catch (Exception ex) - { - - } - - editor.Attach(propertyItem); - propertyItem.Editor = editor.ResolveEditor(); - - return propertyItem; - } - - private static PropertyCollection GetCategorizedProperties(List propertyItems) - { - PropertyCollection propertyCollection = new PropertyCollection(); - - CollectionViewSource src = new CollectionViewSource { Source = propertyItems }; - src.GroupDescriptions.Add(new PropertyGroupDescription("Category")); - src.SortDescriptions.Add(new SortDescription("Category", ListSortDirection.Ascending)); - src.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending)); - - foreach (CollectionViewGroup item in src.View.Groups) - { - PropertyCategoryItem propertyCategoryItem = new PropertyCategoryItem { Category = item.Name.ToString() }; - foreach (var propertyitem in item.Items) - { - propertyCategoryItem.Properties.Add((PropertyItem)propertyitem); - } - propertyCollection.Add(propertyCategoryItem); - } - - return propertyCollection; - } - - private static PropertyCollection GetAlphabetizedProperties(List propertyItems) - { - PropertyCollection propertyCollection = new PropertyCollection(); - - if (propertyItems == null) - return propertyCollection; - - CollectionViewSource src = new CollectionViewSource { Source = propertyItems }; - src.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending)); - - foreach (var item in ((ListCollectionView)(src.View))) - { - propertyCollection.Add((PropertyItem)item); - } - - return propertyCollection; - } - - private void SetSelectedObjectNameBinding(object selectedObject) - { - if (selectedObject is FrameworkElement) - { - var binding = new Binding("Name"); - binding.Source = selectedObject; - binding.Mode = BindingMode.OneWay; - BindingOperations.SetBinding(this, PropertyGrid.SelectedObjectNameProperty, binding); - } - } - - private void SetDragThumbMargin(bool isCategorized) - { - if (_dragThumb == null) - return; - - if (isCategorized) - _dragThumb.Margin = new Thickness(6, 0, 0, 0); - else - _dragThumb.Margin = new Thickness(-1, 0, 0, 0); - } - - #endregion //Methods - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyItem.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyItem.cs deleted file mode 100644 index fa3f2be7..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyItem.cs +++ /dev/null @@ -1,258 +0,0 @@ -using System; -using System.Linq; -using System.ComponentModel; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Input; -using Microsoft.Windows.Controls.PropertyGrid.Commands; -using System.Windows.Markup.Primitives; - -namespace Microsoft.Windows.Controls.PropertyGrid -{ - public class PropertyItem : Control - { - #region Members - - private DependencyPropertyDescriptor _dpDescriptor; - private MarkupObject _markupObject; - - #endregion //Members - - #region Properties - - #region Category - - public static readonly DependencyProperty CategoryProperty = DependencyProperty.Register("Category", typeof(string), typeof(PropertyItem), new UIPropertyMetadata(string.Empty)); - public string Category - { - get { return (string)GetValue(CategoryProperty); } - set { SetValue(CategoryProperty, value); } - } - - #endregion //Category - - public string Description { get { return PropertyDescriptor.Description; } } - - #region Editor - - public static readonly DependencyProperty EditorProperty = DependencyProperty.Register("Editor", typeof(FrameworkElement), typeof(PropertyItem), new UIPropertyMetadata(null)); - public FrameworkElement Editor - { - get { return (FrameworkElement)GetValue(EditorProperty); } - set { SetValue(EditorProperty, value); } - } - - #endregion //Editor - - private object _instance; - public object Instance - { - get - { - return _instance; - } - private set - { - _instance = value; - _markupObject = MarkupWriter.GetMarkupObjectFor(_instance); - } - } - - /// - /// Gets if the property is data bound - /// - public bool IsDataBound - { - get - { - var dependencyObject = Instance as DependencyObject; - if (dependencyObject != null && _dpDescriptor != null) - return BindingOperations.GetBindingExpressionBase(dependencyObject, _dpDescriptor.DependencyProperty) != null; - - return false; - } - } - - public bool IsDynamicResource - { - get - { - var markupProperty = _markupObject.Properties.Where(p => p.Name == PropertyDescriptor.Name).FirstOrDefault(); - if (markupProperty != null) - return markupProperty.Value is DynamicResourceExtension; - return false; - } - } - - public bool HasResourceApplied - { - //TODO: need to find a better way to determine if a StaticResource has been applied to any property not just a style - get - { - var markupProperty = _markupObject.Properties.Where(p => p.Name == PropertyDescriptor.Name).FirstOrDefault(); - if (markupProperty != null) - return markupProperty.Value is Style; - - return false; - } - } - - public bool IsReadOnly { get { return PropertyDescriptor.IsReadOnly; } } - - #region IsSelected - - public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register("IsSelected", typeof(bool), typeof(PropertyItem), new UIPropertyMetadata(false, OnIsSelectedChanged)); - public bool IsSelected - { - get { return (bool)GetValue(IsSelectedProperty); } - set { SetValue(IsSelectedProperty, value); } - } - - private static void OnIsSelectedChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - PropertyItem propertyItem = o as PropertyItem; - if (propertyItem != null) - propertyItem.OnIsSelectedChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnIsSelectedChanged(bool oldValue, bool newValue) - { - if (newValue) - PropertyGrid.SelectedProperty = this; - } - - #endregion //IsSelected - - public bool IsWriteable { get { return !IsReadOnly; } } - - private PropertyDescriptor _propertyDescriptor; - public PropertyDescriptor PropertyDescriptor - { - get - { - return _propertyDescriptor; - } - private set - { - _propertyDescriptor = value; - Name = _propertyDescriptor.Name; - Category = _propertyDescriptor.Category; - _dpDescriptor = DependencyPropertyDescriptor.FromProperty(_propertyDescriptor); - } - } - - public PropertyGrid PropertyGrid { get; private set; } - - public Type PropertyType { get { return PropertyDescriptor.PropertyType; } } - - public ICommand ResetValueCommand { get; private set; } - - #region Value - - public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(object), typeof(PropertyItem), new UIPropertyMetadata(null, OnValueChanged)); - public object Value - { - get { return (object)GetValue(ValueProperty); } - set { SetValue(ValueProperty, value); } - } - - private static void OnValueChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - PropertyItem propertyItem = o as PropertyItem; - if (propertyItem != null) - propertyItem.OnValueChanged((object)e.OldValue, (object)e.NewValue); - } - - protected virtual void OnValueChanged(object oldValue, object newValue) - { - // TODO: Add your property changed side-effects. Descendants can override as well. - } - - #endregion //Value - - /// - /// Gets the value source. - /// - public BaseValueSource ValueSource - { - get - { - var dependencyObject = Instance as DependencyObject; - if (_dpDescriptor != null && dependencyObject != null) - return DependencyPropertyHelper.GetValueSource(dependencyObject, _dpDescriptor.DependencyProperty).BaseValueSource; - - return BaseValueSource.Unknown; - } - } - - #endregion //Properties - - #region Constructor - - static PropertyItem() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(PropertyItem), new FrameworkPropertyMetadata(typeof(PropertyItem))); - } - - public PropertyItem(object instance, PropertyDescriptor property, PropertyGrid propertyGrid) - { - - PropertyDescriptor = property; - PropertyGrid = propertyGrid; - Instance = instance; - - CommandBindings.Add(new CommandBinding(PropertyItemCommands.ResetValue, ExecuteResetValueCommand, CanExecuteResetValueCommand)); - - AddHandler(Mouse.MouseDownEvent, new MouseButtonEventHandler(PropertyItem_MouseDown), true); - AddHandler(Mouse.PreviewMouseDownEvent, new MouseButtonEventHandler(PropertyItem_PreviewMouseDown), true); - } - - #endregion //Constructor - - #region Event Handlers - - void PropertyItem_MouseDown(object sender, MouseButtonEventArgs e) - { - if (Editor != null) - Editor.Focus(); - - e.Handled = true; - } - - void PropertyItem_PreviewMouseDown(object sender, MouseButtonEventArgs e) - { - IsSelected = true; - - //if it is a comboBox then the selection will not take when Focus is called - if (!(e.Source is ComboBox)) - Focus(); - } - - #endregion //Event Handlers - - #region Commands - - private void ExecuteResetValueCommand(object sender, ExecutedRoutedEventArgs e) - { - if (PropertyDescriptor.CanResetValue(Instance)) - PropertyDescriptor.ResetValue(Instance); - - //TODO: notify UI that the ValueSource may have changed to update the icon - } - - private void CanExecuteResetValueCommand(object sender, CanExecuteRoutedEventArgs e) - { - bool canExecute = false; - - if (PropertyDescriptor.CanResetValue(Instance) && !PropertyDescriptor.IsReadOnly) - { - canExecute = true; - } - - e.CanExecute = canExecute; - } - - #endregion //Commands - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml deleted file mode 100644 index f851614b..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/ITextFormatter.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/ITextFormatter.cs deleted file mode 100644 index f8e22d41..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/ITextFormatter.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Windows.Documents; - -namespace Microsoft.Windows.Controls -{ - public interface ITextFormatter - { - string GetText(FlowDocument document); - void SetText(FlowDocument document, string text); - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/PlainTextFormatter.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/PlainTextFormatter.cs deleted file mode 100644 index 1c792a32..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/PlainTextFormatter.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Windows.Documents; - -namespace Microsoft.Windows.Controls -{ - /// - /// Formats the RichTextBox text as plain text - /// - public class PlainTextFormatter : ITextFormatter - { - public string GetText(FlowDocument document) - { - return new TextRange(document.ContentStart, document.ContentEnd).Text; - } - - public void SetText(FlowDocument document, string text) - { - new TextRange(document.ContentStart, document.ContentEnd).Text = text; - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/RtfFormatter.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/RtfFormatter.cs deleted file mode 100644 index 9b2b895c..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/RtfFormatter.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Text; -using System.Windows.Documents; -using System.IO; -using System.Windows; - -namespace Microsoft.Windows.Controls -{ - /// - /// Formats the RichTextBox text as RTF - /// - public class RtfFormatter : ITextFormatter - { - public string GetText(FlowDocument document) - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream()) - { - tr.Save(ms, DataFormats.Rtf); - return ASCIIEncoding.Default.GetString(ms.ToArray()); - } - } - - public void SetText(FlowDocument document, string text) - { - try - { - //if the text is null/empty clear the contents of the RTB. If you were to pass a null/empty string - //to the TextRange.Load method an exception would occur. - if (String.IsNullOrEmpty(text)) - { - document.Blocks.Clear(); - } - else - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes(text))) - { - tr.Load(ms, DataFormats.Rtf); - } - } - } - catch - { - throw new InvalidDataException("Data provided is not in the correct RTF format."); - } - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/XamlFormatter.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/XamlFormatter.cs deleted file mode 100644 index 250f391b..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/Formatters/XamlFormatter.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Text; -using System.IO; -using System.Windows.Documents; -using System.Windows; - -namespace Microsoft.Windows.Controls -{ - /// - /// Formats the RichTextBox text as Xaml - /// - public class XamlFormatter : ITextFormatter - { - public string GetText(System.Windows.Documents.FlowDocument document) - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream()) - { - tr.Save(ms, DataFormats.Xaml); - return ASCIIEncoding.Default.GetString(ms.ToArray()); - } - } - - public void SetText(System.Windows.Documents.FlowDocument document, string text) - { - try - { - //if the text is null/empty clear the contents of the RTB. If you were to pass a null/empty string - //to the TextRange.Load method an exception would occur. - if (String.IsNullOrEmpty(text)) - { - document.Blocks.Clear(); - } - else - { - TextRange tr = new TextRange(document.ContentStart, document.ContentEnd); - using (MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes(text))) - { - tr.Load(ms, DataFormats.Xaml); - } - } - } - catch - { - throw new InvalidDataException("Data provided is not in the correct Xaml format."); - } - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/RichTextBox.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/RichTextBox.cs deleted file mode 100644 index bb4f57a7..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/RichTextBox.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Data; - -namespace Microsoft.Windows.Controls -{ - public class RichTextBox : System.Windows.Controls.RichTextBox - { - #region Private Members - - private bool _textSetInternally; - - #endregion //Private Members - - #region Constructors - - public RichTextBox() - { - Loaded += RichTextBox_Loaded; - } - - public RichTextBox(System.Windows.Documents.FlowDocument document) - : base(document) - { - - } - - #endregion //Constructors - - #region Properties - - #region Text - - public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(RichTextBox), new FrameworkPropertyMetadata(String.Empty, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnTextPropertyChanged, CoerceTextProperty, true, UpdateSourceTrigger.LostFocus)); - public string Text - { - get { return (string)GetValue(TextProperty); } - set { SetValue(TextProperty, value); } - } - - private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - RichTextBox rtb = (RichTextBox)d; - - // if the text is not being set internally then load the text into the RichTextBox - if (!rtb._textSetInternally) - rtb.TextFormatter.SetText(rtb.Document, (string)e.NewValue); - } - - private static object CoerceTextProperty(DependencyObject d, object value) - { - return value ?? ""; - } - - #endregion //Text - - #region TextFormatter - - private ITextFormatter _textFormatter; - /// - /// The ITextFormatter the is used to format the text of the RichTextBox. - /// Deafult formatter is the RtfFormatter - /// - public ITextFormatter TextFormatter - { - get - { - if (_textFormatter == null) - _textFormatter = new RtfFormatter(); //default is rtf - - return _textFormatter; - } - set - { - if (_textFormatter != value) - { - _textFormatter = value; - _textFormatter.SetText(Document, Text); - } - } - } - - #endregion //TextFormatter - - #endregion //Properties - - #region Methods - - private void UpdateText() - { - _textSetInternally = true; - - Text = TextFormatter.GetText(Document); - - _textSetInternally = false; - } - - /// - /// Clears the content of the RichTextBox. - /// - public void Clear() - { - Document.Blocks.Clear(); - } - - #endregion //Methods - - #region Event Hanlders - - private void RichTextBox_Loaded(object sender, RoutedEventArgs e) - { - Binding binding = BindingOperations.GetBinding(this, TextProperty); - - if (binding != null) - { - if (binding.UpdateSourceTrigger == UpdateSourceTrigger.Default || binding.UpdateSourceTrigger == UpdateSourceTrigger.LostFocus) - { - PreviewLostKeyboardFocus += (o, ea) => UpdateText(); - } - else - { - TextChanged += (o, ea) => UpdateText(); - } - } - } - - #endregion //Event Hanlders - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/IRichTextBoxFormatBar.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/IRichTextBoxFormatBar.cs deleted file mode 100644 index 46c38afe..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/IRichTextBoxFormatBar.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - public interface IRichTextBoxFormatBar - { - /// - /// Represents the RichTextBox that will be the target for all text manipulations in the format bar. - /// - global::System.Windows.Controls.RichTextBox Target { get; set; } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png deleted file mode 100644 index 8fb36a1a..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bullets16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bullets16.png deleted file mode 100644 index 73e7c15e..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bullets16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png deleted file mode 100644 index 1030a021..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/FontColorPicker16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/FontColorPicker16.png deleted file mode 100644 index d9207308..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/FontColorPicker16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png deleted file mode 100644 index 8259a9e1..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png deleted file mode 100644 index c5499bce..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png deleted file mode 100644 index 51dffb73..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Numbering16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Numbering16.png deleted file mode 100644 index 03f6fde2..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Numbering16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png deleted file mode 100644 index cb8e400a..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png deleted file mode 100644 index 4a3783f2..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png deleted file mode 100644 index 72689482..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml deleted file mode 100644 index ae4b1845..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml +++ /dev/null @@ -1,427 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs deleted file mode 100644 index 98f39321..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs +++ /dev/null @@ -1,232 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Controls.Primitives; -using Microsoft.Windows.Controls.Core; - -namespace Microsoft.Windows.Controls -{ - /// - /// Interaction logic for RichTextBoxFormatBar.xaml - /// - public partial class RichTextBoxFormatBar : UserControl, IRichTextBoxFormatBar - { - #region Properties - - #region RichTextBox - - public static readonly DependencyProperty TargetProperty = DependencyProperty.Register("Target", typeof(global::System.Windows.Controls.RichTextBox), typeof(RichTextBoxFormatBar), new PropertyMetadata(null, OnRichTextBoxPropertyChanged)); - public global::System.Windows.Controls.RichTextBox Target - { - get { return (global::System.Windows.Controls.RichTextBox)GetValue(TargetProperty); } - set { SetValue(TargetProperty, value); } - } - - private static void OnRichTextBoxPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - RichTextBoxFormatBar formatBar = d as RichTextBoxFormatBar; - } - - #endregion //RichTextBox - - public static double[] FontSizes - { - get - { - return new double[] { - 3.0, 4.0, 5.0, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, - 10.0, 10.5, 11.0, 11.5, 12.0, 12.5, 13.0, 13.5, 14.0, 15.0, - 16.0, 17.0, 18.0, 19.0, 20.0, 22.0, 24.0, 26.0, 28.0, 30.0, - 32.0, 34.0, 36.0, 38.0, 40.0, 44.0, 48.0, 52.0, 56.0, 60.0, 64.0, 68.0, 72.0, 76.0, - 80.0, 88.0, 96.0, 104.0, 112.0, 120.0, 128.0, 136.0, 144.0 - }; - } - } - - #endregion - - #region Constructors - - public RichTextBoxFormatBar() - { - InitializeComponent(); - Loaded += FormatToolbar_Loaded; - - _cmbFontFamilies.ItemsSource = Fonts.SystemFontFamilies; - _cmbFontSizes.ItemsSource = FontSizes; - } - - #endregion //Constructors - - #region Event Hanlders - - void FormatToolbar_Loaded(object sender, RoutedEventArgs e) - { - UpdateVisualState(); - } - - private void FontFamily_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (e.AddedItems.Count == 0) - return; - - FontFamily editValue = (FontFamily)e.AddedItems[0]; - ApplyPropertyValueToSelectedText(TextElement.FontFamilyProperty, editValue); - } - - private void FontSize_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (e.AddedItems.Count == 0) - return; - - ApplyPropertyValueToSelectedText(TextElement.FontSizeProperty, e.AddedItems[0]); - } - - void FontColor_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) - { - Color selectedColor = (Color)e.NewValue; - ApplyPropertyValueToSelectedText(TextElement.ForegroundProperty, new SolidColorBrush(selectedColor)); - } - - private void FontBackgroundColor_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) - { - Color selectedColor = (Color)e.NewValue; - ApplyPropertyValueToSelectedText(TextElement.BackgroundProperty, new SolidColorBrush(selectedColor)); - } - - private void Bullets_Clicked(object sender, RoutedEventArgs e) - { - if (BothSelectionListsAreChecked()) - { - _btnNumbers.IsChecked = false; - } - } - - private void Numbers_Clicked(object sender, RoutedEventArgs e) - { - if (BothSelectionListsAreChecked()) - { - _btnBullets.IsChecked = false; - } - } - - private void DragWidget_DragDelta(object sender, DragDeltaEventArgs e) - { - ProcessMove(e); - } - - #endregion //Event Hanlders - - #region Methods - - private void UpdateVisualState() - { - UpdateToggleButtonState(); - UpdateSelectedFontFamily(); - UpdateSelectedFontSize(); - UpdateFontColor(); - UpdateFontBackgroundColor(); - UpdateSelectionListType(); - } - - private void UpdateToggleButtonState() - { - UpdateItemCheckedState(_btnBold, TextElement.FontWeightProperty, FontWeights.Bold); - UpdateItemCheckedState(_btnItalic, TextElement.FontStyleProperty, FontStyles.Italic); - UpdateItemCheckedState(_btnUnderline, Inline.TextDecorationsProperty, TextDecorations.Underline); - - UpdateItemCheckedState(_btnAlignLeft, Paragraph.TextAlignmentProperty, TextAlignment.Left); - UpdateItemCheckedState(_btnAlignCenter, Paragraph.TextAlignmentProperty, TextAlignment.Center); - UpdateItemCheckedState(_btnAlignRight, Paragraph.TextAlignmentProperty, TextAlignment.Right); - } - - void UpdateItemCheckedState(ToggleButton button, DependencyProperty formattingProperty, object expectedValue) - { - object currentValue = Target.Selection.GetPropertyValue(formattingProperty); - button.IsChecked = (currentValue == DependencyProperty.UnsetValue) ? false : currentValue != null && currentValue.Equals(expectedValue); - } - - private void UpdateSelectedFontFamily() - { - object value = Target.Selection.GetPropertyValue(TextElement.FontFamilyProperty); - FontFamily currentFontFamily = (FontFamily)((value == DependencyProperty.UnsetValue) ? null : value); - if (currentFontFamily != null) - { - _cmbFontFamilies.SelectedItem = currentFontFamily; - } - } - - private void UpdateSelectedFontSize() - { - object value = Target.Selection.GetPropertyValue(TextElement.FontSizeProperty); - _cmbFontSizes.SelectedValue = (value == DependencyProperty.UnsetValue) ? null : value; - } - - private void UpdateFontColor() - { - object value = Target.Selection.GetPropertyValue(TextElement.ForegroundProperty); - Color currentColor = (Color)((value == DependencyProperty.UnsetValue) ? Colors.Black : ((SolidColorBrush)value).Color); - _cmbFontColor.SelectedColor = currentColor; - } - - private void UpdateFontBackgroundColor() - { - object value = Target.Selection.GetPropertyValue(TextElement.BackgroundProperty); - Color currentColor = (Color)((value == null || value == DependencyProperty.UnsetValue) ? default(Color) : ((SolidColorBrush)value).Color); - _cmbFontBackgroundColor.SelectedColor = currentColor; - } - - /// - /// Updates the visual state of the List styles, such as Numbers and Bullets. - /// - private void UpdateSelectionListType() - { - //uncheck both - _btnBullets.IsChecked = false; - _btnNumbers.IsChecked = false; - - Paragraph startParagraph = Target.Selection.Start.Paragraph; - Paragraph endParagraph = Target.Selection.End.Paragraph; - if (startParagraph != null && endParagraph != null && (startParagraph.Parent is ListItem) && (endParagraph.Parent is ListItem) && object.ReferenceEquals(((ListItem)startParagraph.Parent).List, ((ListItem)endParagraph.Parent).List)) - { - TextMarkerStyle markerStyle = ((ListItem)startParagraph.Parent).List.MarkerStyle; - if (markerStyle == TextMarkerStyle.Disc) //bullets - { - _btnBullets.IsChecked = true; - } - else if (markerStyle == TextMarkerStyle.Decimal) //numbers - { - _btnNumbers.IsChecked = true; - } - } - } - - /// - /// Checks to see if both selection lists are checked. (Bullets and Numbers) - /// - /// - private bool BothSelectionListsAreChecked() - { - return _btnBullets.IsChecked == true && _btnNumbers.IsChecked == true; - } - - void ApplyPropertyValueToSelectedText(DependencyProperty formattingProperty, object value) - { - if (value == null) - return; - - Target.Selection.ApplyPropertyValue(formattingProperty, value); - } - - private void ProcessMove(DragDeltaEventArgs e) - { - AdornerLayer layer = AdornerLayer.GetAdornerLayer(Target); - UIElementAdorner adorner = layer.GetAdorners(Target)[0] as UIElementAdorner; - adorner.SetOffsets(adorner.OffsetLeft + e.HorizontalChange, adorner.OffsetTop + e.VerticalChange); - } - - #endregion //Methods - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBarManager.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBarManager.cs deleted file mode 100644 index f5a8f0ea..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBarManager.cs +++ /dev/null @@ -1,196 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using Microsoft.Windows.Controls.Core; -using System.Windows.Input; - -namespace Microsoft.Windows.Controls -{ - public class RichTextBoxFormatBarManager : DependencyObject - { - #region Members - - private global::System.Windows.Controls.RichTextBox _richTextBox; - private UIElementAdorner _adorner; - private IRichTextBoxFormatBar _toolbar; - - #endregion //Members - - #region Properties - - #region FormatBar - - public static readonly DependencyProperty FormatBarProperty = DependencyProperty.RegisterAttached("FormatBar", typeof(IRichTextBoxFormatBar), typeof(RichTextBox), new PropertyMetadata(null, OnFormatBarPropertyChanged)); - public static void SetFormatBar(UIElement element, IRichTextBoxFormatBar value) - { - element.SetValue(FormatBarProperty, value); - } - public static IRichTextBoxFormatBar GetFormatBar(UIElement element) - { - return (IRichTextBoxFormatBar)element.GetValue(FormatBarProperty); - } - - private static void OnFormatBarPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - global::System.Windows.Controls.RichTextBox rtb = d as global::System.Windows.Controls.RichTextBox; - if (rtb == null) - throw new Exception("A FormatBar can only be applied to a RichTextBox."); - - RichTextBoxFormatBarManager manager = new RichTextBoxFormatBarManager(); - manager.AttachFormatBarToRichtextBox(rtb, e.NewValue as IRichTextBoxFormatBar); - } - - #endregion //FormatBar - - public bool IsAdornerVisible - { - get { return _adorner.Visibility == Visibility.Visible; } - } - - #endregion //Properties - - #region Event Handlers - - void RichTextBox_MouseButtonUp(object sender, MouseButtonEventArgs e) - { - if (e.ChangedButton == MouseButton.Left && e.LeftButton == MouseButtonState.Released) - { - TextRange selectedText = new TextRange(_richTextBox.Selection.Start, _richTextBox.Selection.End); -#if !VS2008 - if (selectedText.Text.Length > 0 && !String.IsNullOrWhiteSpace(selectedText.Text)) - ShowAdorner(); -#else - if (selectedText.Text.Length > 0 && !String.IsNullOrEmpty(selectedText.Text)) - ShowAdorner(); -#endif - else - HideAdorner(); - - e.Handled = true; - } - else - HideAdorner(); - } - - void RichTextBox_PreviewMouseMove(object sender, MouseEventArgs e) - { - //if the mouse moves outside the richtextbox bounds hide the adorner - //though this deosn't always work, especially if the user moves the mouse very quickly. - //need to find a better solution, but this will work for now. - Point p = e.GetPosition(_richTextBox); - if (p.X <= 5.0 || p.X >= _richTextBox.ActualWidth - 5 || p.Y <= 3.0 || p.Y >= _richTextBox.ActualHeight - 3) - HideAdorner(); - } - - void RichTextBox_TextChanged(object sender, TextChangedEventArgs e) - { - //this fixes the bug when applying text transformations the text would lose it's highlight. That was because the RichTextBox was losing focus - //so we just give it focus again and it seems to do the trick of re-highlighting it. - if (!_richTextBox.IsFocused && !_richTextBox.Selection.IsEmpty) - _richTextBox.Focus(); - } - - #endregion //Event Handlers - - #region Methods - - /// - /// Attaches a FormatBar to a RichtextBox - /// - /// The RichtextBox to attach to. - /// The Formatbar to attach. - private void AttachFormatBarToRichtextBox(global::System.Windows.Controls.RichTextBox richTextBox, IRichTextBoxFormatBar formatBar) - { - _richTextBox = richTextBox; - _richTextBox.PreviewMouseMove += RichTextBox_PreviewMouseMove; - //we cannot use the PreviewMouseLeftButtonUp event because of selection bugs. - //we cannot use the MouseLeftButtonUp event because it is handled by the RichTextBox and does not bubble up to here, so we must - //add a hander to the MouseUpEvent using the Addhandler syntax, and specify to listen for handled events too. - _richTextBox.AddHandler(Mouse.MouseUpEvent, new MouseButtonEventHandler(RichTextBox_MouseButtonUp), true); - _richTextBox.TextChanged += RichTextBox_TextChanged; - - _adorner = new UIElementAdorner(_richTextBox); - - formatBar.Target = _richTextBox; - _toolbar = formatBar; - } - - /// - /// Shows the FormatBar - /// - void ShowAdorner() - { - if (_adorner.Visibility == Visibility.Visible) - return; - - VerifyAdornerLayer(); - - Control adorningEditor = _toolbar as Control; - - if (_adorner.Child == null) - _adorner.Child = adorningEditor; - - _adorner.Visibility = Visibility.Visible; - - PositionFormatBar(adorningEditor); - } - - /// - /// Positions the FormatBar so that is does not go outside the bounds of the RichTextBox or covers the selected text - /// - /// - private void PositionFormatBar(Control adorningEditor) - { - Point mousePosition = Mouse.GetPosition(_richTextBox); - - double left = mousePosition.X; - double top = (mousePosition.Y - 15) - adorningEditor.ActualHeight; - - //top - if (top < 0) - { - top = mousePosition.Y + 10; - } - - //right boundary - if (left + adorningEditor.ActualWidth > _richTextBox.ActualWidth - 20) - { - left = left - (adorningEditor.ActualWidth - (_richTextBox.ActualWidth - left)); - } - - _adorner.SetOffsets(left, top); - } - - /// - /// Ensures that the IRichTextFormatBar is in the adorner layer. - /// - /// True if the IRichTextFormatBar is in the adorner layer, else false. - bool VerifyAdornerLayer() - { - if (_adorner.Parent != null) - return true; - - AdornerLayer layer = AdornerLayer.GetAdornerLayer(_richTextBox); - if (layer == null) - return false; - - layer.Add(_adorner); - return true; - } - - /// - /// Hides the IRichTextFormatBar that is in the adornor layer. - /// - void HideAdorner() - { - if (IsAdornerVisible) - { - _adorner.Visibility = Visibility.Collapsed; - //_adorner.Child = null; - } - } - - #endregion //Methods - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/SplitButton/Implementation/SplitButton.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/SplitButton/Implementation/SplitButton.cs deleted file mode 100644 index e667053d..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/SplitButton/Implementation/SplitButton.cs +++ /dev/null @@ -1,283 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using System.Windows.Controls.Primitives; -using System.ComponentModel; - -namespace Microsoft.Windows.Controls -{ - public class SplitButton : ContentControl, ICommandSource - { - #region Members - Button _actionButton; - ToggleButton _toggleButton; - Popup _popup; - - #endregion //Members - - #region Constructors - - static SplitButton() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(SplitButton), new FrameworkPropertyMetadata(typeof(SplitButton))); - } - - public SplitButton() - { - Keyboard.AddKeyDownHandler(this, OnKeyDown); - Mouse.AddPreviewMouseDownOutsideCapturedElementHandler(this, OnMouseDownOutsideCapturedElement); - } - - #endregion //Constructors - - #region Properties - - #region DropDownContent - - public static readonly DependencyProperty DropDownContentProperty = DependencyProperty.Register("DropDownContent", typeof(object), typeof(SplitButton), new UIPropertyMetadata(null, OnDropDownContentChanged)); - public object DropDownContent - { - get { return (object)GetValue(DropDownContentProperty); } - set { SetValue(DropDownContentProperty, value); } - } - - private static void OnDropDownContentChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - SplitButton splitButton = o as SplitButton; - if (splitButton != null) - splitButton.OnDropDownContentChanged((object)e.OldValue, (object)e.NewValue); - } - - protected virtual void OnDropDownContentChanged(object oldValue, object newValue) - { - // TODO: Add your property changed side-effects. Descendants can override as well. - } - - #endregion //DropDownContent - - #region IsOpen - - public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register("IsOpen", typeof(bool), typeof(SplitButton), new UIPropertyMetadata(false, OnIsOpenChanged)); - public bool IsOpen - { - get { return (bool)GetValue(IsOpenProperty); } - set { SetValue(IsOpenProperty, value); } - } - - private static void OnIsOpenChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - SplitButton splitButton = o as SplitButton; - if (splitButton != null) - splitButton.OnIsOpenChanged((bool)e.OldValue, (bool)e.NewValue); - } - - protected virtual void OnIsOpenChanged(bool oldValue, bool newValue) - { - // TODO: check for cancel event args on an OnOpening event - } - - #endregion //IsOpen - - #endregion //Properties - - #region Events - - public static readonly RoutedEvent ClickEvent = EventManager.RegisterRoutedEvent("Click", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(SplitButton)); - public event RoutedEventHandler Click - { - add { AddHandler(ClickEvent, value); } - remove { RemoveHandler(ClickEvent, value); } - } - - #endregion //Events - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - _actionButton = (Button)GetTemplateChild("PART_ActionButton"); - _actionButton.Click += ActionButton_Click; - - _toggleButton = (ToggleButton)GetTemplateChild("PART_ToggleButton"); - - _popup = (Popup)GetTemplateChild("PART_Popup"); - //_popup.Opened += Popup_Opened; - } - - #endregion //Base Class Overrides - - #region Event Handlers - - void ActionButton_Click(object sender, RoutedEventArgs e) - { - OnClick(); - } - - void Popup_Opened(object sender, EventArgs e) - { - - } - - private void OnKeyDown(object sender, KeyEventArgs e) - { - switch (e.Key) - { - case Key.Escape: - { - CloseDropDown(); - break; - } - } - } - - private void OnMouseDownOutsideCapturedElement(object sender, MouseButtonEventArgs e) - { - CloseDropDown(); - } - - void CanExecuteChanged(object sender, EventArgs e) - { - if (Command != null) - { - RoutedCommand command = Command as RoutedCommand; - - // If a RoutedCommand. - if (command != null) - IsEnabled = command.CanExecute(CommandParameter, CommandTarget) ? true : false; - // If a not RoutedCommand. - else - IsEnabled = Command.CanExecute(CommandParameter) ? true : false; - } - } - - #endregion //Event Handlers - - #region Methods - - #region Protected - - protected virtual void OnClick() - { - RaiseClickEvent(); - RaiseCommand(); - } - #endregion //Protected - - #region Private - - /// - /// Raises the click event. - /// - private void RaiseClickEvent() - { - RoutedEventArgs args = new RoutedEventArgs(SplitButton.ClickEvent, this); - RaiseEvent(args); - } - - /// - /// Raises the command's Execute event. - /// - private void RaiseCommand() - { - if (Command != null) - { - RoutedCommand routedCommand = Command as RoutedCommand; - - if (routedCommand == null) - ((ICommand)Command).Execute(CommandParameter); - else - routedCommand.Execute(CommandParameter, CommandTarget); - } - } - - /// - /// Unhooks a command from the Command property. - /// - /// The old command. - /// The new command. - private void UnhookCommand(ICommand oldCommand, ICommand newCommand) - { - EventHandler handler = CanExecuteChanged; - oldCommand.CanExecuteChanged -= handler; - } - - /// - /// Hooks up a command to the CanExecuteChnaged event handler. - /// - /// The old command. - /// The new command. - private void HookUpCommand(ICommand oldCommand, ICommand newCommand) - { - EventHandler handler = new EventHandler(CanExecuteChanged); - canExecuteChangedHandler = handler; - if (newCommand != null) - newCommand.CanExecuteChanged += canExecuteChangedHandler; - } - - /// - /// Closes the drop down. - /// - private void CloseDropDown() - { - if (IsOpen) - IsOpen = false; - ReleaseMouseCapture(); - } - - #endregion //Private - - #endregion //Methods - - #region ICommandSource Members - - // Keeps a copy of the CanExecuteChnaged handler so it doesn't get garbage collected. - private static EventHandler canExecuteChangedHandler; - - #region Command - - public static readonly DependencyProperty CommandProperty = DependencyProperty.Register("Command", typeof(ICommand), typeof(SplitButton), new PropertyMetadata((ICommand)null, OnCommandChanged)); - [TypeConverter(typeof(CommandConverter))] - public ICommand Command - { - get { return (ICommand)GetValue(CommandProperty); } - set { SetValue(CommandProperty, value); } - } - - private static void OnCommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - SplitButton splitButton = d as SplitButton; - if (splitButton != null) - splitButton.OnCommandChanged((ICommand)e.OldValue, (ICommand)e.NewValue); - } - - protected virtual void OnCommandChanged(ICommand oldValue, ICommand newValue) - { - // If old command is not null, then we need to remove the handlers. - if (oldValue != null) - UnhookCommand(oldValue, newValue); - - HookUpCommand(oldValue, newValue); - } - - #endregion //Command - - public static readonly DependencyProperty CommandParameterProperty = DependencyProperty.Register("CommandParameter", typeof(object), typeof(SplitButton), new PropertyMetadata(null)); - public object CommandParameter - { - get { return GetValue(CommandParameterProperty); } - set { SetValue(CommandParameterProperty, value); } - } - - public static readonly DependencyProperty CommandTargetProperty = DependencyProperty.Register("CommandTarget", typeof(IInputElement), typeof(SplitButton), new PropertyMetadata(null)); - public IInputElement CommandTarget - { - get { return (IInputElement)GetValue(CommandTargetProperty); } - set { SetValue(CommandTargetProperty, value); } - } - - #endregion - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/SplitButton/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/SplitButton/Themes/Generic.xaml deleted file mode 100644 index 9e863a17..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/SplitButton/Themes/Generic.xaml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Common/Generic_Common.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Common/Generic_Common.xaml deleted file mode 100644 index e1ef5440..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Common/Generic_Common.xaml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml deleted file mode 100644 index febe9614..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Implementation/TimeFormat.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Implementation/TimeFormat.cs deleted file mode 100644 index 0e0714ed..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Implementation/TimeFormat.cs +++ /dev/null @@ -1,10 +0,0 @@ - -namespace Microsoft.Windows.Controls -{ - public enum TimeFormat - { - Custom, - ShortTime, - LongTime - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Implementation/TimeItem.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Implementation/TimeItem.cs deleted file mode 100644 index 6b88f1d5..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Implementation/TimeItem.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - public class TimeItem - { - public string Display { get; set; } - public TimeSpan Time { get; set; } - - public TimeItem(string display, TimeSpan time) - { - Display = display; - Time = time; - } - - #region Base Class Overrides - - public override bool Equals(object obj) - { - var item = obj as TimeItem; - if (item != null) - return Time == item.Time; - else - return false; - } - - public override int GetHashCode() - { - return Time.GetHashCode(); - } - - #endregion //Base Class Overrides - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Implementation/TimePicker.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Implementation/TimePicker.cs deleted file mode 100644 index 04836a2a..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Implementation/TimePicker.cs +++ /dev/null @@ -1,409 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using System.Collections; -using System.Globalization; - -namespace Microsoft.Windows.Controls -{ - public class TimePicker : Control - { - #region Members - - ListBox _timeListBox; - private DateTimeFormatInfo DateTimeFormatInfo { get; set; } - internal static readonly TimeSpan EndTimeDefaultValue = new TimeSpan(23, 59, 0); - internal static readonly TimeSpan StartTimeDefaultValue = new TimeSpan(0, 0, 0); - internal static readonly TimeSpan TimeIntervalDefaultValue = new TimeSpan(1, 0, 0); - - #endregion //Members - - #region Properties - - #region AllowSpin - - public static readonly DependencyProperty AllowSpinProperty = DependencyProperty.Register("AllowSpin", typeof(bool), typeof(TimePicker), new UIPropertyMetadata(true)); - public bool AllowSpin - { - get { return (bool)GetValue(AllowSpinProperty); } - set { SetValue(AllowSpinProperty, value); } - } - - #endregion //AllowSpin - - #region EndTime - - public static readonly DependencyProperty EndTimeProperty = DependencyProperty.Register("EndTime", typeof(TimeSpan), typeof(TimePicker), new UIPropertyMetadata(EndTimeDefaultValue, new PropertyChangedCallback(OnEndTimeChanged), new CoerceValueCallback(OnCoerceEndTime))); - - private static object OnCoerceEndTime(DependencyObject o, object value) - { - TimePicker timePicker = o as TimePicker; - if (timePicker != null) - return timePicker.OnCoerceEndTime((TimeSpan)value); - else - return value; - } - - private static void OnEndTimeChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - TimePicker timePicker = o as TimePicker; - if (timePicker != null) - timePicker.OnEndTimeChanged((TimeSpan)e.OldValue, (TimeSpan)e.NewValue); - } - - protected virtual TimeSpan OnCoerceEndTime(TimeSpan value) - { - // TODO: Keep the proposed value within the desired range. - return value; - } - - protected virtual void OnEndTimeChanged(TimeSpan oldValue, TimeSpan newValue) - { - // TODO: Add your property changed side-effects. Descendants can override as well. - } - - public TimeSpan EndTime - { - // IMPORTANT: To maintain parity between setting a property in XAML and procedural code, do not touch the getter and setter inside this dependency property! - get - { - return (TimeSpan)GetValue(EndTimeProperty); - } - set - { - SetValue(EndTimeProperty, value); - } - } - - - #endregion //EndTime - - #region Format - - public static readonly DependencyProperty FormatProperty = DependencyProperty.Register("Format", typeof(TimeFormat), typeof(TimePicker), new UIPropertyMetadata(TimeFormat.ShortTime, OnFormatChanged)); - public TimeFormat Format - { - get { return (TimeFormat)GetValue(FormatProperty); } - set { SetValue(FormatProperty, value); } - } - - private static void OnFormatChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - TimePicker timePicker = o as TimePicker; - if (timePicker != null) - timePicker.OnFormatChanged((TimeFormat)e.OldValue, (TimeFormat)e.NewValue); - } - - protected virtual void OnFormatChanged(TimeFormat oldValue, TimeFormat newValue) - { - - } - - #endregion //Format - - #region FormatString - - public static readonly DependencyProperty FormatStringProperty = DependencyProperty.Register("FormatString", typeof(string), typeof(TimePicker), new UIPropertyMetadata(default(String), OnFormatStringChanged)); - public string FormatString - { - get { return (string)GetValue(FormatStringProperty); } - set { SetValue(FormatStringProperty, value); } - } - - private static void OnFormatStringChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - TimePicker timePicker = o as TimePicker; - if (timePicker != null) - timePicker.OnFormatStringChanged((string)e.OldValue, (string)e.NewValue); - } - - protected virtual void OnFormatStringChanged(string oldValue, string newValue) - { - if (string.IsNullOrEmpty(newValue)) - throw new ArgumentException("CustomFormat should be specified.", FormatString); - } - - #endregion //FormatString - - #region IsOpen - - public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register("IsOpen", typeof(bool), typeof(TimePicker), new UIPropertyMetadata(false)); - public bool IsOpen - { - get { return (bool)GetValue(IsOpenProperty); } - set { SetValue(IsOpenProperty, value); } - } - - #endregion //IsOpen - - #region Maximum - - - - #endregion //Maximum - - #region Minimum - - - - #endregion //Minimum - - #region ShowButtonSpinner - - public static readonly DependencyProperty ShowButtonSpinnerProperty = DependencyProperty.Register("ShowButtonSpinner", typeof(bool), typeof(TimePicker), new UIPropertyMetadata(true)); - public bool ShowButtonSpinner - { - get { return (bool)GetValue(ShowButtonSpinnerProperty); } - set { SetValue(ShowButtonSpinnerProperty, value); } - } - - #endregion //ShowButtonSpinner - - #region StartTime - - public static readonly DependencyProperty StartTimeProperty = DependencyProperty.Register("StartTime", typeof(TimeSpan), typeof(TimePicker), new UIPropertyMetadata(StartTimeDefaultValue, new PropertyChangedCallback(OnStartTimeChanged), new CoerceValueCallback(OnCoerceStartTime))); - - private static object OnCoerceStartTime(DependencyObject o, object value) - { - TimePicker timePicker = o as TimePicker; - if (timePicker != null) - return timePicker.OnCoerceStartTime((TimeSpan)value); - else - return value; - } - - private static void OnStartTimeChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - TimePicker timePicker = o as TimePicker; - if (timePicker != null) - timePicker.OnStartTimeChanged((TimeSpan)e.OldValue, (TimeSpan)e.NewValue); - } - - protected virtual TimeSpan OnCoerceStartTime(TimeSpan value) - { - // TODO: Keep the proposed value within the desired range. - return value; - } - - protected virtual void OnStartTimeChanged(TimeSpan oldValue, TimeSpan newValue) - { - // TODO: Add your property changed side-effects. Descendants can override as well. - } - - public TimeSpan StartTime - { - // IMPORTANT: To maintain parity between setting a property in XAML and procedural code, do not touch the getter and setter inside this dependency property! - get - { - return (TimeSpan)GetValue(StartTimeProperty); - } - set - { - SetValue(StartTimeProperty, value); - } - } - - - #endregion //StartTime - - #region TimeInterval - - public static readonly DependencyProperty TimeIntervalProperty = DependencyProperty.Register("TimeInterval", typeof(TimeSpan), typeof(TimePicker), new UIPropertyMetadata(TimeIntervalDefaultValue, OnTimeIntervalChanged)); - public TimeSpan TimeInterval - { - get { return (TimeSpan)GetValue(TimeIntervalProperty); } - set { SetValue(TimeIntervalProperty, value); } - } - - private static void OnTimeIntervalChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - TimePicker timePicker = o as TimePicker; - if (timePicker != null) - timePicker.OnTimeIntervalChanged((TimeSpan)e.OldValue, (TimeSpan)e.NewValue); - } - - protected virtual void OnTimeIntervalChanged(TimeSpan oldValue, TimeSpan newValue) - { - // TODO: Add your property changed side-effects. Descendants can override as well. - } - - #endregion //TimeInterval - - #region Value - - public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(DateTime?), typeof(TimePicker), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValueChanged)); - public DateTime? Value - { - get { return (DateTime?)GetValue(ValueProperty); } - set { SetValue(ValueProperty, value); } - } - - private static void OnValueChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - TimePicker timePicker = o as TimePicker; - if (timePicker != null) - timePicker.OnValueChanged((DateTime?)e.OldValue, (DateTime?)e.NewValue); - } - - protected virtual void OnValueChanged(DateTime? oldValue, DateTime? newValue) - { - //TODO: refactor this - if (newValue.HasValue && _timeListBox != null) - { - var items = _timeListBox.ItemsSource; - foreach (TimeItem item in items) - { - if (item.Time == newValue.Value.TimeOfDay) - { - int index = _timeListBox.Items.IndexOf(item); - if (_timeListBox.SelectedIndex != index) - _timeListBox.SelectedIndex = index; - break; - } - } - } - } - - #endregion //Value - - #region Watermark - - public static readonly DependencyProperty WatermarkProperty = DependencyProperty.Register("Watermark", typeof(object), typeof(TimePicker), new UIPropertyMetadata(null)); - public object Watermark - { - get { return (object)GetValue(WatermarkProperty); } - set { SetValue(WatermarkProperty, value); } - } - - #endregion //Watermark - - #region WatermarkTemplate - - public static readonly DependencyProperty WatermarkTemplateProperty = DependencyProperty.Register("WatermarkTemplate", typeof(DataTemplate), typeof(TimePicker), new UIPropertyMetadata(null)); - public DataTemplate WatermarkTemplate - { - get { return (DataTemplate)GetValue(WatermarkTemplateProperty); } - set { SetValue(WatermarkTemplateProperty, value); } - } - - #endregion //WatermarkTemplate - - #endregion //Properties - - #region Constructors - - static TimePicker() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(TimePicker), new FrameworkPropertyMetadata(typeof(TimePicker))); - } - - public TimePicker() - { - DateTimeFormatInfo = DateTimeFormatInfo.GetInstance(CultureInfo.CurrentCulture); - Keyboard.AddKeyDownHandler(this, OnKeyDown); - Mouse.AddPreviewMouseDownOutsideCapturedElementHandler(this, OnMouseDownOutsideCapturedElement); - } - - #endregion //Constructors - - #region Base Class Overrides - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - _timeListBox = (ListBox)GetTemplateChild("PART_TimeListItems"); - _timeListBox.ItemsSource = GenerateTimeListItemsSource(); - _timeListBox.SelectionChanged += TimeListBox_SelectionChanged; - } - - #endregion //Base Class Overrides - - #region Event Handlers - - private void OnKeyDown(object sender, KeyEventArgs e) - { - switch (e.Key) - { - case Key.Escape: - case Key.Tab: - { - CloseTimePicker(); - break; - } - } - } - - private void OnMouseDownOutsideCapturedElement(object sender, MouseButtonEventArgs e) - { - CloseTimePicker(); - } - - void TimeListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (e.AddedItems.Count > 0) - { - TimeItem selectedTimeListItem = (TimeItem)e.AddedItems[0]; - var time = selectedTimeListItem.Time; ; - var date = Value ?? DateTime.MinValue; - - Value = new DateTime(date.Year, date.Month, date.Day, time.Hours, time.Minutes, time.Seconds, time.Milliseconds); - } - - CloseTimePicker(); - } - - #endregion //Event Handlers - - #region Methods - - private void CloseTimePicker() - { - if (IsOpen) - IsOpen = false; - ReleaseMouseCapture(); - } - - public IEnumerable GenerateTimeListItemsSource() - { - TimeSpan time = StartTime; - TimeSpan endTime = EndTime; - - if (endTime <= time) - { - endTime = EndTimeDefaultValue; - time = StartTimeDefaultValue; - } - - TimeSpan timeInterval = TimeInterval; - - if (time != null && endTime != null && timeInterval != null && timeInterval.Ticks > 0) - { - while (time <= endTime) - { - yield return new TimeItem(DateTime.MinValue.Add(time).ToString(GetTimeFormat(), CultureInfo.CurrentCulture), time); - time = time.Add(timeInterval); - } - yield break; - } - } - - private string GetTimeFormat() - { - switch (Format) - { - case TimeFormat.Custom: - return FormatString; - case TimeFormat.LongTime: - return DateTimeFormatInfo.LongTimePattern; - case TimeFormat.ShortTime: - return DateTimeFormatInfo.ShortTimePattern; - default: - return DateTimeFormatInfo.ShortTimePattern; - } - } - - #endregion //Methods - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Themes/Generic.xaml deleted file mode 100644 index a0aa2027..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TimePicker/Themes/Generic.xaml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/VisualStates.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/VisualStates.cs deleted file mode 100644 index 721a96e2..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/VisualStates.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace Microsoft.Windows.Controls -{ - internal static partial class VisualStates - { - - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj deleted file mode 100644 index bcc065fc..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj +++ /dev/null @@ -1,325 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {72E591D6-8F83-4D8C-8F67-9C325E623234} - library - Properties - Microsoft.Windows.Controls - WPFToolkit.Extended - v4.0 - Client - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - SAK - SAK - SAK - SAK - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - - - sn.snk - - - - - - - - - - - 4.0 - - - - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - RichTextBoxFormatBar.xaml - - - - - - - - - - - - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Implementation/WatermarkTextBox.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Implementation/WatermarkTextBox.cs deleted file mode 100644 index 7a6b67bd..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Implementation/WatermarkTextBox.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; - -namespace Microsoft.Windows.Controls -{ - public class WatermarkTextBox : TextBox - { - #region Properties - - #region Watermark - - public static readonly DependencyProperty WatermarkProperty = DependencyProperty.Register("Watermark", typeof(object), typeof(WatermarkTextBox), new UIPropertyMetadata(null)); - public object Watermark - { - get { return (object)GetValue(WatermarkProperty); } - set { SetValue(WatermarkProperty, value); } - } - - #endregion //Watermark - - #region WatermarkTemplate - - public static readonly DependencyProperty WatermarkTemplateProperty = DependencyProperty.Register("WatermarkTemplate", typeof(DataTemplate), typeof(WatermarkTextBox), new UIPropertyMetadata(null)); - public DataTemplate WatermarkTemplate - { - get { return (DataTemplate)GetValue(WatermarkTemplateProperty); } - set { SetValue(WatermarkTemplateProperty, value); } - } - - #endregion //WatermarkTemplate - - #endregion //Properties - - #region Constructors - - static WatermarkTextBox() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(WatermarkTextBox), new FrameworkPropertyMetadata(typeof(WatermarkTextBox))); - } - - #endregion //Constructors - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Themes/Generic.xaml deleted file mode 100644 index c1c0ddf3..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Themes/Generic.xaml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/sn.snk b/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/sn.snk deleted file mode 100644 index 1bdc9120..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/sn.snk and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln deleted file mode 100644 index d0d4034b..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln +++ /dev/null @@ -1,38 +0,0 @@ - -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.Examples", "Src\WPFToolkit.Extended.Examples\WPFToolkit.Extended.Examples.csproj", "{747652D0-6AA6-4F96-99F7-0C834274FAB2}" -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.Examples\\WPFToolkit.Extended.Examples.csproj - SccProjectName2 = Src/WPFToolkit.Extended.Examples - SccLocalPath2 = Src\\WPFToolkit.Extended.Examples - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - 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}.Release|Any CPU.ActiveCfg = Release|Any CPU - {72E591D6-8F83-4D8C-8F67-9C325E623234}.Release|Any CPU.Build.0 = Release|Any CPU - {747652D0-6AA6-4F96-99F7-0C834274FAB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {747652D0-6AA6-4F96-99F7-0C834274FAB2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {747652D0-6AA6-4F96-99F7-0C834274FAB2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {747652D0-6AA6-4F96-99F7-0C834274FAB2}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.vssscc b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.vssscc deleted file mode 100644 index 794f014c..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.vssscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml deleted file mode 100644 index b6483ed1..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml.cs deleted file mode 100644 index 490ee2d0..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Windows; - -namespace WPFToolkit.Extended.Examples -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/AssemblyInfo.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/AssemblyInfo.cs deleted file mode 100644 index af4eebe1..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -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.Examples")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("WPFToolkit.Extended.Examples")] -[assembly: AssemblyCopyright("Copyright © Microsoft 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.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.Designer.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.Designer.cs deleted file mode 100644 index c3711362..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.225 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WPFToolkit.Extended.Examples.Properties { - using System; - - - /// - /// 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 (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WPFToolkit.Extended.Examples.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.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.resx b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.resx deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.Designer.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.Designer.cs deleted file mode 100644 index edee43de..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.225 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WPFToolkit.Extended.Examples.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.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.settings b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.settings deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj deleted file mode 100644 index 1fce92a3..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj +++ /dev/null @@ -1,122 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {747652D0-6AA6-4F96-99F7-0C834274FAB2} - WinExe - Properties - WPFToolkit.Extended.Examples - WPFToolkit.Extended.Examples - v3.5 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - SAK - SAK - SAK - SAK - - - - - 3.5 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - - - - MSBuild:Compile - Designer - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - MSBuild:Compile - Designer - - - App.xaml - Code - - - Window1.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.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj.vspscc b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj.vspscc deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml deleted file mode 100644 index c76c960b..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml.cs deleted file mode 100644 index ae35ac34..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml.cs +++ /dev/null @@ -1,33 +0,0 @@ -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.Examples -{ - /// - /// Interaction logic for Window1.xaml - /// - public partial class Window1 : Window - { - public Window1() - { - InitializeComponent(); - Loaded += new RoutedEventHandler(Window1_Loaded); - } - - void Window1_Loaded(object sender, RoutedEventArgs e) - { - - } - } -} diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml deleted file mode 100644 index 01119b0a..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Collapsed - - - - - - - Collapsed - - - - - - - - - - - Visible - - - - - - - Visible - - - - - - - - - - - - - True - - - - - - - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml deleted file mode 100644 index 73c19ad1..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml deleted file mode 100644 index 37529ff7..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml +++ /dev/null @@ -1,496 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Chromes/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Chromes/Themes/Generic.xaml deleted file mode 100644 index 0f0fd301..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Chromes/Themes/Generic.xaml +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - 2.75 - 1.75 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorCanvas/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorCanvas/Themes/Generic.xaml deleted file mode 100644 index 6cc8d243..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorCanvas/Themes/Generic.xaml +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/Themes/Generic.xaml deleted file mode 100644 index ddcd39f7..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ColorPicker/Themes/Generic.xaml +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/DateTimePicker/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/DateTimePicker/Themes/Generic.xaml deleted file mode 100644 index 7a5862af..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/DateTimePicker/Themes/Generic.xaml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/DateTimeUpDown/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/DateTimeUpDown/Themes/Generic.xaml deleted file mode 100644 index 9d753485..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/DateTimeUpDown/Themes/Generic.xaml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Magnifier/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Magnifier/Themes/Generic.xaml deleted file mode 100644 index bcbf1567..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Magnifier/Themes/Generic.xaml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MaskedTextBox/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MaskedTextBox/Themes/Generic.xaml deleted file mode 100644 index 8743492f..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MaskedTextBox/Themes/Generic.xaml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png deleted file mode 100644 index 4304d43b..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Error48.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png deleted file mode 100644 index 35075187..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Information48.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png deleted file mode 100644 index dad7dd09..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Question48.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png deleted file mode 100644 index ecb7fe86..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Icons/Warning48.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Themes/Generic.xaml deleted file mode 100644 index efbd5084..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/MessageBox/Themes/Generic.xaml +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/NumericUpDown/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/NumericUpDown/Themes/Generic.xaml deleted file mode 100644 index 68f53135..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/NumericUpDown/Themes/Generic.xaml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs deleted file mode 100644 index 1a90ce26..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Markup; -using System; - -// 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("Extended WPF Toolkit")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Extended WPF Toolkit")] -[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)] -[assembly: CLSCompliant(true)] - -//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.4.0.0")] -[assembly: AssemblyFileVersion("1.4.0.0")] - -[assembly: XmlnsPrefix("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "extToolkit")] -[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "Microsoft.Windows.Controls")] -[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended", "Microsoft.Windows.Controls.PropertyGrid")] diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs deleted file mode 100644 index eaf63633..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 Microsoft.Windows.Controls.Properties { - using System; - - - /// - /// 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 (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Windows.Controls.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.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.resx b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.resx deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs deleted file mode 100644 index 4a0f1423..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 Microsoft.Windows.Controls.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.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.settings b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.settings deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/AdvancedProperties11.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/AdvancedProperties11.png deleted file mode 100644 index 0146e932..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/AdvancedProperties11.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Categorize16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Categorize16.png deleted file mode 100644 index 51510df8..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Categorize16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Database11.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Database11.png deleted file mode 100644 index 0f523fbd..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Database11.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Inheritance11.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Inheritance11.png deleted file mode 100644 index 7dd3b491..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Inheritance11.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Local11.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Local11.png deleted file mode 100644 index ec521dd4..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Local11.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Resource11.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Resource11.png deleted file mode 100644 index 7275c981..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Resource11.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/SortAscending16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/SortAscending16.png deleted file mode 100644 index b3138ba3..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/SortAscending16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Style11.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Style11.png deleted file mode 100644 index 7a6005d6..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Images/Style11.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml deleted file mode 100644 index da8090bc..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/PropertyGrid/Themes/Generic.xaml +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png deleted file mode 100644 index 8fb36a1a..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bold16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bullets16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bullets16.png deleted file mode 100644 index 73e7c15e..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Bullets16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png deleted file mode 100644 index 1030a021..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/CenterAlign16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/FontColorPicker16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/FontColorPicker16.png deleted file mode 100644 index d9207308..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/FontColorPicker16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png deleted file mode 100644 index 8259a9e1..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Italic16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png deleted file mode 100644 index c5499bce..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/JustifyAlign16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png deleted file mode 100644 index 51dffb73..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/LeftAlign16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Numbering16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Numbering16.png deleted file mode 100644 index 03f6fde2..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Numbering16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png deleted file mode 100644 index cb8e400a..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/RightAlign16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png deleted file mode 100644 index 4a3783f2..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/TextHighlightColorPicker16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png deleted file mode 100644 index 72689482..00000000 Binary files a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/RichTextBoxFormatBar/Images/Underline16.png and /dev/null differ diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/SplitButton/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/SplitButton/Themes/Generic.xaml deleted file mode 100644 index b4cc1be5..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/SplitButton/Themes/Generic.xaml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Common/Generic_Common.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Common/Generic_Common.xaml deleted file mode 100644 index e1ef5440..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Common/Generic_Common.xaml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Generic.xaml deleted file mode 100644 index 45bf4339..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Themes/Generic.xaml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/TimePicker/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/TimePicker/Themes/Generic.xaml deleted file mode 100644 index 235c58c6..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/TimePicker/Themes/Generic.xaml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj deleted file mode 100644 index ab5e5da3..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj +++ /dev/null @@ -1,507 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {72E591D6-8F83-4D8C-8F67-9C325E623234} - library - Properties - Microsoft.Windows.Controls - WPFToolkit.Extended - v3.5 - Client - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - SAK - SAK - SAK - SAK - true - ..\..\..\ExtendedWPFToolkitSolution\Src\WPFToolkit.Extended\sn.snk - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - TRACE;DEBUG;VS2008 - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE;VS2008 - prompt - 4 - - - - - - - 3.5 - - - - - 3.0 - - - 3.0 - - - 3.0 - - - 3.0 - - - - - - RichTextBoxFormatBar\RichTextBoxFormatBar.xaml - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - BusyIndicator\Implementation\BusyIndicator.cs - - - BusyIndicator\Implementation\VisualStates.BusyIndicator.cs - - - ButtonSpinner\Implementation\ButtonSpinner.cs - - - ButtonSpinner\Implementation\SpinDirection.cs - - - ButtonSpinner\Implementation\SpinEventArgs.cs - - - ButtonSpinner\Implementation\Spinner.cs - - - ButtonSpinner\Implementation\ValidSpinDirections.cs - - - CalculatorUpDown\Implementation\CalculatorUpDown.cs - - - Calculator\Implementation\Calculator.cs - - - Calculator\Implementation\CalculatorCommands.cs - - - ChildWindow\Implementation\ChildWindow.cs - - - ChildWindow\Implementation\WindowStartupLocation.cs - - - ChildWindow\Implementation\WindowState.cs - - - Chromes\Implementation\ButtonChrome.cs - - - ColorCanvas\Implementation\ColorCanvas.cs - - - ColorCanvas\Implementation\ColorSpectrumSlider.cs - - - ColorPicker\Implementation\ColorItem.cs - - - ColorPicker\Implementation\ColorPicker.cs - - - Core\Converters\CalculatorMemoryToVisibilityConverter.cs - - - Core\Converters\ColorToSolidColorBrushConverter.cs - - - Core\Converters\InverseBoolConverter.cs - - - Core\Converters\SolidColorBrushToColorConverter.cs - - - Core\Converters\TimeFormatToDateTimeFormatConverter.cs - - - Core\Primitives\HsvColor.cs - - - Core\Primitives\InputBase.cs - - - Core\Primitives\UpDownBase.cs - - - Core\UIElementAdorner.cs - - - Core\Utilities\CalculatorUtilities.cs - - - Core\Utilities\ColorUtilities.cs - - - Core\Utilities\ContextMenuUtilities.cs - - - DateTimePicker\Implementation\DateTimePicker.cs - - - DateTimeUpDown\Implementation\DateTimeFormat.cs - - - DateTimeUpDown\Implementation\DateTimeInfo.cs - - - DateTimeUpDown\Implementation\DateTimeParser.cs - - - DateTimeUpDown\Implementation\DateTimePart.cs - - - DateTimeUpDown\Implementation\DateTimeUpDown.cs - - - Magnifier\Implementation\Converters\BorderThicknessToStrokeThicknessConverter.cs - - - Magnifier\Implementation\Converters\RadiusConverter.cs - - - Magnifier\Implementation\Magnifier.cs - - - Magnifier\Implementation\MagnifierAdorner.cs - - - Magnifier\Implementation\MagnifierManager.cs - - - MaskedTextBox\Implementation\MaskedTextBox.cs - - - MessageBox\Implementation\MessageBox.cs - - - MessageBox\Implementation\VisualStates.MessageBox.cs - - - NumericUpDown\Implementation\DecimalUpDown.cs - - - NumericUpDown\Implementation\DoubleUpDown.cs - - - NumericUpDown\Implementation\IntegerUpDown.cs - - - NumericUpDown\Implementation\NumericUpDown.cs - - - PropertyGrid\Implementation\Commands\PropertyItemCommands.cs - - - PropertyGrid\Implementation\Converters\ValueSourceToImagePathConverter.cs - - - PropertyGrid\Implementation\Converters\ValueSourceToToolTipConverter.cs - - - PropertyGrid\Implementation\CustomTypeEditorCollection.cs - - - PropertyGrid\Implementation\Editors\CheckBoxEditor.cs - - - PropertyGrid\Implementation\Editors\ColorEditor.cs - - - PropertyGrid\Implementation\Editors\ComboBoxEditor.cs - - - PropertyGrid\Implementation\Editors\CustomTypeEditor.cs - - - PropertyGrid\Implementation\Editors\DateTimeUpDownEditor.cs - - - PropertyGrid\Implementation\Editors\DecimalUpDownEditor.cs - - - PropertyGrid\Implementation\Editors\DoubleUpDownEditor.cs - - - PropertyGrid\Implementation\Editors\EnumComboBoxEditor.cs - - - PropertyGrid\Implementation\Editors\FontComboBoxEditor.cs - - - PropertyGrid\Implementation\Editors\ICustomTypeEditor.cs - - - PropertyGrid\Implementation\Editors\IntegerUpDownEditor.cs - - - PropertyGrid\Implementation\Editors\ITypeEditor.cs - - - PropertyGrid\Implementation\Editors\TextBlockEditor.cs - - - PropertyGrid\Implementation\Editors\TextBoxEditor.cs - - - PropertyGrid\Implementation\Editors\TypeEditor.cs - - - PropertyGrid\Implementation\PropertyCategoryItem.cs - - - PropertyGrid\Implementation\PropertyCollection.cs - - - PropertyGrid\Implementation\PropertyGrid.cs - - - PropertyGrid\Implementation\PropertyItem.cs - - - RichTextBoxFormatBar\IRichTextBoxFormatBar.cs - - - RichTextBoxFormatBar\RichTextBoxFormatBar.xaml.cs - RichTextBoxFormatBar.xaml - - - RichTextBoxFormatBar\RichTextBoxFormatBarManager.cs - - - RichTextBox\Formatters\ITextFormatter.cs - - - RichTextBox\Formatters\PlainTextFormatter.cs - - - RichTextBox\Formatters\RtfFormatter.cs - - - RichTextBox\Formatters\XamlFormatter.cs - - - RichTextBox\RichTextBox.cs - - - SplitButton\Implementation\SplitButton.cs - - - TimePicker\Implementation\TimeFormat.cs - - - TimePicker\Implementation\TimeItem.cs - - - TimePicker\Implementation\TimePicker.cs - - - VisualStates.cs - - - WatermarkTextBox\Implementation\WatermarkTextBox.cs - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - sn.snk - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - \ No newline at end of file diff --git a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WatermarkTextBox/Themes/Generic.xaml b/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WatermarkTextBox/Themes/Generic.xaml deleted file mode 100644 index 83ce7afd..00000000 --- a/Release/v1.4.0/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/WatermarkTextBox/Themes/Generic.xaml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln b/Release/v1.5.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln deleted file mode 100644 index 90ba96c7..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln +++ /dev/null @@ -1,261 +0,0 @@ - -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("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{01F2E61E-7F20-4F2E-8A3C-6604B18415B9}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples", "Src\Samples\Samples\Samples.csproj", "{6EE69D18-F8AB-4CF9-AC3D-4719F36A8D99}" - ProjectSection(ProjectDependencies) = postProject - {1A9C0E21-DE3B-4B2D-9EF0-39AA1922CDA6} = {1A9C0E21-DE3B-4B2D-9EF0-39AA1922CDA6} - {44733C25-7F22-4B91-83C7-4E654063DFD6} = {44733C25-7F22-4B91-83C7-4E654063DFD6} - {22F36E4A-98E6-4A1C-96CA-52CA46F19274} = {22F36E4A-98E6-4A1C-96CA-52CA46F19274} - {511FB369-57D2-430B-9002-F367DF165E70} = {511FB369-57D2-430B-9002-F367DF165E70} - {CBED4977-79ED-4E46-AA00-0A4D83D333A6} = {CBED4977-79ED-4E46-AA00-0A4D83D333A6} - {CAB850B9-1D47-4F45-A6A5-07B48599B5D7} = {CAB850B9-1D47-4F45-A6A5-07B48599B5D7} - {10EFEFC6-F2CC-4C6E-955C-668B17F7F342} = {10EFEFC6-F2CC-4C6E-955C-668B17F7F342} - {A36AB9C9-D813-4018-B341-8729A9B5BD7D} = {A36AB9C9-D813-4018-B341-8729A9B5BD7D} - {EF6701CF-21C3-45B5-9C90-40BE6130BB7D} = {EF6701CF-21C3-45B5-9C90-40BE6130BB7D} - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{F927B3FE-820C-4EE1-921F-D10D3AE287AE}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.BusyIndicator", "Src\Samples\Modules\Samples.Modules.BusyIndicator\Samples.Modules.BusyIndicator.csproj", "{1A9C0E21-DE3B-4B2D-9EF0-39AA1922CDA6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Infrastructure", "Src\Samples\Samples.Infrastructure\Samples.Infrastructure.csproj", "{A4A049A4-665A-4651-9046-7D06E9D0CCDC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.Calculator", "Src\Samples\Modules\Samples.Modules.Caclulator\Samples.Modules.Calculator.csproj", "{EF6701CF-21C3-45B5-9C90-40BE6130BB7D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.ChildWindow", "Src\Samples\Modules\Samples.Modules.ChildWindow\Samples.Modules.ChildWindow.csproj", "{44733C25-7F22-4B91-83C7-4E654063DFD6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.Color", "Src\Samples\Modules\Samples.Modules.Color\Samples.Modules.Color.csproj", "{A36AB9C9-D813-4018-B341-8729A9B5BD7D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.DateTime", "Src\Samples\Modules\Samples.Modules.DateTime\Samples.Modules.DateTime.csproj", "{CAB850B9-1D47-4F45-A6A5-07B48599B5D7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.Numeric", "Src\Samples\Modules\Samples.Modules.Numeric\Samples.Modules.Numeric.csproj", "{CBED4977-79ED-4E46-AA00-0A4D83D333A6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.Text", "Src\Samples\Modules\Samples.Modules.Text\Samples.Modules.Text.csproj", "{10EFEFC6-F2CC-4C6E-955C-668B17F7F342}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.Button", "Src\Samples\Modules\Samples.Modules.Button\Samples.Modules.Button.csproj", "{22F36E4A-98E6-4A1C-96CA-52CA46F19274}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.PropertyGrid", "Src\Samples\Modules\Samples.Modules.PropertyGrid\Samples.Modules.PropertyGrid.csproj", "{511FB369-57D2-430B-9002-F367DF165E70}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.Wizard", "Src\Samples\Modules\Samples.Modules.Wizard\Samples.Modules.Wizard.csproj", "{DB0F7672-AFCC-4152-A231-7DCFDD5F219F}" -EndProject -Global - GlobalSection(TeamFoundationVersionControl) = preSolution - SccNumberOfProjects = 14 - 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\\Samples\\Samples\\Samples.csproj - SccProjectTopLevelParentUniqueName2 = ExtendedWPFToolkit.sln - SccProjectName2 = Src/Samples/Samples - SccLocalPath2 = Src\\Samples\\Samples - SccProjectUniqueName3 = Src\\Samples\\Modules\\Samples.Modules.BusyIndicator\\Samples.Modules.BusyIndicator.csproj - SccProjectTopLevelParentUniqueName3 = ExtendedWPFToolkit.sln - SccProjectName3 = Src/Samples/Modules/Samples.Modules.BusyIndicator - SccLocalPath3 = Src\\Samples\\Modules\\Samples.Modules.BusyIndicator - SccProjectUniqueName4 = Src\\Samples\\Samples.Infrastructure\\Samples.Infrastructure.csproj - SccProjectTopLevelParentUniqueName4 = ExtendedWPFToolkit.sln - SccProjectName4 = Src/Samples/Samples.Infrastructure - SccLocalPath4 = Src\\Samples\\Samples.Infrastructure - SccProjectUniqueName5 = Src\\Samples\\Modules\\Samples.Modules.ChildWindow\\Samples.Modules.ChildWindow.csproj - SccProjectTopLevelParentUniqueName5 = ExtendedWPFToolkit.sln - SccProjectName5 = Src/Samples/Modules/Samples.Modules.ChildWindow - SccLocalPath5 = Src\\Samples\\Modules\\Samples.Modules.ChildWindow - SccProjectUniqueName6 = Src\\Samples\\Modules\\Samples.Modules.Color\\Samples.Modules.Color.csproj - SccProjectTopLevelParentUniqueName6 = ExtendedWPFToolkit.sln - SccProjectName6 = Src/Samples/Modules/Samples.Modules.Color - SccLocalPath6 = Src\\Samples\\Modules\\Samples.Modules.Color - SccProjectUniqueName7 = Src\\Samples\\Modules\\Samples.Modules.DateTime\\Samples.Modules.DateTime.csproj - SccProjectTopLevelParentUniqueName7 = ExtendedWPFToolkit.sln - SccProjectName7 = Src/Samples/Modules/Samples.Modules.DateTime - SccLocalPath7 = Src\\Samples\\Modules\\Samples.Modules.DateTime - SccProjectUniqueName8 = Src\\Samples\\Modules\\Samples.Modules.Numeric\\Samples.Modules.Numeric.csproj - SccProjectTopLevelParentUniqueName8 = ExtendedWPFToolkit.sln - SccProjectName8 = Src/Samples/Modules/Samples.Modules.Numeric - SccLocalPath8 = Src\\Samples\\Modules\\Samples.Modules.Numeric - SccProjectUniqueName9 = Src\\Samples\\Modules\\Samples.Modules.Text\\Samples.Modules.Text.csproj - SccProjectTopLevelParentUniqueName9 = ExtendedWPFToolkit.sln - SccProjectName9 = Src/Samples/Modules/Samples.Modules.Text - SccLocalPath9 = Src\\Samples\\Modules\\Samples.Modules.Text - SccProjectUniqueName10 = Src\\Samples\\Modules\\Samples.Modules.Button\\Samples.Modules.Button.csproj - SccProjectTopLevelParentUniqueName10 = ExtendedWPFToolkit.sln - SccProjectName10 = Src/Samples/Modules/Samples.Modules.Button - SccLocalPath10 = Src\\Samples\\Modules\\Samples.Modules.Button - SccProjectUniqueName11 = Src\\Samples\\Modules\\Samples.Modules.PropertyGrid\\Samples.Modules.PropertyGrid.csproj - SccProjectTopLevelParentUniqueName11 = ExtendedWPFToolkit.sln - SccProjectName11 = Src/Samples/Modules/Samples.Modules.PropertyGrid - SccLocalPath11 = Src\\Samples\\Modules\\Samples.Modules.PropertyGrid - SccProjectUniqueName12 = Src\\Samples\\Modules\\Samples.Modules.Caclulator\\Samples.Modules.Calculator.csproj - SccProjectTopLevelParentUniqueName12 = ExtendedWPFToolkit.sln - SccProjectName12 = Src/Samples/Modules/Samples.Modules.Caclulator - SccLocalPath12 = Src\\Samples\\Modules\\Samples.Modules.Caclulator - SccProjectUniqueName13 = Src\\Samples\\Modules\\Samples.Modules.Wizard\\Samples.Modules.Wizard.csproj - SccProjectTopLevelParentUniqueName13 = ExtendedWPFToolkit.sln - SccProjectName13 = Src/Samples/Modules/Samples.Modules.Wizard - SccLocalPath13 = Src\\Samples\\Modules\\Samples.Modules.Wizard - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - 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 - {6EE69D18-F8AB-4CF9-AC3D-4719F36A8D99}.Debug|Any CPU.ActiveCfg = Debug|x86 - {6EE69D18-F8AB-4CF9-AC3D-4719F36A8D99}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {6EE69D18-F8AB-4CF9-AC3D-4719F36A8D99}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {6EE69D18-F8AB-4CF9-AC3D-4719F36A8D99}.Debug|x86.ActiveCfg = Debug|x86 - {6EE69D18-F8AB-4CF9-AC3D-4719F36A8D99}.Debug|x86.Build.0 = Debug|x86 - {6EE69D18-F8AB-4CF9-AC3D-4719F36A8D99}.Release|Any CPU.ActiveCfg = Release|x86 - {6EE69D18-F8AB-4CF9-AC3D-4719F36A8D99}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {6EE69D18-F8AB-4CF9-AC3D-4719F36A8D99}.Release|Mixed Platforms.Build.0 = Release|x86 - {6EE69D18-F8AB-4CF9-AC3D-4719F36A8D99}.Release|x86.ActiveCfg = Release|x86 - {6EE69D18-F8AB-4CF9-AC3D-4719F36A8D99}.Release|x86.Build.0 = Release|x86 - {1A9C0E21-DE3B-4B2D-9EF0-39AA1922CDA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1A9C0E21-DE3B-4B2D-9EF0-39AA1922CDA6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1A9C0E21-DE3B-4B2D-9EF0-39AA1922CDA6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {1A9C0E21-DE3B-4B2D-9EF0-39AA1922CDA6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {1A9C0E21-DE3B-4B2D-9EF0-39AA1922CDA6}.Debug|x86.ActiveCfg = Debug|Any CPU - {1A9C0E21-DE3B-4B2D-9EF0-39AA1922CDA6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1A9C0E21-DE3B-4B2D-9EF0-39AA1922CDA6}.Release|Any CPU.Build.0 = Release|Any CPU - {1A9C0E21-DE3B-4B2D-9EF0-39AA1922CDA6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {1A9C0E21-DE3B-4B2D-9EF0-39AA1922CDA6}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {1A9C0E21-DE3B-4B2D-9EF0-39AA1922CDA6}.Release|x86.ActiveCfg = Release|Any CPU - {A4A049A4-665A-4651-9046-7D06E9D0CCDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A4A049A4-665A-4651-9046-7D06E9D0CCDC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A4A049A4-665A-4651-9046-7D06E9D0CCDC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {A4A049A4-665A-4651-9046-7D06E9D0CCDC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {A4A049A4-665A-4651-9046-7D06E9D0CCDC}.Debug|x86.ActiveCfg = Debug|Any CPU - {A4A049A4-665A-4651-9046-7D06E9D0CCDC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A4A049A4-665A-4651-9046-7D06E9D0CCDC}.Release|Any CPU.Build.0 = Release|Any CPU - {A4A049A4-665A-4651-9046-7D06E9D0CCDC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {A4A049A4-665A-4651-9046-7D06E9D0CCDC}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {A4A049A4-665A-4651-9046-7D06E9D0CCDC}.Release|x86.ActiveCfg = Release|Any CPU - {EF6701CF-21C3-45B5-9C90-40BE6130BB7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EF6701CF-21C3-45B5-9C90-40BE6130BB7D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EF6701CF-21C3-45B5-9C90-40BE6130BB7D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {EF6701CF-21C3-45B5-9C90-40BE6130BB7D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {EF6701CF-21C3-45B5-9C90-40BE6130BB7D}.Debug|x86.ActiveCfg = Debug|Any CPU - {EF6701CF-21C3-45B5-9C90-40BE6130BB7D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EF6701CF-21C3-45B5-9C90-40BE6130BB7D}.Release|Any CPU.Build.0 = Release|Any CPU - {EF6701CF-21C3-45B5-9C90-40BE6130BB7D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {EF6701CF-21C3-45B5-9C90-40BE6130BB7D}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {EF6701CF-21C3-45B5-9C90-40BE6130BB7D}.Release|x86.ActiveCfg = Release|Any CPU - {44733C25-7F22-4B91-83C7-4E654063DFD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {44733C25-7F22-4B91-83C7-4E654063DFD6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {44733C25-7F22-4B91-83C7-4E654063DFD6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {44733C25-7F22-4B91-83C7-4E654063DFD6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {44733C25-7F22-4B91-83C7-4E654063DFD6}.Debug|x86.ActiveCfg = Debug|Any CPU - {44733C25-7F22-4B91-83C7-4E654063DFD6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {44733C25-7F22-4B91-83C7-4E654063DFD6}.Release|Any CPU.Build.0 = Release|Any CPU - {44733C25-7F22-4B91-83C7-4E654063DFD6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {44733C25-7F22-4B91-83C7-4E654063DFD6}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {44733C25-7F22-4B91-83C7-4E654063DFD6}.Release|x86.ActiveCfg = Release|Any CPU - {A36AB9C9-D813-4018-B341-8729A9B5BD7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A36AB9C9-D813-4018-B341-8729A9B5BD7D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A36AB9C9-D813-4018-B341-8729A9B5BD7D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {A36AB9C9-D813-4018-B341-8729A9B5BD7D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {A36AB9C9-D813-4018-B341-8729A9B5BD7D}.Debug|x86.ActiveCfg = Debug|Any CPU - {A36AB9C9-D813-4018-B341-8729A9B5BD7D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A36AB9C9-D813-4018-B341-8729A9B5BD7D}.Release|Any CPU.Build.0 = Release|Any CPU - {A36AB9C9-D813-4018-B341-8729A9B5BD7D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {A36AB9C9-D813-4018-B341-8729A9B5BD7D}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {A36AB9C9-D813-4018-B341-8729A9B5BD7D}.Release|x86.ActiveCfg = Release|Any CPU - {CAB850B9-1D47-4F45-A6A5-07B48599B5D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CAB850B9-1D47-4F45-A6A5-07B48599B5D7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CAB850B9-1D47-4F45-A6A5-07B48599B5D7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {CAB850B9-1D47-4F45-A6A5-07B48599B5D7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {CAB850B9-1D47-4F45-A6A5-07B48599B5D7}.Debug|x86.ActiveCfg = Debug|Any CPU - {CAB850B9-1D47-4F45-A6A5-07B48599B5D7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CAB850B9-1D47-4F45-A6A5-07B48599B5D7}.Release|Any CPU.Build.0 = Release|Any CPU - {CAB850B9-1D47-4F45-A6A5-07B48599B5D7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {CAB850B9-1D47-4F45-A6A5-07B48599B5D7}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {CAB850B9-1D47-4F45-A6A5-07B48599B5D7}.Release|x86.ActiveCfg = Release|Any CPU - {CBED4977-79ED-4E46-AA00-0A4D83D333A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CBED4977-79ED-4E46-AA00-0A4D83D333A6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CBED4977-79ED-4E46-AA00-0A4D83D333A6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {CBED4977-79ED-4E46-AA00-0A4D83D333A6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {CBED4977-79ED-4E46-AA00-0A4D83D333A6}.Debug|x86.ActiveCfg = Debug|Any CPU - {CBED4977-79ED-4E46-AA00-0A4D83D333A6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CBED4977-79ED-4E46-AA00-0A4D83D333A6}.Release|Any CPU.Build.0 = Release|Any CPU - {CBED4977-79ED-4E46-AA00-0A4D83D333A6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {CBED4977-79ED-4E46-AA00-0A4D83D333A6}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {CBED4977-79ED-4E46-AA00-0A4D83D333A6}.Release|x86.ActiveCfg = Release|Any CPU - {10EFEFC6-F2CC-4C6E-955C-668B17F7F342}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {10EFEFC6-F2CC-4C6E-955C-668B17F7F342}.Debug|Any CPU.Build.0 = Debug|Any CPU - {10EFEFC6-F2CC-4C6E-955C-668B17F7F342}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {10EFEFC6-F2CC-4C6E-955C-668B17F7F342}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {10EFEFC6-F2CC-4C6E-955C-668B17F7F342}.Debug|x86.ActiveCfg = Debug|Any CPU - {10EFEFC6-F2CC-4C6E-955C-668B17F7F342}.Release|Any CPU.ActiveCfg = Release|Any CPU - {10EFEFC6-F2CC-4C6E-955C-668B17F7F342}.Release|Any CPU.Build.0 = Release|Any CPU - {10EFEFC6-F2CC-4C6E-955C-668B17F7F342}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {10EFEFC6-F2CC-4C6E-955C-668B17F7F342}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {10EFEFC6-F2CC-4C6E-955C-668B17F7F342}.Release|x86.ActiveCfg = Release|Any CPU - {22F36E4A-98E6-4A1C-96CA-52CA46F19274}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {22F36E4A-98E6-4A1C-96CA-52CA46F19274}.Debug|Any CPU.Build.0 = Debug|Any CPU - {22F36E4A-98E6-4A1C-96CA-52CA46F19274}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {22F36E4A-98E6-4A1C-96CA-52CA46F19274}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {22F36E4A-98E6-4A1C-96CA-52CA46F19274}.Debug|x86.ActiveCfg = Debug|Any CPU - {22F36E4A-98E6-4A1C-96CA-52CA46F19274}.Release|Any CPU.ActiveCfg = Release|Any CPU - {22F36E4A-98E6-4A1C-96CA-52CA46F19274}.Release|Any CPU.Build.0 = Release|Any CPU - {22F36E4A-98E6-4A1C-96CA-52CA46F19274}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {22F36E4A-98E6-4A1C-96CA-52CA46F19274}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {22F36E4A-98E6-4A1C-96CA-52CA46F19274}.Release|x86.ActiveCfg = Release|Any CPU - {511FB369-57D2-430B-9002-F367DF165E70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {511FB369-57D2-430B-9002-F367DF165E70}.Debug|Any CPU.Build.0 = Debug|Any CPU - {511FB369-57D2-430B-9002-F367DF165E70}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {511FB369-57D2-430B-9002-F367DF165E70}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {511FB369-57D2-430B-9002-F367DF165E70}.Debug|x86.ActiveCfg = Debug|Any CPU - {511FB369-57D2-430B-9002-F367DF165E70}.Release|Any CPU.ActiveCfg = Release|Any CPU - {511FB369-57D2-430B-9002-F367DF165E70}.Release|Any CPU.Build.0 = Release|Any CPU - {511FB369-57D2-430B-9002-F367DF165E70}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {511FB369-57D2-430B-9002-F367DF165E70}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {511FB369-57D2-430B-9002-F367DF165E70}.Release|x86.ActiveCfg = Release|Any CPU - {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Debug|x86.ActiveCfg = Debug|Any CPU - {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Release|Any CPU.Build.0 = Release|Any CPU - {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {DB0F7672-AFCC-4152-A231-7DCFDD5F219F}.Release|x86.ActiveCfg = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {6EE69D18-F8AB-4CF9-AC3D-4719F36A8D99} = {01F2E61E-7F20-4F2E-8A3C-6604B18415B9} - {F927B3FE-820C-4EE1-921F-D10D3AE287AE} = {01F2E61E-7F20-4F2E-8A3C-6604B18415B9} - {A4A049A4-665A-4651-9046-7D06E9D0CCDC} = {01F2E61E-7F20-4F2E-8A3C-6604B18415B9} - {1A9C0E21-DE3B-4B2D-9EF0-39AA1922CDA6} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE} - {EF6701CF-21C3-45B5-9C90-40BE6130BB7D} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE} - {44733C25-7F22-4B91-83C7-4E654063DFD6} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE} - {A36AB9C9-D813-4018-B341-8729A9B5BD7D} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE} - {CAB850B9-1D47-4F45-A6A5-07B48599B5D7} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE} - {CBED4977-79ED-4E46-AA00-0A4D83D333A6} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE} - {10EFEFC6-F2CC-4C6E-955C-668B17F7F342} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE} - {22F36E4A-98E6-4A1C-96CA-52CA46F19274} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE} - {511FB369-57D2-430B-9002-F367DF165E70} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE} - {DB0F7672-AFCC-4152-A231-7DCFDD5F219F} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE} - EndGlobalSection -EndGlobal diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc b/Release/v1.5.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc deleted file mode 100644 index 794f014c..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.5.0/ExtendedWPFToolkitSolution/Libs/Prism/Microsoft.Practices.Prism.UnityExtensions.dll b/Release/v1.5.0/ExtendedWPFToolkitSolution/Libs/Prism/Microsoft.Practices.Prism.UnityExtensions.dll deleted file mode 100644 index 99c42d6b..00000000 Binary files a/Release/v1.5.0/ExtendedWPFToolkitSolution/Libs/Prism/Microsoft.Practices.Prism.UnityExtensions.dll and /dev/null differ diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Libs/Prism/Microsoft.Practices.Prism.dll b/Release/v1.5.0/ExtendedWPFToolkitSolution/Libs/Prism/Microsoft.Practices.Prism.dll deleted file mode 100644 index 383c1f46..00000000 Binary files a/Release/v1.5.0/ExtendedWPFToolkitSolution/Libs/Prism/Microsoft.Practices.Prism.dll and /dev/null differ diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Libs/Prism/Microsoft.Practices.Unity.dll b/Release/v1.5.0/ExtendedWPFToolkitSolution/Libs/Prism/Microsoft.Practices.Unity.dll deleted file mode 100644 index 84f1870d..00000000 Binary files a/Release/v1.5.0/ExtendedWPFToolkitSolution/Libs/Prism/Microsoft.Practices.Unity.dll and /dev/null differ diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/BusyIndicatorModule.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/BusyIndicatorModule.cs deleted file mode 100644 index f5aa895a..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/BusyIndicatorModule.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using Samples.Infrastructure; -using Microsoft.Practices.Unity; -using Microsoft.Practices.Prism.Regions; -using Samples.Infrastructure.Extensions; -using Samples.Modules.BusyIndicator.NavigationItems; -using Samples.Modules.BusyIndicator.Views; - -namespace Samples.Modules.BusyIndicator -{ - public class BusyIndicatorModule : ModuleBase - { - public BusyIndicatorModule(IUnityContainer container, IRegionManager regionManager) - : base(container, regionManager) - { - } - - protected override void RegisterViewsAndTypes() - { - Container.RegisterNavigationType(typeof(BusyIndicatorView)); - Container.RegisterNavigationType(typeof(BusyIndicatorCustomContentView)); - Container.RegisterNavigationType(typeof(BusyIndicatorCustomContentTemplateView)); - } - - protected override void InitializeModule() - { - RegionManager.RegisterViewWithRegion(RegionNames.NavigationRegion, typeof(BusyIndicatorNavItem)); - } - } -} diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Images/CdBurning32.png b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Images/CdBurning32.png deleted file mode 100644 index 2f6f4871..00000000 Binary files a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Images/CdBurning32.png and /dev/null differ diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/NavigationItems/BusyIndicatorNavItem.xaml b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/NavigationItems/BusyIndicatorNavItem.xaml deleted file mode 100644 index 14e971f5..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/NavigationItems/BusyIndicatorNavItem.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentTemplateView.xaml.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentTemplateView.xaml.cs deleted file mode 100644 index ddd46af9..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentTemplateView.xaml.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using Samples.Infrastructure.Controls; -using Microsoft.Practices.Prism.Regions; - -namespace Samples.Modules.BusyIndicator.Views -{ - /// - /// Interaction logic for BusyIndicatorCustomContentTemplateView.xaml - /// - [RegionMemberLifetime(KeepAlive=false)] - public partial class BusyIndicatorCustomContentTemplateView : DemoView - { - public BusyIndicatorCustomContentTemplateView() - { - InitializeComponent(); - } - } -} diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentView.xaml b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentView.xaml deleted file mode 100644 index 7c936ba1..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentView.xaml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentView.xaml.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentView.xaml.cs deleted file mode 100644 index 36ce6ab3..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentView.xaml.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using Samples.Infrastructure.Controls; -using Microsoft.Practices.Prism.Regions; - -namespace Samples.Modules.BusyIndicator.Views -{ - /// - /// Interaction logic for BusyIndicatorCustomContentView.xaml - /// - [RegionMemberLifetime(KeepAlive=false)] - public partial class BusyIndicatorCustomContentView : DemoView - { - public BusyIndicatorCustomContentView() - { - InitializeComponent(); - } - } -} diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorView.xaml b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorView.xaml deleted file mode 100644 index 44910071..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorView.xaml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorView.xaml.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorView.xaml.cs deleted file mode 100644 index eea3cb14..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorView.xaml.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using Samples.Infrastructure.Controls; -using Microsoft.Practices.Prism.Regions; -using System.Windows.Data; - -namespace Samples.Modules.BusyIndicator.Views -{ - /// - /// Interaction logic for HomeView.xaml - /// - [RegionMemberLifetime(KeepAlive=false)] - public partial class BusyIndicatorView : DemoView - { - public BusyIndicatorView() - { - InitializeComponent(); - } - } - - public class IntegerToTimespanConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - return TimeSpan.FromMilliseconds((int)value); - } - - public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/ButtonModule.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/ButtonModule.cs deleted file mode 100644 index 66526652..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/ButtonModule.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using Samples.Infrastructure; -using Microsoft.Practices.Prism.Regions; -using Microsoft.Practices.Unity; -using Samples.Infrastructure.Extensions; -using Samples.Modules.Button.Views; -using Samples.Modules.Button.NavigationItems; - -namespace Samples.Modules.Button -{ - public class ButtonModule : ModuleBase - { - public ButtonModule(IUnityContainer container, IRegionManager regionManager) - : base(container, regionManager) { } - - protected override void InitializeModule() - { - RegionManager.RegisterViewWithRegion(RegionNames.NavigationRegion, typeof(ButtonSpinnerNavItem)); - RegionManager.RegisterViewWithRegion(RegionNames.NavigationRegion, typeof(DropDownButtonNavItem)); - RegionManager.RegisterViewWithRegion(RegionNames.NavigationRegion, typeof(SplitButtonNavItem)); - } - - protected override void RegisterViewsAndTypes() - { - Container.RegisterNavigationType(typeof(ButtonSpinnerView)); - Container.RegisterNavigationType(typeof(DropDownButtonView)); - Container.RegisterNavigationType(typeof(SplitButtonView)); - } - } -} diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/NavigationItems/ButtonSpinnerNavItem.xaml b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/NavigationItems/ButtonSpinnerNavItem.xaml deleted file mode 100644 index 229405ba..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/NavigationItems/ButtonSpinnerNavItem.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/ViewModelBase.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/ViewModelBase.cs deleted file mode 100644 index b663320b..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/ViewModelBase.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.ComponentModel; - -namespace Samples.Infrastructure -{ - public interface IViewModel { } - - public class ViewModelBase : IViewModel, INotifyPropertyChanged - { - public event PropertyChangedEventHandler PropertyChanged; - protected virtual void OnPropertyChanged(string propertyName) - { - if (PropertyChanged != null) - PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - } -} diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.config b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.config deleted file mode 100644 index cc9cb69d..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.config +++ /dev/null @@ -1,19 +0,0 @@ - - - -
- - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.xaml b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.xaml deleted file mode 100644 index 99b2dad0..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.xaml.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.xaml.cs deleted file mode 100644 index d59478b5..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.xaml.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Windows; -using System.Globalization; -using System.Threading; - -namespace Samples -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - protected override void OnStartup(StartupEventArgs e) - { - // Put the following code before InitializeComponent() - // Sets the culture to French (France) - //Thread.CurrentThread.CurrentCulture = new CultureInfo("da-DK"); - // Sets the UI culture to French (France) - //Thread.CurrentThread.CurrentUICulture = new CultureInfo("da-DK"); - - base.OnStartup(e); - Bootstrapper bootstrapper = new Bootstrapper(); - bootstrapper.Run(); - } - } -} diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Bootstrapper.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Bootstrapper.cs deleted file mode 100644 index 9323254e..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Bootstrapper.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using Microsoft.Practices.Prism.UnityExtensions; -using Microsoft.Practices.Unity; -using System.Windows; -using Microsoft.Practices.Prism.Modularity; - -namespace Samples -{ - public class Bootstrapper : UnityBootstrapper - { - protected override DependencyObject CreateShell() - { - Container.RegisterType(); - return Container.Resolve(); - } - - protected override void InitializeShell() - { - base.InitializeShell(); - - App.Current.MainWindow = (Shell)Shell; - App.Current.MainWindow.Show(); - } - - protected override Microsoft.Practices.Prism.Modularity.IModuleCatalog CreateModuleCatalog() - { - return new ConfigurationModuleCatalog(); - } - } -} diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/IShellViewModel.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/IShellViewModel.cs deleted file mode 100644 index b9250d81..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/IShellViewModel.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; - -namespace Samples -{ - public interface IShellViewModel - { - } -} diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Images/Background.png b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Images/Background.png deleted file mode 100644 index ea52078d..00000000 Binary files a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Images/Background.png and /dev/null differ diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/AssemblyInfo.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/AssemblyInfo.cs deleted file mode 100644 index d59369ca..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Samples")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Samples")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2011")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Resources.Designer.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Resources.Designer.cs deleted file mode 100644 index b8917e35..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.235 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Samples.Properties { - using System; - - - /// - /// 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 (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("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.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Resources.resx b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Resources.resx deleted file mode 100644 index ffecec85..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Settings.Designer.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Settings.Designer.cs deleted file mode 100644 index 2afd4b0b..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.235 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Samples.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.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Settings.settings b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Settings.settings deleted file mode 100644 index 8f2fd95d..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Resources/TextBlockStyles.xaml b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Resources/TextBlockStyles.xaml deleted file mode 100644 index b5b8bd85..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Resources/TextBlockStyles.xaml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Resources/TreeViewStyles.xaml b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Resources/TreeViewStyles.xaml deleted file mode 100644 index 40015624..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Resources/TreeViewStyles.xaml +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Samples.csproj b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Samples.csproj deleted file mode 100644 index 7f7b711a..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Samples.csproj +++ /dev/null @@ -1,142 +0,0 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {6EE69D18-F8AB-4CF9-AC3D-4719F36A8D99} - WinExe - Properties - Samples - Samples - v4.0 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - SAK - SAK - SAK - SAK - Client - - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\Libs\Prism\Microsoft.Practices.Prism.dll - - - False - ..\..\..\Libs\Prism\Microsoft.Practices.Prism.UnityExtensions.dll - - - False - ..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll - - - - - - - - - - - - - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - - - Shell.xaml - - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - {72E591D6-8F83-4D8C-8F67-9C325E623234} - WPFToolkit.Extended - - - {A4A049A4-665A-4651-9046-7D06E9D0CCDC} - Samples.Infrastructure - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - - - - \ No newline at end of file diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Samples.csproj.vspscc b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Samples.csproj.vspscc deleted file mode 100644 index feffdeca..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Samples.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"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.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Shell.xaml b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Shell.xaml deleted file mode 100644 index 413091d1..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Shell.xaml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Shell.xaml.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Shell.xaml.cs deleted file mode 100644 index a4af829b..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/Shell.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.ComponentModel; - -namespace Samples -{ - public partial class Shell : Window - { - public Shell(IShellViewModel viewModel) - { - InitializeComponent(); - ViewModel = viewModel; - } - - public IShellViewModel ViewModel - { - get { return (IShellViewModel)DataContext; } - private set { DataContext = value; } - } - - private void TreeView_Loaded(object sender, RoutedEventArgs e) - { - TreeView tv = (TreeView)sender; - tv.Items.SortDescriptions.Add(new SortDescription("Header", ListSortDirection.Ascending)); - } - } -} diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/ShellViewModel.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/ShellViewModel.cs deleted file mode 100644 index 8f91e527..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/Samples/Samples/ShellViewModel.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Windows.Input; -using Microsoft.Practices.Prism.Commands; -using Microsoft.Practices.Prism.Regions; -using Samples.Infrastructure; - -namespace Samples -{ - public class ShellViewModel : ViewModelBase, IShellViewModel - { - private readonly IRegionManager _regionManager; - - public ICommand NavigateCommand { get; set; } - - public ShellViewModel(IRegionManager regionManager) - { - _regionManager = regionManager; - NavigateCommand = new DelegateCommand(Navigate); - } - - private void Navigate(string navigatePath) - { - if (!String.IsNullOrWhiteSpace(navigatePath)) - _regionManager.RequestNavigate(RegionNames.ContentRegion, navigatePath); - } - } -} diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/BusyIndicator.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/BusyIndicator.cs deleted file mode 100644 index 6a73cd8f..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/BusyIndicator.cs +++ /dev/null @@ -1,266 +0,0 @@ -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.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/VisualStates.BusyIndicator.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/VisualStates.BusyIndicator.cs deleted file mode 100644 index 5d78d952..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Implementation/VisualStates.BusyIndicator.cs +++ /dev/null @@ -1,37 +0,0 @@ -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.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml deleted file mode 100644 index 734bff5a..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Collapsed - - - - - - - Collapsed - - - - - - - - - - - Visible - - - - - - - Visible - - - - - - - - - - - - - True - - - - - - - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ButtonSpinner.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ButtonSpinner.cs deleted file mode 100644 index fde872d8..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ButtonSpinner.cs +++ /dev/null @@ -1,231 +0,0 @@ -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/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinDirection.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinDirection.cs deleted file mode 100644 index aaa121fb..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinDirection.cs +++ /dev/null @@ -1,21 +0,0 @@ -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.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinEventArgs.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinEventArgs.cs deleted file mode 100644 index f8a89385..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinEventArgs.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/Spinner.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/Spinner.cs deleted file mode 100644 index 63b2a22a..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/Spinner.cs +++ /dev/null @@ -1,75 +0,0 @@ -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.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ValidSpinDirections.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ValidSpinDirections.cs deleted file mode 100644 index d744620d..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ValidSpinDirections.cs +++ /dev/null @@ -1,26 +0,0 @@ -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.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml deleted file mode 100644 index 1bfea78f..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs deleted file mode 100644 index 0ceeaa69..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs +++ /dev/null @@ -1,470 +0,0 @@ -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) - { - if (!IsFocused) - { - Focus(); - e.Handled = true; - } - } - - 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/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/CalculatorCommands.cs b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/CalculatorCommands.cs deleted file mode 100644 index 47fbc8df..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/CalculatorCommands.cs +++ /dev/null @@ -1,14 +0,0 @@ -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/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml b/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml deleted file mode 100644 index 37529ff7..00000000 --- a/Release/v1.5.0/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Themes/Generic.xaml +++ /dev/null @@ -1,496 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -