diff --git a/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln b/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln
index e2d8477b..8b521022 100644
--- a/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln
+++ b/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.sln
@@ -24,7 +24,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.BusyIndicat
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}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.Calculator", "Src\Samples\Modules\Samples.Modules.Calculator\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
@@ -44,68 +44,17 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.Wizard", "S
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.TimelinePanel", "Src\Samples\Modules\Samples.Modules.TimelinePanel\Samples.Modules.TimelinePanel.csproj", "{9FCBCEF6-6E41-4CD5-A49B-456890A038BA}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.Zoombox", "Src\Samples\Modules\Samples.Modules.Zoombox\Samples.Modules.Zoombox.csproj", "{D6581837-4158-4165-BE2F-35EBF9742A54}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.Pie", "Src\Samples\Modules\Samples.Modules.Pie\Samples.Modules.Pie.csproj", "{08E7A934-4991-4CFC-BE12-B43AC6713122}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.CheckLists", "Src\Samples\Modules\Samples.Modules.CheckLists\Samples.Modules.CheckLists.csproj", "{910A7A19-DD9F-4989-A001-BD7E5BAD2FE8}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.Magnifier", "Src\Samples\Modules\Samples.Modules.Magnifier\Samples.Modules.Magnifier.csproj", "{C3D3FFAD-2DA3-4142-8DE8-7045E347B63A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Modules.MessageBox", "Src\Samples\Modules\Samples.Modules.MessageBox\Samples.Modules.MessageBox.csproj", "{C324395B-C1D1-407B-8745-4AAC39B8BFD9}"
+EndProject
Global
- GlobalSection(TeamFoundationVersionControl) = preSolution
- SccNumberOfProjects = 15
- 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
- SccProjectUniqueName14 = Src\\Samples\\Modules\\Samples.Modules.TimelinePanel\\Samples.Modules.TimelinePanel.csproj
- SccProjectTopLevelParentUniqueName14 = ExtendedWPFToolkit.sln
- SccProjectName14 = Src/Samples/Modules/Samples.Modules.TimelinePanel
- SccLocalPath14 = Src\\Samples\\Modules\\Samples.Modules.TimelinePanel
- EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
@@ -255,6 +204,56 @@ Global
{9FCBCEF6-6E41-4CD5-A49B-456890A038BA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{9FCBCEF6-6E41-4CD5-A49B-456890A038BA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{9FCBCEF6-6E41-4CD5-A49B-456890A038BA}.Release|x86.ActiveCfg = Release|Any CPU
+ {D6581837-4158-4165-BE2F-35EBF9742A54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D6581837-4158-4165-BE2F-35EBF9742A54}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D6581837-4158-4165-BE2F-35EBF9742A54}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {D6581837-4158-4165-BE2F-35EBF9742A54}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {D6581837-4158-4165-BE2F-35EBF9742A54}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D6581837-4158-4165-BE2F-35EBF9742A54}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D6581837-4158-4165-BE2F-35EBF9742A54}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D6581837-4158-4165-BE2F-35EBF9742A54}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {D6581837-4158-4165-BE2F-35EBF9742A54}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {D6581837-4158-4165-BE2F-35EBF9742A54}.Release|x86.ActiveCfg = Release|Any CPU
+ {08E7A934-4991-4CFC-BE12-B43AC6713122}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {08E7A934-4991-4CFC-BE12-B43AC6713122}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {08E7A934-4991-4CFC-BE12-B43AC6713122}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {08E7A934-4991-4CFC-BE12-B43AC6713122}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {08E7A934-4991-4CFC-BE12-B43AC6713122}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {08E7A934-4991-4CFC-BE12-B43AC6713122}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {08E7A934-4991-4CFC-BE12-B43AC6713122}.Release|Any CPU.Build.0 = Release|Any CPU
+ {08E7A934-4991-4CFC-BE12-B43AC6713122}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {08E7A934-4991-4CFC-BE12-B43AC6713122}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {08E7A934-4991-4CFC-BE12-B43AC6713122}.Release|x86.ActiveCfg = Release|Any CPU
+ {910A7A19-DD9F-4989-A001-BD7E5BAD2FE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {910A7A19-DD9F-4989-A001-BD7E5BAD2FE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {910A7A19-DD9F-4989-A001-BD7E5BAD2FE8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {910A7A19-DD9F-4989-A001-BD7E5BAD2FE8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {910A7A19-DD9F-4989-A001-BD7E5BAD2FE8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {910A7A19-DD9F-4989-A001-BD7E5BAD2FE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {910A7A19-DD9F-4989-A001-BD7E5BAD2FE8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {910A7A19-DD9F-4989-A001-BD7E5BAD2FE8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {910A7A19-DD9F-4989-A001-BD7E5BAD2FE8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {910A7A19-DD9F-4989-A001-BD7E5BAD2FE8}.Release|x86.ActiveCfg = Release|Any CPU
+ {C3D3FFAD-2DA3-4142-8DE8-7045E347B63A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C3D3FFAD-2DA3-4142-8DE8-7045E347B63A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C3D3FFAD-2DA3-4142-8DE8-7045E347B63A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {C3D3FFAD-2DA3-4142-8DE8-7045E347B63A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {C3D3FFAD-2DA3-4142-8DE8-7045E347B63A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C3D3FFAD-2DA3-4142-8DE8-7045E347B63A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C3D3FFAD-2DA3-4142-8DE8-7045E347B63A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C3D3FFAD-2DA3-4142-8DE8-7045E347B63A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {C3D3FFAD-2DA3-4142-8DE8-7045E347B63A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {C3D3FFAD-2DA3-4142-8DE8-7045E347B63A}.Release|x86.ActiveCfg = Release|Any CPU
+ {C324395B-C1D1-407B-8745-4AAC39B8BFD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C324395B-C1D1-407B-8745-4AAC39B8BFD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C324395B-C1D1-407B-8745-4AAC39B8BFD9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {C324395B-C1D1-407B-8745-4AAC39B8BFD9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {C324395B-C1D1-407B-8745-4AAC39B8BFD9}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C324395B-C1D1-407B-8745-4AAC39B8BFD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C324395B-C1D1-407B-8745-4AAC39B8BFD9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C324395B-C1D1-407B-8745-4AAC39B8BFD9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {C324395B-C1D1-407B-8745-4AAC39B8BFD9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {C324395B-C1D1-407B-8745-4AAC39B8BFD9}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -274,5 +273,10 @@ Global
{511FB369-57D2-430B-9002-F367DF165E70} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE}
{DB0F7672-AFCC-4152-A231-7DCFDD5F219F} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE}
{9FCBCEF6-6E41-4CD5-A49B-456890A038BA} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE}
+ {D6581837-4158-4165-BE2F-35EBF9742A54} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE}
+ {08E7A934-4991-4CFC-BE12-B43AC6713122} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE}
+ {910A7A19-DD9F-4989-A001-BD7E5BAD2FE8} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE}
+ {C3D3FFAD-2DA3-4142-8DE8-7045E347B63A} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE}
+ {C324395B-C1D1-407B-8745-4AAC39B8BFD9} = {F927B3FE-820C-4EE1-921F-D10D3AE287AE}
EndGlobalSection
EndGlobal
diff --git a/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc b/ExtendedWPFToolkitSolution/ExtendedWPFToolkit.vssscc
deleted file mode 100644
index 794f014c..00000000
--- a/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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Properties/Resources.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Properties/Resources.Designer.cs
deleted file mode 100644
index 60f1e1db..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/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.Modules.BusyIndicator.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.Modules.BusyIndicator.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Properties/Resources.resx
deleted file mode 100644
index ffecec85..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Properties/Settings.Designer.cs
deleted file mode 100644
index 0253ff22..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/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.Modules.BusyIndicator.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Properties/Settings.settings b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Resources/Common.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Resources/Common.xaml
index 86c8dd5e..5b338152 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Resources/Common.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Resources/Common.xaml
@@ -57,4 +57,4 @@
-
\ No newline at end of file
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Samples.Modules.BusyIndicator.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Samples.Modules.BusyIndicator.csproj
index 43f3a24c..a491c78b 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Samples.Modules.BusyIndicator.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Samples.Modules.BusyIndicator.csproj
@@ -14,10 +14,6 @@
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
- SAK
- SAK
- SAK
- SAK
Client
@@ -46,6 +42,14 @@
False
..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
@@ -74,36 +78,8 @@
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
@@ -131,14 +107,14 @@
- xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Samples.Modules.BusyIndicator.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Samples.Modules.BusyIndicator.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Samples.Modules.BusyIndicator.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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentTemplateView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentTemplateView.xaml
index 9d99d869..e3c86813 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentTemplateView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentTemplateView.xaml
@@ -21,7 +21,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- Title="BusyIndicator">
+ Title="BusyIndicator"
+ Description="This example demonstrates how to create a custom content template by setting the BusyContentTemplate property to an instance of a custom DataTemplate. Take notice of how the default ProgressBar is being hidden by setting the PrgressBarStyle property. The default OverlayStyle is also being set to a custom style.">
+
@@ -30,52 +32,41 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentView.xaml
index 83cd30b4..a2201786 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorCustomContentView.xaml
@@ -21,7 +21,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- Title="BusyIndicator">
+ Title="BusyIndicator"
+ Description="This example demonstrates how to define your own custom content. This is done by setting the BusyContent property.">
@@ -30,30 +31,19 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorView.xaml
index 7ce5fd9d..43fc12c3 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.BusyIndicator/Views/BusyIndicatorView.xaml
@@ -22,7 +22,8 @@
xmlns:local="clr-namespace:Samples.Modules.BusyIndicator.Views"
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- Title="BusyIndicator">
+ Title="BusyIndicator"
+ Description="BusyIndicator makes it easy to let the user know when an application is busy. Simply wrap the relevant content in an instance of the BusyIndicator control and toggle its IsBusy property to True during any long-running process.">
@@ -36,16 +37,12 @@
-
-
-
-
+
@@ -67,7 +64,7 @@
-
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Properties/Resources.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Properties/Resources.Designer.cs
deleted file mode 100644
index ae461a5e..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +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.Modules.Calculator.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Samples.Modules.Button.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Properties/Resources.resx
deleted file mode 100644
index ffecec85..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Properties/Settings.Designer.cs
deleted file mode 100644
index 2b836727..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +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.Modules.Calculator.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Properties/Settings.settings b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Samples.Modules.Button.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Samples.Modules.Button.csproj
index 3b6c3c91..07a30103 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Samples.Modules.Button.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Samples.Modules.Button.csproj
@@ -15,10 +15,6 @@
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
- SAK
- SAK
- SAK
- SAK
true
@@ -46,6 +42,14 @@
False
..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
@@ -77,30 +81,12 @@
Code
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
DropDownButtonView.xaml
SplitButtonView.xaml
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
@@ -129,26 +115,16 @@
MSBuild:Compile
-
-
- {72E591D6-8F83-4D8C-8F67-9C325E623234}
- WPFToolkit.Extended
-
-
- {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
- Samples.Infrastructure
-
-
- xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Samples.Modules.Button.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Samples.Modules.Button.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Samples.Modules.Button.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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Views/ButtonSpinnerView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Views/ButtonSpinnerView.xaml
index b47915f2..19c8127e 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Views/ButtonSpinnerView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Views/ButtonSpinnerView.xaml
@@ -21,18 +21,29 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- Title="ButtonSpinner">
+ xmlns:s="clr-namespace:System;assembly=mscorlib"
+ Title="ButtonSpinner"
+ Description="The ButtonSpinner control allows you to add button spinners to any element and then respond to the Spin event to manipulate that element. The Spin event lets the developer know which direction the buttons are spinning; SpinDirection.Increase indicates an increment, SpinDirection.Decrease indicates a decrement.">
+
+
+ John Smith
+ Janel Leverling
+ Laura Callahan
+ Robert King
+ Margaret Peacock
+ Andrew Fuller
+ Anne Dodsworth
+ Nancy Davolio
+ Naomi Suyama
+
+
-
-
-
-
+
@@ -51,9 +62,9 @@
-
+
-
-
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Views/ButtonSpinnerView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Views/ButtonSpinnerView.xaml.cs
index 5f48a03d..a552f35a 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Views/ButtonSpinnerView.xaml.cs
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Views/ButtonSpinnerView.xaml.cs
@@ -38,22 +38,23 @@ namespace Samples.Modules.Button.Views
private void ButtonSpinner_Spin( object sender, SpinEventArgs e )
{
+ String[] names = (String[])this.Resources[ "names" ];
+
ButtonSpinner spinner = ( ButtonSpinner )sender;
TextBox txtBox = ( TextBox )spinner.Content;
- try
- {
- int value = String.IsNullOrEmpty( txtBox.Text ) ? 0 : Convert.ToInt32( txtBox.Text );
- if( e.Direction == SpinDirection.Increase )
- value++;
- else
- value--;
- txtBox.Text = value.ToString();
- }
- catch
- {
- txtBox.Text = "0";
- }
+ int value = Array.IndexOf( names, txtBox.Text );
+ if( e.Direction == SpinDirection.Increase )
+ value++;
+ else
+ value--;
+
+ if( value < 0 )
+ value = names.Length - 1;
+ else if( value >= names.Length )
+ value = 0;
+
+ txtBox.Text = names[ value ];
}
}
}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Views/DropDownButtonView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Views/DropDownButtonView.xaml
index b2c7cfd7..ef033ca7 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Views/DropDownButtonView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Button/Views/DropDownButtonView.xaml
@@ -21,18 +21,15 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- Title="DropDownButton">
+ Title="DropDownButton"
+ Description="The DropDownButton control is a button that when clicked displays a drop down in which you can place any custom content within.">
-
-
-
-
+
@@ -48,7 +45,7 @@
-
+
+ Title="SplitButton"
+ Description="The SplitButton control is a button that can be clicked and also provides a drop down in which you can place any custom content within.">
-
-
-
-
+
@@ -48,7 +45,7 @@
-
+
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.235
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Samples.Modules.Calculator.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.Modules.Calculator.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Properties/Resources.resx
deleted file mode 100644
index ffecec85..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Properties/Settings.Designer.cs
deleted file mode 100644
index 856bc8b3..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/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.Modules.Calculator.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Properties/Settings.settings b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Samples.Modules.Calculator.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Samples.Modules.Calculator.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Samples.Modules.Calculator.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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/CalculatorModule.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/CalculatorModule.cs
similarity index 100%
rename from ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/CalculatorModule.cs
rename to ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/CalculatorModule.cs
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/NavigationItems/CalculatorNavItem.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/NavigationItems/CalculatorNavItem.xaml
similarity index 100%
rename from ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/NavigationItems/CalculatorNavItem.xaml
rename to ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/NavigationItems/CalculatorNavItem.xaml
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/NavigationItems/CalculatorNavItem.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/NavigationItems/CalculatorNavItem.xaml.cs
similarity index 100%
rename from ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/NavigationItems/CalculatorNavItem.xaml.cs
rename to ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/NavigationItems/CalculatorNavItem.xaml.cs
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/NavigationItems/CalculatorUpDownNavItem.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/NavigationItems/CalculatorUpDownNavItem.xaml
similarity index 100%
rename from ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/NavigationItems/CalculatorUpDownNavItem.xaml
rename to ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/NavigationItems/CalculatorUpDownNavItem.xaml
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/NavigationItems/CalculatorUpDownNavItem.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/NavigationItems/CalculatorUpDownNavItem.xaml.cs
similarity index 100%
rename from ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/NavigationItems/CalculatorUpDownNavItem.xaml.cs
rename to ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/NavigationItems/CalculatorUpDownNavItem.xaml.cs
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Properties/AssemblyInfo.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/Properties/AssemblyInfo.cs
similarity index 100%
rename from ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Properties/AssemblyInfo.cs
rename to ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/Properties/AssemblyInfo.cs
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Samples.Modules.Calculator.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/Samples.Modules.Calculator.csproj
similarity index 82%
rename from ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Samples.Modules.Calculator.csproj
rename to ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/Samples.Modules.Calculator.csproj
index e15df91c..afe7e919 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Samples.Modules.Calculator.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/Samples.Modules.Calculator.csproj
@@ -15,10 +15,6 @@
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
- SAK
- SAK
- SAK
- SAK
true
@@ -46,6 +42,14 @@
False
..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
@@ -71,42 +75,14 @@
Code
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
CalculatorUpDownView.xaml
CalculatorView.xaml
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
- {72E591D6-8F83-4D8C-8F67-9C325E623234}
- WPFToolkit.Extended
-
-
- {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
- Samples.Infrastructure
-
-
Designer
@@ -128,14 +104,14 @@
- xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Views/CalculatorUpDownView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/Views/CalculatorUpDownView.xaml
similarity index 87%
rename from ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Views/CalculatorUpDownView.xaml
rename to ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/Views/CalculatorUpDownView.xaml
index 6cea6fab..bf17aecd 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Views/CalculatorUpDownView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/Views/CalculatorUpDownView.xaml
@@ -21,18 +21,15 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- Title="CalculatorUpDown">
+ Title="CalculatorUpDown"
+ Description="The CalculatorUpDown provides a TextBox with button spinners that allow incrementing and decrementing numeric values by using the spinner buttons, keyboard up/down arrows, or mouse wheel. It also provides a Calculator dropdown which allows you to perform mathematical calculations.">
-
-
-
-
+
@@ -66,7 +63,7 @@
-
+
+ Title="Calculator"
+ Description="The Calculator is a control used for performing mathematical calculations.">
-
-
-
+
@@ -48,7 +46,7 @@
-
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Views/CalculatorView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/Views/CalculatorView.xaml.cs
similarity index 100%
rename from ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Caclulator/Views/CalculatorView.xaml.cs
rename to ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Calculator/Views/CalculatorView.xaml.cs
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/CheckListsModule.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/CheckListsModule.cs
new file mode 100644
index 00000000..b61760cc
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/CheckListsModule.cs
@@ -0,0 +1,45 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using Microsoft.Practices.Prism.Regions;
+using Microsoft.Practices.Unity;
+using Samples.Infrastructure;
+using Samples.Infrastructure.Extensions;
+using Samples.Modules.CheckLists.Views;
+
+namespace Samples.Modules.CheckLists
+{
+ public class CheckListsModule : ModuleBase
+ {
+ public CheckListsModule( IUnityContainer container, IRegionManager regionManager )
+ : base( container, regionManager )
+ {
+ }
+
+ protected override void InitializeModule()
+ {
+ RegionManager.RegisterViewWithRegion( RegionNames.NavigationRegion, typeof( NavigationView ) );
+ }
+
+ protected override void RegisterViewsAndTypes()
+ {
+ Container.RegisterNavigationType( typeof( HomeView ) );
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Properties/AssemblyInfo.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..094cb011
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Properties/AssemblyInfo.cs
@@ -0,0 +1,72 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System.Reflection;
+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 CheckLists Sample" )]
+[assembly: AssemblyDescription( "" )]
+[assembly: AssemblyConfiguration( "" )]
+[assembly: AssemblyCompany( "Xceed Software Inc." )]
+[assembly: AssemblyProduct( "Extended WPF Toolkit CheckLists Sample" )]
+[assembly: AssemblyCopyright( "Copyright © Xceed Software Inc. 2010-2012" )]
+[assembly: AssemblyTrademark( "" )]
+[assembly: AssemblyCulture( "" )]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible( false )]
+
+//In order to begin building localizable applications, set
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion( "1.0.0.0" )]
+[assembly: AssemblyFileVersion( "1.0.0.0" )]
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Samples.Modules.CheckLists.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Samples.Modules.CheckLists.csproj
new file mode 100644
index 00000000..1c1495ad
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Samples.Modules.CheckLists.csproj
@@ -0,0 +1,102 @@
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {910A7A19-DD9F-4989-A001-BD7E5BAD2FE8}
+ library
+ Properties
+ Samples.Modules.CheckLists
+ Samples.Modules.CheckLists
+ v4.0
+ Client
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\..\..\..\Libs\Prism\Microsoft.Practices.Prism.dll
+
+
+ ..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ HomeView.xaml
+
+
+ NavigationView.xaml
+
+
+ Code
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+ Code
+
+
+
+
+
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
+
+
+
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Views/HomeView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Views/HomeView.xaml
new file mode 100644
index 00000000..8ce4243c
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Views/HomeView.xaml
@@ -0,0 +1,185 @@
+
+
+
+
+ ID
+ FirstName
+ LastName
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Views/HomeView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Views/HomeView.xaml.cs
new file mode 100644
index 00000000..f25cd72e
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Views/HomeView.xaml.cs
@@ -0,0 +1,135 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using Microsoft.Practices.Prism.Regions;
+using Samples.Infrastructure.Controls;
+
+namespace Samples.Modules.CheckLists.Views
+{
+ ///
+ /// Interaction logic for HomeView.xaml
+ ///
+ [RegionMemberLifetime( KeepAlive = false )]
+ public partial class HomeView : DemoView
+ {
+ public HomeView()
+ {
+ InitializeComponent();
+ this.DataContext = new List()
+ {
+ new Person(){ID=101, FirstName="John", LastName="Smith"},
+ new Person(){ID=102, FirstName="Janel", LastName="Leverling"},
+ new Person(){ID=103, FirstName="Laura", LastName="Callahan"},
+ new Person(){ID=104, FirstName="Robert", LastName="King"},
+ new Person(){ID=105, FirstName="Margaret", LastName="Peacock"},
+ new Person(){ID=106, FirstName="Andrew", LastName="Fuller"},
+ new Person(){ID=107, FirstName="Anne", LastName="Dodsworth"},
+ new Person(){ID=108, FirstName="Nancy", LastName="Davolio"},
+ new Person(){ID=109, FirstName="Naomi", LastName="Suyama"},
+ };
+ }
+
+ }
+
+ public class Person : INotifyPropertyChanged
+ {
+ private bool _isSelected;
+ private int _ID;
+ private string _firstName;
+ private string _lastName;
+
+ public bool IsSelected
+ {
+ get
+ {
+ return _isSelected;
+ }
+ set
+ {
+ _isSelected = value;
+ OnPropertyChanged( "IsSelected" );
+ }
+ }
+
+ public int ID
+ {
+ get
+ {
+ return _ID;
+ }
+ set
+ {
+ _ID = value;
+ OnPropertyChanged( "ID" );
+ }
+ }
+
+ public string FirstName
+ {
+ get
+ {
+ return _firstName;
+ }
+ set
+ {
+ _firstName = value;
+ OnPropertyChanged( "FirstName" );
+ }
+ }
+
+ public string LastName
+ {
+ get
+ {
+ return _lastName;
+ }
+ set
+ {
+ _lastName = value;
+ OnPropertyChanged( "LastName" );
+ }
+ }
+
+ public string ModelDisplay
+ {
+ get
+ {
+ string completeName = string.Format("{0} {1}", FirstName, LastName).PadRight(20);
+ return string.Format(
+ "ID={0}: Name= {1}, IsSelected= {2}",
+ ID,
+ completeName,
+ IsSelected );
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+ protected void OnPropertyChanged( string propertyName )
+ {
+ if( PropertyChanged != null )
+ {
+ PropertyChanged( this, new PropertyChangedEventArgs( propertyName ) );
+ PropertyChanged( this, new PropertyChangedEventArgs( "ModelDisplay" ) );
+ }
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Views/NavigationView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Views/NavigationView.xaml
new file mode 100644
index 00000000..fa613eb8
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Views/NavigationView.xaml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Views/NavigationView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Views/NavigationView.xaml.cs
new file mode 100644
index 00000000..6402721c
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.CheckLists/Views/NavigationView.xaml.cs
@@ -0,0 +1,34 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System.Windows.Controls;
+
+namespace Samples.Modules.CheckLists.Views
+{
+ ///
+ /// Interaction logic for NavigationView.xaml
+ ///
+ public partial class NavigationView : TreeViewItem
+ {
+ public NavigationView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Properties/Resources.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Properties/Resources.Designer.cs
deleted file mode 100644
index 32aa3409..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +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.Modules.ChildWindow.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Samples.Modules.ChildWindow.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Properties/Resources.resx
deleted file mode 100644
index ffecec85..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Properties/Settings.Designer.cs
deleted file mode 100644
index 527ff841..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +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.Modules.ChildWindow.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Properties/Settings.settings b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Samples.Modules.ChildWindow.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Samples.Modules.ChildWindow.csproj
index f41ec3d3..38ddac54 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Samples.Modules.ChildWindow.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Samples.Modules.ChildWindow.csproj
@@ -15,10 +15,6 @@
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
- SAK
- SAK
- SAK
- SAK
true
@@ -46,6 +42,14 @@
False
..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
@@ -65,30 +69,12 @@
Code
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
HomeView.xaml
NavigationView.xaml
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
@@ -101,26 +87,16 @@
MSBuild:Compile
-
-
- {72E591D6-8F83-4D8C-8F67-9C325E623234}
- WPFToolkit.Extended
-
-
- {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
- Samples.Infrastructure
-
-
- xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Samples.Modules.ChildWindow.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Samples.Modules.ChildWindow.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Samples.Modules.ChildWindow.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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Views/HomeView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Views/HomeView.xaml
index 12babdca..aabbdf21 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Views/HomeView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.ChildWindow/Views/HomeView.xaml
@@ -22,7 +22,8 @@
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
- Title="ChildWindow">
+ Title="ChildWindow"
+ Description="The ChildWindow can be used to create a window that is displayed within the bounds of a specific parent container.">
-
-
-
-
+
@@ -85,7 +82,7 @@
-
+
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.235
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Samples.Modules.Color.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Samples.Modules.Color.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Properties/Resources.resx
deleted file mode 100644
index ffecec85..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Properties/Settings.Designer.cs
deleted file mode 100644
index 71785ee5..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +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.Modules.Color.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Properties/Settings.settings b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Samples.Modules.Color.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Samples.Modules.Color.csproj
index df3a47b3..133f7118 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Samples.Modules.Color.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Samples.Modules.Color.csproj
@@ -15,10 +15,6 @@
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
- SAK
- SAK
- SAK
- SAK
true
@@ -46,6 +42,14 @@
False
..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
@@ -65,42 +69,14 @@
Code
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
HomeView.xaml
NavigationView.xaml
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
- {72E591D6-8F83-4D8C-8F67-9C325E623234}
- WPFToolkit.Extended
-
-
- {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
- Samples.Infrastructure
-
-
MSBuild:Compile
@@ -113,14 +89,14 @@
- xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Samples.Modules.Color.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Samples.Modules.Color.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Samples.Modules.Color.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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Views/HomeView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Views/HomeView.xaml
index fc85542a..fd2e7bae 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Views/HomeView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Views/HomeView.xaml
@@ -21,59 +21,160 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- Title="Color Controls">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Title="Color Controls"
+ Description="The ColorCanvas and ColorPicker controls allow the user to input a color. Not shown in the sample are the ColorPicker's Available, Standard and Recent color lists, which are entirely customizable.">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Views/HomeView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Views/HomeView.xaml.cs
index 457514c6..bd0cecf3 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Views/HomeView.xaml.cs
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Color/Views/HomeView.xaml.cs
@@ -34,166 +34,7 @@ namespace Samples.Modules.Color.Views
public HomeView()
{
InitializeComponent();
-
- DataContext = new Data();
-
- //List colors = new List();
- //colors.Add("1");
- //colors.Add("2");
- //colors.Add("3");
- //colors.Add("4");
- //colors.Add("5");
- //colors.Add("6");
- //colors.Add("7");
- //colors.Add("8");
- //colors.Add("9");
- //colors.Add("10");
-
-
- List colors = new List();
- colors.Add( new Person( System.Windows.Media.Colors.Red, 0 ) );
- colors.Add( new Person( System.Windows.Media.Colors.Purple, 1 )
- {
- IsSelected = true
- } );
- colors.Add( new Person( System.Windows.Media.Colors.Coral, 2 ) );
- colors.Add( new Person( System.Windows.Media.Colors.MidnightBlue, 3 )
- {
- IsSelected = true
- } );
- colors.Add( new Person( System.Windows.Media.Colors.Green, 4 ) );
- colors.Add( new Person( System.Windows.Media.Colors.Red, 5 ) );
- colors.Add( new Person( System.Windows.Media.Colors.Purple, 6 ) );
- colors.Add( new Person( System.Windows.Media.Colors.SaddleBrown, 7 ) );
- colors.Add( new Person( System.Windows.Media.Colors.MidnightBlue, 8 ) );
- colors.Add( new Person( System.Windows.Media.Colors.Green, 9 ) );
- colors.Add( new Person( System.Windows.Media.Colors.Red, 10 ) );
- colors.Add( new Person( System.Windows.Media.Colors.Purple, 11 ) );
- colors.Add( new Person( System.Windows.Media.Colors.SaddleBrown, 12 ) );
- colors.Add( new Person( System.Windows.Media.Colors.MidnightBlue, 13 ) );
- colors.Add( new Person( System.Windows.Media.Colors.Green, 14 ) );
- colors.Add( new Person( System.Windows.Media.Colors.Red, 15 ) );
- colors.Add( new Person( System.Windows.Media.Colors.Purple, 16 ) );
- colors.Add( new Person( System.Windows.Media.Colors.SaddleBrown, 17 ) );
- colors.Add( new Person( System.Windows.Media.Colors.MidnightBlue, 18 ) );
- colors.Add( new Person( System.Windows.Media.Colors.Green, 19 ) );
-
- //_dataGrid.ItemsSource = colors;
- //_chk.ItemsSource = colors;
- _combo.ItemsSource = colors;
- //_combo.SelectedValue = "1,3,5,7,9,";
-
- _listBox.ItemsSource = colors;
- //_listBox.SelectedValue = "1,3,5,7,9,";
- }
-
- private void Button_Click( object sender, System.Windows.RoutedEventArgs e )
- {
- ( DataContext as Data ).SelectedValue = "1,3,5,7,9,";
- }
- }
-
- public class Data : INotifyPropertyChanged
- {
- private string _selectedValues;// = "1,3,5,7,9,";
- public string SelectedValue
- {
- get
- {
- return _selectedValues;
- }
- set
- {
- _selectedValues = value;
- OnPropertyChanged( "SelectedValue" );
- }
- }
-
- private ObservableCollection _selectedItems = new ObservableCollection();
- public ObservableCollection SelectedItems
- {
- get
- {
- return _selectedItems;
- }
- set
- {
- _selectedItems = value;
- OnPropertyChanged( "SelectedItems" );
- }
- }
-
- public Data()
- {
- }
-
- public event PropertyChangedEventHandler PropertyChanged;
- protected void OnPropertyChanged( string propertyName )
- {
- if( PropertyChanged != null )
- PropertyChanged( this, new PropertyChangedEventArgs( propertyName ) );
}
- }
- public class Person : INotifyPropertyChanged
- {
- private bool _isSelected;
- public bool IsSelected
- {
- get
- {
- return _isSelected;
- }
- set
- {
- _isSelected = value;
- OnPropertyChanged( "IsSelected" );
- }
- }
-
- System.Windows.Media.Color _color;
- public System.Windows.Media.Color Color
- {
- get
- {
- return _color;
- }
- set
- {
- _color = value;
- OnPropertyChanged( "Color" );
- }
- }
-
- int _level;
- public int Level
- {
- get
- {
- return _level;
- }
- set
- {
- _level = value;
- OnPropertyChanged( "Level" );
- }
- }
-
- public Person()
- {
- }
-
- public Person( System.Windows.Media.Color color, int level )
- {
- this._color = color;
- this._level = level;
- }
-
- public event PropertyChangedEventHandler PropertyChanged;
- protected void OnPropertyChanged( string propertyName )
- {
- if( PropertyChanged != null )
- PropertyChanged( this, new PropertyChangedEventArgs( propertyName ) );
- }
}
}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Converters/DateTimeToTimeSpanConverter.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Converters/DateTimeToTimeSpanConverter.cs
new file mode 100644
index 00000000..039ba8ce
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Converters/DateTimeToTimeSpanConverter.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows.Data;
+using System.Globalization;
+
+namespace Samples.Modules.DateTime.Converters
+{
+ public class DateTimeToTimeSpanConverter : IValueConverter
+ {
+ public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
+ {
+ if( value is System.DateTime )
+ {
+ System.DateTime time = (System.DateTime)value;
+ return new TimeSpan( time.Hour, time.Minute, 0 );
+ }
+ return value;
+ }
+ public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Properties/Resources.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Properties/Resources.Designer.cs
deleted file mode 100644
index 3f225b2e..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +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.Modules.DateTime.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Samples.Modules.DateTime.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Properties/Resources.resx
deleted file mode 100644
index ffecec85..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Properties/Settings.Designer.cs
deleted file mode 100644
index 25f2d296..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +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.Modules.DateTime.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Properties/Settings.settings b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Samples.Modules.DateTime.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Samples.Modules.DateTime.csproj
index 56378629..24dd2df3 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Samples.Modules.DateTime.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Samples.Modules.DateTime.csproj
@@ -15,10 +15,6 @@
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
- SAK
- SAK
- SAK
- SAK
true
@@ -46,6 +42,14 @@
False
..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
@@ -61,46 +65,19 @@
+
Code
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
HomeView.xaml
NavigationView.xaml
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
- {72E591D6-8F83-4D8C-8F67-9C325E623234}
- WPFToolkit.Extended
-
-
- {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
- Samples.Infrastructure
-
-
MSBuild:Compile
@@ -113,14 +90,14 @@
- xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Samples.Modules.DateTime.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Samples.Modules.DateTime.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Samples.Modules.DateTime.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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Views/HomeView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Views/HomeView.xaml
index 94dc1214..4f195aec 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Views/HomeView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.DateTime/Views/HomeView.xaml
@@ -16,13 +16,104 @@
Visit http://xceed.com and follow @datagrid on Twitter.
********************************************************************-->
+
-
-
-
+ xmlns:sys="clr-namespace:System;assembly=mscorlib"
+ xmlns:conv="clr-namespace:Samples.Modules.DateTime.Converters"
+ Title="DateTime Controls"
+ Description="DateTimePicker and TimePicker controls let you the date and time with many possibilities. The TimePicker is included in the DateTimePicker.">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Converters/ColorConverter.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Converters/ColorConverter.cs
new file mode 100644
index 00000000..49f2e619
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Converters/ColorConverter.cs
@@ -0,0 +1,48 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows.Data;
+using System.Windows.Media;
+
+namespace Samples.Modules.Magnifier.Converters
+{
+ class ColorConverter : IValueConverter
+ {
+ #region IValueConverter Members
+
+ public object Convert( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
+ {
+ if( (value != null) && value is Color )
+ return new SolidColorBrush( (Color)value );
+
+ return value;
+ }
+
+ public object ConvertBack( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Converters/VisibilityConverter.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Converters/VisibilityConverter.cs
new file mode 100644
index 00000000..a0afac5d
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Converters/VisibilityConverter.cs
@@ -0,0 +1,76 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows.Data;
+using System.Windows.Media;
+using Xceed.Wpf.Toolkit;
+using System.Windows;
+
+namespace Samples.Modules.Magnifier.Converters
+{
+ class VisibilityConverter : IValueConverter
+ {
+ #region IValueConverter Members
+
+ public object Convert( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
+ {
+ if( value is FrameType )
+ {
+ FrameType frameType = (FrameType)value;
+ int param = int.Parse((string)parameter);
+ switch( frameType )
+ {
+ case FrameType.Circle:
+ {
+ //For the radius
+ if( param == 0 )
+ return Visibility.Visible;
+ //For the rectangle
+ else if( param == 1 )
+ return Visibility.Collapsed;
+ }
+ break;
+ case FrameType.Rectangle:
+ {
+ //For the radius
+ if( param == 0 )
+ return Visibility.Collapsed;
+ //For the rectangle
+ else if( param == 1 )
+ return Visibility.Visible;
+ }
+ break;
+ }
+ }
+
+ return value;
+ }
+
+ public object ConvertBack( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/MagnifierModule.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/MagnifierModule.cs
new file mode 100644
index 00000000..e44ea1ca
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/MagnifierModule.cs
@@ -0,0 +1,45 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using Microsoft.Practices.Prism.Regions;
+using Microsoft.Practices.Unity;
+using Samples.Infrastructure;
+using Samples.Infrastructure.Extensions;
+using Samples.Modules.Magnifier.Views;
+
+namespace Samples.Modules.Magnifier
+{
+ public class MagnifierModule : ModuleBase
+ {
+ public MagnifierModule( IUnityContainer container, IRegionManager regionManager )
+ : base( container, regionManager )
+ {
+ }
+
+ protected override void InitializeModule()
+ {
+ RegionManager.RegisterViewWithRegion( RegionNames.NavigationRegion, typeof( NavigationView ) );
+ }
+
+ protected override void RegisterViewsAndTypes()
+ {
+ Container.RegisterNavigationType( typeof( HomeView ) );
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Properties/AssemblyInfo.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..aec6a383
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle( "Extended WPF Toolkit Magnifier Sample" )]
+[assembly: AssemblyDescription( "" )]
+[assembly: AssemblyConfiguration( "" )]
+[assembly: AssemblyCompany( "Xceed Software Inc." )]
+[assembly: AssemblyProduct( "Extended WPF Toolkit Magnifier Sample" )]
+[assembly: AssemblyCopyright( "Copyright © Xceed Software Inc. 2010-2012" )]
+[assembly: AssemblyTrademark( "" )]
+[assembly: AssemblyCulture( "" )]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible( false )]
+
+//In order to begin building localizable applications, set
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion( "1.0.0.0" )]
+[assembly: AssemblyFileVersion( "1.0.0.0" )]
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Resources/SampleText.rtf b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Resources/SampleText.rtf
new file mode 100644
index 00000000..fcd8739b
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Resources/SampleText.rtf
@@ -0,0 +1,9 @@
+{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0 Times New Roman;}{\f2\fcharset0 Segoe UI;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;}\loch\hich\dbch\pard\plain\ltrpar\itap0{\lang1033\fs18\f2\cf0 \cf0\ql{\fs15\f2 {\b\ltrch "Using Xceed DataGrid for WPF Professional Edition in Microsoft Visual Studio Team System 2010 helped us greatly reduce the time and resources necessary for developing all the data presentation features we needed. Working with Xceed has been a pleasure, and they update the product often and provide innovative new features such as 3D views for visualizing data. We will certainly continue to look at their technology in the future as a complement to our products."}\li0\ri0\sa0\sb0\fi0\ql\par}
+{\fs15\f2 {\ltrch }\li0\ri0\sa0\sb0\fi0\ql\par}
+{\fs15\f2 {\ltrch - Norman Guadagno, director of product marketing for Microsoft Visual Studio Team System, October 27, 2008}\li0\ri0\sa0\sb0\fi0\ql\par}
+{\fs15\f2 {\ltrch }\li0\ri0\sa0\sb0\fi0\ql\par}
+{\fs15\f2 {\b\ltrch "IBM U2 researched existing third-party solutions and identified Xceed DataGrid for WPF as the most suitable tool. The datagrid\rquote s performance and solid foundation take true advantage of WPF and provide the extensibility required for IBM U2 customers to take their applications to the next level in presentation design and styling."}\li0\ri0\sa0\sb0\fi0\ql\par}
+{\fs15\f2 {\ltrch }\li0\ri0\sa0\sb0\fi0\ql\par}
+{\fs15\f2 {\ltrch - Vinnie Smith, U2 Tools product manager at IBM, October 27, 2008}\li0\ri0\sa0\sb0\fi0\ql\par}
+}
+}
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Samples.Modules.Magnifier.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Samples.Modules.Magnifier.csproj
new file mode 100644
index 00000000..e5baed58
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Samples.Modules.Magnifier.csproj
@@ -0,0 +1,103 @@
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {C3D3FFAD-2DA3-4142-8DE8-7045E347B63A}
+ library
+ Properties
+ Samples.Modules.Magnifier
+ Samples.Modules.Magnifier
+ v4.0
+ Client
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\..\..\..\Libs\Prism\Microsoft.Practices.Prism.dll
+
+
+ ..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ HomeView.xaml
+
+
+ NavigationView.xaml
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
+
+
+
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Views/HomeView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Views/HomeView.xaml
new file mode 100644
index 00000000..7873425c
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Views/HomeView.xaml
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Views/HomeView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Views/HomeView.xaml.cs
new file mode 100644
index 00000000..2b196426
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Views/HomeView.xaml.cs
@@ -0,0 +1,49 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System;
+using System.IO;
+using System.Windows;
+using System.Windows.Resources;
+using Microsoft.Practices.Prism.Regions;
+using Samples.Infrastructure.Controls;
+
+namespace Samples.Modules.Magnifier.Views
+{
+ ///
+ /// Interaction logic for HomeView.xaml
+ ///
+ [RegionMemberLifetime( KeepAlive = false )]
+ public partial class HomeView : DemoView
+ {
+ public HomeView()
+ {
+ InitializeComponent();
+
+ // Load and display the RTF file.
+ Uri uri = new Uri( "pack://application:,,,/Samples.Modules.Magnifier;component/Resources/SampleText.rtf" );
+ StreamResourceInfo info = Application.GetResourceStream( uri );
+ using( StreamReader txtReader = new StreamReader( info.Stream ) )
+ {
+ _txtContent.Text = txtReader.ReadToEnd();
+ }
+ }
+
+ }
+}
diff --git a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Views/NavigationView.xaml
similarity index 58%
rename from ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml
rename to ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Views/NavigationView.xaml
index 536bd326..cdb905c7 100644
--- a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Views/NavigationView.xaml
@@ -16,14 +16,13 @@
Visit http://xceed.com and follow @datagrid on Twitter.
********************************************************************-->
-
-
+
-
-
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Views/NavigationView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Views/NavigationView.xaml.cs
new file mode 100644
index 00000000..636d9f6c
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Magnifier/Views/NavigationView.xaml.cs
@@ -0,0 +1,34 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System.Windows.Controls;
+
+namespace Samples.Modules.Magnifier.Views
+{
+ ///
+ /// Interaction logic for NavigationView.xaml
+ ///
+ public partial class NavigationView : TreeViewItem
+ {
+ public NavigationView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/MessageBoxModule.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/MessageBoxModule.cs
new file mode 100644
index 00000000..343a520d
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/MessageBoxModule.cs
@@ -0,0 +1,45 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using Microsoft.Practices.Prism.Regions;
+using Microsoft.Practices.Unity;
+using Samples.Infrastructure;
+using Samples.Infrastructure.Extensions;
+using Samples.Modules.MessageBox.Views;
+
+namespace Samples.Modules.MessageBox
+{
+ public class MessageBoxModule : ModuleBase
+ {
+ public MessageBoxModule( IUnityContainer container, IRegionManager regionManager )
+ : base( container, regionManager )
+ {
+ }
+
+ protected override void InitializeModule()
+ {
+ RegionManager.RegisterViewWithRegion( RegionNames.NavigationRegion, typeof( NavigationView ) );
+ }
+
+ protected override void RegisterViewsAndTypes()
+ {
+ Container.RegisterNavigationType( typeof( HomeView ) );
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Properties/AssemblyInfo.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..10a2a031
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Properties/AssemblyInfo.cs
@@ -0,0 +1,72 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System.Reflection;
+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 MessageBox Sample" )]
+[assembly: AssemblyDescription( "" )]
+[assembly: AssemblyConfiguration( "" )]
+[assembly: AssemblyCompany( "Xceed Software Inc." )]
+[assembly: AssemblyProduct( "Extended WPF Toolkit MessageBox Sample" )]
+[assembly: AssemblyCopyright( "Copyright © Xceed Software Inc. 2010-2012" )]
+[assembly: AssemblyTrademark( "" )]
+[assembly: AssemblyCulture( "" )]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible( false )]
+
+//In order to begin building localizable applications, set
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion( "1.0.0.0" )]
+[assembly: AssemblyFileVersion( "1.0.0.0" )]
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Samples.Modules.MessageBox.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Samples.Modules.MessageBox.csproj
new file mode 100644
index 00000000..cb22cc89
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Samples.Modules.MessageBox.csproj
@@ -0,0 +1,101 @@
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {C324395B-C1D1-407B-8745-4AAC39B8BFD9}
+ library
+ Properties
+ Samples.Modules.MessageBox
+ Samples.Modules.MessageBox
+ v4.0
+ Client
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\..\..\..\Libs\Prism\Microsoft.Practices.Prism.dll
+
+
+ ..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+
+ NavigationView.xaml
+
+
+ MSBuild:Compile
+ Designer
+
+
+ HomeView.xaml
+ Code
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+
+ Code
+
+
+
+
+
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
+
+
+
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Views/HomeView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Views/HomeView.xaml
new file mode 100644
index 00000000..7733cac3
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Views/HomeView.xaml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Views/HomeView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Views/HomeView.xaml.cs
new file mode 100644
index 00000000..7141903e
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Views/HomeView.xaml.cs
@@ -0,0 +1,47 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using Microsoft.Practices.Prism.Regions;
+using Samples.Infrastructure.Controls;
+using System.Windows;
+
+namespace Samples.Modules.MessageBox.Views
+{
+ ///
+ /// Interaction logic for HomeView.xaml
+ ///
+ [RegionMemberLifetime( KeepAlive = false )]
+ public partial class HomeView : DemoView
+ {
+ public HomeView()
+ {
+ InitializeComponent();
+ }
+
+ private void Button_Click( object sender, System.Windows.RoutedEventArgs e )
+ {
+ System.Windows.Style style = ( System.Windows.Style )this.Resources[ "messageBoxStyle" ];
+ Xceed.Wpf.Toolkit.MessageBox.Show( null, "Hello World!", "Extended WPF Toolkit MessageBox", style );
+ }
+
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Views/NavigationView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Views/NavigationView.xaml
new file mode 100644
index 00000000..19ef4f60
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Views/NavigationView.xaml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Views/NavigationView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Views/NavigationView.xaml.cs
new file mode 100644
index 00000000..d6a4b87c
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.MessageBox/Views/NavigationView.xaml.cs
@@ -0,0 +1,34 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System.Windows.Controls;
+
+namespace Samples.Modules.MessageBox.Views
+{
+ ///
+ /// Interaction logic for NavigationView.xaml
+ ///
+ public partial class NavigationView : TreeViewItem
+ {
+ public NavigationView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Properties/Resources.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Properties/Resources.Designer.cs
deleted file mode 100644
index fe432862..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +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.Modules.Numeric.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Samples.Modules.Numeric.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Properties/Resources.resx
deleted file mode 100644
index ffecec85..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Properties/Settings.Designer.cs
deleted file mode 100644
index 566af9c6..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +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.Modules.Numeric.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Properties/Settings.settings b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Samples.Modules.Numeric.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Samples.Modules.Numeric.csproj
index 9b92c5b5..c8047b8a 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Samples.Modules.Numeric.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Samples.Modules.Numeric.csproj
@@ -15,10 +15,6 @@
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
- SAK
- SAK
- SAK
- SAK
true
@@ -46,6 +42,14 @@
False
..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
@@ -65,42 +69,14 @@
Code
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
HomeView.xaml
NavigationView.xaml
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
- {72E591D6-8F83-4D8C-8F67-9C325E623234}
- WPFToolkit.Extended
-
-
- {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
- Samples.Infrastructure
-
-
MSBuild:Compile
@@ -113,14 +89,14 @@
- xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Samples.Modules.Numeric.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Samples.Modules.Numeric.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Samples.Modules.Numeric.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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Views/HomeView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Views/HomeView.xaml
index 97719174..5e88b543 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Views/HomeView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Numeric/Views/HomeView.xaml
@@ -20,8 +20,59 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
- Title="Numeric Controls">
+ xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
+ Title="Numeric Controls"
+ Description="The DecimalUpDown, DoubleUpDown and IntegerUpDown provides a TextBox with button spinners that allow incrementing and decrementing numeric values by using the spinner buttons, keyboard up/down arrows, or mouse wheel.">
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Currency
+ Fixed Point
+ General
+ Number
+ Percent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/PieModule.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/PieModule.cs
new file mode 100644
index 00000000..c86bb11f
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/PieModule.cs
@@ -0,0 +1,48 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using Microsoft.Practices.Prism.Regions;
+using Microsoft.Practices.Unity;
+using Samples.Infrastructure;
+using Samples.Infrastructure.Extensions;
+using Samples.Modules.Pie.Views;
+
+namespace Samples.Modules.Pie
+{
+ public class PieModule : ModuleBase
+ {
+ public PieModule( IUnityContainer container, IRegionManager regionManager )
+ : base( container, regionManager )
+ {
+ }
+
+ protected override void InitializeModule()
+ {
+ RegionManager.RegisterViewWithRegion( RegionNames.NavigationRegion, typeof( NavigationView ) );
+ }
+
+ protected override void RegisterViewsAndTypes()
+ {
+ Container.RegisterNavigationType( typeof( HomeView ) );
+ Container.RegisterNavigationType( typeof( PieChart ) );
+ Container.RegisterNavigationType( typeof( PieProgress ) );
+
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/AssemblyInfo.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Properties/AssemblyInfo.cs
similarity index 93%
rename from ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/AssemblyInfo.cs
rename to ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Properties/AssemblyInfo.cs
index 05df1b54..8c93b58e 100644
--- a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/AssemblyInfo.cs
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Properties/AssemblyInfo.cs
@@ -24,11 +24,11 @@ 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 Samples" )]
+[assembly: AssemblyTitle( "Extended WPF Toolkit Pie Sample" )]
[assembly: AssemblyDescription( "" )]
[assembly: AssemblyConfiguration( "" )]
[assembly: AssemblyCompany( "Xceed Software Inc." )]
-[assembly: AssemblyProduct( "Extended WPF Toolkit Samples" )]
+[assembly: AssemblyProduct( "Extended WPF Toolkit Pie Sample" )]
[assembly: AssemblyCopyright( "Copyright © Xceed Software Inc. 2010-2012" )]
[assembly: AssemblyTrademark( "" )]
[assembly: AssemblyCulture( "" )]
diff --git a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Samples.Modules.Pie.csproj
similarity index 53%
rename from ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj
rename to ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Samples.Modules.Pie.csproj
index 1fce92a3..88590113 100644
--- a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Samples.Modules.Pie.csproj
@@ -3,26 +3,18 @@
Debug
AnyCPU
- 9.0.30729
+ 8.0.30703
2.0
- {747652D0-6AA6-4F96-99F7-0C834274FAB2}
- WinExe
+ {08E7A934-4991-4CFC-BE12-B43AC6713122}
+ library
Properties
- WPFToolkit.Extended.Examples
- WPFToolkit.Extended.Examples
- v3.5
+ Samples.Modules.Pie
+ Samples.Modules.Pie
+ v4.0
+ Client
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
- SAK
- SAK
- SAK
- SAK
-
-
-
-
- 3.5
true
@@ -42,81 +34,85 @@
4
-
-
- 3.5
-
-
- 3.5
+
+ ..\..\..\..\Libs\Prism\Microsoft.Practices.Prism.dll
-
- 3.5
+
+ ..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
+
+
+
+
+
+
+ 4.0
+
-
-
- MSBuild:Compile
- Designer
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
- MSBuild:Compile
- Designer
-
-
- App.xaml
+
Code
-
- Window1.xaml
- Code
+
+ HomeView.xaml
+
+
+ NavigationView.xaml
+
+
+ PieChart.xaml
+
+
+ PieProgress.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
-
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/HomeView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/HomeView.xaml
new file mode 100644
index 00000000..285ac323
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/HomeView.xaml
@@ -0,0 +1,228 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/HomeView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/HomeView.xaml.cs
new file mode 100644
index 00000000..2e61e4aa
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/HomeView.xaml.cs
@@ -0,0 +1,52 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using Microsoft.Practices.Prism.Regions;
+using Samples.Infrastructure.Controls;
+using System.Windows.Data;
+using System.Windows.Media;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Reflection;
+using System.Windows.Controls;
+using Xceed.Wpf.Toolkit;
+
+namespace Samples.Modules.Pie.Views
+{
+ ///
+ /// Interaction logic for HomeView.xaml
+ ///
+ [RegionMemberLifetime( KeepAlive = false )]
+ public partial class HomeView : DemoView
+ {
+ public HomeView()
+ {
+ InitializeComponent();
+ }
+
+ private void ComboBox_SelectionChanged( object sender, System.Windows.Controls.SelectionChangedEventArgs e )
+ {
+ ComboBox modeCombo = ( ComboBox )sender;
+ PieMode newMode = ( PieMode )modeCombo.SelectedItem;
+ this.endAngleSlider.IsEnabled = ( newMode != PieMode.Slice );
+ this.sliceSlider.IsEnabled = ( newMode != PieMode.EndAngle );
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/NavigationView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/NavigationView.xaml
new file mode 100644
index 00000000..bf731401
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/NavigationView.xaml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/NavigationView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/NavigationView.xaml.cs
new file mode 100644
index 00000000..02e303d5
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/NavigationView.xaml.cs
@@ -0,0 +1,34 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System.Windows.Controls;
+
+namespace Samples.Modules.Pie.Views
+{
+ ///
+ /// Interaction logic for NavigationView.xaml
+ ///
+ public partial class NavigationView : TreeViewItem
+ {
+ public NavigationView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/PieChart.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/PieChart.xaml
new file mode 100644
index 00000000..e8f7a093
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/PieChart.xaml
@@ -0,0 +1,239 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/PieChart.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/PieChart.xaml.cs
new file mode 100644
index 00000000..fa37486e
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/PieChart.xaml.cs
@@ -0,0 +1,50 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using Microsoft.Practices.Prism.Regions;
+using Samples.Infrastructure.Controls;
+using System.Windows.Data;
+
+namespace Samples.Modules.Pie.Views
+{
+ ///
+ /// Interaction logic for PieChart.xaml
+ ///
+ [RegionMemberLifetime( KeepAlive = false )]
+ public partial class PieChart : DemoView
+ {
+ public PieChart()
+ {
+ InitializeComponent();
+ }
+ }
+
+ public class SliceLabelConverter : IValueConverter
+ {
+ public object Convert( object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture )
+ {
+ return ( ( double )value ).ToString( "#.#% " + parameter );
+ }
+
+ public object ConvertBack( object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture )
+ {
+ throw new System.NotImplementedException();
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/PieProgress.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/PieProgress.xaml
new file mode 100644
index 00000000..5fcc9dbd
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/PieProgress.xaml
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/PieProgress.xaml.cs
similarity index 71%
rename from ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml.cs
rename to ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/PieProgress.xaml.cs
index b5511843..c040608f 100644
--- a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Window1.xaml.cs
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Pie/Views/PieProgress.xaml.cs
@@ -17,24 +17,22 @@
**********************************************************************/
-using System.Windows;
+using Microsoft.Practices.Prism.Regions;
+using Samples.Infrastructure.Controls;
+using System.Windows.Data;
-namespace WPFToolkit.Extended.Examples
+namespace Samples.Modules.Pie.Views
{
///
- /// Interaction logic for Window1.xaml
+ /// Interaction logic for PieProgress.xaml
///
- public partial class Window1 : Window
+ [RegionMemberLifetime( KeepAlive = false )]
+ public partial class PieProgress : DemoView
{
- public Window1()
+ public PieProgress()
{
InitializeComponent();
- Loaded += new RoutedEventHandler( Window1_Loaded );
- }
-
- void Window1_Loaded( object sender, RoutedEventArgs e )
- {
-
}
}
+
}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Properties/Resources.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Properties/Resources.Designer.cs
deleted file mode 100644
index 04ad6997..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +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.Modules.PropertyGrid.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Samples.Modules.PropertyGrid.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Properties/Resources.resx
deleted file mode 100644
index ffecec85..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Properties/Settings.Designer.cs
deleted file mode 100644
index 4914b063..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +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.Modules.PropertyGrid.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Properties/Settings.settings b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Samples.Modules.PropertyGrid.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Samples.Modules.PropertyGrid.csproj
index 9783a938..e97616e1 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Samples.Modules.PropertyGrid.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Samples.Modules.PropertyGrid.csproj
@@ -15,10 +15,6 @@
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
- SAK
- SAK
- SAK
- SAK
true
@@ -46,6 +42,14 @@
False
..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
@@ -68,16 +72,6 @@
Code
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
BindingToStructs.xaml
@@ -102,26 +96,8 @@
SpecifyingProperties.xaml
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
- {72E591D6-8F83-4D8C-8F67-9C325E623234}
- WPFToolkit.Extended
-
-
- {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
- Samples.Infrastructure
-
-
Designer
@@ -162,14 +138,14 @@
- xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Samples.Modules.PropertyGrid.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Samples.Modules.PropertyGrid.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Samples.Modules.PropertyGrid.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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/BindingToStructs.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/BindingToStructs.xaml
index c5802931..9842048f 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/BindingToStructs.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/BindingToStructs.xaml
@@ -22,48 +22,38 @@
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:Samples.Modules.PropertyGrid.Views"
- Title="Binding to Structs">
+ Title="Binding to Structs"
+ Description="When the SelectedObject contains properties of type Struct youmay find that edits performed in the PropertyGrid do not function properly. This is because Structs are passed by value. Meaning that the PropertyGrid receives a copy of the Struct and not a reference. When this happens, the data binding expressions end up binding to and modifying that copy rather than the original values.">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/CustomEditors.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/CustomEditors.xaml
index c5de82d7..c07118ce 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/CustomEditors.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/CustomEditors.xaml
@@ -22,18 +22,15 @@
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
- Title="Custom Editors">
+ Title="Custom Editors"
+ Description="This example demonstrates the various methods of creating and using custom editors. You can supply your own editor based on a Type, a property name, or both. To supply your own editor for a property you have to create an EditorDefinition for the PropertyGrid.">
-
-
-
-
+
@@ -63,7 +60,7 @@
-
+
@@ -80,7 +77,7 @@
-
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/CustomItemsSource.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/CustomItemsSource.xaml
index 985e6ffc..18bbf862 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/CustomItemsSource.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/CustomItemsSource.xaml
@@ -21,21 +21,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- Title="Custom ItemsSource">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Title="Custom ItemsSource"
+ Description="Sometimes it is desirable to want to provide a collection of values represented by a ComboBox for a given property. The PropertyGrid supports this scenario by create a class that implements IItemsSource and decorating your property with the ItemsSourceAttribute.">
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/DefaultEditors.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/DefaultEditors.xaml
index fa296960..3c638868 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/DefaultEditors.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/DefaultEditors.xaml
@@ -21,19 +21,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- Title="Default Editors">
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Title="Default Editors"
+ Description="This example demonstrates the default editors provided by the PropertyGrid.">
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/ExpandableProperties.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/ExpandableProperties.xaml
index 7e1b93ca..d968f69c 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/ExpandableProperties.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/ExpandableProperties.xaml
@@ -21,21 +21,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- Title="Exandable Properties">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+ Title="Exandable Properties"
+ Description="Sometimes it is neccessary to show the properties of a complex object. The PropertyGrid supports this scenario and allows you to drill down into a property's heirarchy. To enable this behavior you must decorate your property with the ExpandableObject attribute.">
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/HomeView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/HomeView.xaml
index 4a1bab35..5ebd63ec 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/HomeView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.PropertyGrid/Views/HomeView.xaml
@@ -21,18 +21,15 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- Title="PropertyGrid" >
+ Title="PropertyGrid"
+ Description="The PropertyGrid control allows you inspect and edit properties of an object. This PropertyGrid allows you do autogenerate all properties or specify the specific properties you want to display. You can use the standard editors that are provided with the PropertyGrid or you can use custom editors that target a Type, specific properties, or both. The PropertyGrid also supports complex properties, which allows you to drill down into a nested property hierarchy.">
-
-
-
-
+
@@ -45,8 +42,8 @@
-
-
+
+
-
+
@@ -76,7 +73,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Properties/Resources.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Properties/Resources.Designer.cs
deleted file mode 100644
index 3e4eabb3..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +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.Modules.Text.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Samples.Modules.Text.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Properties/Resources.resx
deleted file mode 100644
index ffecec85..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Properties/Settings.Designer.cs
deleted file mode 100644
index 672e996f..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +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.Modules.Text.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Properties/Settings.settings b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Resources/PlainData.txt b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Resources/PlainData.txt
new file mode 100644
index 00000000..72443a9f
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Resources/PlainData.txt
@@ -0,0 +1,2 @@
+This is the RichTextBox
+in Plain Format
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Resources/RtfData.txt b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Resources/RtfData.txt
new file mode 100644
index 00000000..3d527eb9
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Resources/RtfData.txt
@@ -0,0 +1 @@
+ {\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0 Times New Roman;}{\f2\fcharset0 Segoe UI;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;}\loch\hich\dbch\pard\plain\ltrpar\itap0{\lang1033\fs18\f2\cf0 \cf0\ql{\f2 {\ltrch This is the }{\b\ltrch RichTextBox}{\ltrch in Rtf Format }\li0\ri0\sa0\sb0\fi0\ql\par}}}
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Resources/XamlData.txt b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Resources/XamlData.txt
new file mode 100644
index 00000000..baa76946
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Resources/XamlData.txt
@@ -0,0 +1 @@
+This is the RichTextBoxin XAML Format
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Samples.Modules.Text.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Samples.Modules.Text.csproj
index 133861c5..33091a37 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Samples.Modules.Text.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Samples.Modules.Text.csproj
@@ -15,10 +15,6 @@
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
- SAK
- SAK
- SAK
- SAK
true
@@ -46,6 +42,14 @@
False
..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
@@ -65,48 +69,26 @@
Code
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
HomeView.xaml
MaskedTextBoxView.xaml
+
+ MultiLineTextEditor.xaml
+
NavigationView.xaml
+
+ RichTextBoxView.xaml
+
WatermarkTextBoxView.xaml
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
- {72E591D6-8F83-4D8C-8F67-9C325E623234}
- WPFToolkit.Extended
-
-
- {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
- Samples.Infrastructure
-
-
MSBuild:Compile
@@ -116,29 +98,41 @@
Designer
MSBuild:Compile
+
+ MSBuild:Compile
+ Designer
+
MSBuild:Compile
Designer
+
+ MSBuild:Compile
+ Designer
+
Designer
MSBuild:Compile
-
+
+
+
+
+
- xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Samples.Modules.Text.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Samples.Modules.Text.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Samples.Modules.Text.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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/TextModule.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/TextModule.cs
index 1d2b8020..5f056680 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/TextModule.cs
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/TextModule.cs
@@ -41,6 +41,8 @@ namespace Samples.Modules.Text
{
Container.RegisterNavigationType( typeof( HomeView ) );
Container.RegisterNavigationType( typeof( MaskedTextBoxView ) );
+ Container.RegisterNavigationType( typeof( MultiLineTextEditorView ) );
+ Container.RegisterNavigationType( typeof( RichTextBoxView ) );
Container.RegisterNavigationType( typeof( WatermarkTextBoxView ) );
}
}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/HomeView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/HomeView.xaml
index 4cc85dea..6ed815c2 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/HomeView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/HomeView.xaml
@@ -22,13 +22,6 @@
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
Title="Text Controls">
-
-
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/HomeView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/HomeView.xaml.cs
index 44d4aaf4..310095f4 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/HomeView.xaml.cs
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/HomeView.xaml.cs
@@ -33,13 +33,6 @@ namespace Samples.Modules.Text.Views
public HomeView()
{
InitializeComponent();
-
- _textBox.Text = "1;2;"; //is of object ids
- _textBox.ItemsSource = new List()
- {
- new Email() { Id = 1, FirstName = "John", LastName = "Doe", EmailAddress = "john@test.com" },
- new Email() { Id = 2, FirstName = "Jane", LastName = "Doe", EmailAddress = "jane@test.com" },
- };
}
public class Email
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/MaskedTextBoxView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/MaskedTextBoxView.xaml
index 3c43b8e8..b1171869 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/MaskedTextBoxView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/MaskedTextBoxView.xaml
@@ -21,19 +21,16 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- Title="MaskedTextBox">
+ Title="MaskedTextBox"
+ Description="The MaskedTextBox control lets you display and edit values based on a mask.">
-
-
-
-
+
@@ -74,7 +71,7 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/MultiLineTextEditor.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/MultiLineTextEditor.xaml.cs
new file mode 100644
index 00000000..bfa458c4
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/MultiLineTextEditor.xaml.cs
@@ -0,0 +1,90 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+
+using Microsoft.Practices.Prism.Regions;
+using Samples.Infrastructure.Controls;
+using System.Collections.Generic;
+namespace Samples.Modules.Text.Views
+{
+ public class Movie
+ {
+ public string Title
+ {
+ get;
+ set;
+ }
+
+ public string Review
+ {
+ get;
+ set;
+ }
+
+ public double Rating
+ {
+ get;
+ set;
+ }
+ }
+
+ ///
+ /// Interaction logic for MultiLineTextEditor.xaml
+ ///
+ [RegionMemberLifetime( KeepAlive = false )]
+ public partial class MultiLineTextEditorView : DemoView
+ {
+ public MultiLineTextEditorView()
+ {
+ InitializeComponent();
+ _dataGrid.DataContext = InitMovieList();
+ }
+
+ private List InitMovieList()
+ {
+ List movieList = new List();
+ movieList.Add( new Movie()
+ {
+ Title = "Lords Of The Ring",
+ Review = "A great movie with many special effects.",
+ Rating = 9
+ } );
+ movieList.Add( new Movie()
+ {
+ Title = "Pirates Of The Caribbean",
+ Review = "An epic pirate movie with ships, swords, explosion and a treasure.",
+ Rating = 9.5
+ } );
+ movieList.Add( new Movie()
+ {
+ Title = "Batman",
+ Review = "Batman returns after 8 years, stronger than ever, to deliver Gotham City from a new criminel.",
+ Rating = 7.8
+ } );
+ movieList.Add( new Movie()
+ {
+ Title = "Indiana Jones",
+ Review = "Harrison Ford strikes back for full-pack action movie in the jungle to uncover a mysterious Crystal skull.",
+ Rating = 6.4
+ } );
+
+ return movieList;
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/NavigationView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/NavigationView.xaml
index d6e0c335..37538b50 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/NavigationView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/NavigationView.xaml
@@ -27,8 +27,8 @@
-
-
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/RichTextBoxView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/RichTextBoxView.xaml
new file mode 100644
index 00000000..aaca4a79
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/RichTextBoxView.xaml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Plain Text
+ RTF
+ Xaml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/RichTextBoxView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/RichTextBoxView.xaml.cs
new file mode 100644
index 00000000..38b98ab6
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/RichTextBoxView.xaml.cs
@@ -0,0 +1,96 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using Microsoft.Practices.Prism.Regions;
+using Samples.Infrastructure.Controls;
+using System.Windows.Controls;
+using Xceed.Wpf.Toolkit;
+using System;
+using System.Windows.Resources;
+using System.Windows;
+using System.IO;
+namespace Samples.Modules.Text.Views
+{
+ public enum TextFormatterEnum
+ {
+ PlainText,
+ Rtf,
+ Xaml
+ };
+
+ ///
+ /// Interaction logic for RichTextBox.xaml
+ ///
+ [RegionMemberLifetime( KeepAlive = false )]
+ public partial class RichTextBoxView : DemoView
+ {
+ public RichTextBoxView()
+ {
+ InitializeComponent();
+ }
+
+ public override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ UpdateValues( _textFormatter );
+ }
+
+ private void OnTextFormatterChanged( object sender, SelectionChangedEventArgs args )
+ {
+ ComboBox comboBox = sender as ComboBox;
+ UpdateValues( comboBox );
+ }
+
+ private void UpdateValues( ComboBox comboBox )
+ {
+ if( ( comboBox != null ) && ( _text != null ) && ( _richTextBox != null ) )
+ {
+ object tagValue = ( ( ComboBoxItem )comboBox.SelectedItem ).Tag;
+ if( object.Equals( TextFormatterEnum.PlainText, tagValue ) )
+ {
+ _text.Text = GetDataFromResource( "/Samples.Modules.Text;component/Resources/PlainData.txt" );
+ _richTextBox.TextFormatter = new PlainTextFormatter();
+ }
+ else if( object.Equals( TextFormatterEnum.Rtf, tagValue ) )
+ {
+ _text.Text = GetDataFromResource( "/Samples.Modules.Text;component/Resources/RtfData.txt" );
+ _richTextBox.TextFormatter = new RtfFormatter();
+ }
+ else if( object.Equals( TextFormatterEnum.Xaml, tagValue ) )
+ {
+ _text.Text = GetDataFromResource( "/Samples.Modules.Text;component/Resources/XamlData.txt" );
+ _richTextBox.TextFormatter = new XamlFormatter();
+ }
+ }
+ }
+
+ private string GetDataFromResource( string uriString )
+ {
+ Uri uri = new Uri( uriString, UriKind.Relative );
+ StreamResourceInfo info = Application.GetResourceStream( uri );
+
+ StreamReader reader = new StreamReader( info.Stream );
+ string data = reader.ReadToEnd();
+ reader.Close();
+
+ return data;
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/WatermarkTextBoxView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/WatermarkTextBoxView.xaml
index c86c54ab..114c1b27 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/WatermarkTextBoxView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Text/Views/WatermarkTextBoxView.xaml
@@ -21,17 +21,15 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- Title="WatermarkTextBox">
+ Title="WatermarkTextBox"
+ Description="The WatermarkTextBox is simply a TextBox that allows you to sepcify an object, usually a String, to represent null or missing text.">
-
-
-
-
+
@@ -51,7 +49,7 @@
-
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/AssemblyInfo.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/AssemblyInfo.cs
index 021ed7f2..e541620f 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/AssemblyInfo.cs
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/AssemblyInfo.cs
@@ -69,4 +69,4 @@ using System.Windows;
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion( "1.0.0.0" )]
-[assembly: AssemblyFileVersion( "1.0.0.0" )]
\ No newline at end of file
+[assembly: AssemblyFileVersion( "1.0.0.0" )]
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/Resources.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/Resources.Designer.cs
deleted file mode 100644
index e0aceb50..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.261
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Samples.Modules.TimelinePanel.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.Modules.TimelinePanel.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/Resources.resx
deleted file mode 100644
index 85c90909..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/Resources.resx
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 1.3
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/Settings.Designer.cs
deleted file mode 100644
index 58ad38e9..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.261
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Samples.Modules.TimelinePanel.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/Settings.settings b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/Settings.settings
deleted file mode 100644
index 15034e76..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Properties/Settings.settings
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Samples.Modules.TimelinePanel.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Samples.Modules.TimelinePanel.csproj
index 278589ab..3a727ab2 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Samples.Modules.TimelinePanel.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Samples.Modules.TimelinePanel.csproj
@@ -12,10 +12,6 @@
Samples.Modules.TimelinePanel
v4.0
512
- SAK
- SAK
- SAK
- SAK
Client
@@ -42,6 +38,14 @@
..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
@@ -56,16 +60,6 @@
-
- True
- True
- Resources.resx
-
-
- True
- True
- Settings.settings
-
HomeView.xaml
@@ -74,28 +68,6 @@
NavigationView.xaml
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
- {72E591D6-8F83-4D8C-8F67-9C325E623234}
- WPFToolkit.Extended
-
-
- {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
- Samples.Infrastructure
-
-
Designer
@@ -108,14 +80,14 @@
- xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Samples.Modules.TimelinePanel.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Samples.Modules.TimelinePanel.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Samples.Modules.TimelinePanel.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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Views/HomeView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Views/HomeView.xaml
index 4cf009a6..86a02fdd 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Views/HomeView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.TimelinePanel/Views/HomeView.xaml
@@ -23,7 +23,8 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:pf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
- Title="TimelinePanel">
+ Title="TimelinePanel"
+ Description="TimelinePanel is a WPF panel at arranges it's children along a timeline. Items are placed along the timeline based on the Date attached property, which is set on each item.">
@@ -102,15 +103,11 @@
-
-
-
-
+
@@ -134,7 +131,7 @@
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Resources.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Resources.Designer.cs
deleted file mode 100644
index 8f2ac69f..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +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.Modules.Wizard.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Samples.Modules.Wizard.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Resources.resx
deleted file mode 100644
index ffecec85..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Settings.Designer.cs
deleted file mode 100644
index 0dce97b4..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +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.Modules.Wizard.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Settings.settings b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.csproj
index 55a738cb..227a858b 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.csproj
@@ -15,10 +15,6 @@
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
- SAK
- SAK
- SAK
- SAK
true
@@ -45,6 +41,14 @@
False
..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
@@ -63,16 +67,6 @@
Code
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
HomeView.xaml
@@ -80,26 +74,8 @@
NavigationView.xaml
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
- {72E591D6-8F83-4D8C-8F67-9C325E623234}
- WPFToolkit.Extended
-
-
- {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
- Samples.Infrastructure
-
-
@@ -113,14 +89,14 @@
- xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Wizard/Samples.Modules.Wizard.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/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Properties/AssemblyInfo.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..61d5d37a
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Properties/AssemblyInfo.cs
@@ -0,0 +1,72 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System.Reflection;
+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 Zoombox Sample" )]
+[assembly: AssemblyDescription( "" )]
+[assembly: AssemblyConfiguration( "" )]
+[assembly: AssemblyCompany( "Xceed Software Inc." )]
+[assembly: AssemblyProduct( "Extended WPF Toolkit Zoombox Sample" )]
+[assembly: AssemblyCopyright( "Copyright © Xceed Software Inc. 2010-2012" )]
+[assembly: AssemblyTrademark( "" )]
+[assembly: AssemblyCulture( "" )]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible( false )]
+
+//In order to begin building localizable applications, set
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion( "1.0.0.0" )]
+[assembly: AssemblyFileVersion( "1.0.0.0" )]
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Resources/Default.jpg b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Resources/Default.jpg
new file mode 100644
index 00000000..112ce2a5
Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Resources/Default.jpg differ
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Resources/ZoomboxProperties.xml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Resources/ZoomboxProperties.xml
new file mode 100644
index 00000000..0f7dae6a
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Resources/ZoomboxProperties.xml
@@ -0,0 +1,153 @@
+
+
+Gets or sets the acceleration ratio used for scale and pan animations.
+
+By default, transitions from one view to another are animated. This property determines the acceleration ratio of that animation.
+Gets or sets the deceleration ratio used for scale and pan animations.
+
+By default, transitions from one view to another are animated. This property determines the deceleration ratio of that animation.
+Gets or sets the duration used for scale and pan animations.
+
+By default, transitions from one view to another are animated. This property determines the duration of that animation.
+Gets a Boolean value that specifies whether the keys in the DragModifiers collection are currently pressed. It is updated only when the Zoombox has keyboard or cursor focus.
+
+This value is intended for use as a trigger within the Zoombox style. It can be used to change the appearance of the cursor to show that it’s possible to drag (or pan) the content.
+
+This value is not updated in partial trust.
+Gets a Boolean value that specifies whether the keys in the RelativeZoomModifiers collection are currently pressed. It is updated only when the Zoombox has keyboard or cursor focus.
+
+This value is intended for use as a trigger within the Zoombox style. It can be used to change the appearance of the cursor to show that it’s possible to scale the content relative to the cursor position. This allows the user to zoom in on a specific point within the content.
+
+This value is not updated in partial trust.
+Gets a Boolean value that specifies whether the keys in the ZoomModifiers collection are currently pressed. It is updated only when the Zoombox has keyboard or cursor focus.
+
+This value is intended for use as a trigger within the Zoombox style. It can be used within the Zoombox control’s style to change the appearance of the cursor to show that it’s possible to zoom in or out using the mouse wheel. The zoom operation occurs relative to the ZoomOrigin point (by default, the center of the content).
+
+This value is not updated in partial trust.
+Gets a Boolean value that specifies whether the keys in the ZoomToSelectionModifiers collection are currently pressed. It is updated only when the Zoombox has keyboard or cursor focus.
+
+This value is intended for use as a trigger within the Zoombox style. It can be used to show that it’s possible to select a zoom region by pressing the left mouse button and dragging the mouse. Upon release of the mouse button, the Zoombox control will zoom in to the selected region.
+
+By default, the selected region will be centered within the Zoombox control, but this can be changed by altering the HorizontalContentAlignment and VerticalContentAlignment properties.
+
+This value is not updated in partial trust.
+Gets or sets a Boolean value that determines if the content of the Zoombox is wrapped in a Viewbox.
+
+By default, the content of the Zoombox control will be wrapped within a Viewbox element (unless the content is already a Viewbox). The viewbox ensures that the content does not get clipped by its parent and that it renders correctly within the visual brush used in the view finder.
+
+Some elements, like Image, have built-in viewbox behaviors. This property can be set to False for such elements to prevent the extra wrapping layer. However, if this causes the content to appear incorrectly in the view finder, try setting this property back to True.
+Gets the current view for the Zoombox. This is an object of type ZoomboxView.
+
+This property may return an absolute view (given by a position and/or scale value), a region-based view (given by a Rect within the content), or a predefined view, given by one of the static ZoomboxView properties: Center, Empty, Fill, or Fit.
+Gets the index of the current view (see the CurrentView property) within the Zoombox control's view stack (see the ViewStack property).
+
+If the current view is not a member of the view stack, the CurrentViewIndex property returns -1. This will happen if the Zoombox control has a manual view stack (see the ViewStackMode property) and the control has been zoomed or panned away from the selected view. In this case, the ViewStackIndex property can be used to get the index of the selected view. Also, the RefocusView() method can be used to zoom back to the selected view.
+
+If the view stack is disabled, the CurrentViewIndex property always returns -1.
+Gets or sets a collection of KeyModifier values representing keys that must be pressed to pan the content by dragging it.
+
+All keys must be pressed in order for the operation to occur. If None is specified, the content will be dragged without any modifier keys. If the collection includes Blocked, the content cannot be dragged.
+
+The default value includes only the Ctrl key.
+Gets or sets a Boolean value that specifies whether the Zoombox responds to tunneled mouse events (PreviewMouseDown, PreviewMouseMove, and PreviewMouseUp) to pan the content via a mouse drag. If false, panning occurs in response to the bubbled events (MouseDown, MouseMove, and MouseUp).
+
+The default value is false.
+Gets a ZoomboxViewStackMode value representing the mode that is currently in effect for the view stack. The effective mode will be either Auto, Manual, or Disabled.
+
+For more information, see the ViewStackMode property.
+Gets a Boolean value that specifies whether there are views on the back side of the view stack (see the ViewStack property).
+Gets a Boolean value that specifies whether there are views on the forward side of the view stack (see the ViewStack property).
+Gets or sets a Boolean value specifying whether transitions between views (scale and pan operations) are animated.
+
+The default value is true.
+Gets a Boolean value that specifies whether the content is currently being panned via a drag operation.
+Gets a Boolean value that specifies whether a zoom region is currently being selected.
+Gets or sets a Double value representing the maximum scale factor (or zoom level) that can be applied to the content.
+Gets or sets a Double value representing the minimum scale factor (or zoom level) that can be applied to the content.
+Gets or sets a Boolean value that specifies whether the Zoombox responds to tunneled mouse events (PreviewMouseDown) to navigate through the view stack. If false, navigation occurs in response to bubbled mouse events (MouseDown).
+
+The default value is false.
+
+This setting only impacts the control's response to the forward (XButton2) and back (XButton1) mouse buttons. Note that the control will also navigate in response to the forward (BrowserForward) and back (BrowserBack or Backspace) keyboard keys, but this is enabled via key bindings in an InputBindingCollection within the Resources section of the Zoombox template.
+Gets or sets a Double value that is used to determine how many pixels the content will pan using the PanLeft, PanUp, PanRight, or PanDown Zoombox commands.
+
+The pan commands are hooked up to key strokes using an InputBindingCollection within the Resources section of the Zoombox template. The default key bindings map Shift+Ctrl+Left, Shift+Ctrl+Up, Shift+Ctrl+Right, and Shift+Ctrl+Down to their respective Pan commands.
+
+The keyboard focus must be within the Zoombox to pan the content via the key bindings.
+
+The default value is 5 pixels.
+Gets or sets the top-left point of the content within the Zoombox control.
+
+The Position is expressed as a Point within the coordinate space of the Zoombox control.
+Gets or sets a collection of KeyModifier values representing keys that must be pressed to zoom the content relative to the current mouse position using the mouse wheel.
+
+All keys must be pressed in order for the operation to occur. If None is specified, the content will be zoomed without any modifier keys. If the collection includes Blocked, the content cannot be zoomed.
+
+The default value is the Ctrl+Alt combination.
+Gets or sets a Double value representing the scale factor (or zoom level) for the content.
+
+A scale value of 1.0 represents the actual content size.
+Gets a reference to the view finder element within the visual tree of the Zoombox.
+
+The view finder element typically serves as the root of a subtree that contains a ViewFinderDisplay element and several command buttons for changing views. The ViewFinderDisplay element is the element that renders the thumbnail image of the Zoombox content.
+
+The view finder element, if present in the control template, must be named "ViewFinder". The visibility of the view finder element is typically bound to the ViewFinderVisibility attached property.
+Gets a Visibility value for the ViewFinder.
+
+This property is typically leveraged by the Zoombox template to control the visibility of the view finder element. In the default Zoombox template, this property is also bound to a toggle button that is used to show and hide the view finder.
+
+This is an attached property because the Zoombox control, itself, does not directly use the property.
+Gets a Rect identifying the portion of the content that is visible in the Zoombox. The viewport is expressed in the coordinate space of the content.
+Gets the view stack for the Zoombox. This stack can be manually specified, automatically maintained, or disabled entirely, depending on the ViewStackMode property.
+
+The view stack is maintained in an instance of the ZoomboxViewStack class.
+Gets an integer value representing the number of views in the view stack.
+Gets or sets the index of the selected view within the view stack.
+
+For a manual stack, a positive ViewStackIndex value does not necessarily indicate that the specified view is the current view. The user may have zoomed or panned away from the view represented by the ViewStackIndex property. The CurrentView property can be used to determine the actual current view. In this case, the CurrentViewIndex will be -1 but the ViewStackIndex will be a positive value. The Refocus command or the RefocusView() method can be used to refocus the selected view on the stack.
+Gets or sets the mode for the view stack.
+
+The ViewStackMode property determines how the Zoombox will maintain its stack of views for back and forward view navigation. It can be set to any of the following values from the ZoomboxViewStackMode enumeration:
+
+Auto: The control automatically tracks view changes and adds them to the view stack. In this case, every view selected is added to the view stack (in the same manner that visited URLs are added to a browser stack).
+
+Manual: The control uses a manually specified view stack. The views can be directly added to the ViewStack in markup or programmatically. They can also be bound to the Zoombox using the ViewStackSource property.
+
+Default: The control will use one of the other ZoomboxViewStackMode values at runtime. The EffectiveViewStackMode property can be used to determine which mode is actually in effect. If the views in the stack come from a ViewStackSource, then the default mode is Manual; otherwise, the default mode is Auto.
+
+Disabled: The view stack is disabled altogether. In this mode, the ViewStack property will return null. An attempt to add views manually will result in an exception.
+Gets or sets an IEnumerable value representing a collection used to generate a view stack for the Zoombox.
+
+The view stack of a Zoombox is either explicitly set using the ViewStack property or auto-generated based on members of the ViewStackSource collection. In this sense, the ViewStackSource property is analogous to the ItemsSource property for an ItemsControl.
+
+This property can be used to bind the view stack to an observable collection of ZoomboxView objects (or a collection of objects of type string, Point, double, or Rect, which can be directly converted to ZoomboxView objects via the ZoomboxViewConverter class).
+
+When the ViewStackSource property is in use, the ViewStack property is effectively read-only. An attempt to directly modify the ViewStack will result in an exception.
+
+When the ViewStackSource property is set to a non-null collection, the contents of the ViewStack collection is replaced with the views generated from the ViewStackSource.
+
+If the ViewStackSource property is already set, explicitly setting it to null will remove the auto-generated collection of views and the Zoombox will have an empty ViewStack collection. If ViewStackSource is already null, setting it to null has no effect.
+Gets or sets a collection of KeyModifier values representing keys that must be pressed to zoom the content relative to its ZoomOrigin (by default, the center of the content) using the mouse wheel.
+
+All specified keys must be pressed in order for the operation to occur. If None is specified, the relative zoom will occur without any modifier keys. If the collection includes Blocked, a zoom cannot be performed.
+
+The default value includes only the Ctrl key.
+Gets or sets a Boolean value that specifies whether the Zoombox responds to tunneled mouse events (PreviewMouseWheel) to zoom the content via the mouse wheel. If false, zooming occurs in response to the bubbled events (MouseWheel).
+
+The default value is true.
+Gets or sets the relative position within the content around which Zoom operations occur by default.
+
+This value is used when zooming via the mouse wheel, ZoomIn or ZoomOut commands, or the Zoom() method.
+Gets or sets a Double value that is used to determine how much the content will zoom when using the ZoomIn or ZoomOut commands or when zooming via the mouse wheel.
+
+The zoom commands are hooked up to key strokes using an InputBindingCollection within the Resources section of the Zoombox template. The default key bindings map Ctrl+Left and Ctrl+Up to the ZoomOut command and Ctrl+Right and Ctrl+Down to the ZoomIn command.
+
+Keyboard focus must be within the Zoombox to scale the content via the key bindings.
+
+The default value is 5%.
+Gets or sets a collection of KeyModifier values representing keys that must be pressed to select and zoom to a location of the content using the mouse.
+
+All specified keys must be pressed in order for the operation to occur. If None is specified, the zoom operation will occur without any modifier keys. If the collection includes Blocked, the zoom operation cannot be performed.
+
+The default value includes only the Alt key.
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Samples.Modules.Zoombox.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Samples.Modules.Zoombox.csproj
new file mode 100644
index 00000000..bea8ae89
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Samples.Modules.Zoombox.csproj
@@ -0,0 +1,106 @@
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {D6581837-4158-4165-BE2F-35EBF9742A54}
+ library
+ Properties
+ Samples.Modules.Zoombox
+ Samples.Modules.Zoombox
+ v4.0
+ Client
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\..\..\..\Libs\Prism\Microsoft.Practices.Prism.dll
+
+
+ False
+ ..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll
+
+
+ {72E591D6-8F83-4D8C-8F67-9C325E623234}
+ WPFToolkit.Extended
+
+
+ {A4A049A4-665A-4651-9046-7D06E9D0CCDC}
+ Samples.Infrastructure
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+
+ HomeView.xaml
+
+
+ NavigationView.xaml
+
+
+ Code
+
+
+
+
+
+
+
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+ xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y
+xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I
+
+
+
+
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Views/HomeView.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Views/HomeView.xaml
new file mode 100644
index 00000000..88690f8c
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Views/HomeView.xaml
@@ -0,0 +1,489 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fit
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Views/HomeView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Views/HomeView.xaml.cs
new file mode 100644
index 00000000..bd6b8f1a
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Views/HomeView.xaml.cs
@@ -0,0 +1,129 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using Microsoft.Practices.Prism.Regions;
+using Samples.Infrastructure.Controls;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System;
+using System.Windows;
+
+namespace Samples.Modules.Zoombox.Views
+{
+ ///
+ /// Interaction logic for HomeView.xaml
+ ///
+ [RegionMemberLifetime( KeepAlive = false )]
+ public partial class HomeView : DemoView
+ {
+ public HomeView()
+ {
+ InitializeComponent();
+ }
+
+ private void AdjustAnimationDuration( object sender, RoutedPropertyChangedEventArgs e )
+ {
+ Slider slider = sender as Slider;
+ if( slider == null )
+ return;
+
+ zoombox.AnimationDuration = TimeSpan.FromMilliseconds( slider.Value );
+ }
+
+ private void CoerceAnimationRatios( object sender, RoutedPropertyChangedEventArgs e )
+ {
+ Slider slider = sender as Slider;
+ if( slider == null )
+ return;
+
+ Slider otherRatio = ( sender == this.AccelerationSlider ) ? this.DecelerationSlider : this.AccelerationSlider;
+
+ if( slider.Value + otherRatio.Value > 1 )
+ {
+ otherRatio.Value = 1 - slider.Value;
+ }
+ }
+ }
+
+ public abstract class SimpleConverter : IValueConverter
+ {
+ protected abstract object Convert( object value );
+
+ public object Convert( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
+ {
+ return this.Convert( value );
+ }
+
+ public object ConvertBack( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ public class ViewNameConverter : SimpleConverter
+ {
+ protected override object Convert( object value )
+ {
+ return value.ToString().Remove( 0, 13 );
+ }
+ }
+
+
+ public class ViewFinderConverter : SimpleConverter
+ {
+ protected override object Convert( object value )
+ {
+ return ( value != null ) ? value.GetType().Name : null;
+ }
+ }
+
+ public class RectConverter : SimpleConverter
+ {
+ protected override object Convert( object value )
+ {
+ return string.Format( "({0}),({1})",
+ PointConverter.ConvertPoint( ( ( Rect )value ).TopLeft ),
+ PointConverter.ConvertPoint( ( ( Rect )value ).BottomRight ) );
+ }
+ }
+
+ public class PointConverter : SimpleConverter
+ {
+ protected override object Convert( object value )
+ {
+ return PointConverter.ConvertPoint( ( Point )value );
+ }
+
+ public static string ConvertPoint( Point point )
+ {
+ return string.Format( "{0},{1}",
+ Math.Round( point.X ), Math.Round( point.Y ) );
+ }
+ }
+
+ public class ViewStackCountConverter : SimpleConverter
+ {
+ protected override object Convert( object value )
+ {
+ return ( ( int )value ) - 1;
+ }
+ }
+
+
+}
diff --git a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Views/NavigationView.xaml
similarity index 58%
rename from ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml
rename to ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Views/NavigationView.xaml
index 5c07e642..7b9b5955 100644
--- a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/App.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Views/NavigationView.xaml
@@ -16,11 +16,14 @@
Visit http://xceed.com and follow @datagrid on Twitter.
********************************************************************-->
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Views/NavigationView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Views/NavigationView.xaml.cs
new file mode 100644
index 00000000..81dd13cd
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/Views/NavigationView.xaml.cs
@@ -0,0 +1,34 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System.Windows.Controls;
+
+namespace Samples.Modules.Zoombox.Views
+{
+ ///
+ /// Interaction logic for NavigationView.xaml
+ ///
+ public partial class NavigationView : TreeViewItem
+ {
+ public NavigationView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/ZoomboxModule.cs b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/ZoomboxModule.cs
new file mode 100644
index 00000000..70c7343c
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Modules/Samples.Modules.Zoombox/ZoomboxModule.cs
@@ -0,0 +1,45 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using Microsoft.Practices.Prism.Regions;
+using Microsoft.Practices.Unity;
+using Samples.Infrastructure;
+using Samples.Infrastructure.Extensions;
+using Samples.Modules.Zoombox.Views;
+
+namespace Samples.Modules.Zoombox
+{
+ public class ZoomboxModule : ModuleBase
+ {
+ public ZoomboxModule( IUnityContainer container, IRegionManager regionManager )
+ : base( container, regionManager )
+ {
+ }
+
+ protected override void InitializeModule()
+ {
+ RegionManager.RegisterViewWithRegion( RegionNames.NavigationRegion, typeof( NavigationView ) );
+ }
+
+ protected override void RegisterViewsAndTypes()
+ {
+ Container.RegisterNavigationType( typeof( HomeView ) );
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Controls/DemoView.cs b/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Controls/DemoView.cs
index 47b3c67c..8816daad 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Controls/DemoView.cs
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Controls/DemoView.cs
@@ -35,6 +35,22 @@ namespace Samples.Infrastructure.Controls
#region Properties
+
+
+ public static readonly DependencyProperty DescriptionProperty = DependencyProperty.Register( "Description", typeof( string ), typeof( DemoView ), new UIPropertyMetadata( String.Empty ) );
+ public string Description
+ {
+ get
+ {
+ return ( string )GetValue( DescriptionProperty );
+ }
+ set
+ {
+ SetValue( DescriptionProperty, value );
+ }
+ }
+
+
public static readonly DependencyProperty CSharpTextProperty = DependencyProperty.Register( "CSharpText", typeof( string ), typeof( DemoView ), new UIPropertyMetadata( null ) );
public string CSharpText
{
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Core/CodeFormatting/CSharpFormat.cs b/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Core/CodeFormatting/CSharpFormat.cs
index 1fa3a6b7..d0480e3f 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Core/CodeFormatting/CSharpFormat.cs
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Core/CodeFormatting/CSharpFormat.cs
@@ -209,13 +209,22 @@ namespace Samples.Infrastructure.Core.CodeFormatting
if( match.Groups[ 1 ].Success ) //comment
{
StringReader reader = new StringReader( match.ToString() );
- string line;
StringBuilder sb = new StringBuilder();
+ string line;
+ bool firstLineRead = false;
while( ( line = reader.ReadLine() ) != null )
{
- Run r = new Run( line );
- r.Foreground = new SolidColorBrush( Color.FromRgb( 0, 128, 0 ) );
+ if( firstLineRead )
+ sb.Append( "\r" );
+ sb.Append( line );
+ firstLineRead = true;
+ }
+
+ if( !string.IsNullOrEmpty( sb.ToString() ) )
+ {
+ Run r = new Run( sb.ToString() );
+ r.Foreground = new SolidColorBrush( Color.FromRgb( 0, 128, 0 ) );
CodeParagraphGlobal.Add( r );
}
return "::::::";
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Properties/Resources.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Properties/Resources.Designer.cs
deleted file mode 100644
index 000b63d2..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +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.Infrastructure.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Samples.Infrastructure.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Properties/Resources.resx
deleted file mode 100644
index ffecec85..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/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/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Properties/Settings.Designer.cs
deleted file mode 100644
index b6b97418..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +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.Infrastructure.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Properties/Settings.settings b/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Samples.Infrastructure.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Samples.Infrastructure.csproj
index 75c1a109..843f384c 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Samples.Infrastructure.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Samples.Infrastructure.csproj
@@ -15,10 +15,6 @@
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
- SAK
- SAK
- SAK
- SAK
true
@@ -73,26 +69,8 @@
Code
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
@@ -102,11 +80,11 @@
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Samples.Infrastructure.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Samples.Infrastructure.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Samples.Infrastructure.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/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Themes/Generic.xaml
index 6f7e47d1..7c3a5685 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Samples.Infrastructure/Themes/Generic.xaml
@@ -139,7 +139,14 @@
-
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.config b/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.config
index dde3ced8..69603068 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.config
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Samples/App.config
@@ -8,13 +8,18 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Resources.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Resources.Designer.cs
deleted file mode 100644
index b8917e35..00000000
--- a/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/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Resources.resx
deleted file mode 100644
index ffecec85..00000000
--- a/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/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Settings.Designer.cs
deleted file mode 100644
index 2afd4b0b..00000000
--- a/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/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Settings.settings b/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d..00000000
--- a/ExtendedWPFToolkitSolution/Src/Samples/Samples/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Samples/Resources/TextBlockStyles.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Samples/Resources/TextBlockStyles.xaml
index f20dbfe9..1aa25218 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Samples/Resources/TextBlockStyles.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Samples/Resources/TextBlockStyles.xaml
@@ -26,4 +26,4 @@
-
\ No newline at end of file
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Samples/Resources/TreeViewStyles.xaml b/ExtendedWPFToolkitSolution/Src/Samples/Samples/Resources/TreeViewStyles.xaml
index 61fd29cf..f9e870fe 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Samples/Resources/TreeViewStyles.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Samples/Resources/TreeViewStyles.xaml
@@ -246,4 +246,4 @@
-
\ No newline at end of file
+
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Samples/Samples.csproj b/ExtendedWPFToolkitSolution/Src/Samples/Samples/Samples.csproj
index 42d933ac..21cf80f7 100644
--- a/ExtendedWPFToolkitSolution/Src/Samples/Samples/Samples.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Samples/Samples/Samples.csproj
@@ -14,10 +14,6 @@
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
- SAK
- SAK
- SAK
- SAK
Client
@@ -87,32 +83,10 @@
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
@@ -136,11 +110,11 @@
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Samples/Samples/Samples.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/Samples/Samples/Samples.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/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/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/AssemblyVersionInfo.cs
new file mode 100644
index 00000000..74011485
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/AssemblyVersionInfo.cs
@@ -0,0 +1,39 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+[assembly: System.Reflection.AssemblyVersion( _XceedVersionInfo.Version )]
+
+internal static class _XceedVersionInfo
+{
+ [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
+ public const string BaseVersion = "1.7";
+ [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
+ public const string Version = BaseVersion +
+ _XceedVersionInfoCommon.Build;
+ [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
+ public const string PublicKeyToken = "ba83ff368b7563c6";
+ [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
+ public const string DesignFullName =
+ "Xceed.Wpf.Toolkit,Version=" +
+ Version +
+ ",Culture=neutral,PublicKeyToken=" + PublicKeyToken;
+
+
+
+}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/AssemblyVersionInfoCommon.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/AssemblyVersionInfoCommon.cs
new file mode 100644
index 00000000..d9308cb5
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/AssemblyVersionInfoCommon.cs
@@ -0,0 +1,25 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+internal static class _XceedVersionInfoCommon
+{
+[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
+ public const string Build = ".*";
+
+}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml
index ce99bcea..cbd9490a 100644
--- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml
@@ -1,4 +1,4 @@
-
+ **********************************************************************-->
+
-
\ No newline at end of file
+
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml
index 53f746d3..adaa75f3 100644
--- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml
@@ -1,4 +1,4 @@
-
+ **********************************************************************-->
+
-
\ No newline at end of file
+
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs
index 4cadbf53..c5aae90b 100644
--- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs
@@ -28,8 +28,11 @@ using Xceed.Wpf.Toolkit.Core.Utilities;
namespace Xceed.Wpf.Toolkit
{
+ [TemplatePart( Name = PART_CalculatorButtonPanel, Type = typeof( ContentControl ) )]
public class Calculator : Control
{
+ private const string PART_CalculatorButtonPanel = "PART_CalculatorButtonPanel";
+
#region Members
private ContentControl _buttonPanel;
@@ -94,12 +97,6 @@ namespace Xceed.Wpf.Toolkit
#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 ) );
@@ -211,10 +208,7 @@ namespace Xceed.Wpf.Toolkit
protected virtual void OnValueChanged( decimal? oldValue, decimal? newValue )
{
- if( newValue.HasValue )
- DisplayText = newValue.ToString();
- else
- DisplayText = "0";
+ SetDisplayText( newValue );
RoutedPropertyChangedEventArgs
true
@@ -37,12 +33,6 @@
prompt
4
-
- true
-
-
- sn.snk
-
@@ -187,20 +177,22 @@
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
+
+
@@ -220,13 +212,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -235,6 +240,13 @@
+
+
+
+
+
+
+
@@ -257,19 +269,11 @@
+
+
Code
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
@@ -330,10 +334,6 @@
-
-
-
-
@@ -342,16 +342,19 @@
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -420,15 +423,21 @@
-
+
+
+
+
+
+ ErrorMessages.cs
+ Designer
+
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/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/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Implementation/WatermarkTextBox.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Implementation/WatermarkTextBox.cs
index 8b486cb5..4514a07e 100644
--- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Implementation/WatermarkTextBox.cs
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Implementation/WatermarkTextBox.cs
@@ -91,11 +91,11 @@ namespace Xceed.Wpf.Toolkit
#region Base Class Overrides
- protected override void OnGotKeyboardFocus( KeyboardFocusChangedEventArgs e )
+ protected override void OnGotFocus( RoutedEventArgs e )
{
- base.OnGotKeyboardFocus( e );
+ base.OnGotFocus( e );
- if( SelectAllOnGotFocus )
+ if( SelectAllOnGotFocus )
SelectAll();
}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Themes/Generic.xaml
index 854d39e1..9e20b897 100644
--- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WatermarkTextBox/Themes/Generic.xaml
@@ -1,4 +1,4 @@
-
+ **********************************************************************-->
+
@@ -102,4 +103,4 @@
-
\ No newline at end of file
+
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/Wizard.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/Wizard.cs
index 6ee4610b..16436dea 100644
--- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/Wizard.cs
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Implementation/Wizard.cs
@@ -580,4 +580,4 @@ namespace Xceed.Wpf.Toolkit
#endregion //Methods
}
-}
\ No newline at end of file
+}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Themes/Generic.xaml
index 6743bbd8..33168b23 100644
--- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Wizard/Themes/Generic.xaml
@@ -1,4 +1,4 @@
-
+ **********************************************************************-->
+
-
\ No newline at end of file
+
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/Resources/Zoom.cur b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/Resources/Zoom.cur
new file mode 100644
index 00000000..f5001727
Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/Resources/Zoom.cur differ
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/Resources/ZoomRelative.cur b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/Resources/ZoomRelative.cur
new file mode 100644
index 00000000..7df27fd6
Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/Resources/ZoomRelative.cur differ
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/Themes/Generic.xaml
new file mode 100644
index 00000000..189b238a
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/Themes/Generic.xaml
@@ -0,0 +1,601 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/Zoombox.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/Zoombox.cs
new file mode 100644
index 00000000..93798650
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/Zoombox.cs
@@ -0,0 +1,3781 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System;
+using System.Collections;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Globalization;
+using System.Security;
+using System.Security.Permissions;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using Xceed.Wpf.Toolkit.Core.Input;
+using Xceed.Wpf.Toolkit.Core;
+using Xceed.Wpf.Toolkit.Core.Utilities;
+
+namespace Xceed.Wpf.Toolkit.Zoombox
+{
+ public sealed class Zoombox : ContentControl
+ {
+
+ #region Constructors
+
+ static Zoombox()
+ {
+ Zoombox.DefaultStyleKeyProperty.OverrideMetadata( typeof( Zoombox ), new FrameworkPropertyMetadata( typeof( Zoombox ) ) );
+ Zoombox.ClipToBoundsProperty.OverrideMetadata( typeof( Zoombox ), new FrameworkPropertyMetadata( true ) );
+ Zoombox.FocusableProperty.OverrideMetadata( typeof( Zoombox ), new FrameworkPropertyMetadata( true ) );
+ Zoombox.HorizontalContentAlignmentProperty.OverrideMetadata( typeof( Zoombox ), new FrameworkPropertyMetadata( HorizontalAlignment.Center, new PropertyChangedCallback( Zoombox.RefocusView ) ) );
+ Zoombox.VerticalContentAlignmentProperty.OverrideMetadata( typeof( Zoombox ), new FrameworkPropertyMetadata( VerticalAlignment.Center, new PropertyChangedCallback( Zoombox.RefocusView ) ) );
+ Zoombox.ContentProperty.OverrideMetadata( typeof( Zoombox ), new FrameworkPropertyMetadata( ( PropertyChangedCallback )null, new CoerceValueCallback( Zoombox.CoerceContentValue ) ) );
+ }
+
+ public Zoombox()
+ : base()
+ {
+ try
+ {
+ new UIPermission( PermissionState.Unrestricted ).Demand();
+ _cacheBits[ ( int )CacheBits.HasUIPermission ] = true;
+ }
+ catch( SecurityException )
+ {
+ }
+
+ this.InitCommands();
+
+ // use the LayoutUpdated event to keep the Viewport in sync
+ this.LayoutUpdated += new EventHandler( this.OnLayoutUpdated );
+ this.AddHandler( FrameworkElement.SizeChangedEvent, new SizeChangedEventHandler( this.OnSizeChanged ), true );
+
+ this.CoerceValue( Zoombox.ViewStackModeProperty );
+ }
+
+ #endregion
+
+ #region AnimationAccelerationRatio Property
+
+ public static readonly DependencyProperty AnimationAccelerationRatioProperty =
+ DependencyProperty.Register( "AnimationAccelerationRatio", typeof( double ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( 0d ),
+ new ValidateValueCallback( Zoombox.ValidateAccelerationRatio ) );
+
+ public double AnimationAccelerationRatio
+ {
+ get
+ {
+ return ( double )this.GetValue( Zoombox.AnimationAccelerationRatioProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.AnimationAccelerationRatioProperty, value );
+ }
+ }
+
+ private static bool ValidateAccelerationRatio( object value )
+ {
+ double newValue = ( double )value;
+ if( newValue < 0 || newValue > 1 || DoubleHelper.IsNaN( newValue ) )
+ throw new ArgumentException( ErrorMessages.GetMessage( "AnimationAccelerationRatioOOR" ) );
+
+ return true;
+ }
+
+ #endregion
+
+ #region AnimationDecelerationRatio Property
+
+ public static readonly DependencyProperty AnimationDecelerationRatioProperty =
+ DependencyProperty.Register( "AnimationDecelerationRatio", typeof( double ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( 0d ),
+ new ValidateValueCallback( Zoombox.ValidateDecelerationRatio ) );
+
+ public double AnimationDecelerationRatio
+ {
+ get
+ {
+ return ( double )this.GetValue( Zoombox.AnimationDecelerationRatioProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.AnimationDecelerationRatioProperty, value );
+ }
+ }
+
+ private static bool ValidateDecelerationRatio( object value )
+ {
+ double newValue = ( double )value;
+ if( newValue < 0 || newValue > 1 || DoubleHelper.IsNaN( newValue ) )
+ throw new ArgumentException( ErrorMessages.GetMessage( "AnimationDecelerationRatioOOR" ) );
+
+ return true;
+ }
+
+ #endregion
+
+ #region AnimationDuration Property
+
+ public static readonly DependencyProperty AnimationDurationProperty =
+ DependencyProperty.Register( "AnimationDuration", typeof( Duration ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( new Duration( TimeSpan.FromMilliseconds( 300 ) ) ) );
+
+ public Duration AnimationDuration
+ {
+ get
+ {
+ return ( Duration )this.GetValue( Zoombox.AnimationDurationProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.AnimationDurationProperty, value );
+ }
+ }
+
+ #endregion
+
+ #region AreDragModifiersActive Property
+
+ private static readonly DependencyPropertyKey AreDragModifiersActivePropertyKey =
+ DependencyProperty.RegisterReadOnly( "AreDragModifiersActive", typeof( bool ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( false ) );
+
+ public static readonly DependencyProperty AreDragModifiersActiveProperty = Zoombox.AreDragModifiersActivePropertyKey.DependencyProperty;
+
+ public bool AreDragModifiersActive
+ {
+ get
+ {
+ return ( bool )this.GetValue( Zoombox.AreDragModifiersActiveProperty );
+ }
+ }
+
+ private void SetAreDragModifiersActive( bool value )
+ {
+ this.SetValue( Zoombox.AreDragModifiersActivePropertyKey, value );
+ }
+
+ #endregion
+
+ #region AreRelativeZoomModifiersActive Property
+
+ private static readonly DependencyPropertyKey AreRelativeZoomModifiersActivePropertyKey =
+ DependencyProperty.RegisterReadOnly( "AreRelativeZoomModifiersActive", typeof( bool ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( false ) );
+
+ public static readonly DependencyProperty AreRelativeZoomModifiersActiveProperty = Zoombox.AreRelativeZoomModifiersActivePropertyKey.DependencyProperty;
+
+ public bool AreRelativeZoomModifiersActive
+ {
+ get
+ {
+ return ( bool )this.GetValue( Zoombox.AreRelativeZoomModifiersActiveProperty );
+ }
+ }
+
+ private void SetAreRelativeZoomModifiersActive( bool value )
+ {
+ this.SetValue( Zoombox.AreRelativeZoomModifiersActivePropertyKey, value );
+ }
+
+ #endregion
+
+ #region AreZoomModifiersActive Property
+
+ private static readonly DependencyPropertyKey AreZoomModifiersActivePropertyKey =
+ DependencyProperty.RegisterReadOnly( "AreZoomModifiersActive", typeof( bool ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( false ) );
+
+ public static readonly DependencyProperty AreZoomModifiersActiveProperty = Zoombox.AreZoomModifiersActivePropertyKey.DependencyProperty;
+
+ public bool AreZoomModifiersActive
+ {
+ get
+ {
+ return ( bool )this.GetValue( Zoombox.AreZoomModifiersActiveProperty );
+ }
+ }
+
+ private void SetAreZoomModifiersActive( bool value )
+ {
+ this.SetValue( Zoombox.AreZoomModifiersActivePropertyKey, value );
+ }
+
+ #endregion
+
+ #region AreZoomToSelectionModifiersActive Property
+
+ private static readonly DependencyPropertyKey AreZoomToSelectionModifiersActivePropertyKey =
+ DependencyProperty.RegisterReadOnly( "AreZoomToSelectionModifiersActive", typeof( bool ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( false ) );
+
+ public static readonly DependencyProperty AreZoomToSelectionModifiersActiveProperty = Zoombox.AreZoomToSelectionModifiersActivePropertyKey.DependencyProperty;
+
+ public bool AreZoomToSelectionModifiersActive
+ {
+ get
+ {
+ return ( bool )this.GetValue( Zoombox.AreZoomToSelectionModifiersActiveProperty );
+ }
+ }
+
+ private void SetAreZoomToSelectionModifiersActive( bool value )
+ {
+ this.SetValue( Zoombox.AreZoomToSelectionModifiersActivePropertyKey, value );
+ }
+
+ #endregion
+
+ #region AutoWrapContentWithViewbox Property
+
+ public static readonly DependencyProperty AutoWrapContentWithViewboxProperty =
+ DependencyProperty.Register( "AutoWrapContentWithViewbox", typeof( bool ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( true,
+ new PropertyChangedCallback( Zoombox.OnAutoWrapContentWithViewboxChanged ) ) );
+
+ public bool AutoWrapContentWithViewbox
+ {
+ get
+ {
+ return ( bool )this.GetValue( Zoombox.AutoWrapContentWithViewboxProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.AutoWrapContentWithViewboxProperty, value );
+ }
+ }
+
+ private static void OnAutoWrapContentWithViewboxChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
+ {
+ o.CoerceValue( Zoombox.ContentProperty );
+ }
+
+ private static object CoerceContentValue( DependencyObject d, object value )
+ {
+ return ( ( Zoombox )d ).CoerceContentValue( value );
+ }
+
+ private object CoerceContentValue( object value )
+ {
+ if( value != null && !( value is UIElement ) && !( ( bool )this.GetValue( DesignerProperties.IsInDesignModeProperty ) ) )
+ throw new InvalidContentException( ErrorMessages.GetMessage( "ZoomboxContentMustBeUIElement" ) );
+
+ object oldContent = _content;
+ if( value != _trueContent || ( this.IsContentWrapped != this.AutoWrapContentWithViewbox ) )
+ {
+ // check whether the content is currently wrapped and needs to be unwrapped
+ if( this.IsContentWrapped && _content is Viewbox && _content != _trueContent )
+ {
+ Viewbox viewbox = ( Viewbox )_content;
+
+ BindingOperations.ClearAllBindings( viewbox );
+ ( viewbox as Viewbox ).Child = null;
+
+ this.RemoveLogicalChild( viewbox );
+ }
+
+ // make sure the view finder's visual brush is null
+ if( _viewFinderDisplay != null && _viewFinderDisplay.VisualBrush != null )
+ {
+ _viewFinderDisplay.VisualBrush.Visual = null;
+ _viewFinderDisplay.VisualBrush = null;
+ }
+
+ // update the cached content and true content values
+ _content = value as UIElement;
+ _trueContent = value as UIElement;
+
+ // if necessary, unparent the existing content
+ if( _contentPresenter != null && _contentPresenter.Content != null )
+ {
+ _contentPresenter.Content = null;
+ }
+
+ // if necessary, wrap the content
+ this.IsContentWrapped = false;
+ if( this.AutoWrapContentWithViewbox )
+ {
+ // create a viewbox and make it the logical child of the Zoombox
+ Viewbox viewbox = new Viewbox();
+ this.AddLogicalChild( viewbox );
+
+ // now set the new parent to be the viewbox
+ viewbox.Child = value as UIElement;
+ _content = viewbox;
+ viewbox.HorizontalAlignment = HorizontalAlignment.Left;
+ viewbox.VerticalAlignment = VerticalAlignment.Top;
+ this.IsContentWrapped = true;
+ }
+
+ if( _contentPresenter != null )
+ {
+ _contentPresenter.Content = _content;
+ }
+
+ if( _viewFinderDisplay != null )
+ {
+ this.CreateVisualBrushForViewFinder( _content );
+ }
+ this.UpdateViewFinderDisplayContentBounds();
+ }
+
+ // if the content changes, we need to reset the flags used to first render and arrange the content
+ if( oldContent != _content
+ && this.HasArrangedContentPresenter
+ && this.HasRenderedFirstView )
+ {
+ this.HasArrangedContentPresenter = false;
+ this.HasRenderedFirstView = false;
+ this.RefocusViewOnFirstRender = true;
+ _contentPresenter.LayoutUpdated += new EventHandler( this.ContentPresenterFirstArranged );
+ }
+ return _content;
+ }
+
+ private UIElement _trueContent; //null
+
+ #endregion
+
+ #region CurrentView Property
+
+ private static readonly DependencyPropertyKey CurrentViewPropertyKey =
+ DependencyProperty.RegisterReadOnly( "CurrentView", typeof( ZoomboxView ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( ZoomboxView.Empty,
+ new PropertyChangedCallback( Zoombox.OnCurrentViewChanged ) ) );
+
+ public static readonly DependencyProperty CurrentViewProperty = Zoombox.CurrentViewPropertyKey.DependencyProperty;
+
+ public ZoomboxView CurrentView
+ {
+ get
+ {
+ return ( ZoomboxView )this.GetValue( Zoombox.CurrentViewProperty );
+ }
+ }
+
+ private void SetCurrentView( ZoomboxView value )
+ {
+ this.SetValue( Zoombox.CurrentViewPropertyKey, value );
+ }
+
+ private static void OnCurrentViewChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
+ {
+ Zoombox zoombox = ( Zoombox )o;
+ if( !zoombox.IsUpdatingView )
+ {
+ zoombox.ZoomTo( zoombox.CurrentView );
+ }
+ zoombox.RaiseEvent( new ZoomboxViewChangedEventArgs( e.OldValue as ZoomboxView, e.NewValue as ZoomboxView, zoombox._lastViewIndex, zoombox.CurrentViewIndex ) );
+ }
+
+ #endregion
+
+ #region CurrentViewIndex Property
+
+ private static readonly DependencyPropertyKey CurrentViewIndexPropertyKey =
+ DependencyProperty.RegisterReadOnly( "CurrentViewIndex", typeof( int ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( -1 ) );
+
+ public static readonly DependencyProperty CurrentViewIndexProperty = Zoombox.CurrentViewIndexPropertyKey.DependencyProperty;
+
+ public int CurrentViewIndex
+ {
+ get
+ {
+ return ( int )this.GetValue( Zoombox.CurrentViewIndexProperty );
+ }
+ }
+
+ internal void SetCurrentViewIndex( int value )
+ {
+ this.SetValue( Zoombox.CurrentViewIndexPropertyKey, value );
+ }
+
+ #endregion
+
+ #region DragModifiers Property
+
+ public static readonly DependencyProperty DragModifiersProperty =
+ DependencyProperty.Register( "DragModifiers", typeof( KeyModifierCollection ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( Zoombox.GetDefaultDragModifiers() ) );
+
+ [TypeConverter( typeof( KeyModifierCollectionConverter ) )]
+ public KeyModifierCollection DragModifiers
+ {
+ get
+ {
+ return ( KeyModifierCollection )this.GetValue( Zoombox.DragModifiersProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.DragModifiersProperty, value );
+ }
+ }
+
+ private static KeyModifierCollection GetDefaultDragModifiers()
+ {
+ KeyModifierCollection result = new KeyModifierCollection();
+ result.Add( KeyModifier.Ctrl );
+ result.Add( KeyModifier.Exact );
+ return result;
+ }
+
+ #endregion
+
+ #region DragOnPreview Property
+
+ public static readonly DependencyProperty DragOnPreviewProperty =
+ DependencyProperty.Register( "DragOnPreview", typeof( bool ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( false ) );
+
+ public bool DragOnPreview
+ {
+ get
+ {
+ return ( bool )this.GetValue( Zoombox.DragOnPreviewProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.DragOnPreviewProperty, value );
+ }
+ }
+
+ #endregion
+
+ #region EffectiveViewStackMode Property
+
+ private static readonly DependencyPropertyKey EffectiveViewStackModePropertyKey =
+ DependencyProperty.RegisterReadOnly( "EffectiveViewStackMode", typeof( ZoomboxViewStackMode ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( ZoomboxViewStackMode.Auto ) );
+
+ public static readonly DependencyProperty EffectiveViewStackModeProperty = Zoombox.EffectiveViewStackModePropertyKey.DependencyProperty;
+
+ public ZoomboxViewStackMode EffectiveViewStackMode
+ {
+ get
+ {
+ return ( ZoomboxViewStackMode )this.GetValue( Zoombox.EffectiveViewStackModeProperty );
+ }
+ }
+
+ private void SetEffectiveViewStackMode( ZoomboxViewStackMode value )
+ {
+ this.SetValue( Zoombox.EffectiveViewStackModePropertyKey, value );
+ }
+
+ #endregion
+
+ #region HasBackStack Property
+
+ private static readonly DependencyPropertyKey HasBackStackPropertyKey =
+ DependencyProperty.RegisterReadOnly( "HasBackStack", typeof( bool ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( false ) );
+
+ public static readonly DependencyProperty HasBackStackProperty = Zoombox.HasBackStackPropertyKey.DependencyProperty;
+
+ public bool HasBackStack
+ {
+ get
+ {
+ return ( bool )this.GetValue( Zoombox.HasBackStackProperty );
+ }
+ }
+
+ #endregion
+
+ #region HasForwardStack Property
+
+ private static readonly DependencyPropertyKey HasForwardStackPropertyKey =
+ DependencyProperty.RegisterReadOnly( "HasForwardStack", typeof( bool ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( false ) );
+
+ public static readonly DependencyProperty HasForwardStackProperty = Zoombox.HasForwardStackPropertyKey.DependencyProperty;
+
+ public bool HasForwardStack
+ {
+ get
+ {
+ return ( bool )this.GetValue( Zoombox.HasForwardStackProperty );
+ }
+ }
+
+ #endregion
+
+ #region IsAnimated Property
+
+ public static readonly DependencyProperty IsAnimatedProperty =
+ DependencyProperty.Register( "IsAnimated", typeof( bool ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( true,
+ ( PropertyChangedCallback )null, new CoerceValueCallback( Zoombox.CoerceIsAnimatedValue ) ) );
+
+ public bool IsAnimated
+ {
+ get
+ {
+ return ( bool )this.GetValue( Zoombox.IsAnimatedProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.IsAnimatedProperty, value );
+ }
+ }
+
+ private static object CoerceIsAnimatedValue( DependencyObject d, object value )
+ {
+ Zoombox zoombox = ( Zoombox )d;
+ bool result = ( bool )value;
+ if( !zoombox.IsInitialized )
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ #endregion
+
+ #region IsDraggingContent Property
+
+ private static readonly DependencyPropertyKey IsDraggingContentPropertyKey =
+ DependencyProperty.RegisterReadOnly( "IsDraggingContent", typeof( bool ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( false ) );
+
+ public static readonly DependencyProperty IsDraggingContentProperty = Zoombox.IsDraggingContentPropertyKey.DependencyProperty;
+
+ public bool IsDraggingContent
+ {
+ get
+ {
+ return ( bool )this.GetValue( Zoombox.IsDraggingContentProperty );
+ }
+ }
+
+ private void SetIsDraggingContent( bool value )
+ {
+ this.SetValue( Zoombox.IsDraggingContentPropertyKey, value );
+ }
+
+ #endregion
+
+ #region IsSelectingRegion Property
+
+ private static readonly DependencyPropertyKey IsSelectingRegionPropertyKey =
+ DependencyProperty.RegisterReadOnly( "IsSelectingRegion", typeof( bool ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( false ) );
+
+ public static readonly DependencyProperty IsSelectingRegionProperty = Zoombox.IsSelectingRegionPropertyKey.DependencyProperty;
+
+ public bool IsSelectingRegion
+ {
+ get
+ {
+ return ( bool )this.GetValue( Zoombox.IsSelectingRegionProperty );
+ }
+ }
+
+ private void SetIsSelectingRegion( bool value )
+ {
+ this.SetValue( Zoombox.IsSelectingRegionPropertyKey, value );
+ }
+
+ #endregion
+
+ #region MaxScale Property
+
+ public static readonly DependencyProperty MaxScaleProperty =
+ DependencyProperty.Register( "MaxScale", typeof( double ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( 100d, FrameworkPropertyMetadataOptions.AffectsMeasure,
+ new PropertyChangedCallback( Zoombox.OnMaxScaleChanged ), new CoerceValueCallback( Zoombox.CoerceMaxScaleValue ) ) );
+
+ public double MaxScale
+ {
+ get
+ {
+ return ( double )this.GetValue( Zoombox.MaxScaleProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.MaxScaleProperty, value );
+ }
+ }
+
+ private static void OnMaxScaleChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
+ {
+ Zoombox zoombox = ( Zoombox )o;
+ zoombox.CoerceValue( Zoombox.MinScaleProperty );
+ zoombox.CoerceValue( Zoombox.ScaleProperty );
+ }
+
+ private static object CoerceMaxScaleValue( DependencyObject d, object value )
+ {
+ Zoombox zoombox = ( Zoombox )d;
+ double result = ( double )value;
+ if( result < zoombox.MinScale )
+ {
+ result = zoombox.MinScale;
+ }
+ return result;
+ }
+
+ #endregion
+
+ #region MinScale Property
+
+ public static readonly DependencyProperty MinScaleProperty =
+ DependencyProperty.Register( "MinScale", typeof( double ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( 0.01d, FrameworkPropertyMetadataOptions.AffectsMeasure,
+ new PropertyChangedCallback( Zoombox.OnMinScaleChanged ), new CoerceValueCallback( Zoombox.CoerceMinScaleValue ) ) );
+
+ public double MinScale
+ {
+ get
+ {
+ return ( double )this.GetValue( Zoombox.MinScaleProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.MinScaleProperty, value );
+ }
+ }
+
+ private static void OnMinScaleChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
+ {
+ Zoombox zoombox = ( Zoombox )o;
+ zoombox.CoerceValue( Zoombox.MinScaleProperty );
+ zoombox.CoerceValue( Zoombox.ScaleProperty );
+ }
+
+ private static object CoerceMinScaleValue( DependencyObject d, object value )
+ {
+ Zoombox zoombox = ( Zoombox )d;
+ double result = ( double )value;
+ if( result > zoombox.MaxScale )
+ {
+ result = zoombox.MaxScale;
+ }
+ return result;
+ }
+
+ #endregion
+
+ #region NavigateOnPreview Property
+
+ public static readonly DependencyProperty NavigateOnPreviewProperty =
+ DependencyProperty.Register( "NavigateOnPreview", typeof( bool ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( false ) );
+
+ public bool NavigateOnPreview
+ {
+ get
+ {
+ return ( bool )this.GetValue( Zoombox.NavigateOnPreviewProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.NavigateOnPreviewProperty, value );
+ }
+ }
+
+ #endregion
+
+ #region PanDistance Property
+
+ public static readonly DependencyProperty PanDistanceProperty =
+ DependencyProperty.Register( "PanDistance", typeof( double ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( 5d ) );
+
+ public double PanDistance
+ {
+ get
+ {
+ return ( double )this.GetValue( Zoombox.PanDistanceProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.PanDistanceProperty, value );
+ }
+ }
+
+ #endregion
+
+ #region Position Property
+
+ public static readonly DependencyProperty PositionProperty =
+ DependencyProperty.Register( "Position", typeof( Point ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( PointHelper.Empty, new PropertyChangedCallback( Zoombox.OnPositionChanged ) ) );
+
+ public Point Position
+ {
+ get
+ {
+ return ( Point )this.GetValue( Zoombox.PositionProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.PositionProperty, value );
+ }
+ }
+
+ private static void OnPositionChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
+ {
+ Zoombox zoombox = ( Zoombox )o;
+ if( !zoombox.IsUpdatingViewport )
+ {
+ Point newPosition = ( Point )e.NewValue;
+ double scale = zoombox.Scale;
+ if( scale > 0 )
+ {
+ zoombox.ZoomTo( new Point( -newPosition.X, -newPosition.Y ) );
+ }
+ }
+ }
+
+ #endregion
+
+ #region RelativeZoomModifiers Property
+
+ public static readonly DependencyProperty RelativeZoomModifiersProperty =
+ DependencyProperty.Register( "RelativeZoomModifiers", typeof( KeyModifierCollection ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( Zoombox.GetDefaultRelativeZoomModifiers() ) );
+
+ [TypeConverter( typeof( KeyModifierCollectionConverter ) )]
+ public KeyModifierCollection RelativeZoomModifiers
+ {
+ get
+ {
+ return ( KeyModifierCollection )this.GetValue( Zoombox.RelativeZoomModifiersProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.RelativeZoomModifiersProperty, value );
+ }
+ }
+
+ private static KeyModifierCollection GetDefaultRelativeZoomModifiers()
+ {
+ KeyModifierCollection result = new KeyModifierCollection();
+ result.Add( KeyModifier.Ctrl );
+ result.Add( KeyModifier.Alt );
+ result.Add( KeyModifier.Exact );
+ return result;
+ }
+
+ #endregion
+
+ #region Scale Property
+
+ public static readonly DependencyProperty ScaleProperty =
+ DependencyProperty.Register( "Scale", typeof( double ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( double.NaN,
+ new PropertyChangedCallback( Zoombox.OnScaleChanged ), new CoerceValueCallback( Zoombox.CoerceScaleValue ) ) );
+
+ public double Scale
+ {
+ get
+ {
+ return ( double )this.GetValue( Zoombox.ScaleProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.ScaleProperty, value );
+ }
+ }
+
+ private static void OnScaleChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
+ {
+ Zoombox zoombox = ( Zoombox )o;
+ if( !zoombox.IsUpdatingView )
+ {
+ double newScale = ( double )e.NewValue;
+ zoombox.ZoomTo( newScale );
+ }
+ }
+
+ private static object CoerceScaleValue( DependencyObject d, object value )
+ {
+ Zoombox zoombox = ( Zoombox )d;
+ double result = ( double )value;
+
+ if( result < zoombox.MinScale )
+ {
+ result = zoombox.MinScale;
+ }
+
+ if( result > zoombox.MaxScale )
+ {
+ result = zoombox.MaxScale;
+ }
+
+ return result;
+ }
+
+ #endregion
+
+ #region ViewFinder Property
+
+ private static readonly DependencyPropertyKey ViewFinderPropertyKey =
+ DependencyProperty.RegisterReadOnly( "ViewFinder", typeof( FrameworkElement ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( null ) );
+
+ public static readonly DependencyProperty ViewFinderProperty = Zoombox.ViewFinderPropertyKey.DependencyProperty;
+
+ public FrameworkElement ViewFinder
+ {
+ get
+ {
+ return ( FrameworkElement )this.GetValue( Zoombox.ViewFinderProperty );
+ }
+ }
+
+ #endregion
+
+ #region ViewFinderVisibility Attached Property
+
+ public static readonly DependencyProperty ViewFinderVisibilityProperty =
+ DependencyProperty.RegisterAttached( "ViewFinderVisibility", typeof( Visibility ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( Visibility.Visible ) );
+
+ public static Visibility GetViewFinderVisibility( DependencyObject d )
+ {
+ return ( Visibility )( d.GetValue( Zoombox.ViewFinderVisibilityProperty ) );
+ }
+
+ public static void SetViewFinderVisibility( DependencyObject d, Visibility value )
+ {
+ d.SetValue( Zoombox.ViewFinderVisibilityProperty, value );
+ }
+
+ #endregion
+
+ #region Viewport Property
+
+ private static readonly DependencyPropertyKey ViewportPropertyKey =
+ DependencyProperty.RegisterReadOnly( "Viewport", typeof( Rect ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( Rect.Empty,
+ new PropertyChangedCallback( Zoombox.OnViewportChanged ) ) );
+
+ public static readonly DependencyProperty ViewportProperty = Zoombox.ViewportPropertyKey.DependencyProperty;
+
+ public Rect Viewport
+ {
+ get
+ {
+ return ( Rect )this.GetValue( Zoombox.ViewportProperty );
+ }
+ }
+
+ private static void OnViewportChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
+ {
+ // keep the Position property in sync with the Viewport
+ Zoombox zoombox = ( Zoombox )o;
+ zoombox.Position = new Point( -zoombox.Viewport.Left * zoombox.Scale / zoombox._viewboxFactor, -zoombox.Viewport.Top * zoombox.Scale / zoombox._viewboxFactor );
+ }
+
+ #endregion
+
+ #region ViewStackCount Property
+
+ private static readonly DependencyPropertyKey ViewStackCountPropertyKey =
+ DependencyProperty.RegisterReadOnly( "ViewStackCount", typeof( int ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( -1,
+ new PropertyChangedCallback( Zoombox.OnViewStackCountChanged ) ) );
+
+ public static readonly DependencyProperty ViewStackCountProperty = Zoombox.ViewStackCountPropertyKey.DependencyProperty;
+
+ public int ViewStackCount
+ {
+ get
+ {
+ return ( int )this.GetValue( Zoombox.ViewStackCountProperty );
+ }
+ }
+
+ internal void SetViewStackCount( int value )
+ {
+ this.SetValue( Zoombox.ViewStackCountPropertyKey, value );
+ }
+
+ private static void OnViewStackCountChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
+ {
+ ( ( Zoombox )d ).OnViewStackCountChanged( e );
+ }
+
+ private void OnViewStackCountChanged( DependencyPropertyChangedEventArgs e )
+ {
+ if( this.EffectiveViewStackMode == ZoomboxViewStackMode.Disabled )
+ return;
+
+ this.UpdateStackProperties();
+ }
+
+ #endregion
+
+ #region ViewStackIndex Property
+
+ public static readonly DependencyProperty ViewStackIndexProperty =
+ DependencyProperty.Register( "ViewStackIndex", typeof( int ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( -1,
+ new PropertyChangedCallback( Zoombox.OnViewStackIndexChanged ), new CoerceValueCallback( Zoombox.CoerceViewStackIndexValue ) ) );
+
+ public int ViewStackIndex
+ {
+ get
+ {
+ return ( int )this.GetValue( Zoombox.ViewStackIndexProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.ViewStackIndexProperty, value );
+ }
+ }
+
+ private static void OnViewStackIndexChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
+ {
+ ( ( Zoombox )d ).OnViewStackIndexChanged( e );
+ }
+
+ private void OnViewStackIndexChanged( DependencyPropertyChangedEventArgs e )
+ {
+ if( this.EffectiveViewStackMode == ZoomboxViewStackMode.Disabled )
+ return;
+
+ if( !this.IsUpdatingView )
+ {
+ int viewIndex = this.ViewStackIndex;
+ if( viewIndex >= 0 && viewIndex < ViewStack.Count )
+ {
+ // update the current view, but don't allow the new view
+ // to be added to the view stack
+ this.UpdateView( this.ViewStack[ viewIndex ], true, false, viewIndex );
+ }
+ }
+
+ this.UpdateStackProperties();
+ this.RaiseEvent( new IndexChangedEventArgs( Zoombox.ViewStackIndexChangedEvent, ( int )e.OldValue, ( int )e.NewValue ) );
+ }
+
+ private static object CoerceViewStackIndexValue( DependencyObject d, object value )
+ {
+ Zoombox zoombox = d as Zoombox;
+ return ( zoombox.EffectiveViewStackMode == ZoomboxViewStackMode.Disabled ) ? -1 : value;
+ }
+
+ #endregion
+
+ #region ViewStackMode Property
+
+ public static readonly DependencyProperty ViewStackModeProperty =
+ DependencyProperty.Register( "ViewStackMode", typeof( ZoomboxViewStackMode ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( ZoomboxViewStackMode.Default,
+ new PropertyChangedCallback( Zoombox.OnViewStackModeChanged ), new CoerceValueCallback( Zoombox.CoerceViewStackModeValue ) ) );
+
+ public ZoomboxViewStackMode ViewStackMode
+ {
+ get
+ {
+ return ( ZoomboxViewStackMode )this.GetValue( Zoombox.ViewStackModeProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.ViewStackModeProperty, value );
+ }
+ }
+
+ private static void OnViewStackModeChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
+ {
+ ( ( Zoombox )d ).OnViewStackModeChanged( e );
+ }
+
+ private void OnViewStackModeChanged( DependencyPropertyChangedEventArgs e )
+ {
+ if( ( ZoomboxViewStackMode )e.NewValue == ZoomboxViewStackMode.Disabled && _viewStack != null )
+ {
+ _viewStack.ClearViewStackSource();
+ _viewStack = null;
+ }
+ }
+
+ private static object CoerceViewStackModeValue( DependencyObject d, object value )
+ {
+ Zoombox zoombox = d as Zoombox;
+ ZoomboxViewStackMode effectiveMode = ( ZoomboxViewStackMode )value;
+
+ // if the effective mode is currently disabled, it must be updated first
+ if( zoombox.EffectiveViewStackMode == ZoomboxViewStackMode.Disabled )
+ {
+ zoombox.SetEffectiveViewStackMode( effectiveMode );
+ }
+
+ // now determine the correct effective mode
+ if( effectiveMode != ZoomboxViewStackMode.Disabled )
+ {
+ if( effectiveMode == ZoomboxViewStackMode.Default )
+ {
+ effectiveMode = ( zoombox.ViewStack.AreViewsFromSource ? ZoomboxViewStackMode.Manual : ZoomboxViewStackMode.Auto );
+ }
+ if( zoombox.ViewStack.AreViewsFromSource && ( ZoomboxViewStackMode )effectiveMode != ZoomboxViewStackMode.Manual )
+ {
+ throw new InvalidOperationException( ErrorMessages.GetMessage( "ViewModeInvalidForSource" ) );
+ }
+ }
+
+ // update the effective mode
+ zoombox.SetEffectiveViewStackMode( effectiveMode );
+ return value;
+ }
+
+ #endregion
+
+ #region ViewStackSource Property
+
+ public static readonly DependencyProperty ViewStackSourceProperty =
+ DependencyProperty.Register( "ViewStackSource", typeof( IEnumerable ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( ( IEnumerable )null,
+ new PropertyChangedCallback( Zoombox.OnViewStackSourceChanged ) ) );
+
+ [Bindable( true )]
+ public IEnumerable ViewStackSource
+ {
+ get
+ {
+ return ( _viewStack == null ) ? null : ViewStack.Source;
+ }
+ set
+ {
+ if( value == null )
+ {
+ this.ClearValue( Zoombox.ViewStackSourceProperty );
+ }
+ else
+ {
+ this.SetValue( Zoombox.ViewStackSourceProperty, value );
+ }
+ }
+ }
+
+ private static void OnViewStackSourceChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
+ {
+ Zoombox zoombox = ( Zoombox )d;
+ IEnumerable oldValue = ( IEnumerable )e.OldValue;
+ IEnumerable newValue = ( IEnumerable )e.NewValue;
+
+ // We need to know whether the new value represents an explicit null value
+ // or whether it came from a binding. The latter indicates that we stay in ViewStackSource mode,
+ // but with a null collection.
+ if( e.NewValue == null && !BindingOperations.IsDataBound( d, Zoombox.ViewStackSourceProperty ) )
+ {
+ if( zoombox.ViewStack != null )
+ {
+ zoombox.ViewStack.ClearViewStackSource();
+ }
+ }
+ else
+ {
+ zoombox.ViewStack.SetViewStackSource( newValue );
+ }
+
+ zoombox.CoerceValue( Zoombox.ViewStackModeProperty );
+ }
+
+ #endregion
+
+ #region ZoomModifiers Property
+
+ public static readonly DependencyProperty ZoomModifiersProperty =
+ DependencyProperty.Register( "ZoomModifiers", typeof( KeyModifierCollection ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( Zoombox.GetDefaultZoomModifiers() ) );
+
+ [TypeConverter( typeof( KeyModifierCollectionConverter ) )]
+ public KeyModifierCollection ZoomModifiers
+ {
+ get
+ {
+ return ( KeyModifierCollection )this.GetValue( Zoombox.ZoomModifiersProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.ZoomModifiersProperty, value );
+ }
+ }
+
+ private static KeyModifierCollection GetDefaultZoomModifiers()
+ {
+ KeyModifierCollection result = new KeyModifierCollection();
+ result.Add( KeyModifier.Shift );
+ result.Add( KeyModifier.Exact );
+ return result;
+ }
+
+ #endregion
+
+ #region ZoomOnPreview Property
+
+ public static readonly DependencyProperty ZoomOnPreviewProperty =
+ DependencyProperty.Register( "ZoomOnPreview", typeof( bool ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( true ) );
+
+ public bool ZoomOnPreview
+ {
+ get
+ {
+ return ( bool )this.GetValue( Zoombox.ZoomOnPreviewProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.ZoomOnPreviewProperty, value );
+ }
+ }
+
+ #endregion
+
+ #region ZoomOrigin Property
+
+ public static readonly DependencyProperty ZoomOriginProperty =
+ DependencyProperty.Register( "ZoomOrigin", typeof( Point ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( new Point( 0.5d, 0.5d ) ) );
+
+ public Point ZoomOrigin
+ {
+ get
+ {
+ return ( Point )this.GetValue( Zoombox.ZoomOriginProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.ZoomOriginProperty, value );
+ }
+ }
+
+ #endregion
+
+ #region ZoomPercentage Property
+
+ public static readonly DependencyProperty ZoomPercentageProperty =
+ DependencyProperty.Register( "ZoomPercentage", typeof( double ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( 5d ) );
+
+ public double ZoomPercentage
+ {
+ get
+ {
+ return ( double )this.GetValue( Zoombox.ZoomPercentageProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.ZoomPercentageProperty, value );
+ }
+ }
+
+ #endregion
+
+ #region ZoomOn Property
+
+ public static readonly DependencyProperty ZoomOnProperty =
+ DependencyProperty.Register( "ZoomOn", typeof( ZoomboxZoomOn ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( ZoomboxZoomOn.Content ) );
+
+ public ZoomboxZoomOn ZoomOn
+ {
+ get
+ {
+ return ( ZoomboxZoomOn )this.GetValue( Zoombox.ZoomOnProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.ZoomOnProperty, value );
+ }
+ }
+
+ #endregion
+
+ #region ZoomToSelectionModifiers Property
+
+ public static readonly DependencyProperty ZoomToSelectionModifiersProperty =
+ DependencyProperty.Register( "ZoomToSelectionModifiers", typeof( KeyModifierCollection ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( Zoombox.GetDefaultZoomToSelectionModifiers() ) );
+
+ [TypeConverter( typeof( KeyModifierCollectionConverter ) )]
+ public KeyModifierCollection ZoomToSelectionModifiers
+ {
+ get
+ {
+ return ( KeyModifierCollection )this.GetValue( Zoombox.ZoomToSelectionModifiersProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.ZoomToSelectionModifiersProperty, value );
+ }
+ }
+
+ private static KeyModifierCollection GetDefaultZoomToSelectionModifiers()
+ {
+ KeyModifierCollection result = new KeyModifierCollection();
+ result.Add( KeyModifier.Alt );
+ result.Add( KeyModifier.Exact );
+ return result;
+ }
+
+ #endregion
+
+ #region KeepContentInBounds Property
+
+ public static readonly DependencyProperty KeepContentInBoundsProperty =
+ DependencyProperty.Register( "KeepContentInBounds", typeof( bool ), typeof( Zoombox ),
+ new FrameworkPropertyMetadata( false,
+ new PropertyChangedCallback( Zoombox.OnKeepContentInBoundsChanged ) ) );
+
+ public bool KeepContentInBounds
+ {
+ get
+ {
+ return ( bool )this.GetValue( Zoombox.KeepContentInBoundsProperty );
+ }
+ set
+ {
+ this.SetValue( Zoombox.KeepContentInBoundsProperty, value );
+ }
+ }
+
+ private static void OnKeepContentInBoundsChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
+ {
+ ( ( Zoombox )d ).OnKeepContentInBoundsChanged( e );
+ }
+
+ private void OnKeepContentInBoundsChanged( DependencyPropertyChangedEventArgs e )
+ {
+ //
+ // Update view and see if we need to reposition the content
+ //
+ bool oldIsAnimated = this.IsAnimated;
+ this.IsAnimated = false;
+ try
+ {
+ this.UpdateView( this.CurrentView, false, false, this.ViewStackIndex );
+ }
+ finally
+ {
+ this.IsAnimated = oldIsAnimated;
+ }
+ }
+
+ #endregion
+
+ #region ViewStack Property
+
+ public ZoomboxViewStack ViewStack
+ {
+ get
+ {
+ if( _viewStack == null && this.EffectiveViewStackMode != ZoomboxViewStackMode.Disabled )
+ {
+ _viewStack = new ZoomboxViewStack( this );
+ }
+ return _viewStack;
+ }
+ }
+
+ #endregion
+
+ #region HasArrangedContentPresenter Internal Property
+
+ internal bool HasArrangedContentPresenter
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.HasArrangedContentPresenter ];
+ }
+ set
+ {
+ _cacheBits[ ( int )CacheBits.HasArrangedContentPresenter ] = value;
+ }
+ }
+
+ #endregion
+
+ #region IsUpdatingView Internal Property
+
+ internal bool IsUpdatingView
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.IsUpdatingView ];
+ }
+ set
+ {
+ _cacheBits[ ( int )CacheBits.IsUpdatingView ] = value;
+ }
+ }
+
+ #endregion
+
+ #region ContentOffset Private Property
+
+ private Vector ContentOffset
+ {
+ get
+ {
+ // auto-wrapped content is always left and top aligned
+ if( this.IsContentWrapped || _content == null || !( _content is FrameworkElement ) )
+ return new Vector( 0, 0 );
+
+ double x = 0;
+ double y = 0;
+ Size contentSize = this.ContentRect.Size;
+
+ switch( ( _content as FrameworkElement ).HorizontalAlignment )
+ {
+ case HorizontalAlignment.Center:
+ case HorizontalAlignment.Stretch:
+ x = ( this.RenderSize.Width - contentSize.Width ) / 2;
+ break;
+
+ case HorizontalAlignment.Right:
+ x = this.RenderSize.Width - contentSize.Width;
+ break;
+ }
+
+ switch( ( _content as FrameworkElement ).VerticalAlignment )
+ {
+ case VerticalAlignment.Center:
+ case VerticalAlignment.Stretch:
+ y = ( this.RenderSize.Height - contentSize.Height ) / 2;
+ break;
+
+ case VerticalAlignment.Bottom:
+ y = this.RenderSize.Height - contentSize.Height;
+ break;
+ }
+
+ return new Vector( x, y );
+ }
+ }
+
+ #endregion
+
+ #region ContentRect Private Property
+
+ private Rect ContentRect
+ {
+ get
+ {
+ return ( _content == null ) ? Rect.Empty
+ : new Rect( new Size( _content.RenderSize.Width / _viewboxFactor, _content.RenderSize.Height / _viewboxFactor ) );
+ }
+ }
+
+ #endregion
+
+ #region HasRenderedFirstView Private Property
+
+ private bool HasRenderedFirstView
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.HasRenderedFirstView ];
+ }
+ set
+ {
+ _cacheBits[ ( int )CacheBits.HasRenderedFirstView ] = value;
+ }
+ }
+
+ #endregion
+
+ #region HasUIPermission Private Property
+
+ private bool HasUIPermission
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.HasUIPermission ];
+ }
+ }
+
+ #endregion
+
+ #region IsContentWrapped Private Property
+
+ private bool IsContentWrapped
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.IsContentWrapped ];
+ }
+ set
+ {
+ _cacheBits[ ( int )CacheBits.IsContentWrapped ] = value;
+ }
+ }
+
+ #endregion
+
+ #region IsDraggingViewport Private Property
+
+ private bool IsDraggingViewport
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.IsDraggingViewport ];
+ }
+ set
+ {
+ _cacheBits[ ( int )CacheBits.IsDraggingViewport ] = value;
+ }
+ }
+
+ #endregion
+
+ #region IsMonitoringInput Private Property
+
+ private bool IsMonitoringInput
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.IsMonitoringInput ];
+ }
+ set
+ {
+ _cacheBits[ ( int )CacheBits.IsMonitoringInput ] = value;
+ }
+ }
+
+ #endregion
+
+ #region IsResizingViewport Private Property
+
+ private bool IsResizingViewport
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.IsResizingViewport ];
+ }
+ set
+ {
+ _cacheBits[ ( int )CacheBits.IsResizingViewport ] = value;
+ }
+ }
+
+ #endregion
+
+ #region IsUpdatingViewport Private Property
+
+ private bool IsUpdatingViewport
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.IsUpdatingViewport ];
+ }
+ set
+ {
+ _cacheBits[ ( int )CacheBits.IsUpdatingViewport ] = value;
+ }
+ }
+
+ #endregion
+
+ #region RefocusViewOnFirstRender Private Property
+
+ private bool RefocusViewOnFirstRender
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.RefocusViewOnFirstRender ];
+ }
+ set
+ {
+ _cacheBits[ ( int )CacheBits.RefocusViewOnFirstRender ] = value;
+ }
+ }
+
+ #endregion
+
+ #region ViewFinderDisplayRect Private Property
+
+ private Rect ViewFinderDisplayRect
+ {
+ get
+ {
+ return ( _viewFinderDisplay == null ) ? Rect.Empty
+ : new Rect( new Point( 0, 0 ), new Point( _viewFinderDisplay.RenderSize.Width, _viewFinderDisplay.RenderSize.Height ) );
+ }
+ }
+
+ #endregion
+
+ #region AnimationBeginning Event
+
+ public static readonly RoutedEvent AnimationBeginningEvent = EventManager.RegisterRoutedEvent( "AnimationBeginning", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( Zoombox ) );
+
+ public event RoutedEventHandler AnimationBeginning
+ {
+ add
+ {
+ this.AddHandler( Zoombox.AnimationBeginningEvent, value );
+ }
+ remove
+ {
+ this.RemoveHandler( Zoombox.AnimationBeginningEvent, value );
+ }
+ }
+
+ #endregion
+
+ #region AnimationCompleted Event
+
+ public static readonly RoutedEvent AnimationCompletedEvent = EventManager.RegisterRoutedEvent( "AnimationCompleted", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( Zoombox ) );
+
+ public event RoutedEventHandler AnimationCompleted
+ {
+ add
+ {
+ this.AddHandler( Zoombox.AnimationCompletedEvent, value );
+ }
+ remove
+ {
+ this.RemoveHandler( Zoombox.AnimationCompletedEvent, value );
+ }
+ }
+
+ #endregion
+
+ #region CurrentViewChanged Event
+
+ public static readonly RoutedEvent CurrentViewChangedEvent = EventManager.RegisterRoutedEvent( "CurrentViewChanged", RoutingStrategy.Bubble, typeof( ZoomboxViewChangedEventHandler ), typeof( Zoombox ) );
+
+ public event ZoomboxViewChangedEventHandler CurrentViewChanged
+ {
+ add
+ {
+ this.AddHandler( Zoombox.CurrentViewChangedEvent, value );
+ }
+ remove
+ {
+ this.RemoveHandler( Zoombox.CurrentViewChangedEvent, value );
+ }
+ }
+
+ #endregion
+
+ #region ViewStackIndexChanged Event
+
+ public static readonly RoutedEvent ViewStackIndexChangedEvent = EventManager.RegisterRoutedEvent( "ViewStackIndexChanged", RoutingStrategy.Bubble, typeof( IndexChangedEventHandler ), typeof( Zoombox ) );
+
+ public event IndexChangedEventHandler ViewStackIndexChanged
+ {
+ add
+ {
+ this.AddHandler( Zoombox.ViewStackIndexChangedEvent, value );
+ }
+ remove
+ {
+ this.RemoveHandler( Zoombox.ViewStackIndexChangedEvent, value );
+ }
+ }
+
+ #endregion
+
+ #region Back Command
+
+ public static RoutedUICommand Back = new RoutedUICommand( "Go Back", "GoBack", typeof( Zoombox ) );
+
+ private void CanGoBack( object sender, CanExecuteRoutedEventArgs e )
+ {
+ e.CanExecute = ( this.EffectiveViewStackMode != ZoomboxViewStackMode.Disabled )
+ && ( this.ViewStackIndex > 0 );
+ }
+
+ private void GoBack( object sender, ExecutedRoutedEventArgs e )
+ {
+ this.GoBack();
+ }
+
+ #endregion
+
+ #region Center Command
+
+ public static RoutedUICommand Center = new RoutedUICommand( "Center Content", "Center", typeof( Zoombox ) );
+
+ private void CenterContent( object sender, ExecutedRoutedEventArgs e )
+ {
+ this.CenterContent();
+ }
+
+ #endregion
+
+ #region Fill Command
+
+ public static RoutedUICommand Fill = new RoutedUICommand( "Fill Bounds with Content", "FillToBounds", typeof( Zoombox ) );
+
+ private void FillToBounds( object sender, ExecutedRoutedEventArgs e )
+ {
+ this.FillToBounds();
+ }
+
+ #endregion
+
+ #region Fit Command
+
+ public static RoutedUICommand Fit = new RoutedUICommand( "Fit Content within Bounds", "FitToBounds", typeof( Zoombox ) );
+
+ private void FitToBounds( object sender, ExecutedRoutedEventArgs e )
+ {
+ this.FitToBounds();
+ }
+
+ #endregion
+
+ #region Forward Command
+
+ public static RoutedUICommand Forward = new RoutedUICommand( "Go Forward", "GoForward", typeof( Zoombox ) );
+
+ private void CanGoForward( object sender, CanExecuteRoutedEventArgs e )
+ {
+ e.CanExecute = ( this.EffectiveViewStackMode != ZoomboxViewStackMode.Disabled )
+ && ( this.ViewStackIndex < this.ViewStack.Count - 1 );
+ }
+
+ private void GoForward( object sender, ExecutedRoutedEventArgs e )
+ {
+ this.GoForward();
+ }
+
+ #endregion
+
+ #region Home Command
+
+ public static RoutedUICommand Home = new RoutedUICommand( "Go Home", "GoHome", typeof( Zoombox ) );
+
+ private void CanGoHome( object sender, CanExecuteRoutedEventArgs e )
+ {
+ e.CanExecute = ( this.EffectiveViewStackMode != ZoomboxViewStackMode.Disabled )
+ && ( this.ViewStack.Count > 0 )
+ && ( this.ViewStackIndex != 0 );
+ }
+
+ private void GoHome( object sender, ExecutedRoutedEventArgs e )
+ {
+ this.GoHome();
+ }
+
+ #endregion
+
+ #region PanDown Command
+
+ public static RoutedUICommand PanDown = new RoutedUICommand( "Pan Down", "PanDown", typeof( Zoombox ) );
+
+ private void PanDownExecuted( object sender, ExecutedRoutedEventArgs e )
+ {
+ this.Position = new Point( _basePosition.X, _basePosition.Y + PanDistance );
+ }
+
+ #endregion
+
+ #region PanLeft Command
+
+ public static RoutedUICommand PanLeft = new RoutedUICommand( "Pan Left", "PanLeft", typeof( Zoombox ) );
+
+ private void PanLeftExecuted( object sender, ExecutedRoutedEventArgs e )
+ {
+ this.Position = new Point( _basePosition.X - this.PanDistance, _basePosition.Y );
+ }
+
+ #endregion
+
+ #region PanRight Command
+
+ public static RoutedUICommand PanRight = new RoutedUICommand( "Pan Right", "PanRight", typeof( Zoombox ) );
+
+ private void PanRightExecuted( object sender, ExecutedRoutedEventArgs e )
+ {
+ this.Position = new Point( _basePosition.X + this.PanDistance, _basePosition.Y );
+ }
+
+ #endregion
+
+ #region PanUp Command
+
+ public static RoutedUICommand PanUp = new RoutedUICommand( "Pan Up", "PanUp", typeof( Zoombox ) );
+
+ private void PanUpExecuted( object sender, ExecutedRoutedEventArgs e )
+ {
+ this.Position = new Point( _basePosition.X, _basePosition.Y - this.PanDistance );
+ }
+
+ #endregion
+
+ #region Refocus Command
+
+ public static RoutedUICommand Refocus = new RoutedUICommand( "Refocus View", "Refocus", typeof( Zoombox ) );
+
+ private void CanRefocusView( object sender, CanExecuteRoutedEventArgs e )
+ {
+ e.CanExecute = ( this.EffectiveViewStackMode == ZoomboxViewStackMode.Manual )
+ && ( this.ViewStackIndex >= 0 && this.ViewStackIndex < this.ViewStack.Count )
+ && ( this.CurrentView != this.ViewStack[ this.ViewStackIndex ] );
+ }
+
+ private void RefocusView( object sender, ExecutedRoutedEventArgs e )
+ {
+ this.RefocusView();
+ }
+
+ #endregion
+
+ #region ZoomIn Command
+
+ public static RoutedUICommand ZoomIn = new RoutedUICommand( "Zoom In", "ZoomIn", typeof( Zoombox ) );
+
+ private void ZoomInExecuted( object sender, ExecutedRoutedEventArgs e )
+ {
+ this.Zoom( this.ZoomPercentage / 100 );
+ }
+
+ #endregion
+
+ #region ZoomOut Command
+
+ public static RoutedUICommand ZoomOut = new RoutedUICommand( "Zoom Out", "ZoomOut", typeof( Zoombox ) );
+
+ private void ZoomOutExecuted( object sender, ExecutedRoutedEventArgs e )
+ {
+ this.Zoom( -this.ZoomPercentage / 100 );
+ }
+
+ #endregion
+
+ public void CenterContent()
+ {
+ if( _content != null )
+ {
+ this.ZoomTo( ZoomboxView.Center );
+ }
+ }
+
+ public void FillToBounds()
+ {
+ if( _content != null )
+ {
+ this.ZoomTo( ZoomboxView.Fill );
+ }
+ }
+
+ public void FitToBounds()
+ {
+ if( _content != null )
+ {
+ this.ZoomTo( ZoomboxView.Fit );
+ }
+ }
+
+ public void GoBack()
+ {
+ if( this.EffectiveViewStackMode == ZoomboxViewStackMode.Disabled )
+ return;
+
+ if( this.ViewStackIndex > 0 )
+ {
+ this.ViewStackIndex--;
+ }
+ }
+
+ public void GoForward()
+ {
+ if( this.EffectiveViewStackMode == ZoomboxViewStackMode.Disabled )
+ return;
+
+ if( this.ViewStackIndex < this.ViewStack.Count - 1 )
+ {
+ this.ViewStackIndex++;
+ }
+ }
+
+ public void GoHome()
+ {
+ if( this.EffectiveViewStackMode == ZoomboxViewStackMode.Disabled )
+ return;
+
+ if( this.ViewStackIndex > 0 )
+ {
+ this.ViewStackIndex = 0;
+ }
+ }
+
+ public override void OnApplyTemplate()
+ {
+ this.AttachToVisualTree();
+ base.OnApplyTemplate();
+ }
+
+ public void RefocusView()
+ {
+ if( this.EffectiveViewStackMode == ZoomboxViewStackMode.Disabled )
+ return;
+
+ if( this.ViewStackIndex >= 0 && this.ViewStackIndex < this.ViewStack.Count
+ && this.CurrentView != this.ViewStack[ this.ViewStackIndex ] )
+ {
+ this.UpdateView( this.ViewStack[ this.ViewStackIndex ], true, false, this.ViewStackIndex );
+ }
+ }
+
+ public void Zoom( double percentage )
+ {
+ // if there is nothing to scale, just return
+ if( _content == null )
+ return;
+
+ this.Zoom( percentage, this.GetZoomRelativePoint() );
+ }
+
+ public void Zoom( double percentage, Point relativeTo )
+ {
+ // if there is nothing to scale, just return
+ if( _content == null )
+ return;
+
+ // adjust the current scale relative to the given point
+ double scale = this.Scale * ( 1 + percentage );
+ this.ZoomTo( scale, relativeTo );
+ }
+
+ public void ZoomTo( Point position )
+ {
+ // if there is nothing to pan, just return
+ if( _content == null )
+ return;
+
+ // zoom to the new region
+ this.ZoomTo( new ZoomboxView( new Point( -position.X, -position.Y ) ) );
+ }
+
+ public void ZoomTo( Rect region )
+ {
+ if( _content == null )
+ return;
+
+ // adjust the current scale and position
+ this.UpdateView( new ZoomboxView( region ), true, true );
+ }
+
+ public void ZoomTo( double scale )
+ {
+ // if there is nothing to scale, just return
+ if( _content == null )
+ return;
+
+ // adjust the current scale relative to the center of the content within the control
+ this.ZoomTo( scale, true );
+ }
+
+ public void ZoomTo( double scale, Point relativeTo )
+ {
+ this.ZoomTo( scale, relativeTo, true, true );
+ }
+
+ public void ZoomTo( ZoomboxView view )
+ {
+ this.UpdateView( view, true, true );
+ }
+
+ internal void UpdateStackProperties()
+ {
+ this.SetValue( Zoombox.HasBackStackPropertyKey, this.ViewStackIndex > 0 );
+ this.SetValue( Zoombox.HasForwardStackPropertyKey, this.ViewStack.Count > this.ViewStackIndex + 1 );
+ CommandManager.InvalidateRequerySuggested();
+ }
+
+ protected override Size MeasureOverride( Size constraint )
+ {
+ if( _content != null )
+ {
+ // measure visuals according to supplied constraint
+ base.MeasureOverride( constraint );
+
+ // now re-measure content to let the child be whatever size it desires
+ _content.Measure( new Size( double.PositiveInfinity, double.PositiveInfinity ) );
+ }
+
+ // avoid returning infinity
+ if( double.IsInfinity( constraint.Height ) )
+ {
+ constraint.Height = 0;
+ }
+
+ if( double.IsInfinity( constraint.Width ) )
+ {
+ constraint.Width = 0;
+ }
+ return constraint;
+ }
+
+ protected override void OnContentChanged( object oldContent, object newContent )
+ {
+ // disconnect SizeChanged handler from old content
+ if( oldContent is FrameworkElement )
+ {
+ ( oldContent as FrameworkElement ).RemoveHandler( FrameworkElement.SizeChangedEvent, new SizeChangedEventHandler( this.OnContentSizeChanged ) );
+ }
+ else
+ {
+ this.RemoveHandler( FrameworkElement.SizeChangedEvent, new SizeChangedEventHandler( this.OnContentSizeChanged ) );
+ }
+
+ // connect SizeChanged handler to new content
+ if( _content is FrameworkElement )
+ {
+ ( _content as FrameworkElement ).AddHandler( FrameworkElement.SizeChangedEvent, new SizeChangedEventHandler( this.OnContentSizeChanged ), true );
+ }
+ else
+ {
+ this.AddHandler( FrameworkElement.SizeChangedEvent, new SizeChangedEventHandler( this.OnContentSizeChanged ), true );
+ }
+
+ // update the Visual property of the view finder display panel's VisualBrush
+ if( _viewFinderDisplay != null && _viewFinderDisplay.VisualBrush != null )
+ {
+ _viewFinderDisplay.VisualBrush.Visual = _content;
+ }
+ }
+
+ protected override void OnGotKeyboardFocus( KeyboardFocusChangedEventArgs e )
+ {
+ this.MonitorInput();
+ base.OnGotKeyboardFocus( e );
+ }
+
+ protected override void OnLostKeyboardFocus( KeyboardFocusChangedEventArgs e )
+ {
+ this.MonitorInput();
+ base.OnLostKeyboardFocus( e );
+ }
+
+ protected override void OnInitialized( EventArgs e )
+ {
+ base.OnInitialized( e );
+ this.CoerceValue( Zoombox.IsAnimatedProperty );
+ }
+
+ protected override void OnRender( DrawingContext drawingContext )
+ {
+ if( this.HasArrangedContentPresenter && !this.HasRenderedFirstView )
+ {
+ this.HasRenderedFirstView = true;
+ if( this.RefocusViewOnFirstRender )
+ {
+ this.RefocusViewOnFirstRender = false;
+ bool oldAnimated = this.IsAnimated;
+ this.IsAnimated = false;
+ try
+ {
+ this.RefocusView();
+ }
+ finally
+ {
+ this.IsAnimated = oldAnimated;
+ }
+ }
+ }
+
+ base.OnRender( drawingContext );
+ }
+
+ private static void RefocusView( DependencyObject o, DependencyPropertyChangedEventArgs e )
+ {
+ Zoombox zoombox = o as Zoombox;
+ zoombox.UpdateView( zoombox.CurrentView, true, false, zoombox.ViewStackIndex );
+ }
+
+ private void AttachToVisualTree()
+ {
+ // detach from the old tree
+ this.DetachFromVisualTree();
+
+ // create the drag adorner for selection operations
+ _dragAdorner = new DragAdorner( this );
+
+ // check the template for a SelectionBrush resource
+ if( this.Template.Resources.Contains( "SelectionBrush" ) )
+ _dragAdorner.Brush = this.Template.Resources[ "SelectionBrush" ] as Brush;
+
+ // check the template for a SelectionPen resource
+ if( this.Template.Resources.Contains( "SelectionPen" ) )
+ _dragAdorner.Pen = this.Template.Resources[ "SelectionPen" ] as Pen;
+
+ // check the template for key bindings
+ if( this.Template.Resources.Contains( "InputBindings" ) )
+ {
+ InputBindingCollection inputBindings = this.Template.Resources[ "InputBindings" ] as InputBindingCollection;
+ if( inputBindings != null )
+ {
+ this.InputBindings.AddRange( inputBindings );
+ }
+ }
+
+ // locate the content presenter
+ _contentPresenter = VisualTreeHelperEx.FindDescendantByType( this, typeof( ContentPresenter ) ) as ContentPresenter;
+ if( _contentPresenter == null )
+ throw new InvalidTemplateException( ErrorMessages.GetMessage( "ZoomboxTemplateNeedsContent" ) );
+
+ // check the template for an AdornerDecorator
+ AdornerLayer al = null;
+ AdornerDecorator ad = VisualTreeHelperEx.FindDescendantByType( this, typeof( AdornerDecorator ) ) as AdornerDecorator;
+ if( ad != null )
+ {
+ al = ad.AdornerLayer;
+ }
+ else
+ {
+ // look for an inherited adorner layer
+ try
+ {
+ al = AdornerLayer.GetAdornerLayer( this );
+ }
+ catch( Exception )
+ {
+ }
+ }
+
+ // add the drag adorner to the adorner layer
+ if( al != null )
+ {
+ al.Add( _dragAdorner );
+ }
+
+ // TODO: Why is it necessary to walk the visual tree the first time through?
+ // If we don't do the following, the content is not laid out correctly (centered) initially.
+ VisualTreeHelperEx.FindDescendantWithPropertyValue( this, Button.IsPressedProperty, true );
+
+ // set a reference to the ViewFinder element, if present
+ this.SetValue( Zoombox.ViewFinderPropertyKey, this.Template.FindName( "ViewFinder", this ) as FrameworkElement );
+
+ // locate the view finder display panel
+ _viewFinderDisplay = VisualTreeHelperEx.FindDescendantByType( this, typeof( ZoomboxViewFinderDisplay ) ) as ZoomboxViewFinderDisplay;
+
+ // if a ViewFinder was specified but no display panel is present, throw an exception
+ if( this.ViewFinder != null && _viewFinderDisplay == null )
+ throw new InvalidTemplateException( ErrorMessages.GetMessage( "ZoomboxHasViewFinderButNotDisplay" ) );
+
+ // set up the VisualBrush and adorner for the display panel
+ if( _viewFinderDisplay != null )
+ {
+ // create VisualBrush for the view finder display panel
+ this.CreateVisualBrushForViewFinder( _content );
+
+ // hook up event handlers for dragging and resizing the viewport
+ _viewFinderDisplay.MouseMove += new MouseEventHandler( this.ViewFinderDisplayMouseMove );
+ _viewFinderDisplay.MouseLeftButtonDown += new MouseButtonEventHandler( this.ViewFinderDisplayBeginCapture );
+ _viewFinderDisplay.MouseLeftButtonUp += new MouseButtonEventHandler( this.ViewFinderDisplayEndCapture );
+
+ // bind the ViewportRect property of the display to the Viewport of the Zoombox
+ Binding binding = new Binding( "Viewport" );
+ binding.Mode = BindingMode.OneWay;
+ binding.Converter = new ViewFinderSelectionConverter( this );
+ binding.Source = this;
+ _viewFinderDisplay.SetBinding( ZoomboxViewFinderDisplay.ViewportRectProperty, binding );
+ }
+
+ // set up event handler to run once the content presenter has been arranged
+ _contentPresenter.LayoutUpdated += new EventHandler( this.ContentPresenterFirstArranged );
+ }
+
+ private void CreateVisualBrushForViewFinder( Visual visual )
+ {
+ _viewFinderDisplay.VisualBrush = new VisualBrush( visual );
+ _viewFinderDisplay.VisualBrush.Stretch = Stretch.Uniform;
+ _viewFinderDisplay.VisualBrush.AlignmentX = AlignmentX.Left;
+ _viewFinderDisplay.VisualBrush.AlignmentY = AlignmentY.Top;
+ }
+
+ private void ContentPresenterFirstArranged( object sender, EventArgs e )
+ {
+ // remove the handler
+ _contentPresenter.LayoutUpdated -= new EventHandler( this.ContentPresenterFirstArranged );
+
+ // it's now safe to update the view
+ this.HasArrangedContentPresenter = true;
+ this.InvalidateVisual();
+
+ // temporarily disable animations
+ bool oldAnimated = IsAnimated;
+ this.IsAnimated = false;
+ try
+ {
+ // set the initial view
+ double scale = this.Scale;
+ Point position = this.Position;
+
+ // if there are items in the ViewStack and a ViewStackIndex is set, use it
+ if( this.EffectiveViewStackMode != ZoomboxViewStackMode.Disabled )
+ {
+ bool isInitialViewSet = false;
+ if( this.ViewStack.Count > 0 )
+ {
+ if( this.ViewStackIndex >= 0 )
+ {
+ if( this.ViewStackIndex > this.ViewStack.Count - 1 )
+ {
+ this.ViewStackIndex = this.ViewStack.Count - 1;
+ }
+ else
+ {
+ this.UpdateView( this.ViewStack[ this.ViewStackIndex ], false, false, this.ViewStackIndex );
+ }
+ }
+ else if( this.EffectiveViewStackMode != ZoomboxViewStackMode.Auto )
+ {
+ // if this is not an auto-stack, then ensure the index is set to a valid value
+ if( this.ViewStackIndex < 0 )
+ {
+ this.ViewStackIndex = 0;
+ }
+ }
+
+ // if a ViewStackIndex has been set, apply the scale and position values, iff different than the default values
+ if( this.ViewStackIndex >= 0 )
+ {
+ isInitialViewSet = true;
+ if( !DoubleHelper.IsNaN( scale ) || !PointHelper.IsEmpty( position ) )
+ {
+ this.UpdateView( new ZoomboxView( scale, position ), false, false );
+ }
+ }
+ }
+
+ if( !isInitialViewSet )
+ {
+ // set initial view according to the scale and position values and push it on the stack, as necessary
+ ZoomboxView initialView = new ZoomboxView( DoubleHelper.IsNaN( Scale ) ? 1.0 : Scale,
+ PointHelper.IsEmpty( position ) ? new Point() : position );
+
+ if( this.EffectiveViewStackMode == ZoomboxViewStackMode.Auto )
+ {
+ this.ViewStack.PushView( initialView );
+ this.ViewStackIndex = 0;
+ }
+ else
+ {
+ this.UpdateView( initialView, false, false );
+ }
+ }
+ }
+ else
+ {
+ // just set initial view according to the scale and position values
+ ZoomboxView initialView = new ZoomboxView( DoubleHelper.IsNaN( Scale ) ? 1.0 : this.Scale, position );
+ this.UpdateView( initialView, false, false );
+ }
+ }
+ finally
+ {
+ IsAnimated = oldAnimated;
+ }
+ }
+
+ private void DetachFromVisualTree()
+ {
+ // remove the drag adorner
+ if( _dragAdorner != null )
+ AdornerLayer.GetAdornerLayer( this ).Remove( _dragAdorner );
+
+ // remove the layout updated handler, if present
+ if( _contentPresenter != null )
+ {
+ _contentPresenter.LayoutUpdated -= new EventHandler( this.ContentPresenterFirstArranged );
+ }
+
+ // remove the view finder display panel's visual brush and adorner
+ if( _viewFinderDisplay != null )
+ {
+ _viewFinderDisplay = null;
+ }
+
+ // set object references to null
+ _contentPresenter = null;
+ }
+
+ private void DragDisplayViewport( DragDeltaEventArgs e, bool end )
+ {
+ // get the scale of the view finder display panel, the selection rect, and the VisualBrush rect
+ double scale = _viewFinderDisplay.Scale;
+ Rect viewportRect = _viewFinderDisplay.ViewportRect;
+ Rect vbRect = _viewFinderDisplay.ContentBounds;
+
+ // if the entire content is visible, do nothing
+ if( viewportRect.Contains( vbRect ) )
+ return;
+
+ // ensure that we stay within the bounds of the VisualBrush
+ double dx = e.HorizontalChange;
+ double dy = e.VerticalChange;
+
+ // check left boundary
+ if( viewportRect.Left < vbRect.Left )
+ {
+ dx = Math.Max( 0, dx );
+ }
+ else if( viewportRect.Left + dx < vbRect.Left )
+ {
+ dx = vbRect.Left - viewportRect.Left;
+ }
+
+ // check right boundary
+ if( viewportRect.Right > vbRect.Right )
+ {
+ dx = Math.Min( 0, dx );
+ }
+ else if( viewportRect.Right + dx > vbRect.Left + vbRect.Width )
+ {
+ dx = vbRect.Left + vbRect.Width - viewportRect.Right;
+ }
+
+ // check top boundary
+ if( viewportRect.Top < vbRect.Top )
+ {
+ dy = Math.Max( 0, dy );
+ }
+ else if( viewportRect.Top + dy < vbRect.Top )
+ {
+ dy = vbRect.Top - viewportRect.Top;
+ }
+
+ // check bottom boundary
+ if( viewportRect.Bottom > vbRect.Bottom )
+ {
+ dy = Math.Min( 0, dy );
+ }
+ else if( viewportRect.Bottom + dy > vbRect.Top + vbRect.Height )
+ {
+ dy = vbRect.Top + vbRect.Height - viewportRect.Bottom;
+ }
+
+ // call the main OnDrag handler that is used when dragging the content directly
+ this.OnDrag( new DragDeltaEventArgs( -dx / scale / _viewboxFactor, -dy / scale / _viewboxFactor ), end );
+
+ // for a drag operation, update the origin with each delta
+ _originPoint = _originPoint + new Vector( dx, dy );
+ }
+
+ private void InitCommands()
+ {
+ CommandBinding binding = new CommandBinding( Zoombox.Back, this.GoBack, this.CanGoBack );
+ this.CommandBindings.Add( binding );
+
+ binding = new CommandBinding( Zoombox.Center, this.CenterContent );
+ this.CommandBindings.Add( binding );
+
+ binding = new CommandBinding( Zoombox.Fill, this.FillToBounds );
+ this.CommandBindings.Add( binding );
+
+ binding = new CommandBinding( Zoombox.Fit, this.FitToBounds );
+ this.CommandBindings.Add( binding );
+
+ binding = new CommandBinding( Zoombox.Forward, this.GoForward, this.CanGoForward );
+ this.CommandBindings.Add( binding );
+
+ binding = new CommandBinding( Zoombox.Home, this.GoHome, this.CanGoHome );
+ this.CommandBindings.Add( binding );
+
+ binding = new CommandBinding( Zoombox.PanDown, this.PanDownExecuted );
+ this.CommandBindings.Add( binding );
+
+ binding = new CommandBinding( Zoombox.PanLeft, this.PanLeftExecuted );
+ this.CommandBindings.Add( binding );
+
+ binding = new CommandBinding( Zoombox.PanRight, this.PanRightExecuted );
+ this.CommandBindings.Add( binding );
+
+ binding = new CommandBinding( Zoombox.PanUp, this.PanUpExecuted );
+ this.CommandBindings.Add( binding );
+
+ binding = new CommandBinding( Zoombox.Refocus, this.RefocusView, this.CanRefocusView );
+ this.CommandBindings.Add( binding );
+
+ binding = new CommandBinding( Zoombox.ZoomIn, this.ZoomInExecuted );
+ this.CommandBindings.Add( binding );
+
+ binding = new CommandBinding( Zoombox.ZoomOut, this.ZoomOutExecuted );
+ this.CommandBindings.Add( binding );
+ }
+
+ private void MonitorInput()
+ {
+ // cannot pre-process input in partial trust
+ if( this.HasUIPermission )
+ {
+ this.PreProcessInput();
+ }
+ }
+
+ private void OnContentSizeChanged( object sender, SizeChangedEventArgs e )
+ {
+ this.UpdateViewFinderDisplayContentBounds();
+
+ if( this.HasArrangedContentPresenter )
+ {
+ if( this.HasRenderedFirstView )
+ {
+ this.UpdateView( this.CurrentView, true, false, this.CurrentViewIndex );
+ }
+ else
+ {
+ // if the content size changes after the content presenter has been arranged,
+ // but before the first view is rendered, invalidate the render so we can refocus
+ // the view on the first render
+ this.RefocusViewOnFirstRender = true;
+ this.InvalidateVisual();
+ }
+ }
+ }
+
+ private void OnDrag( DragDeltaEventArgs e, bool end )
+ {
+ Point relativePosition = _relativePosition;
+ double scale = this.Scale;
+ Point newPosition = relativePosition + ( this.ContentOffset * scale ) + new Vector( e.HorizontalChange * scale, e.VerticalChange * scale );
+
+ // update the transform
+ this.UpdateView( new ZoomboxView( scale, newPosition ), false, end );
+ }
+
+ private void OnLayoutUpdated( object sender, EventArgs e )
+ {
+ this.UpdateViewport();
+ }
+
+ private void OnSelectRegion( DragDeltaEventArgs e, bool end )
+ {
+ // draw adorner rect
+ if( end )
+ {
+ _dragAdorner.Rect = Rect.Empty;
+
+ if( _trueContent != null )
+ {
+ // get the selected region (in the content's coordinate space) based on the adorner's last position and size
+ Rect selection =
+ new Rect(
+ this.TranslatePoint( _dragAdorner.LastPosition, _trueContent ),
+ this.TranslatePoint( _dragAdorner.LastPosition + new Vector( _dragAdorner.LastSize.Width, _dragAdorner.LastSize.Height ), _trueContent ) );
+
+ // zoom to the selection
+ this.ZoomTo( selection );
+ }
+ }
+ else
+ {
+ _dragAdorner.Rect =
+ Rect.Intersect(
+ new Rect(
+ _originPoint,
+ new Vector( e.HorizontalChange, e.VerticalChange ) ),
+ new Rect(
+ new Point( 0, 0 ),
+ new Point( this.RenderSize.Width, this.RenderSize.Height ) ) );
+ }
+ }
+
+ private void OnSizeChanged( object sender, SizeChangedEventArgs e )
+ {
+ if( !this.HasArrangedContentPresenter )
+ return;
+
+ // when the size is changing, the viewbox factor must be updated before updating the view
+ this.UpdateViewboxFactor();
+
+ bool oldIsAnimated = this.IsAnimated;
+ this.IsAnimated = false;
+ try
+ {
+ this.UpdateView( this.CurrentView, false, false, this.ViewStackIndex );
+ }
+ finally
+ {
+ this.IsAnimated = oldIsAnimated;
+ }
+ }
+
+ private void PreProcessInput()
+ {
+ // if mouse is over the Zoombox element or if it has keyboard focus, pre-process input
+ // to update the KeyModifier trigger properties (e.g., DragModifiersAreActive)
+ if( this.IsMouseOver || this.IsKeyboardFocusWithin )
+ {
+ if( !this.IsMonitoringInput )
+ {
+ this.IsMonitoringInput = true;
+ InputManager.Current.PreNotifyInput += new NotifyInputEventHandler( this.PreProcessInput );
+ this.UpdateKeyModifierTriggerProperties();
+ }
+ }
+ else
+ {
+ if( this.IsMonitoringInput )
+ {
+ this.IsMonitoringInput = false;
+ InputManager.Current.PreNotifyInput -= new NotifyInputEventHandler( this.PreProcessInput );
+
+ this.SetAreDragModifiersActive( false );
+ this.SetAreRelativeZoomModifiersActive( false );
+ this.SetAreZoomModifiersActive( false );
+ this.SetAreZoomToSelectionModifiersActive( false );
+ }
+ }
+ }
+
+ private void PreProcessInput( object sender, NotifyInputEventArgs e )
+ {
+ if( e.StagingItem.Input is KeyEventArgs )
+ {
+ this.UpdateKeyModifierTriggerProperties();
+ }
+ }
+
+ private void ProcessMouseLeftButtonDown( MouseButtonEventArgs e )
+ {
+ if( this.ZoomToSelectionModifiers.AreActive )
+ {
+ this.SetIsDraggingContent( false );
+ this.SetIsSelectingRegion( true );
+ }
+ else if( this.DragModifiers.AreActive )
+ {
+ this.SetIsSelectingRegion( false );
+ this.SetIsDraggingContent( true );
+ }
+ else
+ {
+ this.SetIsSelectingRegion( false );
+ this.SetIsDraggingContent( false );
+ }
+
+ // if nothing to do, just return
+ if( !this.IsSelectingRegion && !this.IsDraggingContent )
+ return;
+
+ // set the origin point and capture the mouse
+ _originPoint = e.GetPosition( this );
+ _contentPresenter.CaptureMouse();
+ e.Handled = true;
+ if( this.IsDraggingContent )
+ {
+ // execute the Drag operation
+ this.OnDrag( new DragDeltaEventArgs( 0, 0 ), false );
+ }
+ else if( this.IsSelectingRegion )
+ {
+ this.OnSelectRegion( new DragDeltaEventArgs( 0, 0 ), false );
+ }
+ }
+
+ private void ProcessMouseLeftButtonUp( MouseButtonEventArgs e )
+ {
+ if( !this.IsDraggingContent && !this.IsSelectingRegion )
+ return;
+
+ bool endDrag = this.IsDraggingContent;
+
+ this.SetIsDraggingContent( false );
+ this.SetIsSelectingRegion( false );
+
+ _originPoint = new Point();
+ _contentPresenter.ReleaseMouseCapture();
+ e.Handled = true;
+
+ if( endDrag )
+ {
+ this.OnDrag( new DragDeltaEventArgs( 0, 0 ), true );
+ }
+ else
+ {
+ this.OnSelectRegion( new DragDeltaEventArgs( 0, 0 ), true );
+ }
+ }
+
+ private void ProcessMouseMove( MouseEventArgs e )
+ {
+ if( e.MouseDevice.LeftButton != MouseButtonState.Pressed )
+ return;
+
+ if( !this.IsDraggingContent && !this.IsSelectingRegion )
+ return;
+
+ Point pos = e.GetPosition( this );
+ e.Handled = true;
+
+ if( this.IsDraggingContent )
+ {
+ Vector delta = ( pos - _originPoint ) / this.Scale;
+ this.OnDrag( new DragDeltaEventArgs( delta.X, delta.Y ), false );
+ _originPoint = pos;
+ }
+ else if( this.IsSelectingRegion )
+ {
+ Vector delta = pos - _originPoint;
+ this.OnSelectRegion( new DragDeltaEventArgs( delta.X, delta.Y ), false );
+ }
+ }
+
+ private void ProcessMouseWheelZoom( MouseWheelEventArgs e )
+ {
+ if( _content == null )
+ return;
+
+ // check modifiers to see if there's work to do
+ bool doZoom = this.ZoomModifiers.AreActive;
+ bool doRelativeZoom = this.RelativeZoomModifiers.AreActive;
+
+ // can't do both, so assume relative zoom
+ if( doZoom && doRelativeZoom )
+ {
+ doZoom = false;
+ }
+
+ if( !( doZoom || doRelativeZoom ) )
+ return;
+
+ e.Handled = true;
+ double percentage = ( ( e.Delta / Zoombox.MOUSE_WHEEL_DELTA ) * this.ZoomPercentage ) / 100;
+
+ // Are we doing a zoom relative to the current mouse position?
+ if( doRelativeZoom )
+ {
+ this.Zoom( percentage, Mouse.GetPosition( _content ) );
+ }
+ else
+ {
+ this.Zoom( percentage );
+ }
+ }
+
+ private void ProcessNavigationButton( RoutedEventArgs e )
+ {
+ if( e is MouseButtonEventArgs )
+ {
+ MouseButtonEventArgs mbea = e as MouseButtonEventArgs;
+ if( mbea.ChangedButton == MouseButton.XButton1
+ || mbea.ChangedButton == MouseButton.XButton2 )
+ {
+ if( mbea.ChangedButton == MouseButton.XButton2 )
+ {
+ this.GoForward();
+ }
+ else
+ {
+ this.GoBack();
+ }
+ mbea.Handled = true;
+ }
+ }
+ else if( e is KeyEventArgs )
+ {
+ KeyEventArgs kea = e as KeyEventArgs;
+ if( kea.Key == Key.Back || kea.Key == Key.BrowserBack || kea.Key == Key.BrowserForward )
+ {
+ if( kea.Key == Key.BrowserForward )
+ {
+ this.GoForward();
+ }
+ else
+ {
+ this.GoBack();
+ }
+ kea.Handled = true;
+ }
+ }
+ }
+
+ private void ResizeDisplayViewport( DragDeltaEventArgs e, ResizeEdge relativeTo )
+ {
+ // get the existing viewport rect and scale
+ Rect viewportRect = _viewFinderDisplay.ViewportRect;
+ double scale = _viewFinderDisplay.Scale;
+
+ // ensure that we stay within the bounds of the VisualBrush
+ double x = Math.Max( _resizeViewportBounds.Left, Math.Min( _resizeDraggingPoint.X + e.HorizontalChange, _resizeViewportBounds.Right ) );
+ double y = Math.Max( _resizeViewportBounds.Top, Math.Min( _resizeDraggingPoint.Y + e.VerticalChange, _resizeViewportBounds.Bottom ) );
+
+ // get the selected region in the coordinate space of the content
+ Point anchorPoint = new Point( _resizeAnchorPoint.X / scale, _resizeAnchorPoint.Y / scale );
+ Vector newRegionVector = new Vector( ( x - _resizeAnchorPoint.X ) / scale / _viewboxFactor, ( y - _resizeAnchorPoint.Y ) / scale / _viewboxFactor );
+ Rect region = new Rect( anchorPoint, newRegionVector );
+
+ // now translate the region from the coordinate space of the content
+ // to the coordinate space of the content presenter
+ region =
+ new Rect(
+ _content.TranslatePoint( region.TopLeft, _contentPresenter ),
+ _content.TranslatePoint( region.BottomRight, _contentPresenter ) );
+
+ // calculate actual scale value
+ double aspectX = this.RenderSize.Width / region.Width;
+ double aspectY = this.RenderSize.Height / region.Height;
+ scale = aspectX < aspectY ? aspectX : aspectY;
+
+ // scale relative to the anchor point
+ this.ZoomTo( scale, anchorPoint, false, false );
+ }
+
+ private void UpdateKeyModifierTriggerProperties()
+ {
+ this.SetAreDragModifiersActive( this.DragModifiers.AreActive );
+ this.SetAreRelativeZoomModifiersActive( this.RelativeZoomModifiers.AreActive );
+ this.SetAreZoomModifiersActive( this.ZoomModifiers.AreActive );
+ this.SetAreZoomToSelectionModifiersActive( this.ZoomToSelectionModifiers.AreActive );
+ }
+
+ private void UpdateView( ZoomboxView view, bool allowAnimation, bool allowStackAddition )
+ {
+ this.UpdateView( view, allowAnimation, allowStackAddition, -1 );
+ }
+
+ private void UpdateView( ZoomboxView view, bool allowAnimation, bool allowStackAddition, int stackIndex )
+ {
+ if( _contentPresenter == null || _content == null || !this.HasArrangedContentPresenter )
+ return;
+
+ // if an absolute view is being used and only a Scale value has been specified,
+ // use the ZoomTo() function to perform a relative zoom
+ if( view.ViewKind == ZoomboxViewKind.Absolute && PointHelper.IsEmpty( view.Position ) )
+ {
+ this.ZoomTo( view.Scale, allowStackAddition );
+ return;
+ }
+
+ // disallow reentrancy
+ if( !this.IsUpdatingView )
+ {
+ this.IsUpdatingView = true;
+ try
+ {
+ // determine the new scale and position
+ double newRelativeScale = _viewboxFactor;
+ Point newRelativePosition = new Point();
+ Rect region = Rect.Empty;
+ switch( view.ViewKind )
+ {
+ case ZoomboxViewKind.Empty:
+ break;
+
+ case ZoomboxViewKind.Absolute:
+ newRelativeScale = DoubleHelper.IsNaN( view.Scale ) ? _relativeScale : view.Scale;
+ newRelativePosition = PointHelper.IsEmpty( view.Position ) ? _relativePosition
+ : new Point( view.Position.X, view.Position.Y ) - this.ContentOffset * newRelativeScale;
+ break;
+
+ case ZoomboxViewKind.Region:
+ region = view.Region;
+ break;
+
+ case ZoomboxViewKind.Center:
+ {
+ // get the current ContentRect in the coordinate space of the Zoombox control
+ Rect currentContentRect =
+ new Rect(
+ _content.TranslatePoint( this.ContentRect.TopLeft, this ),
+ _content.TranslatePoint( this.ContentRect.BottomRight, this ) );
+
+ // inflate (or deflate) the rect by the appropriate amounts in the x & y directions
+ region = Rect.Inflate( currentContentRect,
+ ( this.RenderSize.Width / _viewboxFactor - currentContentRect.Width ) / 2,
+ ( this.RenderSize.Height / _viewboxFactor - currentContentRect.Height ) / 2 );
+
+ // now translate the centered rect back to the coordinate space of the content
+ region = new Rect( this.TranslatePoint( region.TopLeft, _content ), this.TranslatePoint( region.BottomRight, _content ) );
+ }
+ break;
+
+ case ZoomboxViewKind.Fit:
+ region = this.ContentRect;
+ break;
+
+ case ZoomboxViewKind.Fill:
+ region = this.CalculateFillRect();
+ break;
+ }
+
+ if( view.ViewKind != ZoomboxViewKind.Empty )
+ {
+ if( !region.IsEmpty )
+ { // ZOOMING TO A REGION
+ this.CalculatePositionAndScale( region, ref newRelativePosition, ref newRelativeScale );
+ }
+ else if( view != ZoomboxView.Empty )
+ { // USING ABSOLUTE POSITION AND SCALE VALUES
+
+ // ensure that the scale value falls within the valid range
+ if( newRelativeScale > MaxScale )
+ {
+ newRelativeScale = MaxScale;
+ }
+ else if( newRelativeScale < MinScale )
+ {
+ newRelativeScale = MinScale;
+ }
+ }
+
+ double currentScale = _relativeScale;
+ double currentX = _relativePosition.X;
+ double currentY = _relativePosition.Y;
+
+ ScaleTransform st = null;
+ TranslateTransform tt = null;
+ TransformGroup tg = null;
+
+ if( _contentPresenter.RenderTransform != Transform.Identity )
+ {
+ tg = _contentPresenter.RenderTransform as TransformGroup;
+ st = tg.Children[ 0 ] as ScaleTransform;
+ tt = tg.Children[ 1 ] as TranslateTransform;
+ currentScale = st.ScaleX;
+ currentX = tt.X;
+ currentY = tt.Y;
+ }
+
+ if( KeepContentInBounds == true )
+ {
+ Rect boundsRect = new Rect( new Size( this.ContentRect.Width * newRelativeScale, this.ContentRect.Height * newRelativeScale ) );
+
+ // Calc viewport rect (should be inside bounds content rect)
+ Point viewportPosition = new Point( -newRelativePosition.X, -newRelativePosition.Y );
+ Rect viewportRect = new Rect( viewportPosition, _contentPresenter.RenderSize );
+
+ if( DoubleHelper.AreVirtuallyEqual( _relativeScale, newRelativeScale ) ) // we are positioning the content, not scaling
+ {
+ // Handle the width and height seperately since the content extent
+ // could be contained only partially in the viewport. Also if the viewport is only
+ // partially contained within the content extent.
+
+ //
+ // Content extent width is greater than the viewport's width (Zoomed in). Make sure we restrict
+ // the viewport X inside the content.
+ //
+ if( this.IsGreaterThanOrClose( boundsRect.Width, viewportRect.Width ) )
+ {
+ if( boundsRect.Right < viewportRect.Right )
+ {
+ newRelativePosition.X = -( boundsRect.Width - viewportRect.Width );
+ }
+
+ if( boundsRect.Left > viewportRect.Left )
+ {
+ newRelativePosition.X = 0;
+ }
+ }
+ //
+ // Viewport width is greater than the content extent's width (Zoomed out). Make sure we restrict
+ // the content X inside the viewport.
+ //
+ else if( this.IsGreaterThanOrClose( viewportRect.Width, boundsRect.Width ) )
+ {
+ if( viewportRect.Right < boundsRect.Right )
+ {
+ newRelativePosition.X = viewportRect.Width - boundsRect.Width;
+ }
+
+ if( viewportRect.Left > boundsRect.Left )
+ {
+ newRelativePosition.X = 0;
+ }
+ }
+
+ //
+ // Content extent height is greater than the viewport's height (Zoomed in). Make sure we restrict
+ // the viewport Y inside the content.
+ //
+ if( this.IsGreaterThanOrClose( boundsRect.Height, viewportRect.Height ) )
+ {
+ if( boundsRect.Bottom < viewportRect.Bottom )
+ {
+ newRelativePosition.Y = -( boundsRect.Height - viewportRect.Height );
+ }
+
+ if( boundsRect.Top > viewportRect.Top )
+ {
+ newRelativePosition.Y = 0;
+ }
+ }
+ //
+ // Viewport height is greater than the content extent's height (Zoomed out). Make sure we restrict
+ // the content Y inside the viewport.
+ //
+ else if( this.IsGreaterThanOrClose( viewportRect.Height, boundsRect.Height ) )
+ {
+ if( viewportRect.Bottom < boundsRect.Bottom )
+ {
+ newRelativePosition.Y = viewportRect.Height - boundsRect.Height;
+ }
+
+ if( viewportRect.Top > boundsRect.Top )
+ {
+ newRelativePosition.Y = 0;
+ }
+ }
+ }
+ }
+
+ st = new ScaleTransform( newRelativeScale / _viewboxFactor, newRelativeScale / _viewboxFactor );
+ tt = new TranslateTransform( newRelativePosition.X, newRelativePosition.Y );
+ tg = new TransformGroup();
+ tg.Children.Add( st );
+ tg.Children.Add( tt );
+
+ _contentPresenter.RenderTransform = tg;
+
+ if( allowAnimation && IsAnimated )
+ {
+ DoubleAnimation daScale = new DoubleAnimation( currentScale, newRelativeScale / _viewboxFactor, AnimationDuration );
+ daScale.AccelerationRatio = this.AnimationAccelerationRatio;
+ daScale.DecelerationRatio = this.AnimationDecelerationRatio;
+
+ DoubleAnimation daTranslateX = new DoubleAnimation( currentX, newRelativePosition.X, AnimationDuration );
+ daTranslateX.AccelerationRatio = this.AnimationAccelerationRatio;
+ daTranslateX.DecelerationRatio = this.AnimationDecelerationRatio;
+
+ DoubleAnimation daTranslateY = new DoubleAnimation( currentY, newRelativePosition.Y, AnimationDuration );
+ daTranslateY.AccelerationRatio = this.AnimationAccelerationRatio;
+ daTranslateY.DecelerationRatio = this.AnimationDecelerationRatio;
+ daTranslateY.CurrentTimeInvalidated += new EventHandler( this.UpdateViewport );
+ daTranslateY.CurrentStateInvalidated += new EventHandler( this.ZoomAnimationCompleted );
+
+ // raise animation beginning event before beginning the animations
+ RaiseEvent( new RoutedEventArgs( AnimationBeginningEvent, this ) );
+
+ st.BeginAnimation( ScaleTransform.ScaleXProperty, daScale );
+ st.BeginAnimation( ScaleTransform.ScaleYProperty, daScale );
+ tt.BeginAnimation( TranslateTransform.XProperty, daTranslateX );
+ tt.BeginAnimation( TranslateTransform.YProperty, daTranslateY );
+ }
+
+ // maintain the relative scale and position for dragging and animating purposes
+ _relativePosition = newRelativePosition;
+ _relativeScale = newRelativeScale;
+
+ // update the Scale and Position properties to keep them in sync with the current view
+ this.Scale = newRelativeScale;
+ _basePosition = newRelativePosition + this.ContentOffset * newRelativeScale;
+ this.UpdateViewport();
+ }
+
+ // add the current view to the view stack
+ if( this.EffectiveViewStackMode == ZoomboxViewStackMode.Auto && allowStackAddition )
+ {
+ // if the last view was pushed on the stack within the last 300 milliseconds, discard it
+ // since proximally close views are probably the result of a mouse wheel scroll
+ if( this.ViewStack.Count > 1
+ && Math.Abs( DateTime.Now.Ticks - _lastStackAddition.Ticks ) < TimeSpan.FromMilliseconds( 300 ).Ticks )
+ {
+ this.ViewStack.RemoveAt( this.ViewStack.Count - 1 );
+ _lastStackAddition = DateTime.Now - TimeSpan.FromMilliseconds( 300 );
+ }
+
+ // if the current view is the same as the last view, do nothing
+ if( this.ViewStack.Count > 0 && view == this.ViewStack.SelectedView )
+ {
+ // do nothing
+ }
+ else
+ {
+ // otherwise, push the current view on stack
+ this.ViewStack.PushView( view );
+ this.ViewStackIndex++;
+ stackIndex = this.ViewStackIndex;
+
+ // update the timestamp for the last stack addition
+ _lastStackAddition = DateTime.Now;
+ }
+ }
+
+ // update the stack indices used by CurrentViewChanged event
+ _lastViewIndex = this.CurrentViewIndex;
+ this.SetCurrentViewIndex( stackIndex );
+
+ // set the new view parameters
+ // NOTE: this is the only place where the CurrentView member should be set
+ this.SetCurrentView( view );
+ }
+ finally
+ {
+ this.IsUpdatingView = false;
+ }
+ }
+ }
+
+ private bool IsGreaterThanOrClose( double value1, double value2 )
+ {
+ return value1 <= value2 ? DoubleHelper.AreVirtuallyEqual( value1, value2 ) : true;
+ }
+
+ private Rect CalculateFillRect()
+ {
+ // determine the x-y ratio of the current Viewport
+ double xyRatio = this.RenderSize.Width / this.RenderSize.Height;
+
+ // now find the maximal rect within the ContentRect that has the same ratio
+ double x = 0;
+ double y = 0;
+ double width = this.ContentRect.Width;
+ double height = this.ContentRect.Height;
+ if( xyRatio > width / height )
+ {
+ height = width / xyRatio;
+ y = ( this.ContentRect.Height - height ) / 2;
+ }
+ else
+ {
+ width = height * xyRatio;
+ x = ( this.ContentRect.Width - width ) / 2;
+ }
+
+ return new Rect( x, y, width, height );
+ }
+
+ private void CalculatePositionAndScale( Rect region, ref Point newRelativePosition, ref double newRelativeScale )
+ {
+ // if there is nothing to scale, just return
+ // if the region has no area, just return
+ if( region.Width == 0 || region.Height == 0 )
+ return;
+
+ // verify that the selected region intersects with the content, which prevents
+ // the scale operation from zooming the content out of the current view
+ if( !this.ContentRect.IntersectsWith( region ) )
+ return;
+
+ // translate the region from the coordinate space of the content
+ // to the coordinate space of the content presenter
+ region =
+ new Rect(
+ _content.TranslatePoint( region.TopLeft, _contentPresenter ),
+ _content.TranslatePoint( region.BottomRight, _contentPresenter ) );
+
+ // calculate actual zoom, which must fit the entire selection
+ // while maintaining a 1:1 ratio
+ double aspectX = this.RenderSize.Width / region.Width;
+ double aspectY = this.RenderSize.Height / region.Height;
+ newRelativeScale = aspectX < aspectY ? aspectX : aspectY;
+
+ // ensure that the scale value falls within the valid range
+ if( newRelativeScale > this.MaxScale )
+ {
+ newRelativeScale = this.MaxScale;
+ }
+ else if( newRelativeScale < this.MinScale )
+ {
+ newRelativeScale = this.MinScale;
+ }
+
+ // determine the new content position for this zoom operation based
+ // on HorizontalContentAlignment and VerticalContentAlignment
+ double horizontalOffset = 0;
+ double verticalOffset = 0;
+ switch( this.HorizontalContentAlignment )
+ {
+ case HorizontalAlignment.Center:
+ case HorizontalAlignment.Stretch:
+ horizontalOffset = ( this.RenderSize.Width - region.Width * newRelativeScale ) / 2;
+ break;
+
+ case HorizontalAlignment.Right:
+ horizontalOffset = ( this.RenderSize.Width - region.Width * newRelativeScale );
+ break;
+ }
+ switch( VerticalContentAlignment )
+ {
+ case VerticalAlignment.Center:
+ case VerticalAlignment.Stretch:
+ verticalOffset = ( this.RenderSize.Height - region.Height * newRelativeScale ) / 2;
+ break;
+
+ case VerticalAlignment.Bottom:
+ verticalOffset = ( this.RenderSize.Height - region.Height * newRelativeScale );
+ break;
+ }
+ newRelativePosition =
+ new Point( -region.TopLeft.X * newRelativeScale, -region.TopLeft.Y * newRelativeScale )
+ + new Vector( horizontalOffset, verticalOffset );
+ }
+
+ private void UpdateViewFinderDisplayContentBounds()
+ {
+ if( _content == null || _trueContent == null || _viewFinderDisplay == null )
+ return;
+
+ this.UpdateViewboxFactor();
+
+ // ensure the display panel has a size
+ Size contentSize = _content.RenderSize;
+ Size viewFinderSize = _viewFinderDisplay.AvailableSize;
+ if( viewFinderSize.Width > 0d && DoubleHelper.AreVirtuallyEqual( viewFinderSize.Height, 0d ) )
+ {
+ // update height to accomodate width, while keeping a ratio equal to the actual content
+ viewFinderSize = new Size( viewFinderSize.Width, contentSize.Height * viewFinderSize.Width / contentSize.Width );
+ }
+ else if( viewFinderSize.Height > 0d && DoubleHelper.AreVirtuallyEqual( viewFinderSize.Width, 0d ) )
+ {
+ // update width to accomodate height, while keeping a ratio equal to the actual content
+ viewFinderSize = new Size( contentSize.Width * viewFinderSize.Height / contentSize.Height, viewFinderSize.Width );
+ }
+
+ // determine the scale of the view finder display panel
+ double aspectX = viewFinderSize.Width / contentSize.Width;
+ double aspectY = viewFinderSize.Height / contentSize.Height;
+ double scale = aspectX < aspectY ? aspectX : aspectY;
+
+ // determine the rect of the VisualBrush
+ double vbWidth = contentSize.Width * scale;
+ double vbHeight = contentSize.Height * scale;
+
+ // set the ContentBounds and Scale properties on the view finder display panel
+ _viewFinderDisplay.Scale = scale;
+ _viewFinderDisplay.ContentBounds = new Rect( new Size( vbWidth, vbHeight ) );
+ }
+
+ private void UpdateViewboxFactor()
+ {
+ if( _content == null || _trueContent == null )
+ return;
+
+ double contentWidth = _content.RenderSize.Width;
+ double trueContentWidth = _trueContent.RenderSize.Width;
+
+ if( DoubleHelper.AreVirtuallyEqual( contentWidth, 0d ) || DoubleHelper.AreVirtuallyEqual( trueContentWidth, 0d ) )
+ {
+ _viewboxFactor = 1d;
+ }
+ else
+ {
+ _viewboxFactor = contentWidth / trueContentWidth;
+ }
+ }
+
+ private void UpdateViewport()
+ {
+ // if we haven't attached to the visual tree yet or we don't have content, just return
+ if( _contentPresenter == null || _trueContent == null )
+ return;
+
+ this.IsUpdatingViewport = true;
+ try
+ {
+ // calculate the current viewport
+ Rect viewport =
+ new Rect(
+ this.TranslatePoint( new Point( 0d, 0d ), _trueContent ),
+ this.TranslatePoint( new Point( RenderSize.Width, RenderSize.Height ), _trueContent ) );
+
+ // if the viewport has changed, set the Viewport dependency property
+ if( !DoubleHelper.AreVirtuallyEqual( viewport, this.Viewport ) )
+ {
+ this.SetValue( Zoombox.ViewportPropertyKey, viewport );
+ }
+ }
+ finally
+ {
+ this.IsUpdatingViewport = false;
+ }
+ }
+
+ private void UpdateViewport( object sender, EventArgs e )
+ {
+ this.UpdateViewport();
+ }
+
+ private void ViewFinderDisplayBeginCapture( object sender, MouseButtonEventArgs e )
+ {
+ const double ARBITRARY_LARGE_VALUE = 10000000000;
+
+ // if we need to acquire capture, the Tag property of the view finder display panel
+ // will be a ResizeEdge value.
+ if( _viewFinderDisplay.Tag is ResizeEdge )
+ {
+ // if the Tag is ResizeEdge.None, then its a drag operation; otherwise, its a resize
+ if( ( ResizeEdge )_viewFinderDisplay.Tag == ResizeEdge.None )
+ {
+ this.IsDraggingViewport = true;
+ }
+ else
+ {
+ this.IsResizingViewport = true;
+ Vector direction = new Vector();
+ switch( ( ResizeEdge )_viewFinderDisplay.Tag )
+ {
+ case ResizeEdge.TopLeft:
+ _resizeDraggingPoint = _viewFinderDisplay.ViewportRect.TopLeft;
+ _resizeAnchorPoint = _viewFinderDisplay.ViewportRect.BottomRight;
+ direction = new Vector( -1, -1 );
+ break;
+
+ case ResizeEdge.TopRight:
+ _resizeDraggingPoint = _viewFinderDisplay.ViewportRect.TopRight;
+ _resizeAnchorPoint = _viewFinderDisplay.ViewportRect.BottomLeft;
+ direction = new Vector( 1, -1 );
+ break;
+
+ case ResizeEdge.BottomLeft:
+ _resizeDraggingPoint = _viewFinderDisplay.ViewportRect.BottomLeft;
+ _resizeAnchorPoint = _viewFinderDisplay.ViewportRect.TopRight;
+ direction = new Vector( -1, 1 );
+ break;
+
+ case ResizeEdge.BottomRight:
+ _resizeDraggingPoint = _viewFinderDisplay.ViewportRect.BottomRight;
+ _resizeAnchorPoint = _viewFinderDisplay.ViewportRect.TopLeft;
+ direction = new Vector( 1, 1 );
+ break;
+ case ResizeEdge.Left:
+ _resizeDraggingPoint = new Point( _viewFinderDisplay.ViewportRect.Left,
+ _viewFinderDisplay.ViewportRect.Top + ( _viewFinderDisplay.ViewportRect.Height / 2 ) );
+ _resizeAnchorPoint = new Point( _viewFinderDisplay.ViewportRect.Right,
+ _viewFinderDisplay.ViewportRect.Top + ( _viewFinderDisplay.ViewportRect.Height / 2 ) );
+ direction = new Vector( -1, 0 );
+ break;
+ case ResizeEdge.Top:
+ _resizeDraggingPoint = new Point( _viewFinderDisplay.ViewportRect.Left + ( _viewFinderDisplay.ViewportRect.Width / 2 ),
+ _viewFinderDisplay.ViewportRect.Top );
+ _resizeAnchorPoint = new Point( _viewFinderDisplay.ViewportRect.Left + ( _viewFinderDisplay.ViewportRect.Width / 2 ),
+ _viewFinderDisplay.ViewportRect.Bottom );
+ direction = new Vector( 0, -1 );
+ break;
+ case ResizeEdge.Right:
+ _resizeDraggingPoint = new Point( _viewFinderDisplay.ViewportRect.Right,
+ _viewFinderDisplay.ViewportRect.Top + ( _viewFinderDisplay.ViewportRect.Height / 2 ) );
+ _resizeAnchorPoint = new Point( _viewFinderDisplay.ViewportRect.Left,
+ _viewFinderDisplay.ViewportRect.Top + ( _viewFinderDisplay.ViewportRect.Height / 2 ) );
+ direction = new Vector( 1, 0 );
+ break;
+ case ResizeEdge.Bottom:
+ _resizeDraggingPoint = new Point( _viewFinderDisplay.ViewportRect.Left + ( _viewFinderDisplay.ViewportRect.Width / 2 ),
+ _viewFinderDisplay.ViewportRect.Bottom );
+ _resizeAnchorPoint = new Point( _viewFinderDisplay.ViewportRect.Left + ( _viewFinderDisplay.ViewportRect.Width / 2 ),
+ _viewFinderDisplay.ViewportRect.Top );
+ direction = new Vector( 0, 1 );
+ break;
+ }
+ double scale = _viewFinderDisplay.Scale;
+ Rect contentRect = _viewFinderDisplay.ContentBounds;
+ Vector minVector = new Vector( direction.X * ARBITRARY_LARGE_VALUE, direction.Y * ARBITRARY_LARGE_VALUE );
+ Vector maxVector = new Vector( direction.X * contentRect.Width / MaxScale, direction.Y * contentRect.Height / MaxScale );
+ _resizeViewportBounds = new Rect( _resizeAnchorPoint + minVector, _resizeAnchorPoint + maxVector );
+ }
+
+ // store the origin of the operation and acquire capture
+ _originPoint = e.GetPosition( _viewFinderDisplay );
+ _viewFinderDisplay.CaptureMouse();
+ e.Handled = true;
+ }
+ }
+
+ private void ViewFinderDisplayEndCapture( object sender, MouseButtonEventArgs e )
+ {
+ // if a drag or resize is in progress, end it and release capture
+ if( this.IsDraggingViewport || this.IsResizingViewport )
+ {
+ // call the DragDisplayViewport method to end the operation
+ // and store the current position on the stack
+ this.DragDisplayViewport( new DragDeltaEventArgs( 0, 0 ), true );
+
+ // reset the dragging state variables and release capture
+ this.IsDraggingViewport = false;
+ this.IsResizingViewport = false;
+ _originPoint = new Point();
+ _viewFinderDisplay.ReleaseMouseCapture();
+ e.Handled = true;
+ }
+ }
+
+ private void ViewFinderDisplayMouseMove( object sender, MouseEventArgs e )
+ {
+ // if a drag operation is in progress, update the operation
+ if( e.MouseDevice.LeftButton == MouseButtonState.Pressed
+ && ( this.IsDraggingViewport || this.IsResizingViewport ) )
+ {
+ Point pos = e.GetPosition( _viewFinderDisplay );
+ Vector delta = pos - _originPoint;
+ if( this.IsDraggingViewport )
+ {
+ this.DragDisplayViewport( new DragDeltaEventArgs( delta.X, delta.Y ), false );
+ }
+ else
+ {
+ this.ResizeDisplayViewport( new DragDeltaEventArgs( delta.X, delta.Y ), ( ResizeEdge )_viewFinderDisplay.Tag );
+ }
+ e.Handled = true;
+ }
+ else
+ {
+ // update the cursor based on the nearest corner
+ Point mousePos = e.GetPosition( _viewFinderDisplay );
+ Rect viewportRect = _viewFinderDisplay.ViewportRect;
+ double cornerDelta = viewportRect.Width * viewportRect.Height > 100 ? 5.0
+ : Math.Sqrt( viewportRect.Width * viewportRect.Height ) / 2;
+
+ // if the mouse is within the Rect and the Rect does not encompass the entire content, set the appropriate cursor
+ if( viewportRect.Contains( mousePos )
+ && !DoubleHelper.AreVirtuallyEqual( Rect.Intersect( viewportRect, _viewFinderDisplay.ContentBounds ), _viewFinderDisplay.ContentBounds ) )
+ {
+ if( PointHelper.DistanceBetween( mousePos, viewportRect.TopLeft ) < cornerDelta )
+ {
+ _viewFinderDisplay.Tag = ResizeEdge.TopLeft;
+ _viewFinderDisplay.Cursor = Cursors.SizeNWSE;
+ }
+ else if( PointHelper.DistanceBetween( mousePos, viewportRect.BottomRight ) < cornerDelta )
+ {
+ _viewFinderDisplay.Tag = ResizeEdge.BottomRight;
+ _viewFinderDisplay.Cursor = Cursors.SizeNWSE;
+ }
+ else if( PointHelper.DistanceBetween( mousePos, viewportRect.TopRight ) < cornerDelta )
+ {
+ _viewFinderDisplay.Tag = ResizeEdge.TopRight;
+ _viewFinderDisplay.Cursor = Cursors.SizeNESW;
+ }
+ else if( PointHelper.DistanceBetween( mousePos, viewportRect.BottomLeft ) < cornerDelta )
+ {
+ _viewFinderDisplay.Tag = ResizeEdge.BottomLeft;
+ _viewFinderDisplay.Cursor = Cursors.SizeNESW;
+ }
+ else if( mousePos.X <= viewportRect.Left + cornerDelta )
+ {
+ _viewFinderDisplay.Tag = ResizeEdge.Left;
+ _viewFinderDisplay.Cursor = Cursors.SizeWE;
+ }
+ else if( mousePos.Y <= viewportRect.Top + cornerDelta )
+ {
+ _viewFinderDisplay.Tag = ResizeEdge.Top;
+ _viewFinderDisplay.Cursor = Cursors.SizeNS;
+ }
+ else if( mousePos.X >= viewportRect.Right - cornerDelta )
+ {
+ _viewFinderDisplay.Tag = ResizeEdge.Right;
+ _viewFinderDisplay.Cursor = Cursors.SizeWE;
+ }
+ else if( mousePos.Y >= viewportRect.Bottom - cornerDelta )
+ {
+ _viewFinderDisplay.Tag = ResizeEdge.Bottom;
+ _viewFinderDisplay.Cursor = Cursors.SizeNS;
+ }
+ else
+ {
+ _viewFinderDisplay.Tag = ResizeEdge.None;
+ _viewFinderDisplay.Cursor = Cursors.SizeAll;
+ }
+ }
+ else
+ {
+ _viewFinderDisplay.Tag = null;
+ _viewFinderDisplay.Cursor = Cursors.Arrow;
+ }
+ }
+ }
+
+ private void ZoomAnimationCompleted( object sender, EventArgs e )
+ {
+ if( ( sender as AnimationClock ).CurrentState != ClockState.Active )
+ {
+ // remove the event handlers
+ ( sender as AnimationClock ).CurrentStateInvalidated -= new EventHandler( this.ZoomAnimationCompleted );
+ ( sender as AnimationClock ).CurrentTimeInvalidated -= new EventHandler( this.UpdateViewport );
+
+ // raise animation completed event
+ this.RaiseEvent( new RoutedEventArgs( Zoombox.AnimationCompletedEvent, this ) );
+ }
+ }
+
+ private void ZoomTo( double scale, bool allowStackAddition )
+ {
+ // if there is nothing to scale, just return
+ if( _content == null )
+ return;
+
+ // adjust the current scale relative to the zoom origin
+ this.ZoomTo( scale, this.GetZoomRelativePoint(), true, allowStackAddition );
+ }
+
+ private void ZoomTo( double scale, Point relativeTo, bool restrictRelativePointToContent, bool allowStackAddition )
+ {
+ // if there is nothing to scale, just return
+ if( _content == null )
+ return;
+
+ // if necessary, verify that the relativeTo point falls within the content
+ if( restrictRelativePointToContent && !( new Rect( _content.RenderSize ) ).Contains( relativeTo ) )
+ return;
+
+ // ensure that the scale value falls within the valid range
+ if( scale > this.MaxScale )
+ {
+ scale = this.MaxScale;
+ }
+ else if( scale < this.MinScale )
+ {
+ scale = this.MinScale;
+ }
+
+ // internally, updates are always relative to the Zoombox control
+ Point translateFrom = relativeTo;
+ if( this.HasRenderedFirstView )
+ {
+ // Note that this TranslatePoint approach will not work until the first render occurs
+ relativeTo = _content.TranslatePoint( relativeTo, this );
+
+ // adjust translateFrom based on relativeTo
+ translateFrom = this.TranslatePoint( relativeTo, _contentPresenter );
+ }
+ else
+ {
+ // prior to the first render, just use the ContentPresenter's transform and do not adjust translateFrom
+ if( _contentPresenter.RenderTransform == Transform.Identity )
+ {
+ // in order for this approach to work, we must at least make one pass to update a generic view
+ // with Scale = 1.0 and Position = 0,0
+ this.UpdateView( new ZoomboxView( 1, new Point( 0, 0 ) ), false, false );
+ }
+
+ // now there should be a valid RenderTransform
+ relativeTo = ( _contentPresenter.RenderTransform as Transform ).Transform( relativeTo );
+ }
+
+ // determine the new content position for this zoom operation
+ Point translateTo = new Point( relativeTo.X - ( translateFrom.X * scale / _viewboxFactor ),
+ relativeTo.Y - ( translateFrom.Y * scale / _viewboxFactor ) )
+ + this.ContentOffset * scale / _viewboxFactor;
+ this.UpdateView( new ZoomboxView( scale, translateTo ), !this.IsResizingViewport, allowStackAddition );
+ }
+
+ private Point GetZoomRelativePoint()
+ {
+ Point zoomPoint;
+
+ if( ZoomOn == ZoomboxZoomOn.View )
+ {
+ // Transform the viewport point to the content
+ Point viewportZoomOrigin = new Point();
+
+ viewportZoomOrigin.X = this.Viewport.X + ( this.Viewport.Width * this.ZoomOrigin.X );
+ viewportZoomOrigin.Y = this.Viewport.Y + ( this.Viewport.Height * this.ZoomOrigin.Y );
+
+ Point contentZoomOrigin = _trueContent.TranslatePoint( viewportZoomOrigin, _content );
+
+ if( contentZoomOrigin.X < 0 )
+ {
+ contentZoomOrigin.X = 0;
+ }
+ else if( contentZoomOrigin.X > _content.RenderSize.Width )
+ {
+ contentZoomOrigin.X = _content.RenderSize.Width;
+ }
+
+ if( contentZoomOrigin.Y < 0 )
+ {
+ contentZoomOrigin.Y = 0;
+ }
+ else if( contentZoomOrigin.Y > _content.RenderSize.Height )
+ {
+ contentZoomOrigin.Y = _content.RenderSize.Height;
+ }
+
+ zoomPoint = contentZoomOrigin;
+ }
+ else
+ {
+ zoomPoint = new Point( _content.RenderSize.Width * ZoomOrigin.X, _content.RenderSize.Height * ZoomOrigin.Y );
+ }
+
+ return zoomPoint;
+ }
+
+ #region OnKeyDown Methods
+
+ protected override void OnPreviewKeyDown( KeyEventArgs e )
+ {
+ if( this.NavigateOnPreview && !e.Handled )
+ {
+ this.ProcessNavigationButton( e );
+ }
+
+ base.OnPreviewKeyDown( e );
+ }
+
+ protected override void OnKeyDown( KeyEventArgs e )
+ {
+ if( !this.NavigateOnPreview && !e.Handled )
+ {
+ this.ProcessNavigationButton( e );
+ }
+
+ base.OnKeyDown( e );
+ }
+
+ #endregion
+
+ #region OnMouseDown Methods
+
+ protected override void OnPreviewMouseDown( MouseButtonEventArgs e )
+ {
+ if( this.NavigateOnPreview && !e.Handled )
+ {
+ this.ProcessNavigationButton( e );
+ }
+
+ base.OnPreviewMouseDown( e );
+ }
+
+ protected override void OnMouseDown( MouseButtonEventArgs e )
+ {
+ if( !this.NavigateOnPreview && !e.Handled )
+ {
+ this.ProcessNavigationButton( e );
+ }
+
+ base.OnMouseDown( e );
+ }
+
+ #endregion
+
+ #region OnMouseEnter Methods
+
+ protected override void OnMouseEnter( MouseEventArgs e )
+ {
+ this.MonitorInput();
+
+ base.OnMouseEnter( e );
+ }
+
+ #endregion
+
+ #region OnMouseLeave Methods
+
+ protected override void OnMouseLeave( MouseEventArgs e )
+ {
+ this.MonitorInput();
+
+ base.OnMouseLeave( e );
+ }
+
+ #endregion
+
+ #region OnMouseLeftButton Methods
+
+ protected override void OnPreviewMouseLeftButtonDown( MouseButtonEventArgs e )
+ {
+ if( this.DragOnPreview && !e.Handled && _contentPresenter != null )
+ {
+ this.ProcessMouseLeftButtonDown( e );
+ }
+
+ base.OnPreviewMouseLeftButtonDown( e );
+ }
+
+ protected override void OnMouseLeftButtonDown( MouseButtonEventArgs e )
+ {
+ if( !this.DragOnPreview && !e.Handled && _contentPresenter != null )
+ {
+ this.ProcessMouseLeftButtonDown( e );
+ }
+
+ base.OnMouseLeftButtonDown( e );
+ }
+
+ protected override void OnPreviewMouseLeftButtonUp( MouseButtonEventArgs e )
+ {
+ if( this.DragOnPreview && !e.Handled && _contentPresenter != null )
+ {
+ this.ProcessMouseLeftButtonUp( e );
+ }
+
+ base.OnPreviewMouseLeftButtonUp( e );
+ }
+
+ protected override void OnMouseLeftButtonUp( MouseButtonEventArgs e )
+ {
+ if( !this.DragOnPreview && !e.Handled && _contentPresenter != null )
+ {
+ this.ProcessMouseLeftButtonUp( e );
+ }
+
+ base.OnMouseLeftButtonUp( e );
+ }
+
+ #endregion
+
+ #region OnMouseMove Methods
+
+ protected override void OnPreviewMouseMove( MouseEventArgs e )
+ {
+ if( this.DragOnPreview && !e.Handled && _contentPresenter != null )
+ {
+ this.ProcessMouseMove( e );
+ }
+
+ base.OnPreviewMouseMove( e );
+ }
+
+ protected override void OnMouseMove( MouseEventArgs e )
+ {
+ if( !this.DragOnPreview && !e.Handled && _contentPresenter != null )
+ {
+ this.ProcessMouseMove( e );
+ }
+
+ base.OnMouseMove( e );
+ }
+
+ #endregion
+
+ #region OnMouseWheel Methods
+
+ protected override void OnPreviewMouseWheel( MouseWheelEventArgs e )
+ {
+ if( this.ZoomOnPreview && !e.Handled && _contentPresenter != null )
+ {
+ this.ProcessMouseWheelZoom( e );
+ }
+
+ base.OnPreviewMouseWheel( e );
+ }
+
+ protected override void OnMouseWheel( MouseWheelEventArgs e )
+ {
+ if( !this.ZoomOnPreview && !e.Handled && _contentPresenter != null )
+ {
+ this.ProcessMouseWheelZoom( e );
+ }
+
+ base.OnMouseWheel( e );
+ }
+
+ #endregion
+
+ #region Private Fields
+
+ // the default value for a single mouse wheel delta appears to be 28
+ private static int MOUSE_WHEEL_DELTA = 28;
+
+ // the content control's one and only content presenter
+ private ContentPresenter _contentPresenter = null;
+
+ // the content of the Zoombox (cast as a UIElement)
+ private UIElement _content = null;
+
+ // the drag adorner used for selecting a region in a zoom-to-selection operation
+ private DragAdorner _dragAdorner = null;
+
+ // the view stack
+ private ZoomboxViewStack _viewStack = null;
+
+ // the view finder display panel
+ // this is used to show the current viewport
+ private ZoomboxViewFinderDisplay _viewFinderDisplay = null;
+
+ // state variables used during drag and select operations
+ private Rect _resizeViewportBounds = Rect.Empty;
+ private Point _resizeAnchorPoint = new Point( 0, 0 );
+ private Point _resizeDraggingPoint = new Point( 0, 0 );
+ private Point _originPoint = new Point( 0, 0 );
+
+ private double _viewboxFactor = 1.0;
+ private double _relativeScale = 1.0;
+ private Point _relativePosition = new Point();
+ private Point _basePosition = new Point();
+
+ // used to track the time delta between stack operations
+ private DateTime _lastStackAddition;
+
+ // used to provide stack index when view changes
+ private int _lastViewIndex = -1;
+
+ private BitVector32 _cacheBits = new BitVector32( 0 );
+
+ #endregion
+
+ #region ViewFinderSelectionConverter Nested Type
+
+ private sealed class ViewFinderSelectionConverter : IValueConverter
+ {
+ public ViewFinderSelectionConverter( Zoombox zoombox )
+ {
+ _zoombox = zoombox;
+ }
+
+ public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
+ {
+ Rect viewport = ( Rect )value;
+ if( viewport.IsEmpty )
+ return viewport;
+
+ // adjust the viewport from the coordinate space of the Content element
+ // to the coordinate space of the view finder display panel
+ double scale = _zoombox._viewFinderDisplay.Scale * _zoombox._viewboxFactor;
+ Rect result = new Rect( viewport.Left * scale, viewport.Top * scale,
+ viewport.Width * scale, viewport.Height * scale );
+ result.Offset( _zoombox._viewFinderDisplay.ContentBounds.Left,
+ _zoombox._viewFinderDisplay.ContentBounds.Top );
+ return result;
+ }
+
+ public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
+ {
+ return null;
+ }
+
+ private readonly Zoombox _zoombox;
+ }
+
+ #endregion
+
+ #region DragAdorner Nested Type
+
+ internal sealed class DragAdorner : Adorner
+ {
+ public DragAdorner( UIElement adornedElement )
+ : base( adornedElement )
+ {
+ this.ClipToBounds = true;
+ }
+
+ public static readonly DependencyProperty BrushProperty =
+ DependencyProperty.Register( "Brush", typeof( Brush ), typeof( DragAdorner ),
+ new FrameworkPropertyMetadata( Brushes.Transparent, FrameworkPropertyMetadataOptions.AffectsRender ) );
+
+ public Brush Brush
+ {
+ get
+ {
+ return ( Brush )this.GetValue( DragAdorner.BrushProperty );
+ }
+ set
+ {
+ this.SetValue( DragAdorner.BrushProperty, value );
+ }
+ }
+
+ public static readonly DependencyProperty PenProperty =
+ DependencyProperty.Register( "Pen", typeof( Pen ), typeof( DragAdorner ),
+ new FrameworkPropertyMetadata( new Pen( new SolidColorBrush( Color.FromArgb( 0x7F, 0x3F, 0x3F, 0x3F ) ), 2d ), FrameworkPropertyMetadataOptions.AffectsRender ) );
+
+ public Pen Pen
+ {
+ get
+ {
+ return ( Pen )this.GetValue( DragAdorner.PenProperty );
+ }
+ set
+ {
+ this.SetValue( DragAdorner.PenProperty, value );
+ }
+ }
+
+ public static readonly DependencyProperty RectProperty =
+ DependencyProperty.Register( "Rect", typeof( Rect ), typeof( DragAdorner ),
+ new FrameworkPropertyMetadata( Rect.Empty, FrameworkPropertyMetadataOptions.AffectsRender,
+ new PropertyChangedCallback( DragAdorner.OnRectChanged ) ) );
+
+ public Rect Rect
+ {
+ get
+ {
+ return ( Rect )this.GetValue( DragAdorner.RectProperty );
+ }
+ set
+ {
+ this.SetValue( DragAdorner.RectProperty, value );
+ }
+ }
+
+ private static void OnRectChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
+ {
+ DragAdorner dragAdorner = ( DragAdorner )d;
+ Rect rect = ( Rect )e.NewValue;
+
+ // ignore empty values
+ if( rect.IsEmpty )
+ return;
+
+ // if the value is not empty, cache the position and size
+ dragAdorner._cachedPosition = ( ( Rect )e.NewValue ).TopLeft;
+ dragAdorner._cachedSize = ( ( Rect )e.NewValue ).Size;
+ }
+
+ public Point LastPosition
+ {
+ get
+ {
+ return _cachedPosition;
+ }
+ }
+
+ public Size LastSize
+ {
+ get
+ {
+ return _cachedSize;
+ }
+ }
+
+ protected override void OnRender( DrawingContext drawingContext )
+ {
+ drawingContext.DrawRectangle( Brush, Pen, Rect );
+ }
+
+ private Point _cachedPosition;
+ private Size _cachedSize;
+ }
+
+ #endregion
+
+ #region CacheBits Nested Type
+
+ private enum CacheBits
+ {
+ IsUpdatingView = 0x00000001,
+ IsUpdatingViewport = 0x00000002,
+ IsDraggingViewport = 0x00000004,
+ IsResizingViewport = 0x00000008,
+ IsMonitoringInput = 0x00000010,
+ IsContentWrapped = 0x00000020,
+ HasArrangedContentPresenter = 0x00000040,
+ HasRenderedFirstView = 0x00000080,
+ RefocusViewOnFirstRender = 0x00000100,
+ HasUIPermission = 0x00000200,
+ }
+
+ #endregion
+
+ #region ResizeEdge Nested Type
+
+ private enum ResizeEdge
+ {
+ None,
+ TopLeft,
+ TopRight,
+ BottomLeft,
+ BottomRight,
+ Left,
+ Top,
+ Right,
+ Bottom,
+ }
+
+ #endregion
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxCursors.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxCursors.cs
new file mode 100644
index 00000000..960504dc
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxCursors.cs
@@ -0,0 +1,76 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System.Reflection;
+using System.Security;
+using System.Security.Permissions;
+using System.Windows.Input;
+using Xceed.Wpf.Toolkit.Core.Utilities;
+
+namespace Xceed.Wpf.Toolkit.Zoombox
+{
+ public class ZoomboxCursors
+ {
+ #region Constructors
+
+ static ZoomboxCursors()
+ {
+ try
+ {
+ new EnvironmentPermission( PermissionState.Unrestricted ).Demand();
+ _zoom = new Cursor( ResourceHelper.LoadResourceStream( Assembly.GetExecutingAssembly(), "Zoombox/Resources/Zoom.cur" ) );
+ _zoomRelative = new Cursor( ResourceHelper.LoadResourceStream( Assembly.GetExecutingAssembly(), "Zoombox/Resources/ZoomRelative.cur" ) );
+ }
+ catch( SecurityException )
+ {
+ // partial trust, so just use default cursors
+ }
+ }
+
+ #endregion
+
+ #region Zoom Static Property
+
+ public static Cursor Zoom
+ {
+ get
+ {
+ return _zoom;
+ }
+ }
+
+ private static readonly Cursor _zoom = Cursors.Arrow;
+
+ #endregion
+
+ #region ZoomRelative Static Property
+
+ public static Cursor ZoomRelative
+ {
+ get
+ {
+ return _zoomRelative;
+ }
+ }
+
+ private static readonly Cursor _zoomRelative = Cursors.Arrow;
+
+ #endregion
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxView.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxView.cs
new file mode 100644
index 00000000..f1776222
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxView.cs
@@ -0,0 +1,317 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System;
+using System.ComponentModel;
+using System.Windows;
+using Xceed.Wpf.Toolkit.Core.Utilities;
+using Xceed.Wpf.Toolkit.Core;
+
+namespace Xceed.Wpf.Toolkit.Zoombox
+{
+ [TypeConverter( typeof( ZoomboxViewConverter ) )]
+ public class ZoomboxView
+ {
+ #region Constructors
+
+ public ZoomboxView()
+ {
+ }
+
+ public ZoomboxView( double scale )
+ {
+ this.Scale = scale;
+ }
+
+ public ZoomboxView( Point position )
+ {
+ this.Position = position;
+ }
+
+ public ZoomboxView( double scale, Point position )
+ {
+ this.Position = position;
+ this.Scale = scale;
+ }
+
+ public ZoomboxView( Rect region )
+ {
+ this.Region = region;
+ }
+
+ public ZoomboxView( double x, double y )
+ : this( new Point( x, y ) )
+ {
+ }
+
+ public ZoomboxView( double scale, double x, double y )
+ : this( scale, new Point( x, y ) )
+ {
+ }
+
+ public ZoomboxView( double x, double y, double width, double height )
+ : this( new Rect( x, y, width, height ) )
+ {
+ }
+
+ #endregion
+
+ #region Empty Static Property
+
+ public static ZoomboxView Empty
+ {
+ get
+ {
+ return _empty;
+ }
+ }
+
+ private static readonly ZoomboxView _empty = new ZoomboxView( ZoomboxViewKind.Empty );
+
+ #endregion
+
+ #region Fill Static Property
+
+ public static ZoomboxView Fill
+ {
+ get
+ {
+ return _fill;
+ }
+ }
+
+ private static readonly ZoomboxView _fill = new ZoomboxView( ZoomboxViewKind.Fill );
+
+ #endregion
+
+ #region Fit Static Property
+
+ public static ZoomboxView Fit
+ {
+ get
+ {
+ return _fit;
+ }
+ }
+
+ private static readonly ZoomboxView _fit = new ZoomboxView( ZoomboxViewKind.Fit );
+
+ #endregion
+
+ #region Center Static Property
+
+ public static ZoomboxView Center
+ {
+ get
+ {
+ return _center;
+ }
+ }
+
+ private static readonly ZoomboxView _center = new ZoomboxView( ZoomboxViewKind.Center );
+
+ #endregion
+
+ #region ViewKind Property
+
+ public ZoomboxViewKind ViewKind
+ {
+ get
+ {
+ if( _kindHeight > 0 )
+ {
+ return ZoomboxViewKind.Region;
+ }
+ else
+ {
+ return ( ZoomboxViewKind )( int )_kindHeight;
+ }
+ }
+ }
+
+ private double _kindHeight = ( int )ZoomboxViewKind.Empty;
+
+ #endregion
+
+ #region Position Property
+
+ public Point Position
+ {
+ get
+ {
+ if( this.ViewKind != ZoomboxViewKind.Absolute )
+ throw new InvalidOperationException( ErrorMessages.GetMessage( "PositionOnlyAccessibleOnAbsolute" ) );
+
+ return new Point( _x, _y );
+ }
+ set
+ {
+ if( this.ViewKind != ZoomboxViewKind.Absolute && this.ViewKind != ZoomboxViewKind.Empty )
+ throw new InvalidOperationException( String.Format( ErrorMessages.GetMessage( "ZoomboxViewAlreadyInitialized" ), this.ViewKind.ToString() ) );
+
+ _x = value.X;
+ _y = value.Y;
+ _kindHeight = ( int )ZoomboxViewKind.Absolute;
+ }
+ }
+
+ private double _x = double.NaN;
+ private double _y = double.NaN;
+
+ #endregion
+
+ #region Scale Property
+
+ public double Scale
+ {
+ get
+ {
+ if( this.ViewKind != ZoomboxViewKind.Absolute )
+ throw new InvalidOperationException( ErrorMessages.GetMessage( "ScaleOnlyAccessibleOnAbsolute" ) );
+
+ return _scaleWidth;
+ }
+ set
+ {
+ if( this.ViewKind != ZoomboxViewKind.Absolute && this.ViewKind != ZoomboxViewKind.Empty )
+ throw new InvalidOperationException( String.Format( ErrorMessages.GetMessage( "ZoomboxViewAlreadyInitialized" ), this.ViewKind.ToString() ) );
+
+ _scaleWidth = value;
+ _kindHeight = ( int )ZoomboxViewKind.Absolute;
+ }
+ }
+
+ private double _scaleWidth = double.NaN;
+
+ #endregion
+
+ #region Region Property
+
+ public Rect Region
+ {
+ get
+ {
+ // a region view has a positive _typeHeight value
+ if( _kindHeight < 0 )
+ throw new InvalidOperationException( ErrorMessages.GetMessage( "RegionOnlyAccessibleOnRegionalView" ) );
+
+ return new Rect( _x, _y, _scaleWidth, _kindHeight );
+ }
+ set
+ {
+ if( this.ViewKind != ZoomboxViewKind.Region && this.ViewKind != ZoomboxViewKind.Empty )
+ throw new InvalidOperationException( String.Format( ErrorMessages.GetMessage( "ZoomboxViewAlreadyInitialized" ), this.ViewKind.ToString() ) );
+
+ if( !value.IsEmpty )
+ {
+ _x = value.X;
+ _y = value.Y;
+ _scaleWidth = value.Width;
+ _kindHeight = value.Height;
+ }
+ }
+ }
+
+ #endregion
+
+ public override int GetHashCode()
+ {
+ return _x.GetHashCode() ^ _y.GetHashCode() ^ _scaleWidth.GetHashCode() ^ _kindHeight.GetHashCode();
+ }
+
+ public override bool Equals( object o )
+ {
+ bool result = false;
+ if( o is ZoomboxView )
+ {
+ ZoomboxView other = ( ZoomboxView )o;
+ if( this.ViewKind == other.ViewKind )
+ {
+ switch( this.ViewKind )
+ {
+ case ZoomboxViewKind.Absolute:
+ result = ( DoubleHelper.AreVirtuallyEqual( _scaleWidth, other._scaleWidth ) )
+ && ( DoubleHelper.AreVirtuallyEqual( Position, other.Position ) );
+ break;
+
+ case ZoomboxViewKind.Region:
+ result = DoubleHelper.AreVirtuallyEqual( Region, other.Region );
+ break;
+
+ default:
+ result = true;
+ break;
+ }
+ }
+ }
+ return result;
+ }
+
+ public override string ToString()
+ {
+ switch( ViewKind )
+ {
+ case ZoomboxViewKind.Empty:
+ return "ZoomboxView: Empty";
+
+ case ZoomboxViewKind.Center:
+ return "ZoomboxView: Center";
+
+ case ZoomboxViewKind.Fill:
+ return "ZoomboxView: Fill";
+
+ case ZoomboxViewKind.Fit:
+ return "ZoomboxView: Fit";
+
+ case ZoomboxViewKind.Absolute:
+ return string.Format( "ZoomboxView: Scale = {0}; Position = ({1}, {2})", _scaleWidth.ToString( "f" ), _x.ToString( "f" ), _y.ToString( "f" ) );
+
+ case ZoomboxViewKind.Region:
+ return string.Format( "ZoomboxView: Region = ({0}, {1}, {2}, {3})", _x.ToString( "f" ), _y.ToString( "f" ), _scaleWidth.ToString( "f" ), _kindHeight.ToString( "f" ) );
+ }
+
+ return base.ToString();
+ }
+
+ private ZoomboxView( ZoomboxViewKind viewType )
+ {
+ _kindHeight = ( int )viewType;
+ }
+
+ #region Operators Methods
+
+ public static bool operator ==( ZoomboxView v1, ZoomboxView v2 )
+ {
+ if( ( object )v1 == null )
+ return ( object )v2 == null;
+
+ if( ( object )v2 == null )
+ return ( object )v1 == null;
+
+ return v1.Equals( v2 );
+ }
+
+ public static bool operator !=( ZoomboxView v1, ZoomboxView v2 )
+ {
+ return !( v1 == v2 );
+ }
+
+ #endregion
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewChangedEventArgs.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewChangedEventArgs.cs
new file mode 100644
index 00000000..bc7b6d2c
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewChangedEventArgs.cs
@@ -0,0 +1,99 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System;
+using Xceed.Wpf.Toolkit.Core;
+
+namespace Xceed.Wpf.Toolkit.Zoombox
+{
+ public class ZoomboxViewChangedEventArgs : PropertyChangedEventArgs
+ {
+ #region Constructors
+
+ public ZoomboxViewChangedEventArgs(
+ ZoomboxView oldView,
+ ZoomboxView newView,
+ int oldViewStackIndex,
+ int newViewStackIndex )
+ : base( Zoombox.CurrentViewChangedEvent, oldView, newView )
+ {
+ _newViewStackIndex = newViewStackIndex;
+ _oldViewStackIndex = oldViewStackIndex;
+ }
+
+ #endregion
+
+ #region NewViewStackIndex Property
+
+ public int NewViewStackIndex
+ {
+ get
+ {
+ return _newViewStackIndex;
+ }
+ }
+
+ private readonly int _newViewStackIndex = -1;
+
+ #endregion
+
+ #region NewViewStackIndex Property
+
+ public int OldViewStackIndex
+ {
+ get
+ {
+ return _oldViewStackIndex;
+ }
+ }
+
+ private readonly int _oldViewStackIndex = -1;
+
+ #endregion
+
+ #region NewViewStackIndex Property
+
+ public bool IsNewViewFromStack
+ {
+ get
+ {
+ return _newViewStackIndex >= 0;
+ }
+ }
+
+ #endregion
+
+ #region NewViewStackIndex Property
+
+ public bool IsOldViewFromStack
+ {
+ get
+ {
+ return _oldViewStackIndex >= 0;
+ }
+ }
+
+ #endregion
+
+ protected override void InvokeEventHandler( Delegate genericHandler, object genericTarget )
+ {
+ ( ( ZoomboxViewChangedEventHandler )genericHandler )( genericTarget, this );
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewChangedEventHandler.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewChangedEventHandler.cs
new file mode 100644
index 00000000..8662caf5
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewChangedEventHandler.cs
@@ -0,0 +1,23 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+namespace Xceed.Wpf.Toolkit.Zoombox
+{
+ public delegate void ZoomboxViewChangedEventHandler( object sender, ZoomboxViewChangedEventArgs e );
+}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewConverter.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewConverter.cs
new file mode 100644
index 00000000..6e77d7b1
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewConverter.cs
@@ -0,0 +1,210 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Globalization;
+using System.Windows;
+using Xceed.Wpf.Toolkit.Core.Utilities;
+
+namespace Xceed.Wpf.Toolkit.Zoombox
+{
+ public sealed class ZoomboxViewConverter : TypeConverter
+ {
+ #region Converter Static Property
+
+ internal static ZoomboxViewConverter Converter
+ {
+ get
+ {
+ if( _converter == null )
+ {
+ _converter = new ZoomboxViewConverter();
+ }
+ return _converter;
+ }
+ }
+
+ private static ZoomboxViewConverter _converter; //null
+
+ #endregion
+
+ public override bool CanConvertFrom( ITypeDescriptorContext typeDescriptorContext, Type type )
+ {
+ return ( type == typeof( string ) )
+ || ( type == typeof( double ) )
+ || ( type == typeof( Point ) )
+ || ( type == typeof( Rect ) )
+ || ( base.CanConvertFrom( typeDescriptorContext, type ) );
+ }
+
+ public override bool CanConvertTo( ITypeDescriptorContext typeDescriptorContext, Type type )
+ {
+ return ( type == typeof( string ) )
+ || ( base.CanConvertTo( typeDescriptorContext, type ) );
+ }
+
+ public override object ConvertFrom(
+ ITypeDescriptorContext typeDescriptorContext,
+ CultureInfo cultureInfo,
+ object value )
+ {
+ ZoomboxView result = null;
+ if( value is double )
+ {
+ result = new ZoomboxView( ( double )value );
+ }
+ else if( value is Point )
+ {
+ result = new ZoomboxView( ( Point )value );
+ }
+ else if( value is Rect )
+ {
+ result = new ZoomboxView( ( Rect )value );
+ }
+ else if( value is string )
+ {
+ if( string.IsNullOrEmpty( ( value as string ).Trim() ) )
+ {
+ result = ZoomboxView.Empty;
+ }
+ else
+ {
+ switch( ( value as string ).Trim().ToLower() )
+ {
+ case "center":
+ result = ZoomboxView.Center;
+ break;
+
+ case "empty":
+ result = ZoomboxView.Empty;
+ break;
+
+ case "fill":
+ result = ZoomboxView.Fill;
+ break;
+
+ case "fit":
+ result = ZoomboxView.Fit;
+ break;
+
+ default:
+ // parse double values; respect the following separators: ' ', ';', or ','
+ List values = new List();
+ foreach( string token in ( value as string ).Split( new char[] { ' ', ';', ',' }, StringSplitOptions.RemoveEmptyEntries ) )
+ {
+ double d;
+ if( double.TryParse( token, out d ) )
+ {
+ values.Add( d );
+ }
+ if( values.Count >= 4 )
+ {
+ // disregard additional values
+ break;
+ }
+ }
+
+ switch( values.Count )
+ {
+ case 1: // scale
+ result = new ZoomboxView( values[ 0 ] );
+ break;
+
+ case 2: // x, y
+ result = new ZoomboxView( values[ 0 ], values[ 1 ] );
+ break;
+
+ case 3: // scale, x, y
+ result = new ZoomboxView( values[ 0 ], values[ 1 ], values[ 2 ] );
+ break;
+
+ case 4: // x, y, width, height
+ result = new ZoomboxView( values[ 0 ], values[ 1 ], values[ 2 ], values[ 3 ] );
+ break;
+ }
+ break;
+ }
+ }
+ }
+ return ( result == null ? base.ConvertFrom( typeDescriptorContext, cultureInfo, value ) : result );
+ }
+
+ public override object ConvertTo(
+ ITypeDescriptorContext typeDescriptorContext,
+ CultureInfo cultureInfo,
+ object value,
+ Type destinationType )
+ {
+ object result = null;
+ ZoomboxView view = value as ZoomboxView;
+
+ if( view != null )
+ {
+ if( destinationType == typeof( string ) )
+ {
+ result = "Empty";
+ switch( view.ViewKind )
+ {
+ case ZoomboxViewKind.Absolute:
+ if( PointHelper.IsEmpty( view.Position ) )
+ {
+ if( !DoubleHelper.IsNaN( view.Scale ) )
+ {
+ result = view.Scale.ToString();
+ }
+ }
+ else if( DoubleHelper.IsNaN( view.Scale ) )
+ {
+ result = view.Position.X.ToString() + "," + view.Position.Y.ToString();
+ }
+ else
+ {
+ result = view.Scale.ToString() + ","
+ + view.Position.X.ToString() + ","
+ + view.Position.Y.ToString();
+ }
+ break;
+
+ case ZoomboxViewKind.Center:
+ result = "Center";
+ break;
+
+ case ZoomboxViewKind.Fill:
+ result = "Fill";
+ break;
+
+ case ZoomboxViewKind.Fit:
+ result = "Fit";
+ break;
+
+ case ZoomboxViewKind.Region:
+ result = view.Region.X.ToString() + ","
+ + view.Region.Y.ToString() + ","
+ + view.Region.Width.ToString() + ","
+ + view.Region.Height.ToString();
+ break;
+ }
+ }
+ }
+ return ( result == null ? base.ConvertTo( typeDescriptorContext, cultureInfo, value, destinationType ) : result );
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewException.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewException.cs
new file mode 100644
index 00000000..142be476
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewException.cs
@@ -0,0 +1,35 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System;
+
+namespace Xceed.Wpf.Toolkit.Zoombox
+{
+ public class ZoomboxViewException : Exception
+ {
+ #region Constructors
+
+ public ZoomboxViewException( string message )
+ : base( message )
+ {
+ }
+
+ #endregion
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewFinderDisplay.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewFinderDisplay.cs
new file mode 100644
index 00000000..f9f5baef
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewFinderDisplay.cs
@@ -0,0 +1,287 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System;
+using System.Windows;
+using System.Windows.Media;
+using Xceed.Wpf.Toolkit.Core.Utilities;
+
+namespace Xceed.Wpf.Toolkit.Zoombox
+{
+ public class ZoomboxViewFinderDisplay : FrameworkElement
+ {
+ #region Constructors
+
+ static ZoomboxViewFinderDisplay()
+ {
+ ZoomboxViewFinderDisplay.DefaultStyleKeyProperty.OverrideMetadata( typeof( ZoomboxViewFinderDisplay ), new FrameworkPropertyMetadata( typeof( ZoomboxViewFinderDisplay ) ) );
+ }
+
+ public ZoomboxViewFinderDisplay()
+ {
+ }
+
+ #endregion
+
+ #region Background Property
+
+ public static readonly DependencyProperty BackgroundProperty =
+ DependencyProperty.Register( "Background", typeof( Brush ), typeof( ZoomboxViewFinderDisplay ),
+ new FrameworkPropertyMetadata( new SolidColorBrush( Color.FromArgb( 0xC0, 0xFF, 0xFF, 0xFF ) ), FrameworkPropertyMetadataOptions.AffectsRender ) );
+
+ public Brush Background
+ {
+ get
+ {
+ return ( Brush )this.GetValue( ZoomboxViewFinderDisplay.BackgroundProperty );
+ }
+ set
+ {
+ this.SetValue( ZoomboxViewFinderDisplay.BackgroundProperty, value );
+ }
+ }
+
+ #endregion
+
+ #region ContentBounds Property
+
+ private static readonly DependencyPropertyKey ContentBoundsPropertyKey =
+ DependencyProperty.RegisterReadOnly( "ContentBounds", typeof( Rect ), typeof( ZoomboxViewFinderDisplay ),
+ new FrameworkPropertyMetadata( ( Rect )Rect.Empty, FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender ) );
+
+ public static readonly DependencyProperty ContentBoundsProperty = ZoomboxViewFinderDisplay.ContentBoundsPropertyKey.DependencyProperty;
+
+ internal Rect ContentBounds
+ {
+ get
+ {
+ return ( Rect )this.GetValue( ZoomboxViewFinderDisplay.ContentBoundsProperty );
+ }
+ set
+ {
+ this.SetValue( ZoomboxViewFinderDisplay.ContentBoundsPropertyKey, value );
+ }
+ }
+
+ #endregion
+
+ #region ShadowBrush Property
+
+ public static readonly DependencyProperty ShadowBrushProperty =
+ DependencyProperty.Register( "ShadowBrush", typeof( Brush ), typeof( ZoomboxViewFinderDisplay ),
+ new FrameworkPropertyMetadata( new SolidColorBrush( Color.FromArgb( 0x80, 0xFF, 0xFF, 0xFF ) ), FrameworkPropertyMetadataOptions.AffectsRender ) );
+
+ public Brush ShadowBrush
+ {
+ get
+ {
+ return ( Brush )this.GetValue( ZoomboxViewFinderDisplay.ShadowBrushProperty );
+ }
+ set
+ {
+ this.SetValue( ZoomboxViewFinderDisplay.ShadowBrushProperty, value );
+ }
+ }
+
+ #endregion
+
+ #region ViewportBrush Property
+
+ public static readonly DependencyProperty ViewportBrushProperty =
+ DependencyProperty.Register( "ViewportBrush", typeof( Brush ), typeof( ZoomboxViewFinderDisplay ),
+ new FrameworkPropertyMetadata( Brushes.Transparent, FrameworkPropertyMetadataOptions.AffectsRender ) );
+
+ public Brush ViewportBrush
+ {
+ get
+ {
+ return ( Brush )this.GetValue( ZoomboxViewFinderDisplay.ViewportBrushProperty );
+ }
+ set
+ {
+ this.SetValue( ZoomboxViewFinderDisplay.ViewportBrushProperty, value );
+ }
+ }
+
+ #endregion
+
+ #region ViewportPen Property
+
+ public static readonly DependencyProperty ViewportPenProperty =
+ DependencyProperty.Register( "ViewportPen", typeof( Pen ), typeof( ZoomboxViewFinderDisplay ),
+ new FrameworkPropertyMetadata( new Pen( new SolidColorBrush( Color.FromArgb( 0x80, 0x00, 0x00, 0x00 ) ), 1d ), FrameworkPropertyMetadataOptions.AffectsRender ) );
+
+ public Pen ViewportPen
+ {
+ get
+ {
+ return ( Pen )this.GetValue( ZoomboxViewFinderDisplay.ViewportPenProperty );
+ }
+ set
+ {
+ this.SetValue( ZoomboxViewFinderDisplay.ViewportPenProperty, value );
+ }
+ }
+
+ #endregion
+
+ #region ViewportRect Property
+
+ public static readonly DependencyProperty ViewportRectProperty =
+ DependencyProperty.Register( "ViewportRect", typeof( Rect ), typeof( ZoomboxViewFinderDisplay ),
+ new FrameworkPropertyMetadata( Rect.Empty, FrameworkPropertyMetadataOptions.AffectsRender ) );
+
+ public Rect ViewportRect
+ {
+ get
+ {
+ return ( Rect )this.GetValue( ZoomboxViewFinderDisplay.ViewportRectProperty );
+ }
+ set
+ {
+ this.SetValue( ZoomboxViewFinderDisplay.ViewportRectProperty, value );
+ }
+ }
+
+ #endregion
+
+ #region VisualBrush Property
+
+ private static readonly DependencyPropertyKey VisualBrushPropertyKey =
+ DependencyProperty.RegisterReadOnly( "VisualBrush", typeof( VisualBrush ), typeof( ZoomboxViewFinderDisplay ),
+ new FrameworkPropertyMetadata( ( VisualBrush )null ) );
+
+ public static readonly DependencyProperty VisualBrushProperty = ZoomboxViewFinderDisplay.VisualBrushPropertyKey.DependencyProperty;
+
+ internal VisualBrush VisualBrush
+ {
+ get
+ {
+ return ( VisualBrush )this.GetValue( ZoomboxViewFinderDisplay.VisualBrushProperty );
+ }
+ set
+ {
+ this.SetValue( ZoomboxViewFinderDisplay.VisualBrushPropertyKey, value );
+ }
+ }
+
+ #endregion
+
+ #region AvailableSize Internal Property
+
+ internal Size AvailableSize
+ {
+ get
+ {
+ return _availableSize;
+ }
+ }
+
+ private Size _availableSize = Size.Empty;
+
+ #endregion
+
+ #region Scale Internal Property
+
+ internal double Scale
+ {
+ get
+ {
+ return _scale;
+ }
+ set
+ {
+ _scale = value;
+ }
+ }
+
+ private double _scale = 1d;
+
+ #endregion
+
+ protected override Size ArrangeOverride( Size finalSize )
+ {
+ // Note that we do not call the Arrange method on any children
+ // because a ViewFinderDisplay has no children
+
+ // the control's RenderSize should always match its DesiredSize
+ return this.DesiredSize;
+ }
+
+ protected override Size MeasureOverride( Size availableSize )
+ {
+ // Note that we do not call the Measure method on any children
+ // because a ViewFinderDisplay has no children. It is merely used
+ // as a surface for the view finder's VisualBrush.
+
+ // store the available size for use by the Zoombox control
+ _availableSize = availableSize;
+
+ // Simulate size-to-content for the display panel by ensuring a width and height
+ // based on the content bounds. Otherwise, the display panel may have no size, since it doesn't
+ // contain content.
+ double width = DoubleHelper.IsNaN( this.ContentBounds.Width ) ? 0 : Math.Max( 0, this.ContentBounds.Width );
+ double height = DoubleHelper.IsNaN( this.ContentBounds.Height ) ? 0 : Math.Max( 0, this.ContentBounds.Height );
+ Size displayPanelSize = new Size( width, height );
+
+ // Now ensure that the result fits within the available size while maintaining
+ // the width/height ratio of the content bounds
+ if( displayPanelSize.Width > availableSize.Width || displayPanelSize.Height > availableSize.Height )
+ {
+ double aspectX = availableSize.Width / displayPanelSize.Width;
+ double aspectY = availableSize.Height / displayPanelSize.Height;
+ double scale = ( aspectX < aspectY ) ? aspectX : aspectY;
+ displayPanelSize = new Size( displayPanelSize.Width * scale, displayPanelSize.Height * scale );
+ }
+
+ return displayPanelSize;
+ }
+
+ protected override void OnRender( DrawingContext dc )
+ {
+ base.OnRender( dc );
+
+ dc.DrawRectangle( this.Background, null, this.ContentBounds );
+
+ dc.DrawRectangle( this.VisualBrush, null, this.ContentBounds );
+
+ if( this.ViewportRect.IntersectsWith( new Rect( this.RenderSize ) ) )
+ {
+ // draw shadow rectangles over the non-viewport regions
+ Rect r1 = new Rect( new Point( 0, 0 ), new Size( this.RenderSize.Width, Math.Max( 0, this.ViewportRect.Top ) ) );
+ Rect r2 = new Rect( new Point( 0, this.ViewportRect.Top ), new Size( Math.Max( 0, this.ViewportRect.Left ), this.ViewportRect.Height ) );
+ Rect r3 = new Rect( new Point( this.ViewportRect.Right, this.ViewportRect.Top ), new Size( Math.Max( 0, this.RenderSize.Width - this.ViewportRect.Right ), this.ViewportRect.Height ) );
+ Rect r4 = new Rect( new Point( 0, this.ViewportRect.Bottom ), new Size( this.RenderSize.Width, Math.Max( 0, this.RenderSize.Height - this.ViewportRect.Bottom ) ) );
+ dc.DrawRectangle( this.ShadowBrush, null, r1 );
+ dc.DrawRectangle( this.ShadowBrush, null, r2 );
+ dc.DrawRectangle( this.ShadowBrush, null, r3 );
+ dc.DrawRectangle( this.ShadowBrush, null, r4 );
+
+ // draw the rectangle around the viewport region
+ dc.DrawRectangle( this.ViewportBrush, this.ViewportPen, this.ViewportRect );
+ }
+ else
+ {
+ // if no part of the Rect is visible, just draw a
+ // shadow over the entire content bounds
+ dc.DrawRectangle( this.ShadowBrush, null, new Rect( this.RenderSize ) );
+ }
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewKind.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewKind.cs
new file mode 100644
index 00000000..f458c307
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewKind.cs
@@ -0,0 +1,32 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+
+namespace Xceed.Wpf.Toolkit.Zoombox
+{
+ public enum ZoomboxViewKind
+ {
+ Absolute = -5,
+ Fit = -4,
+ Fill = -3,
+ Center = -2,
+ Empty = -1,
+ Region,
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewStack.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewStack.cs
new file mode 100644
index 00000000..d083cd01
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewStack.cs
@@ -0,0 +1,558 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System;
+using System.Collections;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.Windows;
+using Xceed.Wpf.Toolkit.Core;
+
+namespace Xceed.Wpf.Toolkit.Zoombox
+{
+ public sealed class ZoomboxViewStack : Collection, IWeakEventListener
+ {
+ #region Constructors
+
+ public ZoomboxViewStack( Zoombox zoombox )
+ {
+ _zoomboxRef = new WeakReference( zoombox );
+ }
+
+ #endregion
+
+ #region SelectedView Property
+
+ public ZoomboxView SelectedView
+ {
+ get
+ {
+ int currentIndex = this.Zoombox.ViewStackIndex;
+ return ( currentIndex < 0 || currentIndex > Count - 1 ) ? ZoomboxView.Empty : this[ currentIndex ];
+ }
+ }
+
+ #endregion
+
+ #region AreViewsFromSource Internal Property
+
+ internal bool AreViewsFromSource
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.AreViewsFromSource ];
+ }
+ set
+ {
+ _cacheBits[ ( int )CacheBits.AreViewsFromSource ] = value;
+ }
+ }
+
+ #endregion
+
+ #region Source Internal Property
+
+ internal IEnumerable Source
+ {
+ get
+ {
+ return _source;
+ }
+ }
+
+ // if the view stack is generated by items within the ViewStackSource collection
+ // of the Zoombox, then we maintain a strong reference to the source
+ private IEnumerable _source; //null
+
+ #endregion
+
+ #region IsChangeFromSource Private Property
+
+ private bool IsChangeFromSource
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.IsChangeFromSource ];
+ }
+ set
+ {
+ _cacheBits[ ( int )CacheBits.IsChangeFromSource ] = value;
+ }
+ }
+
+ #endregion
+
+ #region IsMovingViews Private Property
+
+ private bool IsMovingViews
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.IsMovingViews ];
+ }
+ set
+ {
+ _cacheBits[ ( int )CacheBits.IsMovingViews ] = value;
+ }
+ }
+
+ #endregion
+
+ #region IsResettingViews Private Property
+
+ private bool IsResettingViews
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.IsResettingViews ];
+ }
+ set
+ {
+ _cacheBits[ ( int )CacheBits.IsResettingViews ] = value;
+ }
+ }
+
+ #endregion
+
+ #region IsSettingInitialViewAfterClear Private Property
+
+ private bool IsSettingInitialViewAfterClear
+ {
+ get
+ {
+ return _cacheBits[ ( int )CacheBits.IsSettingInitialViewAfterClear ];
+ }
+ set
+ {
+ _cacheBits[ ( int )CacheBits.IsSettingInitialViewAfterClear ] = value;
+ }
+ }
+
+ #endregion
+
+ #region Zoombox Private Property
+
+ private Zoombox Zoombox
+ {
+ get
+ {
+ return _zoomboxRef.Target as Zoombox;
+ }
+ }
+
+ // maintain a weak reference to the Zoombox that owns the stack
+ private WeakReference _zoomboxRef;
+
+ #endregion
+
+ internal void ClearViewStackSource()
+ {
+ if( this.AreViewsFromSource )
+ {
+ this.AreViewsFromSource = false;
+ this.MonitorSource( false );
+ _source = null;
+ using( new SourceAccess( this ) )
+ {
+ this.Clear();
+ }
+ this.Zoombox.CoerceValue( Zoombox.ViewStackModeProperty );
+ }
+ }
+
+ internal void PushView( ZoomboxView view )
+ {
+ // clear the forward stack
+ int currentIndex = this.Zoombox.ViewStackIndex;
+ while( this.Count - 1 > currentIndex )
+ {
+ this.RemoveAt( Count - 1 );
+ }
+ this.Add( view );
+ }
+
+ internal void SetViewStackSource( IEnumerable source )
+ {
+ if( _source != source )
+ {
+ this.MonitorSource( false );
+ _source = source;
+ this.MonitorSource( true );
+ this.AreViewsFromSource = true;
+ this.Zoombox.CoerceValue( Zoombox.ViewStackModeProperty );
+ this.ResetViews();
+ }
+ }
+
+ protected override void ClearItems()
+ {
+ this.VerifyStackModification();
+
+ bool currentDeleted = ( this.Zoombox.CurrentViewIndex >= 0 );
+ base.ClearItems();
+ this.Zoombox.SetViewStackCount( Count );
+
+ // if resetting the views due to a change in the view source collection, just return
+ if( this.IsResettingViews )
+ return;
+
+ if( this.Zoombox.EffectiveViewStackMode == ZoomboxViewStackMode.Auto && this.Zoombox.CurrentView != ZoomboxView.Empty )
+ {
+ this.IsSettingInitialViewAfterClear = true;
+ try
+ {
+ this.Add( this.Zoombox.CurrentView );
+ }
+ finally
+ {
+ this.IsSettingInitialViewAfterClear = false;
+ }
+ this.Zoombox.ViewStackIndex = 0;
+ if( currentDeleted )
+ {
+ this.Zoombox.SetCurrentViewIndex( 0 );
+ }
+ }
+ else
+ {
+ this.Zoombox.ViewStackIndex = -1;
+ this.Zoombox.SetCurrentViewIndex( -1 );
+ }
+ }
+
+ protected override void InsertItem( int index, ZoomboxView view )
+ {
+ this.VerifyStackModification();
+
+ if( this.Zoombox.HasArrangedContentPresenter
+ && this.Zoombox.ViewStackIndex >= index
+ && !this.IsSettingInitialViewAfterClear
+ && !this.IsResettingViews
+ && !this.IsMovingViews )
+ {
+ bool oldUpdatingView = this.Zoombox.IsUpdatingView;
+ this.Zoombox.IsUpdatingView = true;
+ try
+ {
+ this.Zoombox.ViewStackIndex++;
+ if( this.Zoombox.CurrentViewIndex != -1 )
+ {
+ this.Zoombox.SetCurrentViewIndex( this.Zoombox.CurrentViewIndex + 1 );
+ }
+ }
+ finally
+ {
+ this.Zoombox.IsUpdatingView = oldUpdatingView;
+ }
+ }
+
+ base.InsertItem( index, view );
+ this.Zoombox.SetViewStackCount( Count );
+ }
+
+ protected override void RemoveItem( int index )
+ {
+ this.VerifyStackModification();
+
+ bool currentDeleted = ( this.Zoombox.ViewStackIndex == index );
+ if( !this.IsMovingViews )
+ {
+ // if an item below the current index was deleted
+ // (or if the last item is currently selected and it was deleted),
+ // adjust the ViewStackIndex and CurrentViewIndex values
+ if( this.Zoombox.HasArrangedContentPresenter
+ && ( this.Zoombox.ViewStackIndex > index
+ || ( currentDeleted && this.Zoombox.ViewStackIndex == this.Zoombox.ViewStack.Count - 1 ) ) )
+ {
+ // if removing the last item, just clear the stack, which ensures the proper
+ // behavior based on the ViewStackMode
+ if( currentDeleted && this.Zoombox.ViewStack.Count == 1 )
+ {
+ this.Clear();
+ return;
+ }
+
+ bool oldUpdatingView = this.Zoombox.IsUpdatingView;
+ this.Zoombox.IsUpdatingView = true;
+ try
+ {
+ this.Zoombox.ViewStackIndex--;
+ if( this.Zoombox.CurrentViewIndex != -1 )
+ {
+ this.Zoombox.SetCurrentViewIndex( this.Zoombox.CurrentViewIndex - 1 );
+ }
+ }
+ finally
+ {
+ this.Zoombox.IsUpdatingView = oldUpdatingView;
+ }
+ }
+ }
+
+ base.RemoveItem( index );
+
+ // if the current view was deleted, we may need to update the view index
+ // (unless a non-stack view is in effect)
+ if( !this.IsMovingViews && currentDeleted && this.Zoombox.CurrentViewIndex != -1 )
+ {
+ this.Zoombox.RefocusView();
+ }
+
+ this.Zoombox.SetViewStackCount( Count );
+ }
+
+ protected override void SetItem( int index, ZoomboxView view )
+ {
+ this.VerifyStackModification();
+
+ base.SetItem( index, view );
+
+ // if the set item is the current item, update the zoombox
+ if( index == this.Zoombox.CurrentViewIndex )
+ {
+ this.Zoombox.RefocusView();
+ }
+ }
+
+ private static ZoomboxView GetViewFromSourceItem( object item )
+ {
+ ZoomboxView view = ( item is ZoomboxView ) ? item as ZoomboxView : ZoomboxViewConverter.Converter.ConvertFrom( item ) as ZoomboxView;
+ if( view == null )
+ throw new InvalidCastException( string.Format( ErrorMessages.GetMessage( "UnableToConvertToZoomboxView" ), item ) );
+
+ return view;
+ }
+
+ private void InsertViews( int index, IList newItems )
+ {
+ using( new SourceAccess( this ) )
+ {
+ foreach( object item in newItems )
+ {
+ ZoomboxView view = ZoomboxViewStack.GetViewFromSourceItem( item );
+ if( index >= this.Count )
+ {
+ this.Add( view );
+ }
+ else
+ {
+ this.Insert( index, view );
+ }
+ index++;
+ }
+ }
+ }
+
+ private void MonitorSource( bool monitor )
+ {
+ if( _source != null && ( _source is INotifyCollectionChanged ) )
+ {
+ if( monitor )
+ {
+ CollectionChangedEventManager.AddListener( _source as INotifyCollectionChanged, this );
+ }
+ else
+ {
+ CollectionChangedEventManager.RemoveListener( _source as INotifyCollectionChanged, this );
+ }
+ }
+ }
+
+ private void MoveViews( int oldIndex, int newIndex, IList movedItems )
+ {
+ using( new SourceAccess( this ) )
+ {
+ int currentIndex = this.Zoombox.ViewStackIndex;
+ int indexAfterMove = currentIndex;
+
+ // adjust the current index, if it was affected by the move
+ if( !( ( oldIndex < currentIndex && newIndex < currentIndex )
+ || ( oldIndex > currentIndex && newIndex > currentIndex ) ) )
+ {
+ if( currentIndex >= oldIndex && currentIndex < oldIndex + movedItems.Count )
+ {
+ indexAfterMove += newIndex - oldIndex;
+ }
+ else if( currentIndex >= newIndex )
+ {
+ indexAfterMove += movedItems.Count;
+ }
+ }
+
+ this.IsMovingViews = true;
+ try
+ {
+ for( int i = 0; i < movedItems.Count; i++ )
+ {
+ this.RemoveAt( oldIndex );
+ }
+ for( int i = 0; i < movedItems.Count; i++ )
+ {
+ this.Insert( newIndex + i, ZoomboxViewStack.GetViewFromSourceItem( movedItems[ i ] ) );
+ }
+ if( indexAfterMove != currentIndex )
+ {
+ this.Zoombox.ViewStackIndex = indexAfterMove;
+ this.Zoombox.SetCurrentViewIndex( indexAfterMove );
+ }
+ }
+ finally
+ {
+ this.IsMovingViews = false;
+ }
+ }
+ }
+
+ private void OnSourceCollectionChanged( object sender, NotifyCollectionChangedEventArgs e )
+ {
+ switch( e.Action )
+ {
+ case NotifyCollectionChangedAction.Add:
+ this.InsertViews( e.NewStartingIndex, e.NewItems );
+ break;
+
+ case NotifyCollectionChangedAction.Move:
+ this.MoveViews( e.OldStartingIndex, e.NewStartingIndex, e.OldItems );
+ break;
+
+ case NotifyCollectionChangedAction.Remove:
+ this.RemoveViews( e.OldStartingIndex, e.OldItems );
+ break;
+
+ case NotifyCollectionChangedAction.Replace:
+ this.ResetViews();
+ break;
+
+ case NotifyCollectionChangedAction.Reset:
+ this.ResetViews();
+ break;
+ }
+ }
+
+ private void ResetViews()
+ {
+ using( new SourceAccess( this ) )
+ {
+ int currentIndex = this.Zoombox.ViewStackIndex;
+ this.IsResettingViews = true;
+ try
+ {
+ this.Clear();
+ foreach( object item in _source )
+ {
+ ZoomboxView view = ZoomboxViewStack.GetViewFromSourceItem( item );
+ this.Add( view );
+ }
+
+ currentIndex = Math.Min( Math.Max( 0, currentIndex ), this.Count - 1 );
+
+ this.Zoombox.ViewStackIndex = currentIndex;
+ this.Zoombox.SetCurrentViewIndex( currentIndex );
+ this.Zoombox.RefocusView();
+ }
+ finally
+ {
+ this.IsResettingViews = false;
+ }
+ }
+ }
+
+ private void RemoveViews( int index, IList removedItems )
+ {
+ using( new SourceAccess( this ) )
+ {
+ for( int i = 0; i < removedItems.Count; i++ )
+ {
+ this.RemoveAt( index );
+ }
+ }
+ }
+
+ private void VerifyStackModification()
+ {
+ if( this.AreViewsFromSource && !this.IsChangeFromSource )
+ throw new InvalidOperationException( ErrorMessages.GetMessage( "ViewStackCannotBeManipulatedNow" ) );
+ }
+
+ #region IWeakEventListener Members
+
+ public bool ReceiveWeakEvent( Type managerType, object sender, EventArgs e )
+ {
+ if( managerType == typeof( CollectionChangedEventManager ) )
+ {
+ this.OnSourceCollectionChanged( sender, ( NotifyCollectionChangedEventArgs )e );
+ }
+ else
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ #endregion
+
+ #region Private Fields
+
+ // to save memory, store bool variables in a bit vector
+ private BitVector32 _cacheBits = new BitVector32( 0 );
+
+ #endregion
+
+ #region SourceAccess Nested Type
+
+ private sealed class SourceAccess : IDisposable
+ {
+ public SourceAccess( ZoomboxViewStack viewStack )
+ {
+ _viewStack = viewStack;
+ _viewStack.IsChangeFromSource = true;
+ }
+
+ ~SourceAccess()
+ {
+ this.Dispose();
+ }
+
+ public void Dispose()
+ {
+ _viewStack.IsChangeFromSource = false;
+ _viewStack = null;
+ GC.SuppressFinalize( this );
+ }
+
+ private ZoomboxViewStack _viewStack;
+ }
+
+ #endregion
+
+ #region CacheBits Nested Type
+
+ private enum CacheBits
+ {
+ AreViewsFromSource = 0x00000001,
+ IsChangeFromSource = 0x00000002,
+ IsResettingViews = 0x00000004,
+ IsMovingViews = 0x00000008,
+ IsSettingInitialViewAfterClear = 0x00000010,
+ }
+
+ #endregion
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewStackMode.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewStackMode.cs
new file mode 100644
index 00000000..4b296f38
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxViewStackMode.cs
@@ -0,0 +1,29 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+namespace Xceed.Wpf.Toolkit.Zoombox
+{
+ public enum ZoomboxViewStackMode
+ {
+ Auto,
+ Default,
+ Disabled,
+ Manual,
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxZoomOn.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxZoomOn.cs
new file mode 100644
index 00000000..30eb5c0a
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Zoombox/ZoomboxZoomOn.cs
@@ -0,0 +1,27 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+namespace Xceed.Wpf.Toolkit.Zoombox
+{
+ public enum ZoomboxZoomOn
+ {
+ Content = 1,
+ View,
+ }
+}
diff --git a/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln b/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln
index d0d4034b..399ab1f9 100644
--- a/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln
+++ b/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.sln
@@ -1,36 +1,18 @@
-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}"
+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", "{2C3149D9-832B-4754-A27B-898A392344B5}"
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
+ {2C3149D9-832B-4754-A27B-898A392344B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2C3149D9-832B-4754-A27B-898A392344B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2C3149D9-832B-4754-A27B-898A392344B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2C3149D9-832B-4754-A27B-898A392344B5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.vssscc b/ExtendedWPFToolkitSolution_35/ExtendedWPFToolkit.vssscc
deleted file mode 100644
index 794f014c..00000000
--- a/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/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.Designer.cs b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.Designer.cs
deleted file mode 100644
index c3711362..00000000
--- a/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/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.resx b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Resources.resx
deleted file mode 100644
index ffecec85..00000000
--- a/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/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.Designer.cs b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.Designer.cs
deleted file mode 100644
index edee43de..00000000
--- a/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/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.settings b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj.vspscc b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended.Examples/WPFToolkit.Extended.Examples.csproj.vspscc
deleted file mode 100644
index feffdeca..00000000
--- a/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/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/AssemblyVersionInfo.cs
new file mode 100644
index 00000000..74011485
--- /dev/null
+++ b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/AssemblyVersionInfo.cs
@@ -0,0 +1,39 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+[assembly: System.Reflection.AssemblyVersion( _XceedVersionInfo.Version )]
+
+internal static class _XceedVersionInfo
+{
+ [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
+ public const string BaseVersion = "1.7";
+ [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
+ public const string Version = BaseVersion +
+ _XceedVersionInfoCommon.Build;
+ [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
+ public const string PublicKeyToken = "ba83ff368b7563c6";
+ [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
+ public const string DesignFullName =
+ "Xceed.Wpf.Toolkit,Version=" +
+ Version +
+ ",Culture=neutral,PublicKeyToken=" + PublicKeyToken;
+
+
+
+}
diff --git a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/AssemblyVersionInfoCommon.cs b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/AssemblyVersionInfoCommon.cs
new file mode 100644
index 00000000..d9308cb5
--- /dev/null
+++ b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/AssemblyVersionInfoCommon.cs
@@ -0,0 +1,25 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+internal static class _XceedVersionInfoCommon
+{
+[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
+ public const string Build = ".*";
+
+}
diff --git a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/Implementation/BusyIndicator.cs b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/Implementation/BusyIndicator.cs
new file mode 100644
index 00000000..4a9e2678
--- /dev/null
+++ b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/Implementation/BusyIndicator.cs
@@ -0,0 +1,325 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+namespace Xceed.Wpf.Toolkit
+{
+ ///
+ /// 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/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/Implementation/VisualStates.BusyIndicator.cs b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/Implementation/VisualStates.BusyIndicator.cs
new file mode 100644
index 00000000..fa49289d
--- /dev/null
+++ b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/Implementation/VisualStates.BusyIndicator.cs
@@ -0,0 +1,54 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+namespace Xceed.Wpf.Toolkit
+{
+ 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/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml
index ba82b69e..0e0b10cb 100644
--- a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/BusyIndicator/Themes/Generic.xaml
@@ -1,4 +1,4 @@
-
+ **********************************************************************-->
+
-
\ No newline at end of file
+
diff --git a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ButtonSpinner.cs b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ButtonSpinner.cs
new file mode 100644
index 00000000..f05a0872
--- /dev/null
+++ b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ButtonSpinner.cs
@@ -0,0 +1,280 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System.Windows;
+using System.Windows.Controls.Primitives;
+using System.Windows.Input;
+using System.Windows.Markup;
+
+namespace Xceed.Wpf.Toolkit
+{
+ ///
+ /// Represents a spinner control that includes two Buttons.
+ ///
+ [TemplatePart( Name = PART_IncreaseButton, Type = typeof( ButtonBase ) )]
+ [TemplatePart( Name = PART_DecreaseButton, Type = typeof( ButtonBase ) )]
+ [ContentProperty( "Content" )]
+ public class ButtonSpinner : Spinner
+ {
+ private const string PART_IncreaseButton = "PART_IncreaseButton";
+ private const string PART_DecreaseButton = "PART_DecreaseButton";
+
+ #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( PART_IncreaseButton ) as ButtonBase;
+ DecreaseButton = GetTemplateChild( PART_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/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinDirection.cs b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinDirection.cs
new file mode 100644
index 00000000..22bd9a6d
--- /dev/null
+++ b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinDirection.cs
@@ -0,0 +1,38 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+namespace Xceed.Wpf.Toolkit
+{
+ ///
+ /// 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/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinEventArgs.cs
new file mode 100644
index 00000000..bd432c2b
--- /dev/null
+++ b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/SpinEventArgs.cs
@@ -0,0 +1,50 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System.Windows;
+
+namespace Xceed.Wpf.Toolkit
+{
+ ///
+ /// 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/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/Spinner.cs b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/Spinner.cs
new file mode 100644
index 00000000..3ca8296b
--- /dev/null
+++ b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/Spinner.cs
@@ -0,0 +1,104 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Xceed.Wpf.Toolkit
+{
+ ///
+ /// 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/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ValidSpinDirections.cs b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ValidSpinDirections.cs
new file mode 100644
index 00000000..48108690
--- /dev/null
+++ b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Implementation/ValidSpinDirections.cs
@@ -0,0 +1,45 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System;
+
+namespace Xceed.Wpf.Toolkit
+{
+ ///
+ /// 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/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml
index 53f746d3..adaa75f3 100644
--- a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/ButtonSpinner/Themes/Generic.xaml
@@ -1,4 +1,4 @@
-
+ **********************************************************************-->
+
-
\ No newline at end of file
+
diff --git a/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs
new file mode 100644
index 00000000..c5aae90b
--- /dev/null
+++ b/ExtendedWPFToolkitSolution_35/Src/WPFToolkit.Extended/Calculator/Implementation/Calculator.cs
@@ -0,0 +1,549 @@
+/************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2010-2012 Xceed Software Inc.
+
+ This program is provided to you under the terms of the Microsoft Public
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+
+ This program can be provided to you by Xceed Software Inc. under a
+ proprietary commercial license agreement for use in non-Open Source
+ projects. The commercial version of Extended WPF Toolkit also includes
+ priority technical support, commercial updates, and many additional
+ useful WPF controls if you license Xceed Business Suite for WPF.
+
+ Visit http://xceed.com and follow @datagrid on Twitter.
+
+ **********************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Threading;
+using Xceed.Wpf.Toolkit.Core.Utilities;
+
+namespace Xceed.Wpf.Toolkit
+{
+ [TemplatePart( Name = PART_CalculatorButtonPanel, Type = typeof( ContentControl ) )]
+ public class Calculator : Control
+ {
+ private const string PART_CalculatorButtonPanel = "PART_CalculatorButtonPanel";
+
+ #region Members
+
+ private ContentControl _buttonPanel;
+ private bool _showNewNumber = true;
+ private decimal _previousValue;
+ private Operation _lastOperation = Operation.None;
+ private CalculatorButtonType _lastButtonPressed;
+ private readonly Dictionary