diff --git a/ExtendedWPFToolkitSolution/APD.Wpf.Xceed.ToolKit.Full.nuspec b/ExtendedWPFToolkitSolution/APD.Wpf.Xceed.ToolKit.Full.nuspec
new file mode 100644
index 00000000..e8212df6
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/APD.Wpf.Xceed.ToolKit.Full.nuspec
@@ -0,0 +1,18 @@
+
+
+
+ APD.Wpf.Xceed.ToolKit.Full
+ 0.0.0.0
+ APD Xceed ToolKit Full
+ Our fork of Xceed's ToolKit. Contain the full Xceed Wpf Tookit - Including avalon dock.
+ Xceed, APD Communications
+ Xceed & APD Communications
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs
index c6ea985d..2c57bb8b 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs
@@ -21,7 +21,7 @@
internal static class _XceedVersionInfo
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
- public const string BaseVersion = "3.4";
+ public const string BaseVersion = "3.5";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml
index 0bbf9bac..051479d8 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml
@@ -578,7 +578,8 @@
-
+
+ Grid.Row="0"
+ Grid.RowSpan="3" />
+ Grid.Row="0"
+ Grid.RowSpan="3" />
-
@@ -1268,7 +1273,7 @@
+ Content="{Binding LayoutItem.View.Content, RelativeSource={RelativeSource TemplatedParent}}" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ This feature is only available in the "Plus" version.
+
+
+ Click here for more details about Xceed Toolkit Plus for WPF.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiCalendarView.xaml.cs.txt b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiCalendarView.xaml.cs.txt
index e6f2523b..9893c4fe 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiCalendarView.xaml.cs.txt
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiCalendarView.xaml.cs.txt
@@ -2,7 +2,7 @@
Toolkit for WPF
- Copyright (C) 2007-2014 Xceed Software Inc.
+ Copyright (C) 2007-2017 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
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiColumnComboBoxView.xaml.cs.txt b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiColumnComboBoxView.xaml.cs.txt
index e32ef1f5..4274e956 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiColumnComboBoxView.xaml.cs.txt
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiColumnComboBoxView.xaml.cs.txt
@@ -15,7 +15,6 @@
*************************************************************************************/
using System.Data;
-using Xceed.Wpf.DataGrid;
using System.Diagnostics;
using System.Windows.Controls;
using System.Windows.Data;
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ThemingCoreWPFView.xaml.cs.txt b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ThemingCoreWPFView.xaml.cs.txt
index 90768ddf..8cd6e595 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ThemingCoreWPFView.xaml.cs.txt
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ThemingCoreWPFView.xaml.cs.txt
@@ -23,7 +23,6 @@ using Xceed.Wpf.Toolkit;
using System.Windows.Controls.Primitives;
using System;
using System.Data;
-using Xceed.Wpf.DataGrid.Views;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Diagnostics;
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ThemingDataGridView.xaml.cs.txt b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ThemingDataGridView.xaml.cs.txt
index 90d31027..4f50db53 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ThemingDataGridView.xaml.cs.txt
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ThemingDataGridView.xaml.cs.txt
@@ -26,7 +26,7 @@ using Xceed.Wpf.Samples.SampleData;
using System.Data;
using System.Diagnostics;
using System.Windows.Media;
-using Xceed.Wpf.DataGrid.Views;
+
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Theming.Views
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/TimeSpanView.xaml.txt b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/TimeSpanView.xaml.txt
index 2e32ea8d..26c65407 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/TimeSpanView.xaml.txt
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/TimeSpanView.xaml.txt
@@ -21,169 +21,183 @@
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
Title="TimeSpanUpDown">
-
-
- The TimeSpanUpDown controls let you increment or decrement a time over 24 hours. The Format is Days.Hours:Minutes:Seconds.Milliseconds.
-
-
+
+
+ The TimeSpanUpDown controls let you increment or decrement a time over 24 hours. The Format is Days.Hours:Minutes:Seconds.Milliseconds.
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml
index 279ed02b..30dca2e7 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml
@@ -516,7 +516,8 @@
+ SampleType="{x:Type samples:DataGrid.Views.DataGridView}"
+ IsPlusOnlyFeature="True" />
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/AssemblyInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/AssemblyInfo.cs
index 798e9a20..19e7f9ca 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/AssemblyInfo.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/AssemblyInfo.cs
@@ -49,8 +49,8 @@ using System.Windows;
// 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( "3.4.*" )]
-[assembly: AssemblyFileVersion( "3.4.0.0" )]
+[assembly: AssemblyVersion( "3.5.*" )]
+[assembly: AssemblyFileVersion( "3.5.0.0" )]
#pragma warning disable 1699
[assembly: AssemblyDelaySign( false )]
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/Resources.resx b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/Resources.resx
index 562a3aac..1900d5b0 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/Resources.resx
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/Resources.resx
@@ -3,7 +3,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ This feature is only available in the "Plus" version.
+
+
+ Click here for more details about Xceed Toolkit Plus for WPF.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/DataGrid/Views/DataGridView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/DataGrid/Views/DataGridView.xaml.cs
index c380b492..513dc2c2 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/DataGrid/Views/DataGridView.xaml.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/DataGrid/Views/DataGridView.xaml.cs
@@ -14,11 +14,7 @@
***********************************************************************************/
-using System.Data;
-using Xceed.Wpf.DataGrid;
-using System.Diagnostics;
using Xceed.Wpf.Samples.SampleData;
-using System.Collections.ObjectModel;
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.DataGrid.Views
{
@@ -29,7 +25,6 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.DataGrid.Views
{
public DataGridView()
{
- this.DataContext = SampleDataProvider.GetOrders();
InitializeComponent();
}
}
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/DataGrid/Views/MultiColumnComboBoxView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/DataGrid/Views/MultiColumnComboBoxView.xaml.cs
index e32ef1f5..4274e956 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/DataGrid/Views/MultiColumnComboBoxView.xaml.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/DataGrid/Views/MultiColumnComboBoxView.xaml.cs
@@ -15,7 +15,6 @@
*************************************************************************************/
using System.Data;
-using Xceed.Wpf.DataGrid;
using System.Diagnostics;
using System.Windows.Controls;
using System.Windows.Data;
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MultiCalendar/Views/MultiCalendarView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MultiCalendar/Views/MultiCalendarView.xaml.cs
index e6f2523b..9893c4fe 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MultiCalendar/Views/MultiCalendarView.xaml.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MultiCalendar/Views/MultiCalendarView.xaml.cs
@@ -2,7 +2,7 @@
Toolkit for WPF
- Copyright (C) 2007-2014 Xceed Software Inc.
+ Copyright (C) 2007-2017 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
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Theming/Views/ThemingCoreWPFView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Theming/Views/ThemingCoreWPFView.xaml.cs
index 90768ddf..8cd6e595 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Theming/Views/ThemingCoreWPFView.xaml.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Theming/Views/ThemingCoreWPFView.xaml.cs
@@ -23,7 +23,6 @@ using Xceed.Wpf.Toolkit;
using System.Windows.Controls.Primitives;
using System;
using System.Data;
-using Xceed.Wpf.DataGrid.Views;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Diagnostics;
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Theming/Views/ThemingDataGridView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Theming/Views/ThemingDataGridView.xaml.cs
index 90d31027..4f50db53 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Theming/Views/ThemingDataGridView.xaml.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Theming/Views/ThemingDataGridView.xaml.cs
@@ -26,7 +26,7 @@ using Xceed.Wpf.Samples.SampleData;
using System.Data;
using System.Diagnostics;
using System.Windows.Media;
-using Xceed.Wpf.DataGrid.Views;
+
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Theming.Views
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/TimeSpan/Views/TimeSpanView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/TimeSpan/Views/TimeSpanView.xaml
index 2e32ea8d..26c65407 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/TimeSpan/Views/TimeSpanView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/TimeSpan/Views/TimeSpanView.xaml
@@ -21,169 +21,183 @@
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
Title="TimeSpanUpDown">
-
-
- The TimeSpanUpDown controls let you increment or decrement a time over 24 hours. The Format is Days.Hours:Minutes:Seconds.Milliseconds.
-
-
+
+
+ The TimeSpanUpDown controls let you increment or decrement a time over 24 hours. The Format is Days.Hours:Minutes:Seconds.Milliseconds.
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Xceed.Wpf.Toolkit.LiveExplorer.csproj b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Xceed.Wpf.Toolkit.LiveExplorer.csproj
index 75a2ecac..8b58b09a 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Xceed.Wpf.Toolkit.LiveExplorer.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Xceed.Wpf.Toolkit.LiveExplorer.csproj
@@ -101,10 +101,6 @@
{DB81988F-E0F2-45A0-A1FD-8C37F3D35244}
Xceed.Wpf.AvalonDock
-
- {63648392-6CE9-4A60-96D4-F9FD718D29B0}
- Xceed.Wpf.DataGrid
-
{72E591D6-8F83-4D8C-8F67-9C325E623234}
Xceed.Wpf.Toolkit
@@ -179,7 +175,6 @@
ColorView.xaml
-
DataGridView.xaml
@@ -1426,6 +1421,9 @@
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Debug/Xceed.Wpf.Toolkit.LiveExplorer.vshost.exe.config b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Debug/Xceed.Wpf.Toolkit.LiveExplorer.vshost.exe.config
deleted file mode 100644
index 23366171..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Debug/Xceed.Wpf.Toolkit.LiveExplorer.vshost.exe.config
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.application b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.application
deleted file mode 100644
index 85f8d7ed..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.application
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ob1xtL0NFoBuWOm6eWhtN/R2wCI=
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.exe.config b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.exe.config
deleted file mode 100644
index 23366171..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.exe.config
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.exe.manifest b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.exe.manifest
deleted file mode 100644
index df3d3358..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.exe.manifest
+++ /dev/null
@@ -1,298 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- fJ+tiQsbOQwfGd3itpkyUquu3RA=
-
-
-
-
-
-
-
-
-
-
-
- iK9HDffv2Q6qrh3sPkrXxIxhPYQ=
-
-
-
-
-
-
-
-
-
-
-
- 5BfdaqLid+/kyJCQX52bEt2rEU8=
-
-
-
-
-
-
-
-
-
-
-
- FmHDLfKoQyzMD6VzydX31KxFVwQ=
-
-
-
-
-
-
-
-
-
-
-
- HysaXhpNt3jXo9+ZbwTHhmqc/ZI=
-
-
-
-
-
-
-
-
-
-
-
- wWS+24oJwFk6HrRmBg5TmTuOSrI=
-
-
-
-
-
-
-
-
-
-
-
- fLJrmg3/6gkuHVpvm48rHU0PQu8=
-
-
-
-
-
-
-
-
-
-
-
- APZdP9nOSFv9/VEayZ7e1u3YQwg=
-
-
-
-
-
-
-
-
-
-
-
- dSmBWR4oV60hXzMEcu5Pzv78324=
-
-
-
-
-
-
-
-
-
-
-
- v9u0pYRMOsstuMutmXdyhxwVSoE=
-
-
-
-
-
-
-
-
-
-
-
- aLiV5N9DeMFHFId42Hauinb7z10=
-
-
-
-
-
-
-
-
-
-
-
- pHMnOAZhLdiVxLW8WVr7oKSNvzc=
-
-
-
-
-
-
-
-
-
-
-
- 6HW2YrRgZzx55mSInWqY5G2Rmtg=
-
-
-
-
-
-
-
-
-
-
-
- dk2/e/lvOlxMqaSBa7vwkuVMmWY=
-
-
-
-
-
-
-
-
-
-
-
- K9KOIk/JBcp0My6g71prOBaVSso=
-
-
-
-
-
-
-
-
-
-
-
- h7GeHgNOmosQ3JAdBzkZH1g8UZs=
-
-
-
-
-
-
-
-
-
-
-
- rzSCAw1wGgE9FFQGxPlp62E0H3E=
-
-
-
-
-
-
-
-
-
-
-
- e/H+bvBidZ6C9yzoGNEGVxWvT3Q=
-
-
-
-
-
-
-
-
-
-
-
- vsLAPrssl9QqQjMJSoMqV2acKVI=
-
-
-
-
-
-
-
-
-
- +gOYudfK6KDh/6TPnBz61fPTSDc=
-
-
-
-
-
-
-
-
- I+4TtxHlXRDLuy+spjHIoJq5EXc=
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.vshost.application b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.vshost.application
deleted file mode 100644
index 85f8d7ed..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.vshost.application
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ob1xtL0NFoBuWOm6eWhtN/R2wCI=
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.vshost.exe.config b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.vshost.exe.config
deleted file mode 100644
index 23366171..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.vshost.exe.config
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.vshost.exe.manifest b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.vshost.exe.manifest
deleted file mode 100644
index df3d3358..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/bin/Release/Xceed.Wpf.Toolkit.LiveExplorer.vshost.exe.manifest
+++ /dev/null
@@ -1,298 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- fJ+tiQsbOQwfGd3itpkyUquu3RA=
-
-
-
-
-
-
-
-
-
-
-
- iK9HDffv2Q6qrh3sPkrXxIxhPYQ=
-
-
-
-
-
-
-
-
-
-
-
- 5BfdaqLid+/kyJCQX52bEt2rEU8=
-
-
-
-
-
-
-
-
-
-
-
- FmHDLfKoQyzMD6VzydX31KxFVwQ=
-
-
-
-
-
-
-
-
-
-
-
- HysaXhpNt3jXo9+ZbwTHhmqc/ZI=
-
-
-
-
-
-
-
-
-
-
-
- wWS+24oJwFk6HrRmBg5TmTuOSrI=
-
-
-
-
-
-
-
-
-
-
-
- fLJrmg3/6gkuHVpvm48rHU0PQu8=
-
-
-
-
-
-
-
-
-
-
-
- APZdP9nOSFv9/VEayZ7e1u3YQwg=
-
-
-
-
-
-
-
-
-
-
-
- dSmBWR4oV60hXzMEcu5Pzv78324=
-
-
-
-
-
-
-
-
-
-
-
- v9u0pYRMOsstuMutmXdyhxwVSoE=
-
-
-
-
-
-
-
-
-
-
-
- aLiV5N9DeMFHFId42Hauinb7z10=
-
-
-
-
-
-
-
-
-
-
-
- pHMnOAZhLdiVxLW8WVr7oKSNvzc=
-
-
-
-
-
-
-
-
-
-
-
- 6HW2YrRgZzx55mSInWqY5G2Rmtg=
-
-
-
-
-
-
-
-
-
-
-
- dk2/e/lvOlxMqaSBa7vwkuVMmWY=
-
-
-
-
-
-
-
-
-
-
-
- K9KOIk/JBcp0My6g71prOBaVSso=
-
-
-
-
-
-
-
-
-
-
-
- h7GeHgNOmosQ3JAdBzkZH1g8UZs=
-
-
-
-
-
-
-
-
-
-
-
- rzSCAw1wGgE9FFQGxPlp62E0H3E=
-
-
-
-
-
-
-
-
-
-
-
- e/H+bvBidZ6C9yzoGNEGVxWvT3Q=
-
-
-
-
-
-
-
-
-
-
-
- vsLAPrssl9QqQjMJSoMqV2acKVI=
-
-
-
-
-
-
-
-
-
- +gOYudfK6KDh/6TPnBz61fPTSDc=
-
-
-
-
-
-
-
-
- I+4TtxHlXRDLuy+spjHIoJq5EXc=
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Debug/Samples/Theming/Views/ThemingDataGridView.g.i.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Debug/Samples/Theming/Views/ThemingDataGridView.g.i.cs
index 8d343050..67966622 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Debug/Samples/Theming/Views/ThemingDataGridView.g.i.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Debug/Samples/Theming/Views/ThemingDataGridView.g.i.cs
@@ -29,11 +29,6 @@ using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
-using Xceed.Wpf.DataGrid;
-using Xceed.Wpf.DataGrid.Converters;
-using Xceed.Wpf.DataGrid.Markup;
-using Xceed.Wpf.DataGrid.ValidationRules;
-using Xceed.Wpf.DataGrid.Views;
using Xceed.Wpf.Toolkit;
using Xceed.Wpf.Toolkit.Chromes;
using Xceed.Wpf.Toolkit.Core.Converters;
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Debug/Samples/Theming/Views/ThemingExtendedToolkitView.g.i.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Debug/Samples/Theming/Views/ThemingExtendedToolkitView.g.i.cs
index 6214c03d..23c36127 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Debug/Samples/Theming/Views/ThemingExtendedToolkitView.g.i.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Debug/Samples/Theming/Views/ThemingExtendedToolkitView.g.i.cs
@@ -29,11 +29,6 @@ using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
-using Xceed.Wpf.DataGrid;
-using Xceed.Wpf.DataGrid.Converters;
-using Xceed.Wpf.DataGrid.Markup;
-using Xceed.Wpf.DataGrid.ValidationRules;
-using Xceed.Wpf.DataGrid.Views;
using Xceed.Wpf.Toolkit;
using Xceed.Wpf.Toolkit.Chromes;
using Xceed.Wpf.Toolkit.Core.Converters;
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Debug/Xceed.Wpf.Toolkit.LiveExplorer.csproj.FileListAbsolute.txt b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Debug/Xceed.Wpf.Toolkit.LiveExplorer.csproj.FileListAbsolute.txt
index 218309e4..fcd77f01 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Debug/Xceed.Wpf.Toolkit.LiveExplorer.csproj.FileListAbsolute.txt
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Debug/Xceed.Wpf.Toolkit.LiveExplorer.csproj.FileListAbsolute.txt
@@ -1,242 +1,239 @@
-D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.LiveExplorer.exe.config
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.csprojAssemblyReference.cache
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Resources\LiveExplorerScrollViewer.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Resources\TextBlockStyles.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\BusyIndicator\Resources\Common.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Resources\CommonResources.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Resources\LastNameUserControlEditor.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\ItemTemplates\Common.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Resources\FancyStyles.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Resources\WindowModelEditor.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\App.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\HomeView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\MainWindow.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\BusyIndicator\Views\BusyIndicatorCustomContentTemplateView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\BusyIndicator\Views\BusyIndicatorCustomContentView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\BusyIndicator\Views\BusyIndicatorView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Button\Views\IconButtonView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Button\Views\ButtonSpinnerView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Button\Views\DropDownSplitButtonView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Calculator\Views\CalculatorView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartAxisView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartLegendView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartSeriesBasicTypesView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartSeriesDataPointsBindingView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingAxesGridView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingColumnSeriesView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingLineSeriesView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingPieSeriesView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\CheckLists\Views\CheckListsView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Color\Views\ColorView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\DataGrid\Views\DataGridView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\DataGrid\Views\MultiColumnComboBoxView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\DateTime\Views\DateTimeView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\FilePicker\Views\FilePickerView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Gauge\Views\RadialGaugeView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\ListBox\Views\ListBoxView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Magnifier\Views\MagnifierView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialHamburgerView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialComboBoxView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialListBoxView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialToolTipView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialDropDownView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialSwitchView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialFrameView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialTabsView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialProgressBarCircularView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialProgressBarView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialRadioButtonView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialCheckBoxView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialToastView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialSliderView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialTextFieldView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialButtonView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialControlsView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MultiCalendar\Views\MultiCalendarView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Numeric\Views\NumericView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Panels\Views\SwitchPanelView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Pie\Views\PieChartView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Pie\Views\PieProgressView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Pie\Views\PieView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PileFlowPanel\Views\PileFlowPanelView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Resources\LastNameUserControlEditor.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridPropertyItemStyleView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridDefinitionKeyView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridEditorDefinitionsView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridAttributesView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridSelectedObjectView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridCustomPropertyView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridPropertiesView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridPropertiesSourceView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridBindingToStructsView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridCategoryOrderView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridCustomEditorsView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridDefaultEditorsView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridDisplayLocalizationView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridMultiSelectedObjectsView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridSpecifyingPropertiesView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridExpandingNonPrimitivesView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\RangeSlider\Views\RangeSliderView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Rating\Views\RatingView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\SlideShow\Views\SlideShowView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\AutoSelectTextboxView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\MaskedTextboxView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\MultiLineTextEditorView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\RichTextboxView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\WatermarkPasswordBoxView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\WatermarkTextboxView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingCoreWPFView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingDataGridView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingExtendedToolkitView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingListBoxView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\TimelinePanel\Views\TimelinePanelView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\TimeSpan\Views\TimeSpanView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\ToggleSwitch\Views\ToggleSwitchView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\TokenizedTextBoxView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\WatermarkComboBox\Views\WatermarkComboBoxView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Resources\WindowModelEditor.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Views\ChildWindowView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Views\StyleableWindowView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Views\WindowContainerView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Wizard\Views\WizardView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Zoombox\Views\ZoomboxView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\App.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\GeneratedInternalTypeHelper.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer_MarkupCompile.cache
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer_MarkupCompile.lref
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.exe
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.pdb
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.LiveExplorer.exe.config
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.LiveExplorer.exe.manifest
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.LiveExplorer.application
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.LiveExplorer.exe
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.LiveExplorer.pdb
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\fr\Xceed.Wpf.Toolkit.LiveExplorer.resources.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Aero.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Metro.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.Themes.VS2010.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.DataGrid.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Samples.SampleData.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Aero.pdb
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Metro.pdb
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.Themes.VS2010.pdb
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.pdb
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.DataGrid.pdb
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.pdb
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\de\Xceed.Wpf.AvalonDock.resources.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\es\Xceed.Wpf.AvalonDock.resources.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\fr\Xceed.Wpf.AvalonDock.resources.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\hu\Xceed.Wpf.AvalonDock.resources.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\it\Xceed.Wpf.AvalonDock.resources.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\pt-BR\Xceed.Wpf.AvalonDock.resources.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\ro\Xceed.Wpf.AvalonDock.resources.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\ru\Xceed.Wpf.AvalonDock.resources.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\sv\Xceed.Wpf.AvalonDock.resources.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\zh-Hans\Xceed.Wpf.AvalonDock.resources.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\AvalonDock\Views\AvalonDockView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingAvalonDockView.g.cs
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\HomeView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\MainWindow.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\AvalonDock\Views\AvalonDockView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\BusyIndicator\Views\BusyIndicatorCustomContentTemplateView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\BusyIndicator\Views\BusyIndicatorCustomContentView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\BusyIndicator\Views\BusyIndicatorView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Button\Views\IconButtonView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Button\Views\ButtonSpinnerView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Button\Views\DropDownSplitButtonView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Calculator\Views\CalculatorView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartAxisView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartLegendView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartSeriesBasicTypesView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartSeriesDataPointsBindingView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingAxesGridView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingColumnSeriesView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingLineSeriesView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingPieSeriesView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\CheckLists\Views\CheckListsView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Color\Views\ColorView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\DataGrid\Views\DataGridView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\DataGrid\Views\MultiColumnComboBoxView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\DateTime\Views\DateTimeView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\FilePicker\Views\FilePickerView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Gauge\Views\RadialGaugeView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\ListBox\Views\ListBoxView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Magnifier\Views\MagnifierView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialHamburgerView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialComboBoxView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialListBoxView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialToolTipView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialDropDownView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialSwitchView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialFrameView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialTabsView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialProgressBarCircularView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialProgressBarView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialRadioButtonView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialCheckBoxView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialToastView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialSliderView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialTextFieldView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialButtonView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialControlsView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MultiCalendar\Views\MultiCalendarView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Numeric\Views\NumericView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Panels\Views\SwitchPanelView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Pie\Views\PieChartView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Pie\Views\PieProgressView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Pie\Views\PieView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PileFlowPanel\Views\PileFlowPanelView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridPropertyItemStyleView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridDefinitionKeyView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridEditorDefinitionsView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridAttributesView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridSelectedObjectView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridCustomPropertyView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridPropertiesView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridPropertiesSourceView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridBindingToStructsView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridCategoryOrderView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridCustomEditorsView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridDefaultEditorsView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridDisplayLocalizationView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridMultiSelectedObjectsView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridSpecifyingPropertiesView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridExpandingNonPrimitivesView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\RangeSlider\Views\RangeSliderView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Rating\Views\RatingView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\SlideShow\Views\SlideShowView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\AutoSelectTextboxView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\MaskedTextboxView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\MultiLineTextEditorView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\RichTextboxView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\WatermarkPasswordBoxView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\WatermarkTextboxView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingAvalonDockView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingCoreWPFView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingDataGridView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingExtendedToolkitView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingListBoxView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\TimelinePanel\Views\TimelinePanelView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\TimeSpan\Views\TimeSpanView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\ToggleSwitch\Views\ToggleSwitchView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\TokenizedTextBoxView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\WatermarkComboBox\Views\WatermarkComboBoxView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Views\ChildWindowView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Views\StyleableWindowView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Views\WindowContainerView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Wizard\Views\WizardView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Zoombox\Views\ZoomboxView.baml
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.g.resources
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.Properties.Resources.resources
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views.DisplayLocalizationRes.resources
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views.DisplayLocalizationRes.fr.resources
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.csproj.GenerateResource.cache
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.csproj.CoreCompileInputs.cache
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\fr\Xceed.Wpf.Toolkit.LiveExplorer.resources.dll
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.exe.manifest
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.application
-C:\Users\johannes.brittain\source\repos\wpftoolkit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.csproj.CopyComplete
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.LiveExplorer.exe.config
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.LiveExplorer.exe.manifest
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.LiveExplorer.application
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.LiveExplorer.exe
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.LiveExplorer.pdb
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\fr\Xceed.Wpf.Toolkit.LiveExplorer.resources.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Aero.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Metro.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.Themes.VS2010.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Samples.SampleData.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Aero.pdb
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Metro.pdb
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.Themes.VS2010.pdb
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.AvalonDock.pdb
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\Xceed.Wpf.Toolkit.pdb
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\de\Xceed.Wpf.AvalonDock.resources.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\es\Xceed.Wpf.AvalonDock.resources.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\fr\Xceed.Wpf.AvalonDock.resources.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\hu\Xceed.Wpf.AvalonDock.resources.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\it\Xceed.Wpf.AvalonDock.resources.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\pt-BR\Xceed.Wpf.AvalonDock.resources.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\ro\Xceed.Wpf.AvalonDock.resources.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\ru\Xceed.Wpf.AvalonDock.resources.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\sv\Xceed.Wpf.AvalonDock.resources.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\bin\Debug\zh-Hans\Xceed.Wpf.AvalonDock.resources.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.csprojAssemblyReference.cache
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Resources\LiveExplorerScrollViewer.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Resources\TextBlockStyles.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\BusyIndicator\Resources\Common.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Resources\CommonResources.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Resources\LastNameUserControlEditor.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\ItemTemplates\Common.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Resources\FancyStyles.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Resources\WindowModelEditor.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\App.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\HomeView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\MainWindow.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\AvalonDock\Views\AvalonDockView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\BusyIndicator\Views\BusyIndicatorCustomContentTemplateView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\BusyIndicator\Views\BusyIndicatorCustomContentView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\BusyIndicator\Views\BusyIndicatorView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Button\Views\IconButtonView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Button\Views\ButtonSpinnerView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Button\Views\DropDownSplitButtonView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Calculator\Views\CalculatorView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartAxisView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartLegendView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartSeriesBasicTypesView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartSeriesDataPointsBindingView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingAxesGridView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingColumnSeriesView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingLineSeriesView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingPieSeriesView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\CheckLists\Views\CheckListsView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Color\Views\ColorView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\DataGrid\Views\DataGridView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\DataGrid\Views\MultiColumnComboBoxView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\DateTime\Views\DateTimeView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\FilePicker\Views\FilePickerView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Gauge\Views\RadialGaugeView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\ListBox\Views\ListBoxView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Magnifier\Views\MagnifierView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialHamburgerView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialComboBoxView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialListBoxView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialToolTipView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialDropDownView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialSwitchView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialFrameView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialTabsView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialProgressBarCircularView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialProgressBarView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialRadioButtonView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialCheckBoxView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialToastView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialSliderView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialTextFieldView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialButtonView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialControlsView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MultiCalendar\Views\MultiCalendarView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Numeric\Views\NumericView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Panels\Views\SwitchPanelView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Pie\Views\PieChartView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Pie\Views\PieProgressView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Pie\Views\PieView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PileFlowPanel\Views\PileFlowPanelView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Resources\LastNameUserControlEditor.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridPropertyItemStyleView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridDefinitionKeyView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridEditorDefinitionsView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridAttributesView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridSelectedObjectView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridCustomPropertyView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridPropertiesView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridPropertiesSourceView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridBindingToStructsView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridCategoryOrderView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridCustomEditorsView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridDefaultEditorsView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridDisplayLocalizationView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridMultiSelectedObjectsView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridSpecifyingPropertiesView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridExpandingNonPrimitivesView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\RangeSlider\Views\RangeSliderView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Rating\Views\RatingView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\SlideShow\Views\SlideShowView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\AutoSelectTextboxView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\MaskedTextboxView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\MultiLineTextEditorView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\RichTextboxView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\WatermarkPasswordBoxView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\WatermarkTextboxView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingAvalonDockView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingCoreWPFView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingDataGridView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingExtendedToolkitView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingListBoxView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\TimelinePanel\Views\TimelinePanelView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\TimeSpan\Views\TimeSpanView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\ToggleSwitch\Views\ToggleSwitchView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\TokenizedTextBoxView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\WatermarkComboBox\Views\WatermarkComboBoxView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Resources\WindowModelEditor.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Views\ChildWindowView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Views\StyleableWindowView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Views\WindowContainerView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Wizard\Views\WizardView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Zoombox\Views\ZoomboxView.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\App.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\GeneratedInternalTypeHelper.g.cs
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer_MarkupCompile.cache
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer_MarkupCompile.lref
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\HomeView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\MainWindow.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\AvalonDock\Views\AvalonDockView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\BusyIndicator\Views\BusyIndicatorCustomContentTemplateView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\BusyIndicator\Views\BusyIndicatorCustomContentView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\BusyIndicator\Views\BusyIndicatorView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Button\Views\IconButtonView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Button\Views\ButtonSpinnerView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Button\Views\DropDownSplitButtonView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Calculator\Views\CalculatorView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartAxisView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartLegendView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartSeriesBasicTypesView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartSeriesDataPointsBindingView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingAxesGridView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingColumnSeriesView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingLineSeriesView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Chart\Views\ChartStylingPieSeriesView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\CheckLists\Views\CheckListsView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Color\Views\ColorView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\DataGrid\Views\DataGridView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\DataGrid\Views\MultiColumnComboBoxView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\DateTime\Views\DateTimeView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\FilePicker\Views\FilePickerView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Gauge\Views\RadialGaugeView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\ListBox\Views\ListBoxView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Magnifier\Views\MagnifierView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialHamburgerView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialComboBoxView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialListBoxView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialToolTipView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialDropDownView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialSwitchView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialFrameView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialTabsView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialProgressBarCircularView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialProgressBarView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialRadioButtonView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialCheckBoxView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialToastView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialSliderView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialTextFieldView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialButtonView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MaterialControls\Views\MaterialControlsView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\MultiCalendar\Views\MultiCalendarView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Numeric\Views\NumericView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Panels\Views\SwitchPanelView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Pie\Views\PieChartView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Pie\Views\PieProgressView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Pie\Views\PieView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PileFlowPanel\Views\PileFlowPanelView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridPropertyItemStyleView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridDefinitionKeyView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridEditorDefinitionsView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridAttributesView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridSelectedObjectView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridCustomPropertyView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridPropertiesView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridPropertiesSourceView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridBindingToStructsView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridCategoryOrderView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridCustomEditorsView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridDefaultEditorsView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridDisplayLocalizationView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridMultiSelectedObjectsView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridSpecifyingPropertiesView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridExpandingNonPrimitivesView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\PropertyGrid\Views\PropertyGridView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\RangeSlider\Views\RangeSliderView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Rating\Views\RatingView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\SlideShow\Views\SlideShowView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\AutoSelectTextboxView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\MaskedTextboxView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\MultiLineTextEditorView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\RichTextboxView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\WatermarkPasswordBoxView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\WatermarkTextboxView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingAvalonDockView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingCoreWPFView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingDataGridView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingExtendedToolkitView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Theming\Views\ThemingListBoxView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\TimelinePanel\Views\TimelinePanelView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\TimeSpan\Views\TimeSpanView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\ToggleSwitch\Views\ToggleSwitchView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Text\Views\TokenizedTextBoxView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\WatermarkComboBox\Views\WatermarkComboBoxView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Views\ChildWindowView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Views\StyleableWindowView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Window\Views\WindowContainerView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Wizard\Views\WizardView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Samples\Zoombox\Views\ZoomboxView.baml
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.g.resources
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.Properties.Resources.resources
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views.DisplayLocalizationRes.resources
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views.DisplayLocalizationRes.fr.resources
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.csproj.GenerateResource.cache
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.csproj.CoreCompileInputs.cache
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\fr\Xceed.Wpf.Toolkit.LiveExplorer.resources.dll
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.exe.manifest
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.application
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.csproj.CopyComplete
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.exe
+D:\Dev\ExtendedWPFToolkit\Release\3.5.0\OpenSource\Generated\Src\Xceed.Wpf.Toolkit.LiveExplorer\obj\x86\Debug\Xceed.Wpf.Toolkit.LiveExplorer.pdb
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/App.baml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/App.baml
deleted file mode 100644
index a1d82d8e..00000000
Binary files a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/App.baml and /dev/null differ
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/App.g.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/App.g.cs
deleted file mode 100644
index d1818617..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/App.g.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "390A483377036FCDA29DB7DD54DF5E9AF95187A7"
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-using System;
-using System.Diagnostics;
-using System.Windows;
-using System.Windows.Automation;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Markup;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Media.Effects;
-using System.Windows.Media.Imaging;
-using System.Windows.Media.Media3D;
-using System.Windows.Media.TextFormatting;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using System.Windows.Shell;
-
-
-namespace Xceed.Wpf.Toolkit.LiveExplorer {
-
-
- ///
- /// App
- ///
- public partial class App : System.Windows.Application {
-
- private bool _contentLoaded;
-
- ///
- /// InitializeComponent
- ///
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- public void InitializeComponent() {
- if (_contentLoaded) {
- return;
- }
- _contentLoaded = true;
-
- #line 19 "..\..\..\App.xaml"
- this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
-
- #line default
- #line hidden
- System.Uri resourceLocater = new System.Uri("/Xceed.Wpf.Toolkit.LiveExplorer;component/app.xaml", System.UriKind.Relative);
-
- #line 1 "..\..\..\App.xaml"
- System.Windows.Application.LoadComponent(this, resourceLocater);
-
- #line default
- #line hidden
- }
-
- ///
- /// Application Entry Point.
- ///
- [System.STAThreadAttribute()]
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- public static void Main() {
- Xceed.Wpf.Toolkit.LiveExplorer.App app = new Xceed.Wpf.Toolkit.LiveExplorer.App();
- app.InitializeComponent();
- app.Run();
- }
- }
-}
-
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/App.g.i.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/App.g.i.cs
deleted file mode 100644
index d1818617..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/App.g.i.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "390A483377036FCDA29DB7DD54DF5E9AF95187A7"
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-using System;
-using System.Diagnostics;
-using System.Windows;
-using System.Windows.Automation;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Markup;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Media.Effects;
-using System.Windows.Media.Imaging;
-using System.Windows.Media.Media3D;
-using System.Windows.Media.TextFormatting;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using System.Windows.Shell;
-
-
-namespace Xceed.Wpf.Toolkit.LiveExplorer {
-
-
- ///
- /// App
- ///
- public partial class App : System.Windows.Application {
-
- private bool _contentLoaded;
-
- ///
- /// InitializeComponent
- ///
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- public void InitializeComponent() {
- if (_contentLoaded) {
- return;
- }
- _contentLoaded = true;
-
- #line 19 "..\..\..\App.xaml"
- this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
-
- #line default
- #line hidden
- System.Uri resourceLocater = new System.Uri("/Xceed.Wpf.Toolkit.LiveExplorer;component/app.xaml", System.UriKind.Relative);
-
- #line 1 "..\..\..\App.xaml"
- System.Windows.Application.LoadComponent(this, resourceLocater);
-
- #line default
- #line hidden
- }
-
- ///
- /// Application Entry Point.
- ///
- [System.STAThreadAttribute()]
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- public static void Main() {
- Xceed.Wpf.Toolkit.LiveExplorer.App app = new Xceed.Wpf.Toolkit.LiveExplorer.App();
- app.InitializeComponent();
- app.Run();
- }
- }
-}
-
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/GeneratedInternalTypeHelper.g.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/GeneratedInternalTypeHelper.g.cs
deleted file mode 100644
index 136dd1ba..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/GeneratedInternalTypeHelper.g.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace XamlGeneratedNamespace {
-
-
- ///
- /// GeneratedInternalTypeHelper
- ///
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
-
- ///
- /// CreateInstance
- ///
- protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
- return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
- | (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
- }
-
- ///
- /// GetPropertyValue
- ///
- protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
- return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
- }
-
- ///
- /// SetPropertyValue
- ///
- protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
- propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
- }
-
- ///
- /// CreateDelegate
- ///
- protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
- return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
- | (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
- delegateType,
- handler}, null)));
- }
-
- ///
- /// AddEventHandler
- ///
- protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
- eventInfo.AddEventHandler(target, handler);
- }
- }
-}
-
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/GeneratedInternalTypeHelper.g.i.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/GeneratedInternalTypeHelper.g.i.cs
deleted file mode 100644
index 136dd1ba..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/GeneratedInternalTypeHelper.g.i.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace XamlGeneratedNamespace {
-
-
- ///
- /// GeneratedInternalTypeHelper
- ///
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
-
- ///
- /// CreateInstance
- ///
- protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
- return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
- | (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
- }
-
- ///
- /// GetPropertyValue
- ///
- protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
- return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
- }
-
- ///
- /// SetPropertyValue
- ///
- protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
- propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
- }
-
- ///
- /// CreateDelegate
- ///
- protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
- return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
- | (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
- delegateType,
- handler}, null)));
- }
-
- ///
- /// AddEventHandler
- ///
- protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
- eventInfo.AddEventHandler(target, handler);
- }
- }
-}
-
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/HomeView.baml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/HomeView.baml
deleted file mode 100644
index f3d7fa79..00000000
Binary files a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/HomeView.baml and /dev/null differ
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/HomeView.g.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/HomeView.g.cs
deleted file mode 100644
index d045b4ec..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/HomeView.g.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-#pragma checksum "..\..\..\HomeView.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "93F1D27FBDD40851D9AE66FD9A5668B70EA6451C"
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-using System;
-using System.Diagnostics;
-using System.Windows;
-using System.Windows.Automation;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Markup;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Media.Effects;
-using System.Windows.Media.Imaging;
-using System.Windows.Media.Media3D;
-using System.Windows.Media.TextFormatting;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using System.Windows.Shell;
-using Xceed.Wpf.Toolkit;
-using Xceed.Wpf.Toolkit.Chromes;
-using Xceed.Wpf.Toolkit.Core.Converters;
-using Xceed.Wpf.Toolkit.Core.Input;
-using Xceed.Wpf.Toolkit.Core.Media;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-using Xceed.Wpf.Toolkit.LiveExplorer;
-using Xceed.Wpf.Toolkit.Panels;
-using Xceed.Wpf.Toolkit.Primitives;
-using Xceed.Wpf.Toolkit.PropertyGrid;
-using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
-using Xceed.Wpf.Toolkit.PropertyGrid.Commands;
-using Xceed.Wpf.Toolkit.PropertyGrid.Converters;
-using Xceed.Wpf.Toolkit.PropertyGrid.Editors;
-using Xceed.Wpf.Toolkit.Zoombox;
-
-
-namespace Xceed.Wpf.Toolkit.LiveExplorer {
-
-
- ///
- /// HomeView
- ///
- public partial class HomeView : Xceed.Wpf.Toolkit.LiveExplorer.DemoView, System.Windows.Markup.IComponentConnector {
-
- private bool _contentLoaded;
-
- ///
- /// InitializeComponent
- ///
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- public void InitializeComponent() {
- if (_contentLoaded) {
- return;
- }
- _contentLoaded = true;
- System.Uri resourceLocater = new System.Uri("/Xceed.Wpf.Toolkit.LiveExplorer;component/homeview.xaml", System.UriKind.Relative);
-
- #line 1 "..\..\..\HomeView.xaml"
- System.Windows.Application.LoadComponent(this, resourceLocater);
-
- #line default
- #line hidden
- }
-
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal System.Delegate _CreateDelegate(System.Type delegateType, string handler) {
- return System.Delegate.CreateDelegate(delegateType, this, handler);
- }
-
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
- void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
- this._contentLoaded = true;
- }
- }
-}
-
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/HomeView.g.i.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/HomeView.g.i.cs
deleted file mode 100644
index d045b4ec..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/HomeView.g.i.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-#pragma checksum "..\..\..\HomeView.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "93F1D27FBDD40851D9AE66FD9A5668B70EA6451C"
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-using System;
-using System.Diagnostics;
-using System.Windows;
-using System.Windows.Automation;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Markup;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Media.Effects;
-using System.Windows.Media.Imaging;
-using System.Windows.Media.Media3D;
-using System.Windows.Media.TextFormatting;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using System.Windows.Shell;
-using Xceed.Wpf.Toolkit;
-using Xceed.Wpf.Toolkit.Chromes;
-using Xceed.Wpf.Toolkit.Core.Converters;
-using Xceed.Wpf.Toolkit.Core.Input;
-using Xceed.Wpf.Toolkit.Core.Media;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-using Xceed.Wpf.Toolkit.LiveExplorer;
-using Xceed.Wpf.Toolkit.Panels;
-using Xceed.Wpf.Toolkit.Primitives;
-using Xceed.Wpf.Toolkit.PropertyGrid;
-using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
-using Xceed.Wpf.Toolkit.PropertyGrid.Commands;
-using Xceed.Wpf.Toolkit.PropertyGrid.Converters;
-using Xceed.Wpf.Toolkit.PropertyGrid.Editors;
-using Xceed.Wpf.Toolkit.Zoombox;
-
-
-namespace Xceed.Wpf.Toolkit.LiveExplorer {
-
-
- ///
- /// HomeView
- ///
- public partial class HomeView : Xceed.Wpf.Toolkit.LiveExplorer.DemoView, System.Windows.Markup.IComponentConnector {
-
- private bool _contentLoaded;
-
- ///
- /// InitializeComponent
- ///
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- public void InitializeComponent() {
- if (_contentLoaded) {
- return;
- }
- _contentLoaded = true;
- System.Uri resourceLocater = new System.Uri("/Xceed.Wpf.Toolkit.LiveExplorer;component/homeview.xaml", System.UriKind.Relative);
-
- #line 1 "..\..\..\HomeView.xaml"
- System.Windows.Application.LoadComponent(this, resourceLocater);
-
- #line default
- #line hidden
- }
-
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal System.Delegate _CreateDelegate(System.Type delegateType, string handler) {
- return System.Delegate.CreateDelegate(delegateType, this, handler);
- }
-
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
- void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
- this._contentLoaded = true;
- }
- }
-}
-
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/MainWindow.baml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/MainWindow.baml
deleted file mode 100644
index 01f525b4..00000000
Binary files a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/MainWindow.baml and /dev/null differ
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/MainWindow.g.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/MainWindow.g.cs
deleted file mode 100644
index 7c4779ad..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/obj/x86/Release/MainWindow.g.cs
+++ /dev/null
@@ -1,167 +0,0 @@
-#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "3CF1EA66A822C4AC9CFE41DF8032D41B8B03A466"
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-using System;
-using System.Diagnostics;
-using System.Windows;
-using System.Windows.Automation;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Markup;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Media.Effects;
-using System.Windows.Media.Imaging;
-using System.Windows.Media.Media3D;
-using System.Windows.Media.TextFormatting;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using System.Windows.Shell;
-using Xceed.Wpf.Toolkit;
-using Xceed.Wpf.Toolkit.Chromes;
-using Xceed.Wpf.Toolkit.Core.Converters;
-using Xceed.Wpf.Toolkit.Core.Input;
-using Xceed.Wpf.Toolkit.Core.Media;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-using Xceed.Wpf.Toolkit.LiveExplorer;
-using Xceed.Wpf.Toolkit.LiveExplorer.Core;
-using Xceed.Wpf.Toolkit.LiveExplorer.Samples;
-using Xceed.Wpf.Toolkit.Panels;
-using Xceed.Wpf.Toolkit.Primitives;
-using Xceed.Wpf.Toolkit.PropertyGrid;
-using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
-using Xceed.Wpf.Toolkit.PropertyGrid.Commands;
-using Xceed.Wpf.Toolkit.PropertyGrid.Converters;
-using Xceed.Wpf.Toolkit.PropertyGrid.Editors;
-using Xceed.Wpf.Toolkit.Zoombox;
-
-
-namespace Xceed.Wpf.Toolkit.LiveExplorer {
-
-
- ///
- /// MainWindow
- ///
- public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
-
-
- #line 453 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.TreeView _treeView;
-
- #line default
- #line hidden
-
-
- #line 730 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.TextBlock VersionTextBlock;
-
- #line default
- #line hidden
-
-
- #line 751 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.ScrollViewer _contentScrollViewer;
-
- #line default
- #line hidden
-
-
- #line 808 "..\..\..\MainWindow.xaml"
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Documents.FlowDocument _flowDocumentDesc;
-
- #line default
- #line hidden
-
- private bool _contentLoaded;
-
- ///
- /// InitializeComponent
- ///
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- public void InitializeComponent() {
- if (_contentLoaded) {
- return;
- }
- _contentLoaded = true;
- System.Uri resourceLocater = new System.Uri("/Xceed.Wpf.Toolkit.LiveExplorer;component/mainwindow.xaml", System.UriKind.Relative);
-
- #line 1 "..\..\..\MainWindow.xaml"
- System.Windows.Application.LoadComponent(this, resourceLocater);
-
- #line default
- #line hidden
- }
-
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal System.Delegate _CreateDelegate(System.Type delegateType, string handler) {
- return System.Delegate.CreateDelegate(delegateType, this, handler);
- }
-
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
- void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
- switch (connectionId)
- {
- case 1:
-
- #line 447 "..\..\..\MainWindow.xaml"
- ((System.Windows.Controls.Image)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_MouseLeftButtonDown);
-
- #line default
- #line hidden
- return;
- case 2:
- this._treeView = ((System.Windows.Controls.TreeView)(target));
-
- #line 456 "..\..\..\MainWindow.xaml"
- this._treeView.SelectedItemChanged += new System.Windows.RoutedPropertyChangedEventHandler
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs
deleted file mode 100644
index 40781ee5..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs
+++ /dev/null
@@ -1,402 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Linq;
-using System.Windows;
-using System.Windows.Input;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-using System.Windows.Controls;
-using System.Collections.Generic;
-using System.Windows.Controls.Primitives;
-using Xceed.Wpf.Toolkit.Primitives;
-
-namespace Xceed.Wpf.Toolkit
-{
- [TemplatePart( Name = PART_Popup, Type = typeof( Popup ) )]
- public class CheckComboBox : SelectAllSelector
- {
- private const string PART_Popup = "PART_Popup";
-
- #region Members
-
- private ValueChangeHelper _displayMemberPathValuesChangeHelper;
- private bool _ignoreTextValueChanged;
- private Popup _popup;
- private List _initialValue = new List();
-
- #endregion
-
- #region Constructors
-
- static CheckComboBox()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( CheckComboBox ), new FrameworkPropertyMetadata( typeof( CheckComboBox ) ) );
- }
-
- public CheckComboBox()
- {
-
- Keyboard.AddKeyDownHandler( this, OnKeyDown );
- Mouse.AddPreviewMouseDownOutsideCapturedElementHandler( this, OnMouseDownOutsideCapturedElement );
- _displayMemberPathValuesChangeHelper = new ValueChangeHelper( this.OnDisplayMemberPathValuesChanged );
- }
-
- #endregion //Constructors
-
- #region Properties
-
- #region IsEditable
-
- public static readonly DependencyProperty IsEditableProperty = DependencyProperty.Register( "IsEditable", typeof( bool ), typeof( CheckComboBox )
- , new UIPropertyMetadata( false ) );
- public bool IsEditable
- {
- get
- {
- return (bool)GetValue( IsEditableProperty );
- }
- set
- {
- SetValue( IsEditableProperty, value );
- }
- }
-
- #endregion
-
- #region Text
-
- public static readonly DependencyProperty TextProperty = DependencyProperty.Register( "Text", typeof( string ), typeof( CheckComboBox )
- , new UIPropertyMetadata( null, OnTextChanged ) );
- public string Text
- {
- get
- {
- return ( string )GetValue( TextProperty );
- }
- set
- {
- SetValue( TextProperty, value );
- }
- }
-
- private static void OnTextChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- var checkComboBox = o as CheckComboBox;
- if( checkComboBox != null )
- checkComboBox.OnTextChanged( (string)e.OldValue, (string)e.NewValue );
- }
-
- protected virtual void OnTextChanged( string oldValue, string newValue )
- {
- if( !this.IsInitialized || _ignoreTextValueChanged || !this.IsEditable )
- return;
-
- this.UpdateFromText();
- }
-
- #endregion
-
- #region IsDropDownOpen
-
- public static readonly DependencyProperty IsDropDownOpenProperty = DependencyProperty.Register( "IsDropDownOpen", typeof( bool ), typeof( CheckComboBox ), new UIPropertyMetadata( false, OnIsDropDownOpenChanged ) );
- public bool IsDropDownOpen
- {
- get
- {
- return ( bool )GetValue( IsDropDownOpenProperty );
- }
- set
- {
- SetValue( IsDropDownOpenProperty, value );
- }
- }
-
- private static void OnIsDropDownOpenChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- CheckComboBox comboBox = o as CheckComboBox;
- if( comboBox != null )
- comboBox.OnIsDropDownOpenChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- protected virtual void OnIsDropDownOpenChanged( bool oldValue, bool newValue )
- {
- if( newValue )
- {
- _initialValue.Clear();
- foreach( object o in SelectedItems )
- {
- _initialValue.Add( o );
- }
- base.RaiseEvent( new RoutedEventArgs( CheckComboBox.OpenedEvent, this ) );
- }
- else
- {
- _initialValue.Clear();
- base.RaiseEvent( new RoutedEventArgs( CheckComboBox.ClosedEvent, this ) );
- }
- }
-
- #endregion //IsDropDownOpen
-
- #region MaxDropDownHeight
-
- public static readonly DependencyProperty MaxDropDownHeightProperty = DependencyProperty.Register( "MaxDropDownHeight", typeof( double ), typeof( CheckComboBox ), new UIPropertyMetadata( SystemParameters.PrimaryScreenHeight / 3.0, OnMaxDropDownHeightChanged ) );
- public double MaxDropDownHeight
- {
- get
- {
- return ( double )GetValue( MaxDropDownHeightProperty );
- }
- set
- {
- SetValue( MaxDropDownHeightProperty, value );
- }
- }
-
- private static void OnMaxDropDownHeightChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- CheckComboBox comboBox = o as CheckComboBox;
- if( comboBox != null )
- comboBox.OnMaxDropDownHeightChanged( ( double )e.OldValue, ( double )e.NewValue );
- }
-
- protected virtual void OnMaxDropDownHeightChanged( double oldValue, double newValue )
- {
- // TODO: Add your property changed side-effects. Descendants can override as well.
- }
-
- #endregion
-
- #endregion //Properties
-
- #region Base Class Overrides
-
- protected override void OnSelectedValueChanged( string oldValue, string newValue )
- {
- base.OnSelectedValueChanged( oldValue, newValue );
- UpdateText();
- }
-
- protected override void OnDisplayMemberPathChanged( string oldDisplayMemberPath, string newDisplayMemberPath )
- {
- base.OnDisplayMemberPathChanged( oldDisplayMemberPath, newDisplayMemberPath );
- this.UpdateDisplayMemberPathValuesBindings();
- }
-
- protected override void OnItemsSourceChanged( System.Collections.IEnumerable oldValue, System.Collections.IEnumerable newValue )
- {
- base.OnItemsSourceChanged( oldValue, newValue );
- this.UpdateDisplayMemberPathValuesBindings();
- }
-
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
-
- if( _popup != null )
- _popup.Opened -= Popup_Opened;
-
- _popup = GetTemplateChild( PART_Popup ) as Popup;
-
- if( _popup != null )
- _popup.Opened += Popup_Opened;
- }
-
-
- #endregion //Base Class Overrides
-
- #region Event Handlers
-
- private void OnMouseDownOutsideCapturedElement( object sender, MouseButtonEventArgs e )
- {
- CloseDropDown( true );
- }
-
- private void OnKeyDown( object sender, KeyEventArgs e )
- {
- if( !IsDropDownOpen )
- {
- if( KeyboardUtilities.IsKeyModifyingPopupState( e ) )
- {
- IsDropDownOpen = true;
- // Popup_Opened() will Focus on ComboBoxItem.
- e.Handled = true;
- }
- }
- else
- {
- if( KeyboardUtilities.IsKeyModifyingPopupState( e ) )
- {
- CloseDropDown( true );
- e.Handled = true;
- }
- else if( e.Key == Key.Enter )
- {
- CloseDropDown( true );
- e.Handled = true;
- }
- else if( e.Key == Key.Escape )
- {
- SelectedItems.Clear();
- foreach( object o in _initialValue )
- SelectedItems.Add( o );
- CloseDropDown( true );
- e.Handled = true;
- }
- }
- }
-
- private void Popup_Opened( object sender, EventArgs e )
- {
- UIElement item = ItemContainerGenerator.ContainerFromItem( SelectedItem ) as UIElement;
- if( (item == null) && (Items.Count > 0) )
- item = ItemContainerGenerator.ContainerFromItem( Items[0] ) as UIElement;
- if( item != null )
- item.Focus();
- }
-
- #endregion //Event Handlers
-
- #region Closed Event
-
- public static readonly RoutedEvent ClosedEvent = EventManager.RegisterRoutedEvent( "Closed", RoutingStrategy.Bubble, typeof( EventHandler ), typeof( CheckComboBox ) );
- public event RoutedEventHandler Closed
- {
- add
- {
- AddHandler( ClosedEvent, value );
- }
- remove
- {
- RemoveHandler( ClosedEvent, value );
- }
- }
-
- #endregion //Closed Event
-
- #region Opened Event
-
- public static readonly RoutedEvent OpenedEvent = EventManager.RegisterRoutedEvent( "Opened", RoutingStrategy.Bubble, typeof( EventHandler ), typeof( CheckComboBox ) );
- public event RoutedEventHandler Opened
- {
- add
- {
- AddHandler( OpenedEvent, value );
- }
- remove
- {
- RemoveHandler( OpenedEvent, value );
- }
- }
-
- #endregion //Opened Event
-
- #region Methods
-
- protected virtual void UpdateText()
- {
-#if VS2008
- string newValue = String.Join( Delimiter, SelectedItems.Cast().Select( x => GetItemDisplayValue( x ).ToString() ).ToArray() );
-#else
- string newValue = String.Join( Delimiter, SelectedItems.Cast().Select( x => GetItemDisplayValue( x ) ) );
-#endif
-
- if( String.IsNullOrEmpty( Text ) || !Text.Equals( newValue ) )
- {
- _ignoreTextValueChanged = true;
-#if VS2008
- Text = newValue;
-#else
- this.SetCurrentValue( CheckComboBox.TextProperty, newValue );
-#endif
- _ignoreTextValueChanged = false;
- }
- }
-
- private void UpdateDisplayMemberPathValuesBindings()
- {
- _displayMemberPathValuesChangeHelper.UpdateValueSource( ItemsCollection, this.DisplayMemberPath );
- }
-
- private void OnDisplayMemberPathValuesChanged()
- {
- this.UpdateText();
- }
-
- ///
- /// Updates the SelectedItems collection based on the content of
- /// the Text property.
- ///
- private void UpdateFromText()
- {
- List selectedValues = null;
- if( !String.IsNullOrEmpty( this.Text ) )
- {
- selectedValues = this.Text.Replace( " ", string.Empty ).Split( new string[] { Delimiter }, StringSplitOptions.RemoveEmptyEntries ).ToList();
- }
-
- this.UpdateFromList( selectedValues, this.GetItemDisplayValue );
- }
-
- protected object GetItemDisplayValue( object item )
- {
- if( String.IsNullOrEmpty( this.DisplayMemberPath ) )
- return item;
-
- string[] nameParts = this.DisplayMemberPath.Split( '.' );
- if( nameParts.Length == 1 )
- {
- var property = item.GetType().GetProperty( this.DisplayMemberPath );
- if( property != null )
- return property.GetValue( item, null );
- return item;
- }
-
- for( int i = 0; i < nameParts.Count(); ++i )
- {
- var type = item.GetType();
- var info = type.GetProperty( nameParts[ i ] );
- if( info == null )
- {
- return item;
- }
-
- if( i == nameParts.Count() - 1 )
- {
- return info.GetValue( item, null );
- }
- else
- {
- item = info.GetValue( item, null );
- }
- }
- return item;
- }
-
- private void CloseDropDown( bool isFocusOnComboBox )
- {
- if( IsDropDownOpen )
- IsDropDownOpen = false;
- ReleaseMouseCapture();
-
- if( isFocusOnComboBox )
- Focus();
- }
-
-#endregion //Methods
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index a3921362..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,216 +0,0 @@
-
-
-
-
-
-
-
- M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml
deleted file mode 100644
index 7311dbfc..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml
+++ /dev/null
@@ -1,206 +0,0 @@
-
-
-
-
-
-
-
-
-
- M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckListBox/Implementation/CheckListBox.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckListBox/Implementation/CheckListBox.cs
deleted file mode 100644
index 6b97c457..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckListBox/Implementation/CheckListBox.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Windows;
-using Xceed.Wpf.Toolkit.Primitives;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class CheckListBox : SelectAllSelector
- {
- #region Constructors
-
- static CheckListBox()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( CheckListBox ), new FrameworkPropertyMetadata( typeof( CheckListBox ) ) );
- }
-
- public CheckListBox()
- {
- }
-
- #endregion //Constructors
-
- #region Base Class Override
-
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckListBox/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckListBox/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index 4d03d107..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckListBox/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckListBox/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckListBox/Themes/Generic.xaml
deleted file mode 100644
index bd3d6c91..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckListBox/Themes/Generic.xaml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Implementation/ChildWindow.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Implementation/ChildWindow.cs
deleted file mode 100644
index ad27f8ba..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Implementation/ChildWindow.cs
+++ /dev/null
@@ -1,875 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.ComponentModel;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Shapes;
-using System.Windows.Threading;
-using Xceed.Wpf.Toolkit.Primitives;
-using Xceed.Wpf.Toolkit.Core;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-
-namespace Xceed.Wpf.Toolkit
-{
-#pragma warning disable 0809
-#pragma warning disable 0618
-
- [TemplatePart( Name = PART_WindowRoot, Type = typeof( Grid ) )]
- [TemplatePart( Name = PART_Root, Type = typeof( Grid ) )]
- [TemplatePart( Name = PART_WindowControl, Type = typeof( WindowControl ) )]
- public class ChildWindow : WindowControl
- {
- private const string PART_WindowRoot = "PART_WindowRoot";
- private const string PART_Root = "PART_Root";
- private const string PART_WindowControl = "PART_WindowControl";
- private const int _horizontalOffset = 3;
- private const int _verticalOffset = 3;
-
- #region Private Members
-
- private Grid _root;
- private TranslateTransform _moveTransform = new TranslateTransform();
- private bool _startupPositionInitialized;
- private FrameworkElement _parentContainer;
- private Rectangle _modalLayer = new Rectangle();
- private Canvas _modalLayerPanel = new Canvas();
- private Grid _windowRoot;
- private WindowControl _windowControl;
- private bool _ignorePropertyChanged;
- private bool _hasChildren;
- private bool _hasWindowContainer;
-
- #endregion //Private Members
-
- #region Public Properties
-
- #region DialogResult
-
- private bool? _dialogResult;
- ///
- /// Gets or sets a value indicating whether the ChildWindow was accepted or canceled.
- ///
- ///
- /// True if the child window was accepted; false if the child window was
- /// canceled. The default is null.
- ///
- [TypeConverter( typeof( NullableBoolConverter ) )]
- public bool? DialogResult
- {
- get
- {
- return _dialogResult;
- }
- set
- {
- if( _dialogResult != value )
- {
- _dialogResult = value;
- this.Close();
- }
- }
- }
-
- #endregion //DialogResult
-
- #region DesignerWindowState
-
- public static readonly DependencyProperty DesignerWindowStateProperty = DependencyProperty.Register( "DesignerWindowState", typeof( WindowState ), typeof( ChildWindow ), new PropertyMetadata( WindowState.Closed, OnDesignerWindowStatePropertyChanged ) );
- public WindowState DesignerWindowState
- {
- get
- {
- return ( WindowState )GetValue( DesignerWindowStateProperty );
- }
- set
- {
- SetValue( DesignerWindowStateProperty, value );
- }
- }
-
- private static void OnDesignerWindowStatePropertyChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ChildWindow childWindow = d as ChildWindow;
- if( childWindow != null )
- childWindow.OnDesignerWindowStatePropertyChanged( ( WindowState )e.OldValue, ( WindowState )e.NewValue );
- }
-
- protected virtual void OnDesignerWindowStatePropertyChanged( WindowState oldValue, WindowState newValue )
- {
- if( DesignerProperties.GetIsInDesignMode( this ) )
- {
- Visibility = newValue == Xceed.Wpf.Toolkit.WindowState.Open ? Visibility.Visible : Visibility.Collapsed;
- }
- }
-
- #endregion //DesignerWindowState
-
- #region FocusedElement
-
- public static readonly DependencyProperty FocusedElementProperty = DependencyProperty.Register( "FocusedElement", typeof( FrameworkElement ), typeof( ChildWindow ), new UIPropertyMetadata( null ) );
- public FrameworkElement FocusedElement
- {
- get
- {
- return ( FrameworkElement )GetValue( FocusedElementProperty );
- }
- set
- {
- SetValue( FocusedElementProperty, value );
- }
- }
-
- #endregion
-
- #region IsModal
-
- public static readonly DependencyProperty IsModalProperty = DependencyProperty.Register( "IsModal", typeof( bool ), typeof( ChildWindow ), new UIPropertyMetadata( false, new PropertyChangedCallback( OnIsModalPropertyChanged ) ) );
- public bool IsModal
- {
- get
- {
- return ( bool )GetValue( IsModalProperty );
- }
- set
- {
- SetValue( IsModalProperty, value );
- }
- }
-
- private static void OnIsModalPropertyChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ChildWindow childWindow = d as ChildWindow;
- if( childWindow != null )
- childWindow.OnIsModalChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- internal event EventHandler IsModalChanged;
-
- private void OnIsModalChanged( bool oldValue, bool newValue )
- {
- EventHandler handler = IsModalChanged;
- if( handler != null )
- {
- handler( this, EventArgs.Empty );
- }
-
- if( !_hasWindowContainer )
- {
- if( newValue )
- {
- KeyboardNavigation.SetTabNavigation( this, KeyboardNavigationMode.Cycle );
- ShowModalLayer();
- }
- else
- {
- KeyboardNavigation.SetTabNavigation( this, KeyboardNavigationMode.Continue );
- HideModalLayer();
- }
- }
- }
-
- #endregion //IsModal
-
- #region OverlayBrush (Obsolete)
-
- [Obsolete( "This property is obsolete and should no longer be used. Use WindowContainer.ModalBackgroundBrushProperty instead." )]
- public static readonly DependencyProperty OverlayBrushProperty = DependencyProperty.Register( "OverlayBrush", typeof( Brush ), typeof( ChildWindow ), new PropertyMetadata( Brushes.Gray, OnOverlayBrushChanged ) );
- [Obsolete( "This property is obsolete and should no longer be used. Use WindowContainer.ModalBackgroundBrushProperty instead." )]
- public Brush OverlayBrush
- {
- get
- {
- return ( Brush )GetValue( OverlayBrushProperty );
- }
- set
- {
- SetValue( OverlayBrushProperty, value );
- }
- }
-
- private static void OnOverlayBrushChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ChildWindow childWindow = d as ChildWindow;
- if( childWindow != null )
- childWindow.OnOverlayBrushChanged( ( Brush )e.OldValue, ( Brush )e.NewValue );
- }
-
- [Obsolete( "This method is obsolete and should no longer be used. Use WindowContainer.ModalBackgroundBrushProperty instead." )]
- protected virtual void OnOverlayBrushChanged( Brush oldValue, Brush newValue )
- {
- _modalLayer.Fill = newValue;
- }
-
- #endregion //OverlayBrush
-
- #region OverlayOpacity (Obsolete)
-
- [Obsolete( "This property is obsolete and should no longer be used. Use WindowContainer.ModalBackgroundBrushProperty instead." )]
- public static readonly DependencyProperty OverlayOpacityProperty = DependencyProperty.Register( "OverlayOpacity", typeof( double ), typeof( ChildWindow ), new PropertyMetadata( 0.5, OnOverlayOpacityChanged ) );
- [Obsolete( "This property is obsolete and should no longer be used. Use WindowContainer.ModalBackgroundBrushProperty instead." )]
- public double OverlayOpacity
- {
- get
- {
- return ( double )GetValue( OverlayOpacityProperty );
- }
- set
- {
- SetValue( OverlayOpacityProperty, value );
- }
- }
-
- private static void OnOverlayOpacityChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ChildWindow childWindow = d as ChildWindow;
- if( childWindow != null )
- childWindow.OnOverlayOpacityChanged( ( double )e.OldValue, ( double )e.NewValue );
- }
-
- [Obsolete( "This method is obsolete and should no longer be used. Use WindowContainer.ModalBackgroundBrushProperty instead." )]
- protected virtual void OnOverlayOpacityChanged( double oldValue, double newValue )
- {
- _modalLayer.Opacity = newValue;
- }
-
- #endregion //OverlayOpacity
-
- #region WindowStartupLocation
-
- public static readonly DependencyProperty WindowStartupLocationProperty = DependencyProperty.Register( "WindowStartupLocation", typeof( WindowStartupLocation ), typeof( ChildWindow ), new UIPropertyMetadata( WindowStartupLocation.Manual, OnWindowStartupLocationChanged ) );
- public WindowStartupLocation WindowStartupLocation
- {
- get
- {
- return ( WindowStartupLocation )GetValue( WindowStartupLocationProperty );
- }
- set
- {
- SetValue( WindowStartupLocationProperty, value );
- }
- }
-
- private static void OnWindowStartupLocationChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ChildWindow childWindow = o as ChildWindow;
- if( childWindow != null )
- childWindow.OnWindowStartupLocationChanged( ( WindowStartupLocation )e.OldValue, ( WindowStartupLocation )e.NewValue );
- }
-
- protected virtual void OnWindowStartupLocationChanged( WindowStartupLocation oldValue, WindowStartupLocation newValue )
- {
- // TODO: Add your property changed side-effects. Descendants can override as well.
- }
-
- #endregion //WindowStartupLocation
-
- #region WindowState
-
- public static readonly DependencyProperty WindowStateProperty = DependencyProperty.Register( "WindowState", typeof( WindowState ), typeof( ChildWindow ), new FrameworkPropertyMetadata( WindowState.Closed, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnWindowStatePropertyChanged ) );
- public WindowState WindowState
- {
- get
- {
- return ( WindowState )GetValue( WindowStateProperty );
- }
- set
- {
- SetValue( WindowStateProperty, value );
- }
- }
-
- private static void OnWindowStatePropertyChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ChildWindow childWindow = d as ChildWindow;
- if( childWindow != null )
- childWindow.OnWindowStatePropertyChanged( ( WindowState )e.OldValue, ( WindowState )e.NewValue );
- }
-
- protected virtual void OnWindowStatePropertyChanged( WindowState oldValue, WindowState newValue )
- {
- if( !DesignerProperties.GetIsInDesignMode( this ) )
- {
- if( !_ignorePropertyChanged )
- SetWindowState( newValue );
- }
- else
- {
- Visibility = DesignerWindowState == Xceed.Wpf.Toolkit.WindowState.Open ? Visibility.Visible : System.Windows.Visibility.Collapsed;
- }
- }
-
- #endregion //WindowState
-
- #endregion //Public Properties
-
- #region Constructors
-
- static ChildWindow()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( ChildWindow ), new FrameworkPropertyMetadata( typeof( ChildWindow ) ) );
- }
-
- public ChildWindow()
- {
- DesignerWindowState = Xceed.Wpf.Toolkit.WindowState.Open;
-
- _modalLayer.Fill = OverlayBrush;
- _modalLayer.Opacity = OverlayOpacity;
-
- this.IsVisibleChanged += this.ChildWindow_IsVisibleChanged;
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- internal override bool AllowPublicIsActiveChange
- {
- get { return false; }
- }
-
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
-
- if( _windowControl != null )
- {
- _windowControl.HeaderDragDelta -= ( o, e ) => this.OnHeaderDragDelta( e );
- _windowControl.HeaderIconDoubleClicked -= ( o, e ) => this.OnHeaderIconDoubleClick( e );
- _windowControl.CloseButtonClicked -= ( o, e ) => this.OnCloseButtonClicked( e );
- }
- _windowControl = this.GetTemplateChild( PART_WindowControl ) as WindowControl;
- if( _windowControl != null )
- {
- _windowControl.HeaderDragDelta += ( o, e ) => this.OnHeaderDragDelta( e );
- _windowControl.HeaderIconDoubleClicked += ( o, e ) => this.OnHeaderIconDoubleClick( e );
- _windowControl.CloseButtonClicked += ( o, e ) => this.OnCloseButtonClicked( e );
- }
-
- this.UpdateBlockMouseInputsPanel();
-
- _windowRoot = this.GetTemplateChild( PART_WindowRoot ) as Grid;
- if( _windowRoot != null )
- {
- _windowRoot.RenderTransform = _moveTransform;
- }
- _hasWindowContainer = ( VisualTreeHelper.GetParent( this ) as WindowContainer ) != null;
-
- if( !_hasWindowContainer )
- {
- _parentContainer = VisualTreeHelper.GetParent( this ) as FrameworkElement;
- if( _parentContainer != null )
- {
- _parentContainer.LayoutUpdated += ParentContainer_LayoutUpdated;
- _parentContainer.SizeChanged += ParentContainer_SizeChanged;
-
- //this is for XBAP applications only. When inside an XBAP the parent container has no height or width until it has loaded. Therefore
- //we need to handle the loaded event and reposition the window.
- if( System.Windows.Interop.BrowserInteropHelper.IsBrowserHosted )
- {
- _parentContainer.Loaded += ( o, e ) =>
- {
- ExecuteOpen();
- };
- }
- }
-
- this.Unloaded += new RoutedEventHandler( ChildWindow_Unloaded );
-
- //initialize our modal background width/height
- _modalLayer.Height = _parentContainer.ActualHeight;
- _modalLayer.Width = _parentContainer.ActualWidth;
-
- _root = this.GetTemplateChild( PART_Root ) as Grid;
-
-#if VS2008
- FocusVisualStyle = null;
-#else
- Style focusStyle = ( _root != null ) ? _root.Resources[ "FocusVisualStyle" ] as Style : null;
- if( focusStyle != null )
- {
- Setter focusStyleDataContext = new Setter( Control.DataContextProperty, this );
- focusStyle.Setters.Add( focusStyleDataContext );
- FocusVisualStyle = focusStyle;
- }
-#endif
- if( _root != null )
- {
- _root.Children.Add( _modalLayerPanel );
- }
- }
- }
-
- protected override void OnGotFocus( RoutedEventArgs e )
- {
- base.OnGotFocus( e );
-
- Action action = () =>
- {
- if( FocusedElement != null )
- {
- _hasChildren = true;
- FocusedElement.Focus();
- }
- else
- {
- //Focus first Focusable Child element of ChildWindow
- var focusableChild = TreeHelper.FindChild( this.Content as DependencyObject, x => x.Focusable );
- if( focusableChild != null )
- {
- _hasChildren = true;
- focusableChild.Focus();
- }
- else
- {
- _hasChildren = false;
- }
- }
- };
-
- Dispatcher.BeginInvoke( DispatcherPriority.ApplicationIdle, action );
- }
-
- protected override void OnPreviewKeyDown( KeyEventArgs e )
- {
- base.OnPreviewKeyDown( e );
-
- if( this.IsModal )
- {
- // Prevent MenuItem shortcuts while ChildWindow is modal.
- if( Keyboard.IsKeyDown( Key.LeftAlt ) || Keyboard.IsKeyDown( Key.RightAlt ) )
- {
- e.Handled = true;
- }
- // Prevent Tab when no children
- else if( (e.Key == Key.Tab) && !_hasChildren )
- {
- e.Handled = true;
- }
- }
- }
-
- protected override void OnKeyDown( KeyEventArgs e )
- {
- base.OnKeyDown( e );
-
- if( WindowState == WindowState.Open )
- {
- switch( e.Key )
- {
- case Key.Left:
- this.Left -= _horizontalOffset;
- e.Handled = true;
- break;
-
- case Key.Right:
- this.Left += _horizontalOffset;
- e.Handled = true;
- break;
-
- case Key.Down:
- this.Top += _verticalOffset;
- e.Handled = true;
- break;
-
- case Key.Up:
- this.Top -= _verticalOffset;
- e.Handled = true;
- break;
- }
- }
- }
-
- protected override void OnLeftPropertyChanged( double oldValue, double newValue )
- {
- base.OnLeftPropertyChanged( oldValue, newValue );
-
- _hasWindowContainer = ( VisualTreeHelper.GetParent( this ) as WindowContainer ) != null;
- if( !_hasWindowContainer )
- {
- Left = GetRestrictedLeft();
- ProcessMove( newValue - oldValue, 0 );
- }
- }
-
- protected override void OnTopPropertyChanged( double oldValue, double newValue )
- {
- base.OnTopPropertyChanged( oldValue, newValue );
-
- _hasWindowContainer = ( VisualTreeHelper.GetParent( this ) as WindowContainer ) != null;
- if( !_hasWindowContainer )
- {
- Top = GetRestrictedTop();
- ProcessMove( 0, newValue - oldValue );
- }
- }
-
- internal override void UpdateBlockMouseInputsPanel()
- {
- if( _windowControl != null )
- {
- _windowControl.IsBlockMouseInputsPanelActive = this.IsBlockMouseInputsPanelActive;
- }
- }
-
-
-
-
- #endregion //Base Class Overrides
-
- #region Event Handlers
-
- protected virtual void OnHeaderDragDelta( DragDeltaEventArgs e )
- {
- if( !this.IsCurrentWindow( e.OriginalSource ) )
- return;
-
- e.Handled = true;
-
- DragDeltaEventArgs args = new DragDeltaEventArgs( e.HorizontalChange, e.VerticalChange );
- args.RoutedEvent = HeaderDragDeltaEvent;
- args.Source = this;
- this.RaiseEvent( args );
-
- if( !args.Handled )
- {
- if( object.Equals( e.OriginalSource, _windowControl ) )
- {
- double left = 0.0;
-
- if( this.FlowDirection == FlowDirection.RightToLeft )
- left = this.Left - e.HorizontalChange;
- else
- left = this.Left + e.HorizontalChange;
-
- this.Left = left;
- this.Top += e.VerticalChange;
- }
- }
- }
-
- protected virtual void OnHeaderIconDoubleClick( MouseButtonEventArgs e )
- {
- if( !this.IsCurrentWindow( e.OriginalSource ) )
- return;
-
- e.Handled = true;
-
- MouseButtonEventArgs args = new MouseButtonEventArgs( Mouse.PrimaryDevice, 0, MouseButton.Left );
- args.RoutedEvent = HeaderIconDoubleClickedEvent;
- args.Source = this;
- this.RaiseEvent( args );
-
- if( !args.Handled )
- {
- this.Close();
- }
- }
-
- protected virtual void OnCloseButtonClicked( RoutedEventArgs e )
- {
- if( !this.IsCurrentWindow( e.OriginalSource ) )
- return;
-
- e.Handled = true;
-
- RoutedEventArgs args = new RoutedEventArgs( CloseButtonClickedEvent, this );
- this.RaiseEvent( args );
-
- if( !args.Handled )
- {
- this.Close();
- }
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
- [Obsolete( "This method is obsolete and should no longer be used." )]
- private void ParentContainer_LayoutUpdated( object sender, EventArgs e )
- {
- if( DesignerProperties.GetIsInDesignMode( this ) )
- return;
-
- //we only want to set the start position if this is the first time the control has bee initialized
- if( !_startupPositionInitialized )
- {
- ExecuteOpen();
- _startupPositionInitialized = true;
- }
- }
-
- [Obsolete( "This method is obsolete and should no longer be used." )]
- private void ChildWindow_Unloaded( object sender, RoutedEventArgs e )
- {
- if( _parentContainer != null )
- {
- _parentContainer.LayoutUpdated -= ParentContainer_LayoutUpdated;
- _parentContainer.SizeChanged -= ParentContainer_SizeChanged;
-
- //this is for XBAP applications only. When inside an XBAP the parent container has no height or width until it has loaded. Therefore
- //we need to handle the loaded event and reposition the window.
- if( System.Windows.Interop.BrowserInteropHelper.IsBrowserHosted )
- {
- _parentContainer.Loaded -= ( o, ev ) =>
- {
- ExecuteOpen();
- };
- }
- }
- }
-
- [Obsolete( "This method is obsolete and should no longer be used." )]
- void ParentContainer_SizeChanged( object sender, SizeChangedEventArgs e )
- {
- //resize our modal layer
- _modalLayer.Height = e.NewSize.Height;
- _modalLayer.Width = e.NewSize.Width;
-
- //reposition our window
- Left = GetRestrictedLeft();
- Top = GetRestrictedTop();
- }
-
- private void ChildWindow_IsVisibleChanged( object sender, DependencyPropertyChangedEventArgs e )
- {
- if( (bool)e.NewValue && this.IsModal )
- {
- this.Focus();
- }
- }
-
-
-
- #endregion //Event Handlers
-
- #region Methods
-
- #region Private
-
-
-
- [Obsolete( "This method is obsolete and should no longer be used. Use WindowContainer.GetRestrictedLeft() instead." )]
- private double GetRestrictedLeft()
- {
- if( Left < 0 )
- return 0;
-
- if( ( _parentContainer != null ) && (_windowRoot != null) )
- {
- if( Left + _windowRoot.ActualWidth > _parentContainer.ActualWidth && _parentContainer.ActualWidth != 0 )
- {
- double left = _parentContainer.ActualWidth - _windowRoot.ActualWidth;
- return left < 0 ? 0 : left;
- }
- }
-
- return Left;
- }
-
- [Obsolete( "This method is obsolete and should no longer be used. Use WindowContainer.GetRestrictedTop() instead." )]
- private double GetRestrictedTop()
- {
- if( Top < 0 )
- return 0;
-
- if( ( _parentContainer != null ) && ( _windowRoot != null ) )
- {
- if( Top + _windowRoot.ActualHeight > _parentContainer.ActualHeight && _parentContainer.ActualHeight != 0 )
- {
- double top = _parentContainer.ActualHeight - _windowRoot.ActualHeight;
- return top < 0 ? 0 : top;
- }
- }
-
- return Top;
- }
-
- private void SetWindowState( WindowState state )
- {
- switch( state )
- {
- case WindowState.Closed:
- {
- ExecuteClose();
- break;
- }
- case WindowState.Open:
- {
- ExecuteOpen();
- break;
- }
- }
- }
-
- private void ExecuteClose()
- {
- CancelEventArgs e = new CancelEventArgs();
- OnClosing( e );
-
- if( !e.Cancel )
- {
- if( !_dialogResult.HasValue )
- _dialogResult = false;
-
- OnClosed( EventArgs.Empty );
- }
- else
- {
- CancelClose();
- }
- }
-
- private void CancelClose()
- {
- _dialogResult = null; //when the close is cancelled, DialogResult should be null
-
- _ignorePropertyChanged = true;
- WindowState = WindowState.Open; //now reset the window state to open because the close was cancelled
- _ignorePropertyChanged = false;
- }
-
- private void ExecuteOpen()
- {
- _dialogResult = null; //reset the dialogResult to null each time the window is opened
-
- if( !_hasWindowContainer )
- if( WindowStartupLocation == Xceed.Wpf.Toolkit.WindowStartupLocation.Center )
- CenterChildWindow();
-
- if( !_hasWindowContainer )
- BringToFront();
- }
-
- private bool IsCurrentWindow( object windowtoTest )
- {
- return object.Equals( _windowControl, windowtoTest );
- }
-
- [Obsolete( "This method is obsolete and should no longer be used. Use WindowContainer.BringToFront() instead." )]
- private void BringToFront()
- {
- int index = 0;
-
- if( _parentContainer != null )
- index = ( int )_parentContainer.GetValue( Canvas.ZIndexProperty );
-
- SetValue( Canvas.ZIndexProperty, ++index );
-
- if( IsModal )
- Canvas.SetZIndex( _modalLayerPanel, index - 2 );
- }
-
- [Obsolete( "This method is obsolete and should no longer be used. Use WindowContainer.CenterChild() instead." )]
- private void CenterChildWindow()
- {
- if( ( _parentContainer != null ) && ( _windowRoot != null ) )
- {
- _windowRoot.UpdateLayout();
-
- Left = ( _parentContainer.ActualWidth - _windowRoot.ActualWidth ) / 2.0;
- Top = ( _parentContainer.ActualHeight - _windowRoot.ActualHeight ) / 2.0;
- }
- }
-
- [Obsolete( "This method is obsolete and should no longer be used." )]
- private void ShowModalLayer()
- {
- if( !DesignerProperties.GetIsInDesignMode( this ) )
- {
- if( !_modalLayerPanel.Children.Contains( _modalLayer ) )
- _modalLayerPanel.Children.Add( _modalLayer );
-
- _modalLayer.Visibility = System.Windows.Visibility.Visible;
- }
- }
-
- [Obsolete( "This method is obsolete and should no longer be used." )]
- private void HideModalLayer()
- {
- _modalLayer.Visibility = System.Windows.Visibility.Collapsed;
- }
-
- [Obsolete( "This method is obsolete and should no longer be used. Use the ChildWindow in a WindowContainer instead." )]
- private void ProcessMove( double x, double y )
- {
- _moveTransform.X += x;
- _moveTransform.Y += y;
-
- InvalidateArrange();
- }
-
- #endregion //Private
-
- #region Public
-
- public void Show()
- {
- WindowState = WindowState.Open;
- }
-
- public void Close()
- {
- WindowState = WindowState.Closed;
- }
-
- #endregion //Public
-
- #endregion //Methods
-
- #region Events
-
- ///
- /// Occurs when the ChildWindow is closed.
- ///
- public event EventHandler Closed;
- protected virtual void OnClosed( EventArgs e )
- {
- if( Closed != null )
- Closed( this, e );
- }
-
- ///
- /// Occurs when the ChildWindow is closing.
- ///
- public event EventHandler Closing;
- protected virtual void OnClosing( CancelEventArgs e )
- {
- if( Closing != null )
- Closing( this, e );
- }
-
- #endregion //Events
-
- }
-
-#pragma warning restore 0809
-#pragma warning restore 0618
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Implementation/WindowStartupLocation.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Implementation/WindowStartupLocation.cs
deleted file mode 100644
index 690c9232..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Implementation/WindowStartupLocation.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit
-{
- public enum WindowStartupLocation
- {
- Center,
- Manual
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Implementation/WindowState.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Implementation/WindowState.cs
deleted file mode 100644
index 07209708..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Implementation/WindowState.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit
-{
- public enum WindowState
- {
- Closed,
- Open
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index 2a5bd5ef..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Themes/Generic.xaml
deleted file mode 100644
index 7256260d..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ChildWindow/Themes/Generic.xaml
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Chromes/Implementation/ButtonChrome.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Chromes/Implementation/ButtonChrome.cs
deleted file mode 100644
index 89c66d09..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Chromes/Implementation/ButtonChrome.cs
+++ /dev/null
@@ -1,272 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Xceed.Wpf.Toolkit.Chromes
-{
- public class ButtonChrome : ContentControl
- {
- #region CornerRadius
-
- public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register( "CornerRadius", typeof( CornerRadius ), typeof( ButtonChrome ), new UIPropertyMetadata( default( CornerRadius ), new PropertyChangedCallback( OnCornerRadiusChanged ) ) );
- public CornerRadius CornerRadius
- {
- get
- {
- return ( CornerRadius )GetValue( CornerRadiusProperty );
- }
- set
- {
- SetValue( CornerRadiusProperty, value );
- }
- }
-
- private static void OnCornerRadiusChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ButtonChrome buttonChrome = o as ButtonChrome;
- if( buttonChrome != null )
- buttonChrome.OnCornerRadiusChanged( ( CornerRadius )e.OldValue, ( CornerRadius )e.NewValue );
- }
-
- protected virtual void OnCornerRadiusChanged( CornerRadius oldValue, CornerRadius newValue )
- {
- //we always want the InnerBorderRadius to be one less than the CornerRadius
- CornerRadius newInnerCornerRadius = new CornerRadius( Math.Max( 0, newValue.TopLeft - 1 ),
- Math.Max( 0, newValue.TopRight - 1 ),
- Math.Max( 0, newValue.BottomRight - 1 ),
- Math.Max( 0, newValue.BottomLeft - 1 ) );
-
- InnerCornerRadius = newInnerCornerRadius;
- }
-
- #endregion //CornerRadius
-
- #region InnerCornerRadius
-
- public static readonly DependencyProperty InnerCornerRadiusProperty = DependencyProperty.Register( "InnerCornerRadius", typeof( CornerRadius ), typeof( ButtonChrome ), new UIPropertyMetadata( default( CornerRadius ), new PropertyChangedCallback( OnInnerCornerRadiusChanged ) ) );
- public CornerRadius InnerCornerRadius
- {
- get
- {
- return ( CornerRadius )GetValue( InnerCornerRadiusProperty );
- }
- set
- {
- SetValue( InnerCornerRadiusProperty, value );
- }
- }
-
- private static void OnInnerCornerRadiusChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ButtonChrome buttonChrome = o as ButtonChrome;
- if( buttonChrome != null )
- buttonChrome.OnInnerCornerRadiusChanged( ( CornerRadius )e.OldValue, ( CornerRadius )e.NewValue );
- }
-
- protected virtual void OnInnerCornerRadiusChanged( CornerRadius oldValue, CornerRadius newValue )
- {
- // TODO: Add your property changed side-effects. Descendants can override as well.
- }
-
- #endregion //InnerCornerRadius
-
- #region RenderChecked
-
- public static readonly DependencyProperty RenderCheckedProperty = DependencyProperty.Register( "RenderChecked", typeof( bool ), typeof( ButtonChrome ), new UIPropertyMetadata( false, OnRenderCheckedChanged ) );
- public bool RenderChecked
- {
- get
- {
- return ( bool )GetValue( RenderCheckedProperty );
- }
- set
- {
- SetValue( RenderCheckedProperty, value );
- }
- }
-
- private static void OnRenderCheckedChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ButtonChrome buttonChrome = o as ButtonChrome;
- if( buttonChrome != null )
- buttonChrome.OnRenderCheckedChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- protected virtual void OnRenderCheckedChanged( bool oldValue, bool newValue )
- {
- // TODO: Add your property changed side-effects. Descendants can override as well.
- }
-
- #endregion //RenderChecked
-
- #region RenderEnabled
-
- public static readonly DependencyProperty RenderEnabledProperty = DependencyProperty.Register( "RenderEnabled", typeof( bool ), typeof( ButtonChrome ), new UIPropertyMetadata( true, OnRenderEnabledChanged ) );
- public bool RenderEnabled
- {
- get
- {
- return ( bool )GetValue( RenderEnabledProperty );
- }
- set
- {
- SetValue( RenderEnabledProperty, value );
- }
- }
-
- private static void OnRenderEnabledChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ButtonChrome buttonChrome = o as ButtonChrome;
- if( buttonChrome != null )
- buttonChrome.OnRenderEnabledChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- protected virtual void OnRenderEnabledChanged( bool oldValue, bool newValue )
- {
- // TODO: Add your property changed side-effects. Descendants can override as well.
- }
-
- #endregion //RenderEnabled
-
- #region RenderFocused
-
- public static readonly DependencyProperty RenderFocusedProperty = DependencyProperty.Register( "RenderFocused", typeof( bool ), typeof( ButtonChrome ), new UIPropertyMetadata( false, OnRenderFocusedChanged ) );
- public bool RenderFocused
- {
- get
- {
- return ( bool )GetValue( RenderFocusedProperty );
- }
- set
- {
- SetValue( RenderFocusedProperty, value );
- }
- }
-
- private static void OnRenderFocusedChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ButtonChrome buttonChrome = o as ButtonChrome;
- if( buttonChrome != null )
- buttonChrome.OnRenderFocusedChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- protected virtual void OnRenderFocusedChanged( bool oldValue, bool newValue )
- {
- // TODO: Add your property changed side-effects. Descendants can override as well.
- }
-
- #endregion //RenderFocused
-
- #region RenderMouseOver
-
- public static readonly DependencyProperty RenderMouseOverProperty = DependencyProperty.Register( "RenderMouseOver", typeof( bool ), typeof( ButtonChrome ), new UIPropertyMetadata( false, OnRenderMouseOverChanged ) );
- public bool RenderMouseOver
- {
- get
- {
- return ( bool )GetValue( RenderMouseOverProperty );
- }
- set
- {
- SetValue( RenderMouseOverProperty, value );
- }
- }
-
- private static void OnRenderMouseOverChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ButtonChrome buttonChrome = o as ButtonChrome;
- if( buttonChrome != null )
- buttonChrome.OnRenderMouseOverChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- protected virtual void OnRenderMouseOverChanged( bool oldValue, bool newValue )
- {
- // TODO: Add your property changed side-effects. Descendants can override as well.
- }
-
- #endregion //RenderMouseOver
-
- #region RenderNormal
-
- public static readonly DependencyProperty RenderNormalProperty = DependencyProperty.Register( "RenderNormal", typeof( bool ), typeof( ButtonChrome ), new UIPropertyMetadata( true, OnRenderNormalChanged ) );
- public bool RenderNormal
- {
- get
- {
- return ( bool )GetValue( RenderNormalProperty );
- }
- set
- {
- SetValue( RenderNormalProperty, value );
- }
- }
-
- private static void OnRenderNormalChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ButtonChrome buttonChrome = o as ButtonChrome;
- if( buttonChrome != null )
- buttonChrome.OnRenderNormalChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- protected virtual void OnRenderNormalChanged( bool oldValue, bool newValue )
- {
- // TODO: Add your property changed side-effects. Descendants can override as well.
- }
-
- #endregion //RenderNormal
-
- #region RenderPressed
-
- public static readonly DependencyProperty RenderPressedProperty = DependencyProperty.Register( "RenderPressed", typeof( bool ), typeof( ButtonChrome ), new UIPropertyMetadata( false, OnRenderPressedChanged ) );
- public bool RenderPressed
- {
- get
- {
- return ( bool )GetValue( RenderPressedProperty );
- }
- set
- {
- SetValue( RenderPressedProperty, value );
- }
- }
-
- private static void OnRenderPressedChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ButtonChrome buttonChrome = o as ButtonChrome;
- if( buttonChrome != null )
- buttonChrome.OnRenderPressedChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- protected virtual void OnRenderPressedChanged( bool oldValue, bool newValue )
- {
- // TODO: Add your property changed side-effects. Descendants can override as well.
- }
-
- #endregion //RenderPressed
-
- #region Contsructors
-
- static ButtonChrome()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( ButtonChrome ), new FrameworkPropertyMetadata( typeof( ButtonChrome ) ) );
- }
-
- #endregion //Contsructors
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Chromes/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Chromes/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index d1f499f6..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Chromes/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,177 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Chromes/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Chromes/Themes/Generic.xaml
deleted file mode 100644
index 2ee81a1a..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Chromes/Themes/Generic.xaml
+++ /dev/null
@@ -1,228 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Images/Delete16.png b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Images/Delete16.png
deleted file mode 100644
index dee2496a..00000000
Binary files a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Images/Delete16.png and /dev/null differ
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Images/Duplicate.png b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Images/Duplicate.png
deleted file mode 100644
index 51b048bc..00000000
Binary files a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Images/Duplicate.png and /dev/null differ
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs
deleted file mode 100644
index d3c774c2..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs
+++ /dev/null
@@ -1,705 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-using Xceed.Wpf.Toolkit.PropertyGrid;
-using System.Windows.Threading;
-using System.Reflection;
-
-namespace Xceed.Wpf.Toolkit
-{
- [TemplatePart( Name = PART_NewItemTypesComboBox, Type = typeof( ComboBox ) )]
- [TemplatePart( Name = PART_PropertyGrid, Type = typeof( PropertyGrid.PropertyGrid ) )]
- [TemplatePart( Name = PART_ListBox, Type = typeof( ListBox ) )]
- public class CollectionControl : Control
- {
- private const string PART_NewItemTypesComboBox = "PART_NewItemTypesComboBox";
- private const string PART_PropertyGrid = "PART_PropertyGrid";
- private const string PART_ListBox = "PART_ListBox";
-
- #region Private Members
-
- private ComboBox _newItemTypesComboBox;
- private PropertyGrid.PropertyGrid _propertyGrid;
- private ListBox _listBox;
-
- #endregion
-
- #region Properties
-
- #region IsReadOnly Property
-
- public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register( "IsReadOnly", typeof( bool ), typeof( CollectionControl ), new UIPropertyMetadata( false ) );
- public bool IsReadOnly
- {
- get
- {
- return ( bool )GetValue( IsReadOnlyProperty );
- }
- set
- {
- SetValue( IsReadOnlyProperty, value );
- }
- }
-
- #endregion //Items
-
- #region Items Property
-
- public static readonly DependencyProperty ItemsProperty = DependencyProperty.Register( "Items", typeof( ObservableCollection ), typeof( CollectionControl ), new UIPropertyMetadata( null ) );
- public ObservableCollection Items
- {
- get
- {
- return ( ObservableCollection )GetValue( ItemsProperty );
- }
- set
- {
- SetValue( ItemsProperty, value );
- }
- }
-
- #endregion //Items
-
- #region ItemsSource Property
-
- public static readonly DependencyProperty ItemsSourceProperty = DependencyProperty.Register( "ItemsSource", typeof( IEnumerable ), typeof( CollectionControl ), new UIPropertyMetadata( null, OnItemsSourceChanged ) );
- public IEnumerable ItemsSource
- {
- get
- {
- return (IEnumerable)GetValue( ItemsSourceProperty );
- }
- set
- {
- SetValue( ItemsSourceProperty, value );
- }
- }
-
- private static void OnItemsSourceChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- var CollectionControl = ( CollectionControl )d;
- if( CollectionControl != null )
- CollectionControl.OnItemSourceChanged( (IEnumerable)e.OldValue, (IEnumerable)e.NewValue );
- }
-
- public void OnItemSourceChanged( IEnumerable oldValue, IEnumerable newValue )
- {
- if( newValue != null )
- {
- var dict = newValue as IDictionary;
- if( dict != null )
- {
- // A Dictionary contains KeyValuePair that can't be edited.
- // We need to Add EditableKeyValuePairs from DictionaryEntries.
- foreach( DictionaryEntry item in dict )
- {
- var keyType = (item.Key != null)
- ? item.Key.GetType()
- : (dict.GetType().GetGenericArguments().Count() > 0) ? dict.GetType().GetGenericArguments()[0] : typeof( object );
- var valueType = (item.Value != null)
- ? item.Value.GetType()
- : (dict.GetType().GetGenericArguments().Count() > 1) ? dict.GetType().GetGenericArguments()[ 1 ] : typeof( object );
- var editableKeyValuePair = ListUtilities.CreateEditableKeyValuePair( item.Key
- , keyType
- , item.Value
- , valueType );
- this.Items.Add( editableKeyValuePair );
- }
- }
- else
- {
- foreach( var item in newValue )
- {
- if( item != null )
- {
- Items.Add( item );
- }
- }
- }
- }
- }
-
- #endregion //ItemsSource
-
- #region ItemsSourceType Property
-
- public static readonly DependencyProperty ItemsSourceTypeProperty = DependencyProperty.Register( "ItemsSourceType", typeof( Type ), typeof( CollectionControl ), new UIPropertyMetadata( null ) );
- public Type ItemsSourceType
- {
- get
- {
- return ( Type )GetValue( ItemsSourceTypeProperty );
- }
- set
- {
- SetValue( ItemsSourceTypeProperty, value );
- }
- }
-
- #endregion //ItemsSourceType
-
- #region NewItemType Property
-
- public static readonly DependencyProperty NewItemTypesProperty = DependencyProperty.Register( "NewItemTypes", typeof( IList ), typeof( CollectionControl ), new UIPropertyMetadata( null ) );
- public IList NewItemTypes
- {
- get
- {
- return ( IList )GetValue( NewItemTypesProperty );
- }
- set
- {
- SetValue( NewItemTypesProperty, value );
- }
- }
-
- #endregion //NewItemType
-
- #region PropertiesLabel Property
-
- public static readonly DependencyProperty PropertiesLabelProperty = DependencyProperty.Register( "PropertiesLabel", typeof( object ), typeof( CollectionControl ), new UIPropertyMetadata( "Properties:" ) );
- public object PropertiesLabel
- {
- get
- {
- return ( object )GetValue( PropertiesLabelProperty );
- }
- set
- {
- SetValue( PropertiesLabelProperty, value );
- }
- }
-
- #endregion //PropertiesLabel
-
- #region SelectedItem Property
-
- public static readonly DependencyProperty SelectedItemProperty = DependencyProperty.Register( "SelectedItem", typeof( object ), typeof( CollectionControl ), new UIPropertyMetadata( null ) );
- public object SelectedItem
- {
- get
- {
- return ( object )GetValue( SelectedItemProperty );
- }
- set
- {
- SetValue( SelectedItemProperty, value );
- }
- }
-
- #endregion //EditorDefinitions
-
- #region TypeSelectionLabel Property
-
- public static readonly DependencyProperty TypeSelectionLabelProperty = DependencyProperty.Register( "TypeSelectionLabel", typeof( object ), typeof( CollectionControl ), new UIPropertyMetadata( "Select type:" ) );
- public object TypeSelectionLabel
- {
- get
- {
- return ( object )GetValue( TypeSelectionLabelProperty );
- }
- set
- {
- SetValue( TypeSelectionLabelProperty, value );
- }
- }
-
- #endregion //TypeSelectionLabel
-
- #region EditorDefinitions Property
-
- public static readonly DependencyProperty EditorDefinitionsProperty = DependencyProperty.Register( "EditorDefinitions", typeof( EditorDefinitionCollection ), typeof( CollectionControl ), new UIPropertyMetadata( null ) );
- public EditorDefinitionCollection EditorDefinitions
- {
- get
- {
- return ( EditorDefinitionCollection )GetValue( EditorDefinitionsProperty );
- }
- set
- {
- SetValue( EditorDefinitionsProperty, value );
- }
- }
-
- #endregion //EditorDefinitions
-
- #endregion //Properties
-
- #region Override Methods
-
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
-
- if( _newItemTypesComboBox != null )
- {
- _newItemTypesComboBox.Loaded -= new RoutedEventHandler( this.NewItemTypesComboBox_Loaded );
- }
- _newItemTypesComboBox = GetTemplateChild( PART_NewItemTypesComboBox ) as ComboBox;
- if( _newItemTypesComboBox != null )
- {
- _newItemTypesComboBox.Loaded += new RoutedEventHandler( this.NewItemTypesComboBox_Loaded );
- }
-
- _listBox = this.GetTemplateChild( PART_ListBox ) as ListBox;
-
- if( _propertyGrid != null )
- {
- _propertyGrid.PropertyValueChanged -= this.PropertyGrid_PropertyValueChanged;
- }
- _propertyGrid = GetTemplateChild( PART_PropertyGrid ) as PropertyGrid.PropertyGrid;
- if( _propertyGrid != null )
- {
- _propertyGrid.PropertyValueChanged += this.PropertyGrid_PropertyValueChanged;
- }
- }
-
- public PropertyGrid.PropertyGrid PropertyGrid
- {
- get
- {
- if( _propertyGrid == null )
- {
- this.ApplyTemplate();
- }
- return _propertyGrid;
- }
- }
-
-
-
-
- #endregion
-
- #region Constructors
-
- static CollectionControl()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( CollectionControl ), new FrameworkPropertyMetadata( typeof( CollectionControl ) ) );
- }
-
- public CollectionControl()
- {
- Items = new ObservableCollection();
- CommandBindings.Add( new CommandBinding( ApplicationCommands.New, this.AddNew, this.CanAddNew ) );
- CommandBindings.Add( new CommandBinding( ApplicationCommands.Delete, this.Delete, this.CanDelete ) );
- CommandBindings.Add( new CommandBinding( ApplicationCommands.Copy, this.Duplicate, this.CanDuplicate ) );
- CommandBindings.Add( new CommandBinding( ComponentCommands.MoveDown, this.MoveDown, this.CanMoveDown ) );
- CommandBindings.Add( new CommandBinding( ComponentCommands.MoveUp, this.MoveUp, this.CanMoveUp ) );
- }
-
- #endregion //Constructors
-
- #region Events
-
- #region ItemDeleting Event
-
- public delegate void ItemDeletingRoutedEventHandler( object sender, ItemDeletingEventArgs e );
-
- public static readonly RoutedEvent ItemDeletingEvent = EventManager.RegisterRoutedEvent( "ItemDeleting", RoutingStrategy.Bubble, typeof( ItemDeletingRoutedEventHandler ), typeof( CollectionControl ) );
- public event ItemDeletingRoutedEventHandler ItemDeleting
- {
- add
- {
- AddHandler( ItemDeletingEvent, value );
- }
- remove
- {
- RemoveHandler( ItemDeletingEvent, value );
- }
- }
-
- #endregion //ItemDeleting Event
-
- #region ItemDeleted Event
-
- public delegate void ItemDeletedRoutedEventHandler( object sender, ItemEventArgs e );
-
- public static readonly RoutedEvent ItemDeletedEvent = EventManager.RegisterRoutedEvent( "ItemDeleted", RoutingStrategy.Bubble, typeof( ItemDeletedRoutedEventHandler ), typeof( CollectionControl ) );
- public event ItemDeletedRoutedEventHandler ItemDeleted
- {
- add
- {
- AddHandler( ItemDeletedEvent, value );
- }
- remove
- {
- RemoveHandler( ItemDeletedEvent, value );
- }
- }
-
- #endregion //ItemDeleted Event
-
- #region ItemAdding Event
-
- public delegate void ItemAddingRoutedEventHandler( object sender, ItemAddingEventArgs e );
-
- public static readonly RoutedEvent ItemAddingEvent = EventManager.RegisterRoutedEvent( "ItemAdding", RoutingStrategy.Bubble, typeof( ItemAddingRoutedEventHandler ), typeof( CollectionControl ) );
- public event ItemAddingRoutedEventHandler ItemAdding
- {
- add
- {
- AddHandler( ItemAddingEvent, value );
- }
- remove
- {
- RemoveHandler( ItemAddingEvent, value );
- }
- }
-
- #endregion //ItemAdding Event
-
- #region ItemAdded Event
-
- public delegate void ItemAddedRoutedEventHandler( object sender, ItemEventArgs e );
-
- public static readonly RoutedEvent ItemAddedEvent = EventManager.RegisterRoutedEvent( "ItemAdded", RoutingStrategy.Bubble, typeof( ItemAddedRoutedEventHandler ), typeof( CollectionControl ) );
- public event ItemAddedRoutedEventHandler ItemAdded
- {
- add
- {
- AddHandler( ItemAddedEvent, value );
- }
- remove
- {
- RemoveHandler( ItemAddedEvent, value );
- }
- }
-
- #endregion //ItemAdded Event
-
- #region ItemMovedDown Event
-
- public delegate void ItemMovedDownRoutedEventHandler( object sender, ItemEventArgs e );
-
- public static readonly RoutedEvent ItemMovedDownEvent = EventManager.RegisterRoutedEvent( "ItemMovedDown", RoutingStrategy.Bubble, typeof( ItemMovedDownRoutedEventHandler ), typeof( CollectionControl ) );
- public event ItemMovedDownRoutedEventHandler ItemMovedDown
- {
- add
- {
- AddHandler( ItemMovedDownEvent, value );
- }
- remove
- {
- RemoveHandler( ItemMovedDownEvent, value );
- }
- }
-
- #endregion //ItemMovedDown Event
-
- #region ItemMovedUp Event
-
- public delegate void ItemMovedUpRoutedEventHandler( object sender, ItemEventArgs e );
-
- public static readonly RoutedEvent ItemMovedUpEvent = EventManager.RegisterRoutedEvent( "ItemMovedUp", RoutingStrategy.Bubble, typeof( ItemMovedUpRoutedEventHandler ), typeof( CollectionControl ) );
- public event ItemMovedUpRoutedEventHandler ItemMovedUp
- {
- add
- {
- AddHandler( ItemMovedUpEvent, value );
- }
- remove
- {
- RemoveHandler( ItemMovedUpEvent, value );
- }
- }
-
- #endregion //ItemMovedUp Event
-
- #endregion
-
- #region EventHandlers
-
- void NewItemTypesComboBox_Loaded( object sender, RoutedEventArgs e )
- {
- if( _newItemTypesComboBox != null )
- _newItemTypesComboBox.SelectedIndex = 0;
- }
-
- private void PropertyGrid_PropertyValueChanged( object sender, PropertyGrid.PropertyValueChangedEventArgs e )
- {
- if( _listBox != null )
- {
- _listBox.Dispatcher.BeginInvoke( DispatcherPriority.Input, new Action( () =>
- {
- _listBox.Items.Refresh();
- }
- ) );
- }
- }
-
- #endregion
-
- #region Commands
-
- private void AddNew( object sender, ExecutedRoutedEventArgs e )
- {
- var newItem = this.CreateNewItem( ( Type )e.Parameter );
-
- this.AddNewCore( newItem );
- }
-
- private void CanAddNew( object sender, CanExecuteRoutedEventArgs e )
- {
- var t = e.Parameter as Type;
- this.CanAddNewCore( t, e );
- }
-
- private void CanAddNewCore( Type t, CanExecuteRoutedEventArgs e )
- {
- if( ( t != null ) && !this.IsReadOnly )
- {
- var isComplexStruct = t.IsValueType && !t.IsEnum && !t.IsPrimitive;
-
- if( isComplexStruct || ( t.GetConstructor( Type.EmptyTypes ) != null ) )
- {
- e.CanExecute = true;
- }
- }
- }
-
- private void AddNewCore( object newItem )
- {
- if( newItem == null )
- throw new ArgumentNullException( "newItem" );
-
- var eventArgs = new ItemAddingEventArgs( ItemAddingEvent, newItem );
- this.RaiseEvent( eventArgs );
- if( eventArgs.Cancel )
- return;
- newItem = eventArgs.Item;
-
- this.Items.Add( newItem );
-
- this.RaiseEvent( new ItemEventArgs( ItemAddedEvent, newItem ) );
-
- this.SelectedItem = newItem;
- }
-
- private void Delete( object sender, ExecutedRoutedEventArgs e )
- {
- var eventArgs = new ItemDeletingEventArgs( ItemDeletingEvent, e.Parameter );
- this.RaiseEvent( eventArgs );
- if( eventArgs.Cancel )
- return;
-
- this.Items.Remove( e.Parameter );
-
- this.RaiseEvent( new ItemEventArgs( ItemDeletedEvent, e.Parameter ) );
- }
-
- private void CanDelete( object sender, CanExecuteRoutedEventArgs e )
- {
- e.CanExecute = e.Parameter != null && !this.IsReadOnly;
- }
-
- private void Duplicate( object sender, ExecutedRoutedEventArgs e )
- {
- var newItem = this.DuplicateItem( e );
- this.AddNewCore( newItem );
- }
-
- private void CanDuplicate( object sender, CanExecuteRoutedEventArgs e )
- {
- var t = (e.Parameter != null) ? e.Parameter.GetType() : null;
- this.CanAddNewCore( t, e );
- }
-
- private object DuplicateItem( ExecutedRoutedEventArgs e )
- {
- if( e == null )
- throw new ArgumentNullException( "e" );
-
- var baseItem = e.Parameter;
- var newItemType = baseItem.GetType();
- var newItem = this.CreateNewItem( newItemType );
-
- var type = newItemType;
- while( type != null )
- {
- var baseProperties = type.GetFields( BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance );
- foreach( var prop in baseProperties )
- {
- prop.SetValue( newItem, prop.GetValue( baseItem ) );
- }
- type = type.BaseType;
- }
-
- return newItem;
- }
-
- private void MoveDown( object sender, ExecutedRoutedEventArgs e )
- {
- var selectedItem = e.Parameter;
- var index = Items.IndexOf( selectedItem );
- Items.RemoveAt( index );
- Items.Insert( ++index, selectedItem );
-
- this.RaiseEvent( new ItemEventArgs( ItemMovedDownEvent, selectedItem ) );
-
- this.SelectedItem = selectedItem;
- }
-
- private void CanMoveDown( object sender, CanExecuteRoutedEventArgs e )
- {
- if( e.Parameter != null && Items.IndexOf( e.Parameter ) < ( Items.Count - 1 ) && !this.IsReadOnly )
- e.CanExecute = true;
- }
-
- private void MoveUp( object sender, ExecutedRoutedEventArgs e )
- {
- var selectedItem = e.Parameter;
- var index = Items.IndexOf( selectedItem );
- this.Items.RemoveAt( index );
- this.Items.Insert( --index, selectedItem );
-
- this.RaiseEvent( new ItemEventArgs( ItemMovedUpEvent, selectedItem ) );
-
- this.SelectedItem = selectedItem;
- }
-
- private void CanMoveUp( object sender, CanExecuteRoutedEventArgs e )
- {
- if( e.Parameter != null && Items.IndexOf( e.Parameter ) > 0 && !this.IsReadOnly )
- e.CanExecute = true;
- }
-
- #endregion //Commands
-
- #region Methods
-
- public void PersistChanges()
- {
- this.PersistChanges( this.Items );
- }
-
- internal void PersistChanges( IList sourceList )
- {
- var collection = ComputeItemsSource();
- if( collection == null )
- return;
-
- //IDictionary and IDictionary
- if( collection is IDictionary )
- {
- //For a Dictionary, we need to parse the list of EditableKeyValuePair and add KeyValuePair to the Dictionary.
- var dict = (IDictionary)collection;
- //the easiest way to persist changes to the source is to just clear the source list and then add all items to it.
- dict.Clear();
-
- foreach( var item in sourceList )
- {
- var propInfoKey = item.GetType().GetProperty( "Key" );
- var propInfoValue = item.GetType().GetProperty( "Value" );
- if( (propInfoKey != null) && (propInfoValue != null) )
- {
- dict.Add( propInfoKey.GetValue( item, null ), propInfoValue.GetValue( item, null ) );
- }
- }
- }
- //IList
- else if( collection is IList )
- {
- var list = (IList)collection;
-
- //the easiest way to persist changes to the source is to just clear the source list and then add all items to it.
- list.Clear();
-
- if( list.IsFixedSize )
- {
- if( sourceList.Count > list.Count )
- throw new IndexOutOfRangeException("Exceeding array size.");
-
- for( int i = 0; i < sourceList.Count; ++i )
- list[ i ] = sourceList[ i ];
- }
- else
- {
- foreach( var item in sourceList )
- {
- list.Add( item );
- }
- }
- }
- else
- {
- //ICollection (or IList)
- var collectionType = collection.GetType();
- var iCollectionOfTInterface = collectionType.GetInterfaces().FirstOrDefault( x => x.IsGenericType && (x.GetGenericTypeDefinition() == typeof( ICollection<> )) );
- if( iCollectionOfTInterface != null )
- {
- var argumentType = iCollectionOfTInterface.GetGenericArguments().FirstOrDefault();
- if( argumentType != null )
- {
- var iCollectionOfTType = typeof( ICollection<> ).MakeGenericType( argumentType );
-
- //the easiest way to persist changes to the source is to just clear the source list and then add all items to it.
- iCollectionOfTType.GetMethod( "Clear" ).Invoke( collection, null );
-
- foreach( var item in sourceList )
- {
- iCollectionOfTType.GetMethod( "Add" ).Invoke( collection, new object[] { item } );
- }
- }
- }
- }
- }
-
- private IEnumerable CreateItemsSource()
- {
- IEnumerable collection = null;
-
- if( ItemsSourceType != null )
- {
- var constructor = ItemsSourceType.GetConstructor( Type.EmptyTypes );
- if( constructor != null )
- {
- collection = ( IEnumerable )constructor.Invoke( null );
- }
- else if( ItemsSourceType.IsArray )
- {
- collection = Array.CreateInstance( ItemsSourceType.GetElementType(), Items.Count );
- }
- }
-
- return collection;
- }
-
- private object CreateNewItem( Type type )
- {
- return Activator.CreateInstance( type );
- }
-
- private IEnumerable ComputeItemsSource()
- {
- if( ItemsSource == null )
- ItemsSource = CreateItemsSource();
-
- return ItemsSource;
- }
-
- #endregion //Methods
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlButton.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlButton.cs
deleted file mode 100644
index 379fa047..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlButton.cs
+++ /dev/null
@@ -1,153 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using Xceed.Wpf.Toolkit.PropertyGrid;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class CollectionControlButton : Button
- {
- #region Constructors
-
- static CollectionControlButton()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( CollectionControlButton ), new FrameworkPropertyMetadata( typeof( CollectionControlButton ) ) );
- }
-
- public CollectionControlButton()
- {
- this.Click += this.CollectionControlButton_Click;
- }
-
- #endregion //Constructors
-
- #region Properties
-
- #region EditorDefinitions Property
-
- public static readonly DependencyProperty EditorDefinitionsProperty = DependencyProperty.Register( "EditorDefinitions", typeof( EditorDefinitionCollection ), typeof( CollectionControlButton ), new UIPropertyMetadata( null ) );
- public EditorDefinitionCollection EditorDefinitions
- {
- get
- {
- return ( EditorDefinitionCollection )GetValue( EditorDefinitionsProperty );
- }
- set
- {
- SetValue( EditorDefinitionsProperty, value );
- }
- }
-
- #endregion //EditorDefinitions
-
- #region IsReadOnly Property
-
- public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register( "IsReadOnly", typeof( bool ), typeof( CollectionControlButton ), new UIPropertyMetadata( false ) );
- public bool IsReadOnly
- {
- get
- {
- return ( bool )GetValue( IsReadOnlyProperty );
- }
- set
- {
- SetValue( IsReadOnlyProperty, value );
- }
- }
-
- #endregion //IsReadOnly
-
- #region ItemsSource Property
-
- public static readonly DependencyProperty ItemsSourceProperty = DependencyProperty.Register( "ItemsSource", typeof( IEnumerable ), typeof( CollectionControlButton ), new UIPropertyMetadata( null ) );
- public IEnumerable ItemsSource
- {
- get
- {
- return ( IEnumerable )GetValue( ItemsSourceProperty );
- }
- set
- {
- SetValue( ItemsSourceProperty, value );
- }
- }
-
- #endregion //ItemsSource
-
- #region ItemsSourceType Property
-
- public static readonly DependencyProperty ItemsSourceTypeProperty = DependencyProperty.Register( "ItemsSourceType", typeof( Type ), typeof( CollectionControlButton ), new UIPropertyMetadata( null ) );
- public Type ItemsSourceType
- {
- get
- {
- return ( Type )GetValue( ItemsSourceTypeProperty );
- }
- set
- {
- SetValue( ItemsSourceTypeProperty, value );
- }
- }
-
- #endregion //ItemsSourceType
-
- #region NewItemTypes Property
-
- public static readonly DependencyProperty NewItemTypesProperty = DependencyProperty.Register( "NewItemTypes", typeof( IList ), typeof( CollectionControlButton ), new UIPropertyMetadata( null ) );
- public IList NewItemTypes
- {
- get
- {
- return ( IList )GetValue( NewItemTypesProperty );
- }
- set
- {
- SetValue( NewItemTypesProperty, value );
- }
- }
-
- #endregion //NewItemTypes
-
- #endregion
-
- #region Base Class Overrides
-
-
- #endregion
-
- #region Methods
-
- private void CollectionControlButton_Click( object sender, RoutedEventArgs e )
- {
- var collectionControlDialog = new CollectionControlDialog();
- var binding = new Binding( "ItemsSource" ) { Source = this, Mode = BindingMode.TwoWay };
- BindingOperations.SetBinding( collectionControlDialog, CollectionControlDialog.ItemsSourceProperty, binding );
- collectionControlDialog.NewItemTypes = this.NewItemTypes;
- collectionControlDialog.ItemsSourceType = this.ItemsSourceType;
- collectionControlDialog.IsReadOnly = this.IsReadOnly;
- collectionControlDialog.EditorDefinitions = this.EditorDefinitions;
- collectionControlDialog.ShowDialog();
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlDialog.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlDialog.xaml
deleted file mode 100644
index aec19954..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlDialog.xaml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlDialog.xaml.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlDialog.xaml.cs
deleted file mode 100644
index db766804..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlDialog.xaml.cs
+++ /dev/null
@@ -1,348 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Windows;
-using System.Windows.Media;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-using System.Linq;
-using System.Runtime.Serialization;
-using System.Security;
-using System.IO;
-using System.Runtime.Serialization.Formatters.Binary;
-using Xceed.Wpf.Toolkit.PropertyGrid;
-
-namespace Xceed.Wpf.Toolkit
-{
- public partial class CollectionControlDialogBase :
- Window
- {
- }
-
- ///
- /// Interaction logic for CollectionControlDialog.xaml
- ///
- public partial class CollectionControlDialog : CollectionControlDialogBase
- {
- #region Private Members
-
- private IList originalData = new List();
-
- #endregion
-
- #region Properties
-
- public static readonly DependencyProperty ItemsSourceProperty = DependencyProperty.Register( "ItemsSource", typeof( IEnumerable ), typeof( CollectionControlDialog ), new UIPropertyMetadata( null ) );
- public IEnumerable ItemsSource
- {
- get
- {
- return ( IEnumerable )GetValue( ItemsSourceProperty );
- }
- set
- {
- SetValue( ItemsSourceProperty, value );
- }
- }
-
- public static readonly DependencyProperty ItemsSourceTypeProperty = DependencyProperty.Register( "ItemsSourceType", typeof( Type ), typeof( CollectionControlDialog ), new UIPropertyMetadata( null ) );
- public Type ItemsSourceType
- {
- get
- {
- return ( Type )GetValue( ItemsSourceTypeProperty );
- }
- set
- {
- SetValue( ItemsSourceTypeProperty, value );
- }
- }
-
- public static readonly DependencyProperty NewItemTypesProperty = DependencyProperty.Register( "NewItemTypes", typeof( IList ), typeof( CollectionControlDialog ), new UIPropertyMetadata( null ) );
- public IList NewItemTypes
- {
- get
- {
- return ( IList )GetValue( NewItemTypesProperty );
- }
- set
- {
- SetValue( NewItemTypesProperty, value );
- }
- }
-
- public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register( "IsReadOnly", typeof( bool ), typeof( CollectionControlDialog ), new UIPropertyMetadata( false ) );
- public bool IsReadOnly
- {
- get
- {
- return ( bool )GetValue( IsReadOnlyProperty );
- }
- set
- {
- SetValue( IsReadOnlyProperty, value );
- }
- }
-
- public static readonly DependencyProperty EditorDefinitionsProperty = DependencyProperty.Register( "EditorDefinitions", typeof( EditorDefinitionCollection ), typeof( CollectionControlDialog ), new UIPropertyMetadata( null ) );
- public EditorDefinitionCollection EditorDefinitions
- {
- get
- {
- return ( EditorDefinitionCollection )GetValue( EditorDefinitionsProperty );
- }
- set
- {
- SetValue( EditorDefinitionsProperty, value );
- }
- }
-
- public CollectionControl CollectionControl
- {
- get
- {
- return _collectionControl;
- }
- }
-
- #endregion //Properties
-
- #region Constructors
-
- public CollectionControlDialog()
- {
- InitializeComponent();
- }
-
- public CollectionControlDialog( Type itemsourceType )
- : this()
- {
- ItemsSourceType = itemsourceType;
- }
-
- public CollectionControlDialog( Type itemsourceType, IList newItemTypes )
- : this( itemsourceType )
- {
- NewItemTypes = newItemTypes;
- }
-
- #endregion //Constructors
-
- #region Overrides
-
- protected override void OnSourceInitialized( EventArgs e )
- {
- base.OnSourceInitialized( e );
-
- //Backup data if case "Cancel" is clicked.
- if( this.ItemsSource != null )
- {
- foreach( var item in this.ItemsSource )
- {
- originalData.Add( this.Clone( item ) );
- }
- }
- }
-
- #endregion
-
- #region Event Handlers
-
- private void OkButton_Click( object sender, RoutedEventArgs e )
- {
- if( this.ItemsSource is IDictionary )
- {
- if( !this.AreDictionaryKeysValid() )
- {
- MessageBox.Show( "All dictionary items should have distinct non-null Key values.", "Warning" );
- return;
- }
- }
-
- _collectionControl.PersistChanges();
- this.DialogResult = true;
- this.Close();
- }
-
- private void CancelButton_Click( object sender, RoutedEventArgs e )
- {
- _collectionControl.PersistChanges( originalData );
- this.DialogResult = false;
- this.Close();
- }
-
- #endregion //Event Hanlders
-
- #region Private Methods
-
- [SecuritySafeCritical]
- private object Clone( object source )
- {
- if( source == null )
- return null;
-
- object result = null;
- var sourceType = source.GetType();
-
- if( source is Array )
- {
- using( var stream = new MemoryStream() )
- {
- var formatter = new BinaryFormatter();
- formatter.Serialize( stream, source );
- stream.Seek( 0, SeekOrigin.Begin );
- result = ( Array )formatter.Deserialize( stream );
- }
- }
- // For IDictionary, we need to create EditableKeyValuePair to edit the Key-Value.
- else if( ( this.ItemsSource is IDictionary )
- && sourceType.IsGenericType
- && typeof( KeyValuePair<,> ).IsAssignableFrom( sourceType.GetGenericTypeDefinition() ) )
- {
- result = this.GenerateEditableKeyValuePair( source );
- }
- else
- {
- // Initialized a new object with default values
- try
- {
- result = FormatterServices.GetUninitializedObject( sourceType );
- }
- catch( Exception )
- {
- }
-
- var constructor = sourceType.GetConstructor( Type.EmptyTypes );
- if( constructor != null )
- {
- constructor.Invoke( result, null );
- }
- else
- {
- result = source;
- }
- }
- Debug.Assert( result != null );
- if( result != null )
- {
- var properties = sourceType.GetProperties();
-
- foreach( var propertyInfo in properties )
- {
- var parameters = propertyInfo.GetIndexParameters();
- var index = parameters.GetLength( 0 ) == 0 ? null : new object[] { parameters.GetLength( 0 ) - 1 };
- var propertyInfoValue = propertyInfo.GetValue( source, index );
-
- if( propertyInfo.CanWrite )
- {
- // Look for nested object
- if( propertyInfo.PropertyType.IsClass
- && ( propertyInfo.PropertyType != typeof( Transform ) )
- && !propertyInfo.PropertyType.Equals( typeof( string ) ) )
- {
- // We have a Collection/List of T.
- if( propertyInfo.PropertyType.IsGenericType )
- {
- // Clone sub-objects if the T are non-primitive types objects.
- var arg = propertyInfo.PropertyType.GetGenericArguments().FirstOrDefault();
- if( ( arg != null ) && !arg.IsPrimitive && !arg.Equals( typeof( String ) ) && !arg.IsEnum )
- {
- var nestedObject = this.Clone( propertyInfoValue );
- propertyInfo.SetValue( result, nestedObject, null );
- }
- else
- {
- // copy object if the T are primitive types objects.
- propertyInfo.SetValue( result, propertyInfoValue, null );
- }
- }
- else
- {
- var nestedObject = this.Clone( propertyInfoValue );
- if( nestedObject != null )
- {
- // For T object included in List/Collections, Add it to the List/Collection of T.
- if( index != null )
- {
- result.GetType().GetMethod( "Add" ).Invoke( result, new[] { nestedObject } );
- }
- else
- {
- propertyInfo.SetValue( result, nestedObject, null );
- }
- }
- }
- }
- else
- {
- // For T object included in List/Collections, Add it to the List/Collection of T.
- if( index != null )
- {
- result.GetType().GetMethod( "Add" ).Invoke( result, new[] { propertyInfoValue } );
- }
- else
- {
- // copy regular object
- propertyInfo.SetValue( result, propertyInfoValue, null );
- }
- }
- }
- }
- }
-
- return result;
- }
-
- private object GenerateEditableKeyValuePair( object source )
- {
- var sourceType = source.GetType();
- if( ( sourceType.GetGenericArguments() == null ) || ( sourceType.GetGenericArguments().GetLength( 0 ) != 2 ) )
- return null;
-
- var propInfoKey = sourceType.GetProperty( "Key" );
- var propInfoValue = sourceType.GetProperty( "Value" );
- if( ( propInfoKey != null ) && ( propInfoValue != null ) )
- {
- return ListUtilities.CreateEditableKeyValuePair( propInfoKey.GetValue( source, null )
- , sourceType.GetGenericArguments()[ 0 ]
- , propInfoValue.GetValue( source, null )
- , sourceType.GetGenericArguments()[ 1 ] );
- }
- return null;
- }
-
- private bool AreDictionaryKeysValid()
- {
- var keys = _collectionControl.Items.Select( x =>
- {
- var keyType = x.GetType().GetProperty( "Key" );
- if( keyType != null )
- {
- return keyType.GetValue( x, null );
- }
- return null;
- } );
-
- return ( keys.Distinct().Count() == _collectionControl.Items.Count )
- && keys.All( x => x != null );
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/Converters/NewItemTypesComboBoxConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/Converters/NewItemTypesComboBoxConverter.cs
deleted file mode 100644
index d0ccf3e4..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/Converters/NewItemTypesComboBoxConverter.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows.Data;
-using System.Globalization;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-
-namespace Xceed.Wpf.Toolkit.Converters
-{
- ///
- /// This multi-value converter is used in the CollectionControl template
- /// to determine the list of possible new item types that will be shown in the combo box.
- ///
- /// If the second value (i.e., CollectionControl.NewItemTypes) is not null, this list will be used.
- /// Otherwise, if the first value (i.e., CollectionControl.ItemsSourceType) is a "IList<T>"
- /// type, the new item type list will contain "T".
- ///
- ///
- public class NewItemTypesComboBoxConverter : IMultiValueConverter
- {
- public object Convert( object[] values, Type targetType, object parameter, CultureInfo culture )
- {
-
- if( values.Length != 2 )
- throw new ArgumentException("The 'values' argument should contain 2 objects.");
-
- if( values[ 1 ] != null )
- {
- if( !values[ 1 ].GetType().IsGenericType || !(values[ 1 ].GetType().GetGenericArguments().First().GetType() is Type) )
- throw new ArgumentException( "The 'value' argument is not of the correct type." );
-
- return values[ 1 ];
- }
- else if( values[ 0 ] != null )
- {
- if( !( values[ 0 ].GetType() is Type ) )
- throw new ArgumentException( "The 'value' argument is not of the correct type." );
-
- List types = new List();
- Type listType = ListUtilities.GetListItemType( ( Type )values[ 0 ] );
- if( listType != null )
- {
- types.Add( listType );
- }
-
- return types;
- }
-
- return null;
- }
-
- public object[] ConvertBack( object value, Type[] targetTypes, object parameter, CultureInfo culture )
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/ItemAddingEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/ItemAddingEventArgs.cs
deleted file mode 100644
index 12d3bb47..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/ItemAddingEventArgs.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Xceed.Wpf.Toolkit.Core;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class ItemAddingEventArgs : CancelRoutedEventArgs
- {
- #region Constructor
-
- public ItemAddingEventArgs( RoutedEvent itemAddingEvent, object itemAdding )
- : base( itemAddingEvent )
- {
- Item = itemAdding;
- }
-
- #endregion
-
- #region Properties
-
- #region Item Property
-
- public object Item
- {
- get;
- set;
- }
-
- #endregion
-
- #endregion //Properties
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/ItemDeletingEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/ItemDeletingEventArgs.cs
deleted file mode 100644
index d8343bdd..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/ItemDeletingEventArgs.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Xceed.Wpf.Toolkit.Core;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class ItemDeletingEventArgs : CancelRoutedEventArgs
- {
- #region Private Members
-
- private object _item;
-
- #endregion
-
- #region Constructor
-
- public ItemDeletingEventArgs( RoutedEvent itemDeletingEvent, object itemDeleting )
- : base( itemDeletingEvent )
- {
- _item = itemDeleting;
- }
-
- #region Property Item
-
- public object Item
- {
- get
- {
- return _item;
- }
- }
-
- #endregion
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/ItemEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/ItemEventArgs.cs
deleted file mode 100644
index aa45304a..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/ItemEventArgs.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class ItemEventArgs : RoutedEventArgs
- {
- #region Protected Members
-
- private object _item;
-
- #endregion
-
- #region Constructor
-
- internal ItemEventArgs( RoutedEvent routedEvent, object newItem )
- : base( routedEvent )
- {
- _item = newItem;
- }
-
- #endregion
-
- #region Property Item
-
- public object Item
- {
- get
- {
- return _item;
- }
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/PrimitiveTypeCollectionControl.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/PrimitiveTypeCollectionControl.cs
deleted file mode 100644
index 1fc0ab77..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/PrimitiveTypeCollectionControl.cs
+++ /dev/null
@@ -1,314 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Text;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class PrimitiveTypeCollectionControl : ContentControl
- {
- #region Members
-
- bool _surpressTextChanged;
- bool _conversionFailed;
-
- #endregion //Members
-
- #region Properties
-
- #region IsOpen
-
- public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register( "IsOpen", typeof( bool ), typeof( PrimitiveTypeCollectionControl ), new UIPropertyMetadata( false, OnIsOpenChanged ) );
- public bool IsOpen
- {
- get
- {
- return ( bool )GetValue( IsOpenProperty );
- }
- set
- {
- SetValue( IsOpenProperty, value );
- }
- }
-
- private static void OnIsOpenChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- PrimitiveTypeCollectionControl primitiveTypeCollectionControl = o as PrimitiveTypeCollectionControl;
- if( primitiveTypeCollectionControl != null )
- primitiveTypeCollectionControl.OnIsOpenChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- protected virtual void OnIsOpenChanged( bool oldValue, bool newValue )
- {
-
- }
-
- #endregion //IsOpen
-
- #region ItemsSource
-
- public static readonly DependencyProperty ItemsSourceProperty = DependencyProperty.Register( "ItemsSource", typeof( IList ), typeof( PrimitiveTypeCollectionControl ), new UIPropertyMetadata( null, OnItemsSourceChanged ) );
- public IList ItemsSource
- {
- get
- {
- return ( IList )GetValue( ItemsSourceProperty );
- }
- set
- {
- SetValue( ItemsSourceProperty, value );
- }
- }
-
- private static void OnItemsSourceChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- PrimitiveTypeCollectionControl primitiveTypeCollectionControl = o as PrimitiveTypeCollectionControl;
- if( primitiveTypeCollectionControl != null )
- primitiveTypeCollectionControl.OnItemsSourceChanged( ( IList )e.OldValue, ( IList )e.NewValue );
- }
-
- protected virtual void OnItemsSourceChanged( IList oldValue, IList newValue )
- {
- if( newValue == null )
- return;
-
- if( ItemsSourceType == null )
- ItemsSourceType = newValue.GetType();
-
- if( ItemType == null && newValue.GetType().ContainsGenericParameters )
- ItemType = newValue.GetType().GetGenericArguments()[ 0 ];
-
- SetText( newValue );
- }
-
- #endregion //ItemsSource
-
- #region IsReadOnly
-
- public static readonly DependencyProperty IsReadOnlyProperty =
- DependencyProperty.Register( "IsReadOnly", typeof( bool ), typeof( PrimitiveTypeCollectionControl ), new UIPropertyMetadata( false ) );
-
- public bool IsReadOnly
- {
- get { return ( bool )GetValue( IsReadOnlyProperty ); }
- set { SetValue( IsReadOnlyProperty, value ); }
- }
-
- #endregion //IsReadOnly
-
- #region ItemsSourceType
-
- public static readonly DependencyProperty ItemsSourceTypeProperty = DependencyProperty.Register( "ItemsSourceType", typeof( Type ), typeof( PrimitiveTypeCollectionControl ), new UIPropertyMetadata( null ) );
- public Type ItemsSourceType
- {
- get
- {
- return ( Type )GetValue( ItemsSourceTypeProperty );
- }
- set
- {
- SetValue( ItemsSourceTypeProperty, value );
- }
- }
-
- #endregion ItemsSourceType
-
- #region ItemType
-
- public static readonly DependencyProperty ItemTypeProperty = DependencyProperty.Register( "ItemType", typeof( Type ), typeof( PrimitiveTypeCollectionControl ), new UIPropertyMetadata( null ) );
- public Type ItemType
- {
- get
- {
- return ( Type )GetValue( ItemTypeProperty );
- }
- set
- {
- SetValue( ItemTypeProperty, value );
- }
- }
-
- #endregion ItemType
-
- #region Text
-
- public static readonly DependencyProperty TextProperty = DependencyProperty.Register( "Text", typeof( string ), typeof( PrimitiveTypeCollectionControl ), new UIPropertyMetadata( null, OnTextChanged ) );
- public string Text
- {
- get
- {
- return ( string )GetValue( TextProperty );
- }
- set
- {
- SetValue( TextProperty, value );
- }
- }
-
- private static void OnTextChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- PrimitiveTypeCollectionControl primitiveTypeCollectionControl = o as PrimitiveTypeCollectionControl;
- if( primitiveTypeCollectionControl != null )
- primitiveTypeCollectionControl.OnTextChanged( ( string )e.OldValue, ( string )e.NewValue );
- }
-
- protected virtual void OnTextChanged( string oldValue, string newValue )
- {
- if( !_surpressTextChanged )
- PersistChanges();
- }
-
- #endregion //Text
-
- #endregion //Properties
-
- #region Constructors
-
- static PrimitiveTypeCollectionControl()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( PrimitiveTypeCollectionControl ), new FrameworkPropertyMetadata( typeof( PrimitiveTypeCollectionControl ) ) );
- }
-
- public PrimitiveTypeCollectionControl()
- {
- }
-
- #endregion //Constructors
-
- #region Overrides
-
-
-#endregion
-
- #region Methods
-
- private void PersistChanges()
- {
- IList list = ComputeItemsSource();
- if( list == null )
- return;
-
- IList items = ComputeItems();
-
- //the easiest way to persist changes to the source is to just clear the source list and then add all items to it.
- list.Clear();
-
- int counter = 0;
- foreach( var item in items )
- {
- if( list is Array )
- {
- ( ( Array )list ).SetValue( item, counter++);
- }
- else
- {
- list.Add( item );
- }
- };
-
- // if something went wrong during conversion we want to reload the text to show only valid entries
- if( _conversionFailed )
- SetText( list );
- }
-
- private IList ComputeItems()
- {
- IList items = new List();
-
- if( ItemType == null )
- return items;
-
- string[] textArray = Text.Split( '\n' );
-
- foreach( string s in textArray )
- {
- string valueString = s.TrimEnd( '\r' );
- if( !String.IsNullOrEmpty( valueString ) )
- {
- object value = null;
- try
- {
- if( ItemType.IsEnum )
- {
- value = Enum.Parse( ItemType, valueString );
- }
- else
- {
- value = Convert.ChangeType( valueString, ItemType );
- }
- }
- catch
- {
- //a conversion failed
- _conversionFailed = true;
- }
-
- if( value != null )
- items.Add( value );
- }
- }
-
- return items;
- }
-
- private IList ComputeItemsSource()
- {
- if( ItemsSource == null )
- {
- // Save current text since creating the ItemsSource will reset it
- string currentText = this.Text;
- ItemsSource = CreateItemsSource();
- this.Text = currentText;
- }
-
- return ItemsSource;
- }
-
- private IList CreateItemsSource()
- {
- IList list = null;
-
- if( ItemsSourceType != null )
- {
- ConstructorInfo constructor = ItemsSourceType.GetConstructor( Type.EmptyTypes );
- list = ( IList )constructor.Invoke( null );
- }
-
- return list;
- }
-
- private void SetText( IEnumerable collection )
- {
- _surpressTextChanged = true;
- StringBuilder builder = new StringBuilder();
- foreach( object obj2 in collection )
- {
- builder.Append( obj2.ToString() );
- builder.AppendLine();
- }
- Text = builder.ToString().Trim();
- _surpressTextChanged = false;
- }
-
- #endregion //Methods
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index 87404edb..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,334 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml
deleted file mode 100644
index 6b1390ff..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml
+++ /dev/null
@@ -1,327 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Implementation/ColorCanvas.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Implementation/ColorCanvas.cs
deleted file mode 100644
index 8ad8ec1e..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Implementation/ColorCanvas.cs
+++ /dev/null
@@ -1,635 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-using System.Windows.Media;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-using Xceed.Wpf.Toolkit.Primitives;
-using System.IO;
-using System;
-
-namespace Xceed.Wpf.Toolkit
-{
- [TemplatePart( Name = PART_ColorShadingCanvas, Type = typeof( Canvas ) )]
- [TemplatePart( Name = PART_ColorShadeSelector, Type = typeof( Canvas ) )]
- [TemplatePart( Name = PART_SpectrumSlider, Type = typeof( ColorSpectrumSlider ) )]
- [TemplatePart( Name = PART_HexadecimalTextBox, Type = typeof( TextBox ) )]
- public class ColorCanvas : Control
- {
- private const string PART_ColorShadingCanvas = "PART_ColorShadingCanvas";
- private const string PART_ColorShadeSelector = "PART_ColorShadeSelector";
- private const string PART_SpectrumSlider = "PART_SpectrumSlider";
- private const string PART_HexadecimalTextBox = "PART_HexadecimalTextBox";
-
- #region Private Members
-
- private TranslateTransform _colorShadeSelectorTransform = new TranslateTransform();
- private Canvas _colorShadingCanvas;
- private Canvas _colorShadeSelector;
- private ColorSpectrumSlider _spectrumSlider;
- private TextBox _hexadecimalTextBox;
- private Point? _currentColorPosition;
- private bool _surpressPropertyChanged;
- private bool _updateSpectrumSliderValue = true;
-
- #endregion //Private Members
-
- #region Properties
-
- #region SelectedColor
-
- public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register( "SelectedColor", typeof( Color? ), typeof( ColorCanvas ), new FrameworkPropertyMetadata( null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedColorChanged ) );
- public Color? SelectedColor
- {
- get
- {
- return ( Color? )GetValue( SelectedColorProperty );
- }
- set
- {
- SetValue( SelectedColorProperty, value );
- }
- }
-
- private static void OnSelectedColorChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ColorCanvas colorCanvas = o as ColorCanvas;
- if( colorCanvas != null )
- colorCanvas.OnSelectedColorChanged( ( Color? )e.OldValue, ( Color? )e.NewValue );
- }
-
- protected virtual void OnSelectedColorChanged( Color? oldValue, Color? newValue )
- {
- SetHexadecimalStringProperty( GetFormatedColorString( newValue ), false );
- UpdateRGBValues( newValue );
- UpdateColorShadeSelectorPosition( newValue );
-
- RoutedPropertyChangedEventArgs args = new RoutedPropertyChangedEventArgs( oldValue, newValue );
- args.RoutedEvent = SelectedColorChangedEvent;
- RaiseEvent( args );
- }
-
- #endregion //SelectedColor
-
- #region RGB
-
- #region A
-
- public static readonly DependencyProperty AProperty = DependencyProperty.Register( "A", typeof( byte ), typeof( ColorCanvas ), new UIPropertyMetadata( ( byte )255, OnAChanged ) );
- public byte A
- {
- get
- {
- return ( byte )GetValue( AProperty );
- }
- set
- {
- SetValue( AProperty, value );
- }
- }
-
- private static void OnAChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ColorCanvas colorCanvas = o as ColorCanvas;
- if( colorCanvas != null )
- colorCanvas.OnAChanged( ( byte )e.OldValue, ( byte )e.NewValue );
- }
-
- protected virtual void OnAChanged( byte oldValue, byte newValue )
- {
- if( !_surpressPropertyChanged )
- UpdateSelectedColor();
- }
-
- #endregion //A
-
- #region R
-
- public static readonly DependencyProperty RProperty = DependencyProperty.Register( "R", typeof( byte ), typeof( ColorCanvas ), new UIPropertyMetadata( ( byte )0, OnRChanged ) );
- public byte R
- {
- get
- {
- return ( byte )GetValue( RProperty );
- }
- set
- {
- SetValue( RProperty, value );
- }
- }
-
- private static void OnRChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ColorCanvas colorCanvas = o as ColorCanvas;
- if( colorCanvas != null )
- colorCanvas.OnRChanged( ( byte )e.OldValue, ( byte )e.NewValue );
- }
-
- protected virtual void OnRChanged( byte oldValue, byte newValue )
- {
- if( !_surpressPropertyChanged )
- UpdateSelectedColor();
- }
-
- #endregion //R
-
- #region G
-
- public static readonly DependencyProperty GProperty = DependencyProperty.Register( "G", typeof( byte ), typeof( ColorCanvas ), new UIPropertyMetadata( ( byte )0, OnGChanged ) );
- public byte G
- {
- get
- {
- return ( byte )GetValue( GProperty );
- }
- set
- {
- SetValue( GProperty, value );
- }
- }
-
- private static void OnGChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ColorCanvas colorCanvas = o as ColorCanvas;
- if( colorCanvas != null )
- colorCanvas.OnGChanged( ( byte )e.OldValue, ( byte )e.NewValue );
- }
-
- protected virtual void OnGChanged( byte oldValue, byte newValue )
- {
- if( !_surpressPropertyChanged )
- UpdateSelectedColor();
- }
-
- #endregion //G
-
- #region B
-
- public static readonly DependencyProperty BProperty = DependencyProperty.Register( "B", typeof( byte ), typeof( ColorCanvas ), new UIPropertyMetadata( ( byte )0, OnBChanged ) );
- public byte B
- {
- get
- {
- return ( byte )GetValue( BProperty );
- }
- set
- {
- SetValue( BProperty, value );
- }
- }
-
- private static void OnBChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ColorCanvas colorCanvas = o as ColorCanvas;
- if( colorCanvas != null )
- colorCanvas.OnBChanged( ( byte )e.OldValue, ( byte )e.NewValue );
- }
-
- protected virtual void OnBChanged( byte oldValue, byte newValue )
- {
- if( !_surpressPropertyChanged )
- UpdateSelectedColor();
- }
-
- #endregion //B
-
- #endregion //RGB
-
- #region HexadecimalString
-
- public static readonly DependencyProperty HexadecimalStringProperty = DependencyProperty.Register( "HexadecimalString", typeof( string ), typeof( ColorCanvas ), new UIPropertyMetadata( "", OnHexadecimalStringChanged, OnCoerceHexadecimalString ) );
- public string HexadecimalString
- {
- get
- {
- return ( string )GetValue( HexadecimalStringProperty );
- }
- set
- {
- SetValue( HexadecimalStringProperty, value );
- }
- }
-
- private static void OnHexadecimalStringChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ColorCanvas colorCanvas = o as ColorCanvas;
- if( colorCanvas != null )
- colorCanvas.OnHexadecimalStringChanged( ( string )e.OldValue, ( string )e.NewValue );
- }
-
- protected virtual void OnHexadecimalStringChanged( string oldValue, string newValue )
- {
- string newColorString = GetFormatedColorString( newValue );
- string currentColorString = GetFormatedColorString( SelectedColor );
- if( !currentColorString.Equals( newColorString ) )
- {
- Color? col = null;
- if( !string.IsNullOrEmpty( newColorString ) )
- {
- col = ( Color )ColorConverter.ConvertFromString( newColorString );
- }
- UpdateSelectedColor( col );
- }
-
- SetHexadecimalTextBoxTextProperty( newValue );
- }
-
- private static object OnCoerceHexadecimalString( DependencyObject d, object basevalue )
- {
- var colorCanvas = ( ColorCanvas )d;
- if( colorCanvas == null )
- return basevalue;
-
- return colorCanvas.OnCoerceHexadecimalString( basevalue );
- }
-
- private object OnCoerceHexadecimalString( object newValue )
- {
- var value = newValue as string;
- string retValue = value;
-
- try
- {
- if( !string.IsNullOrEmpty( retValue ) )
- {
- int outValue;
- // User has entered an hexadecimal value (without the "#" character)... add it.
- if( Int32.TryParse( retValue, System.Globalization.NumberStyles.HexNumber, null, out outValue ) )
- {
- retValue = "#" + retValue;
- }
- ColorConverter.ConvertFromString( retValue );
- }
- }
- catch
- {
- //When HexadecimalString is changed via Code-Behind and hexadecimal format is bad, throw.
- throw new InvalidDataException( "Color provided is not in the correct format." );
- }
-
- return retValue;
- }
-
- #endregion //HexadecimalString
-
- #region UsingAlphaChannel
-
- public static readonly DependencyProperty UsingAlphaChannelProperty = DependencyProperty.Register( "UsingAlphaChannel", typeof( bool ), typeof( ColorCanvas ), new FrameworkPropertyMetadata( true, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback( OnUsingAlphaChannelPropertyChanged ) ) );
- public bool UsingAlphaChannel
- {
- get
- {
- return ( bool )GetValue( UsingAlphaChannelProperty );
- }
- set
- {
- SetValue( UsingAlphaChannelProperty, value );
- }
- }
-
- private static void OnUsingAlphaChannelPropertyChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- ColorCanvas colorCanvas = o as ColorCanvas;
- if( colorCanvas != null )
- colorCanvas.OnUsingAlphaChannelChanged();
- }
-
- protected virtual void OnUsingAlphaChannelChanged()
- {
- SetHexadecimalStringProperty( GetFormatedColorString( SelectedColor ), false );
- }
-
- #endregion //UsingAlphaChannel
-
- #endregion //Properties
-
- #region Constructors
-
- static ColorCanvas()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( ColorCanvas ), new FrameworkPropertyMetadata( typeof( ColorCanvas ) ) );
- }
-
- public ColorCanvas()
- {
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
-
- if( _colorShadingCanvas != null )
- {
- _colorShadingCanvas.MouseLeftButtonDown -= ColorShadingCanvas_MouseLeftButtonDown;
- _colorShadingCanvas.MouseLeftButtonUp -= ColorShadingCanvas_MouseLeftButtonUp;
- _colorShadingCanvas.MouseMove -= ColorShadingCanvas_MouseMove;
- _colorShadingCanvas.SizeChanged -= ColorShadingCanvas_SizeChanged;
- }
-
- _colorShadingCanvas = GetTemplateChild( PART_ColorShadingCanvas ) as Canvas;
-
- if( _colorShadingCanvas != null )
- {
- _colorShadingCanvas.MouseLeftButtonDown += ColorShadingCanvas_MouseLeftButtonDown;
- _colorShadingCanvas.MouseLeftButtonUp += ColorShadingCanvas_MouseLeftButtonUp;
- _colorShadingCanvas.MouseMove += ColorShadingCanvas_MouseMove;
- _colorShadingCanvas.SizeChanged += ColorShadingCanvas_SizeChanged;
- }
-
- _colorShadeSelector = GetTemplateChild( PART_ColorShadeSelector ) as Canvas;
-
- if( _colorShadeSelector != null )
- _colorShadeSelector.RenderTransform = _colorShadeSelectorTransform;
-
- if( _spectrumSlider != null )
- _spectrumSlider.ValueChanged -= SpectrumSlider_ValueChanged;
-
- _spectrumSlider = GetTemplateChild( PART_SpectrumSlider ) as ColorSpectrumSlider;
-
- if( _spectrumSlider != null )
- _spectrumSlider.ValueChanged += SpectrumSlider_ValueChanged;
-
- if( _hexadecimalTextBox != null )
- _hexadecimalTextBox.LostFocus -= new RoutedEventHandler( HexadecimalTextBox_LostFocus );
-
- _hexadecimalTextBox = GetTemplateChild( PART_HexadecimalTextBox ) as TextBox;
-
- if( _hexadecimalTextBox != null )
- _hexadecimalTextBox.LostFocus += new RoutedEventHandler( HexadecimalTextBox_LostFocus );
-
- UpdateRGBValues( SelectedColor );
- UpdateColorShadeSelectorPosition( SelectedColor );
-
- // When changing theme, HexadecimalString needs to be set since it is not binded.
- SetHexadecimalTextBoxTextProperty( GetFormatedColorString( SelectedColor ) );
- }
-
- protected override void OnKeyDown( KeyEventArgs e )
- {
- base.OnKeyDown( e );
-
- //hitting enter on textbox will update Hexadecimal string
- if( e.Key == Key.Enter && e.OriginalSource is TextBox )
- {
- TextBox textBox = ( TextBox )e.OriginalSource;
- if( textBox.Name == PART_HexadecimalTextBox )
- SetHexadecimalStringProperty( textBox.Text, true );
- }
- }
-
-
-
-
- #endregion //Base Class Overrides
-
- #region Event Handlers
-
- void ColorShadingCanvas_MouseLeftButtonDown( object sender, MouseButtonEventArgs e )
- {
- if( _colorShadingCanvas != null )
- {
- Point p = e.GetPosition( _colorShadingCanvas );
- UpdateColorShadeSelectorPositionAndCalculateColor( p, true );
- _colorShadingCanvas.CaptureMouse();
- //Prevent from closing ColorCanvas after mouseDown in ListView
- e.Handled = true;
- }
- }
-
- void ColorShadingCanvas_MouseLeftButtonUp( object sender, MouseButtonEventArgs e )
- {
- if( _colorShadingCanvas != null )
- {
- _colorShadingCanvas.ReleaseMouseCapture();
- }
- }
-
- void ColorShadingCanvas_MouseMove( object sender, MouseEventArgs e )
- {
- if( _colorShadingCanvas != null )
- {
- if( e.LeftButton == MouseButtonState.Pressed )
- {
- Point p = e.GetPosition( _colorShadingCanvas );
- UpdateColorShadeSelectorPositionAndCalculateColor( p, true );
- Mouse.Synchronize();
- }
- }
- }
-
- void ColorShadingCanvas_SizeChanged( object sender, SizeChangedEventArgs e )
- {
- if( _currentColorPosition != null )
- {
- Point _newPoint = new Point
- {
- X = ( ( Point )_currentColorPosition ).X * e.NewSize.Width,
- Y = ( ( Point )_currentColorPosition ).Y * e.NewSize.Height
- };
-
- UpdateColorShadeSelectorPositionAndCalculateColor( _newPoint, false );
- }
- }
-
- void SpectrumSlider_ValueChanged( object sender, RoutedPropertyChangedEventArgs e )
- {
- if( (_currentColorPosition != null) && (this.SelectedColor != null) )
- {
- CalculateColor( ( Point )_currentColorPosition );
- }
- }
-
- void HexadecimalTextBox_LostFocus( object sender, RoutedEventArgs e )
- {
- TextBox textbox = sender as TextBox;
- SetHexadecimalStringProperty( textbox.Text, true );
- }
-
- #endregion //Event Handlers
-
- #region Events
-
- public static readonly RoutedEvent SelectedColorChangedEvent = EventManager.RegisterRoutedEvent( "SelectedColorChanged", RoutingStrategy.Bubble, typeof( RoutedPropertyChangedEventHandler ), typeof( ColorCanvas ) );
- public event RoutedPropertyChangedEventHandler SelectedColorChanged
- {
- add
- {
- AddHandler( SelectedColorChangedEvent, value );
- }
- remove
- {
- RemoveHandler( SelectedColorChangedEvent, value );
- }
- }
-
- #endregion //Events
-
- #region Methods
-
- private void UpdateSelectedColor()
- {
- SelectedColor = Color.FromArgb( A, R, G, B );
- }
-
- private void UpdateSelectedColor( Color? color )
- {
- SelectedColor = ( ( color != null ) && color.HasValue )
- ? (Color?)Color.FromArgb( color.Value.A, color.Value.R, color.Value.G, color.Value.B )
- : null;
- }
-
- private void UpdateRGBValues( Color? color )
- {
- if( ( color == null ) || !color.HasValue )
- return;
-
- _surpressPropertyChanged = true;
-
- A = color.Value.A;
- R = color.Value.R;
- G = color.Value.G;
- B = color.Value.B;
-
- _surpressPropertyChanged = false;
- }
-
- private void UpdateColorShadeSelectorPositionAndCalculateColor( Point p, bool calculateColor )
- {
- if( (_colorShadingCanvas == null) || ( _colorShadeSelector == null) )
- return;
-
- if( p.Y < 0 )
- p.Y = 0;
-
- if( p.X < 0 )
- p.X = 0;
-
- if( p.X > _colorShadingCanvas.ActualWidth )
- p.X = _colorShadingCanvas.ActualWidth;
-
- if( p.Y > _colorShadingCanvas.ActualHeight )
- p.Y = _colorShadingCanvas.ActualHeight;
-
- _colorShadeSelectorTransform.X = p.X - ( _colorShadeSelector.Width / 2 );
- _colorShadeSelectorTransform.Y = p.Y - ( _colorShadeSelector.Height / 2 );
-
- p.X = p.X / _colorShadingCanvas.ActualWidth;
- p.Y = p.Y / _colorShadingCanvas.ActualHeight;
-
- _currentColorPosition = p;
-
- if( calculateColor )
- CalculateColor( p );
- }
-
- private void UpdateColorShadeSelectorPosition( Color? color )
- {
- if( (_spectrumSlider == null) || (_colorShadingCanvas == null) || (color == null) || !color.HasValue)
- return;
-
- _currentColorPosition = null;
-
- var hsv = ColorUtilities.ConvertRgbToHsv( color.Value.R, color.Value.G, color.Value.B );
-
- if( _updateSpectrumSliderValue )
- {
- _spectrumSlider.Value = 360 - hsv.H;
- }
-
- Point p = new Point( hsv.S, 1 - hsv.V );
-
- _currentColorPosition = p;
-
- _colorShadeSelectorTransform.X = ( p.X * _colorShadingCanvas.Width ) - 5;
- _colorShadeSelectorTransform.Y = ( p.Y * _colorShadingCanvas.Height ) - 5;
- }
-
- private void CalculateColor( Point p )
- {
- if( _spectrumSlider == null )
- return;
-
- HsvColor hsv = new HsvColor( 360 - _spectrumSlider.Value, 1, 1 )
- {
- S = p.X,
- V = 1 - p.Y
- };
- var currentColor = ColorUtilities.ConvertHsvToRgb( hsv.H, hsv.S, hsv.V );
- currentColor.A = A;
- _updateSpectrumSliderValue = false;
- SelectedColor = currentColor;
- _updateSpectrumSliderValue = true;
- SetHexadecimalStringProperty( GetFormatedColorString( SelectedColor ), false );
- }
-
- private string GetFormatedColorString( Color? colorToFormat )
- {
- if( ( colorToFormat == null ) || !colorToFormat.HasValue )
- return string.Empty;
- return ColorUtilities.FormatColorString( colorToFormat.ToString(), UsingAlphaChannel );
- }
-
- private string GetFormatedColorString( string stringToFormat )
- {
- return ColorUtilities.FormatColorString( stringToFormat, UsingAlphaChannel );
- }
-
- private void SetHexadecimalStringProperty( string newValue, bool modifyFromUI )
- {
- if( modifyFromUI )
- {
- try
- {
- if( !string.IsNullOrEmpty( newValue ) )
- {
- int outValue;
- // User has entered an hexadecimal value (without the "#" character)... add it.
- if( Int32.TryParse( newValue, System.Globalization.NumberStyles.HexNumber, null, out outValue ) )
- {
- newValue = "#" + newValue;
- }
- ColorConverter.ConvertFromString( newValue );
- }
- HexadecimalString = newValue;
- }
- catch
- {
- //When HexadecimalString is changed via UI and hexadecimal format is bad, keep the previous HexadecimalString.
- SetHexadecimalTextBoxTextProperty( HexadecimalString );
- }
- }
- else
- {
- //When HexadecimalString is changed via Code-Behind, hexadecimal format will be evaluated in OnCoerceHexadecimalString()
- HexadecimalString = newValue;
- }
- }
-
- private void SetHexadecimalTextBoxTextProperty( string newValue )
- {
- if( _hexadecimalTextBox != null )
- _hexadecimalTextBox.Text = newValue;
- }
-
- #endregion //Methods
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Implementation/ColorSpectrumSlider.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Implementation/ColorSpectrumSlider.cs
deleted file mode 100644
index 8d61bcbb..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Implementation/ColorSpectrumSlider.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-using System.Windows.Shapes;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-
-namespace Xceed.Wpf.Toolkit
-{
- [TemplatePart( Name = PART_SpectrumDisplay, Type = typeof( Rectangle ) )]
- public class ColorSpectrumSlider : Slider
- {
- private const string PART_SpectrumDisplay = "PART_SpectrumDisplay";
-
- #region Private Members
-
- private Rectangle _spectrumDisplay;
- private LinearGradientBrush _pickerBrush;
-
- #endregion //Private Members
-
- #region Constructors
-
- static ColorSpectrumSlider()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( ColorSpectrumSlider ), new FrameworkPropertyMetadata( typeof( ColorSpectrumSlider ) ) );
- }
-
- #endregion //Constructors
-
- #region Dependency Properties
-
- public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register( "SelectedColor", typeof( Color ), typeof( ColorSpectrumSlider ), new PropertyMetadata( System.Windows.Media.Colors.Transparent ) );
- public Color SelectedColor
- {
- get
- {
- return ( Color )GetValue( SelectedColorProperty );
- }
- set
- {
- SetValue( SelectedColorProperty, value );
- }
- }
-
- #endregion //Dependency Properties
-
- #region Base Class Overrides
-
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
-
- _spectrumDisplay = ( Rectangle )GetTemplateChild( PART_SpectrumDisplay );
- CreateSpectrum();
- OnValueChanged( Double.NaN, Value );
- }
-
- protected override void OnValueChanged( double oldValue, double newValue )
- {
- base.OnValueChanged( oldValue, newValue );
-
- Color color = ColorUtilities.ConvertHsvToRgb( 360 - newValue, 1, 1 );
- SelectedColor = color;
- }
-
- #endregion //Base Class Overrides
-
- #region Methods
-
- private void CreateSpectrum()
- {
- _pickerBrush = new LinearGradientBrush();
- _pickerBrush.StartPoint = new Point( 0.5, 0 );
- _pickerBrush.EndPoint = new Point( 0.5, 1 );
- _pickerBrush.ColorInterpolationMode = ColorInterpolationMode.SRgbLinearInterpolation;
-
- var colorsList = ColorUtilities.GenerateHsvSpectrum();
-
- double stopIncrement = ( double )1 / (colorsList.Count - 1);
-
- int i;
- for( i = 0; i < colorsList.Count; i++ )
- {
- _pickerBrush.GradientStops.Add( new GradientStop( colorsList[ i ], i * stopIncrement ) );
- }
-
- _pickerBrush.GradientStops[ i - 1 ].Offset = 1.0;
- if( _spectrumDisplay != null )
- {
- _spectrumDisplay.Fill = _pickerBrush;
- }
- }
-
- #endregion //Methods
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index 4047e312..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,475 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Themes/Generic.xaml
deleted file mode 100644
index 2c9d81f4..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Themes/Generic.xaml
+++ /dev/null
@@ -1,616 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Implementation/ColorItem.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Implementation/ColorItem.cs
deleted file mode 100644
index 883ef47e..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Implementation/ColorItem.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Windows.Media;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class ColorItem
- {
- public Color? Color
- {
- get;
- set;
- }
- public string Name
- {
- get;
- set;
- }
-
- public ColorItem( Color? color, string name )
- {
- Color = color;
- Name = name;
- }
-
- public override bool Equals(object obj)
- {
- var ci = obj as ColorItem;
- if (ci == null)
- return false;
- return ( ci.Color.Equals( Color ) && ci.Name.Equals( Name ) );
- }
-
- public override int GetHashCode()
- {
- return this.Color.GetHashCode() ^ this.Name.GetHashCode();
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Implementation/ColorPicker.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Implementation/ColorPicker.cs
deleted file mode 100644
index 23c0a469..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Implementation/ColorPicker.cs
+++ /dev/null
@@ -1,806 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.ObjectModel;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-using System.Windows.Media;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-using System.Windows.Controls.Primitives;
-using System.Windows.Data;
-
-namespace Xceed.Wpf.Toolkit
-{
- public enum ColorMode
- {
- ColorPalette,
- ColorCanvas
- }
-
- public enum ColorSortingMode
- {
- Alphabetical,
- HueSaturationBrightness
- }
-
- [TemplatePart( Name = PART_AvailableColors, Type = typeof( ListBox ) )]
- [TemplatePart( Name = PART_StandardColors, Type = typeof( ListBox ) )]
- [TemplatePart( Name = PART_RecentColors, Type = typeof( ListBox ) )]
- [TemplatePart( Name = PART_ColorPickerToggleButton, Type = typeof( ToggleButton ) )]
- [TemplatePart( Name = PART_ColorPickerPalettePopup, Type = typeof( Popup ) )]
- public class ColorPicker : Control
- {
- private const string PART_AvailableColors = "PART_AvailableColors";
- private const string PART_StandardColors = "PART_StandardColors";
- private const string PART_RecentColors = "PART_RecentColors";
- private const string PART_ColorPickerToggleButton = "PART_ColorPickerToggleButton";
- private const string PART_ColorPickerPalettePopup = "PART_ColorPickerPalettePopup";
-
- #region Members
-
- private ListBox _availableColors;
- private ListBox _standardColors;
- private ListBox _recentColors;
- private ToggleButton _toggleButton;
- private Popup _popup;
- private Color? _initialColor;
- private bool _selectionChanged;
-
- #endregion //Members
-
- #region Properties
-
- #region AdvancedButtonHeader
-
- public static readonly DependencyProperty AdvancedButtonHeaderProperty = DependencyProperty.Register( "AdvancedButtonHeader", typeof( string ), typeof( ColorPicker ), new UIPropertyMetadata( "Advanced" ) );
- public string AdvancedButtonHeader
- {
- get
- {
- return ( string )GetValue( AdvancedButtonHeaderProperty );
- }
- set
- {
- SetValue( AdvancedButtonHeaderProperty, value );
- }
- }
-
- #endregion //AdvancedButtonHeader
-
- #region AvailableColors
-
- public static readonly DependencyProperty AvailableColorsProperty = DependencyProperty.Register( "AvailableColors", typeof( ObservableCollection ), typeof( ColorPicker ), new UIPropertyMetadata( CreateAvailableColors() ) );
- public ObservableCollection AvailableColors
- {
- get
- {
- return ( ObservableCollection )GetValue( AvailableColorsProperty );
- }
- set
- {
- SetValue( AvailableColorsProperty, value );
- }
- }
-
- #endregion //AvailableColors
-
- #region AvailableColorsSortingMode
-
- public static readonly DependencyProperty AvailableColorsSortingModeProperty = DependencyProperty.Register( "AvailableColorsSortingMode", typeof( ColorSortingMode ), typeof( ColorPicker ), new UIPropertyMetadata( ColorSortingMode.Alphabetical, OnAvailableColorsSortingModeChanged ) );
- public ColorSortingMode AvailableColorsSortingMode
- {
- get
- {
- return ( ColorSortingMode )GetValue( AvailableColorsSortingModeProperty );
- }
- set
- {
- SetValue( AvailableColorsSortingModeProperty, value );
- }
- }
-
- private static void OnAvailableColorsSortingModeChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ColorPicker colorPicker = ( ColorPicker )d;
- if( colorPicker != null )
- colorPicker.OnAvailableColorsSortingModeChanged( ( ColorSortingMode )e.OldValue, ( ColorSortingMode )e.NewValue );
- }
-
- private void OnAvailableColorsSortingModeChanged( ColorSortingMode oldValue, ColorSortingMode newValue )
- {
- ListCollectionView lcv = ( ListCollectionView )( CollectionViewSource.GetDefaultView( this.AvailableColors ) );
- if( lcv != null )
- {
- lcv.CustomSort = ( AvailableColorsSortingMode == ColorSortingMode.HueSaturationBrightness )
- ? new ColorSorter()
- : null;
- }
- }
-
- #endregion //AvailableColorsSortingMode
-
- #region AvailableColorsHeader
-
- public static readonly DependencyProperty AvailableColorsHeaderProperty = DependencyProperty.Register( "AvailableColorsHeader", typeof( string ), typeof( ColorPicker ), new UIPropertyMetadata( "Available Colors" ) );
- public string AvailableColorsHeader
- {
- get
- {
- return ( string )GetValue( AvailableColorsHeaderProperty );
- }
- set
- {
- SetValue( AvailableColorsHeaderProperty, value );
- }
- }
-
- #endregion //AvailableColorsHeader
-
- #region ButtonStyle
-
- public static readonly DependencyProperty ButtonStyleProperty = DependencyProperty.Register( "ButtonStyle", typeof( Style ), typeof( ColorPicker ) );
- public Style ButtonStyle
- {
- get
- {
- return ( Style )GetValue( ButtonStyleProperty );
- }
- set
- {
- SetValue( ButtonStyleProperty, value );
- }
- }
-
- #endregion //ButtonStyle
-
- #region DisplayColorAndName
-
- public static readonly DependencyProperty DisplayColorAndNameProperty = DependencyProperty.Register( "DisplayColorAndName", typeof( bool ), typeof( ColorPicker ), new UIPropertyMetadata( false ) );
- public bool DisplayColorAndName
- {
- get
- {
- return ( bool )GetValue( DisplayColorAndNameProperty );
- }
- set
- {
- SetValue( DisplayColorAndNameProperty, value );
- }
- }
-
- #endregion //DisplayColorAndName
-
- #region DisplayColorTooltip
-
- public static readonly DependencyProperty DisplayColorTooltipProperty = DependencyProperty.Register( "DisplayColorTooltip", typeof( bool ), typeof( ColorPicker ), new UIPropertyMetadata( true ) );
- public bool DisplayColorTooltip
- {
- get
- {
- return ( bool )GetValue( DisplayColorTooltipProperty );
- }
- set
- {
- SetValue( DisplayColorTooltipProperty, value );
- }
- }
-
- #endregion //DisplayColorTooltip
-
- #region ColorMode
-
- public static readonly DependencyProperty ColorModeProperty = DependencyProperty.Register( "ColorMode", typeof( ColorMode ), typeof( ColorPicker ), new UIPropertyMetadata( ColorMode.ColorPalette ) );
- public ColorMode ColorMode
- {
- get
- {
- return ( ColorMode )GetValue( ColorModeProperty );
- }
- set
- {
- SetValue( ColorModeProperty, value );
- }
- }
-
- #endregion //ColorMode
-
- #region IsOpen
-
- public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register( "IsOpen", typeof( bool ), typeof( ColorPicker ), new UIPropertyMetadata( false, OnIsOpenChanged ) );
- public bool IsOpen
- {
- get
- {
- return ( bool )GetValue( IsOpenProperty );
- }
- set
- {
- SetValue( IsOpenProperty, value );
- }
- }
-
- private static void OnIsOpenChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ColorPicker colorPicker = (ColorPicker)d;
- if( colorPicker != null )
- colorPicker.OnIsOpenChanged( (bool)e.OldValue, (bool)e.NewValue );
- }
-
- private void OnIsOpenChanged( bool oldValue, bool newValue )
- {
- if( newValue )
- {
- _initialColor = this.SelectedColor;
- }
- RoutedEventArgs args = new RoutedEventArgs( newValue ? OpenedEvent : ClosedEvent, this );
- this.RaiseEvent( args );
- }
-
- #endregion //IsOpen
-
- #region MaxDropDownWidth
-
- public static readonly DependencyProperty MaxDropDownWidthProperty = DependencyProperty.Register( "MaxDropDownWidth", typeof( double )
- , typeof( ColorPicker ), new UIPropertyMetadata( 214d ) );
- public double MaxDropDownWidth
- {
- get
- {
- return ( double )GetValue( MaxDropDownWidthProperty );
- }
- set
- {
- SetValue( MaxDropDownWidthProperty, value );
- }
- }
-
- private static void OnMaxDropDownWidthChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- var colorPicker = o as ColorPicker;
- if( colorPicker != null )
- colorPicker.OnMaxDropDownWidthChanged( ( double )e.OldValue, ( double )e.NewValue );
- }
-
- protected virtual void OnMaxDropDownWidthChanged( double oldValue, double newValue )
- {
-
- }
-
- #endregion
-
- #region RecentColors
-
- public static readonly DependencyProperty RecentColorsProperty = DependencyProperty.Register( "RecentColors", typeof( ObservableCollection ), typeof( ColorPicker ), new UIPropertyMetadata( null ) );
- public ObservableCollection RecentColors
- {
- get
- {
- return ( ObservableCollection )GetValue( RecentColorsProperty );
- }
- set
- {
- SetValue( RecentColorsProperty, value );
- }
- }
-
- #endregion //RecentColors
-
- #region RecentColorsHeader
-
- public static readonly DependencyProperty RecentColorsHeaderProperty = DependencyProperty.Register( "RecentColorsHeader", typeof( string ), typeof( ColorPicker ), new UIPropertyMetadata( "Recent Colors" ) );
- public string RecentColorsHeader
- {
- get
- {
- return ( string )GetValue( RecentColorsHeaderProperty );
- }
- set
- {
- SetValue( RecentColorsHeaderProperty, value );
- }
- }
-
- #endregion //RecentColorsHeader
-
- #region SelectedColor
-
- public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register( "SelectedColor", typeof( Color? ), typeof( ColorPicker ), new FrameworkPropertyMetadata( null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback( OnSelectedColorPropertyChanged ) ) );
- public Color? SelectedColor
- {
- get
- {
- return ( Color? )GetValue( SelectedColorProperty );
- }
- set
- {
- SetValue( SelectedColorProperty, value );
- }
- }
-
- private static void OnSelectedColorPropertyChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ColorPicker colorPicker = ( ColorPicker )d;
- if( colorPicker != null )
- colorPicker.OnSelectedColorChanged( ( Color? )e.OldValue, ( Color? )e.NewValue );
- }
-
- private void OnSelectedColorChanged( Color? oldValue, Color? newValue )
- {
- SelectedColorText = GetFormatedColorString( newValue );
-
- RoutedPropertyChangedEventArgs args = new RoutedPropertyChangedEventArgs( oldValue, newValue );
- args.RoutedEvent = ColorPicker.SelectedColorChangedEvent;
- RaiseEvent( args );
- }
-
- #endregion //SelectedColor
-
- #region SelectedColorText
-
- public static readonly DependencyProperty SelectedColorTextProperty = DependencyProperty.Register( "SelectedColorText", typeof( string ), typeof( ColorPicker ), new UIPropertyMetadata( "" ) );
- public string SelectedColorText
- {
- get
- {
- return ( string )GetValue( SelectedColorTextProperty );
- }
- protected set
- {
- SetValue( SelectedColorTextProperty, value );
- }
- }
-
- #endregion //SelectedColorText
-
- #region ShowTabHeaders
-
- public static readonly DependencyProperty ShowTabHeadersProperty = DependencyProperty.Register( "ShowTabHeaders", typeof( bool ), typeof( ColorPicker ), new UIPropertyMetadata( true ) );
- public bool ShowTabHeaders
- {
- get
- {
- return ( bool )GetValue( ShowTabHeadersProperty );
- }
- set
- {
- SetValue( ShowTabHeadersProperty, value );
- }
- }
-
- #endregion //ShowTabHeaders
-
- #region ShowAvailableColors
-
- public static readonly DependencyProperty ShowAvailableColorsProperty = DependencyProperty.Register( "ShowAvailableColors", typeof( bool ), typeof( ColorPicker ), new UIPropertyMetadata( true ) );
- public bool ShowAvailableColors
- {
- get
- {
- return ( bool )GetValue( ShowAvailableColorsProperty );
- }
- set
- {
- SetValue( ShowAvailableColorsProperty, value );
- }
- }
-
- #endregion //ShowAvailableColors
-
- #region ShowRecentColors
-
- public static readonly DependencyProperty ShowRecentColorsProperty = DependencyProperty.Register( "ShowRecentColors", typeof( bool ), typeof( ColorPicker ), new UIPropertyMetadata( false ) );
- public bool ShowRecentColors
- {
- get
- {
- return ( bool )GetValue( ShowRecentColorsProperty );
- }
- set
- {
- SetValue( ShowRecentColorsProperty, value );
- }
- }
-
- #endregion //DisplayRecentColors
-
- #region ShowStandardColors
-
- public static readonly DependencyProperty ShowStandardColorsProperty = DependencyProperty.Register( "ShowStandardColors", typeof( bool ), typeof( ColorPicker ), new UIPropertyMetadata( true ) );
- public bool ShowStandardColors
- {
- get
- {
- return ( bool )GetValue( ShowStandardColorsProperty );
- }
- set
- {
- SetValue( ShowStandardColorsProperty, value );
- }
- }
-
- #endregion //DisplayStandardColors
-
- #region ShowDropDownButton
-
- public static readonly DependencyProperty ShowDropDownButtonProperty = DependencyProperty.Register( "ShowDropDownButton", typeof( bool ), typeof( ColorPicker ), new UIPropertyMetadata( true ) );
- public bool ShowDropDownButton
- {
- get
- {
- return ( bool )GetValue( ShowDropDownButtonProperty );
- }
- set
- {
- SetValue( ShowDropDownButtonProperty, value );
- }
- }
-
- #endregion //ShowDropDownButton
-
- #region StandardButtonHeader
-
- public static readonly DependencyProperty StandardButtonHeaderProperty = DependencyProperty.Register( "StandardButtonHeader", typeof( string ), typeof( ColorPicker ), new UIPropertyMetadata( "Standard" ) );
- public string StandardButtonHeader
- {
- get
- {
- return ( string )GetValue( StandardButtonHeaderProperty );
- }
- set
- {
- SetValue( StandardButtonHeaderProperty, value );
- }
- }
-
- #endregion //StandardButtonHeader
-
- #region StandardColors
-
- public static readonly DependencyProperty StandardColorsProperty = DependencyProperty.Register( "StandardColors", typeof( ObservableCollection ), typeof( ColorPicker ), new UIPropertyMetadata( CreateStandardColors() ) );
- public ObservableCollection StandardColors
- {
- get
- {
- return ( ObservableCollection )GetValue( StandardColorsProperty );
- }
- set
- {
- SetValue( StandardColorsProperty, value );
- }
- }
-
- #endregion //StandardColors
-
- #region StandardColorsHeader
-
- public static readonly DependencyProperty StandardColorsHeaderProperty = DependencyProperty.Register( "StandardColorsHeader", typeof( string ), typeof( ColorPicker ), new UIPropertyMetadata( "Standard Colors" ) );
- public string StandardColorsHeader
- {
- get
- {
- return ( string )GetValue( StandardColorsHeaderProperty );
- }
- set
- {
- SetValue( StandardColorsHeaderProperty, value );
- }
- }
-
- #endregion //StandardColorsHeader
-
- #region UsingAlphaChannel
-
- public static readonly DependencyProperty UsingAlphaChannelProperty = DependencyProperty.Register( "UsingAlphaChannel", typeof( bool ), typeof( ColorPicker ), new FrameworkPropertyMetadata( true, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback( OnUsingAlphaChannelPropertyChanged ) ) );
- public bool UsingAlphaChannel
- {
- get
- {
- return ( bool )GetValue( UsingAlphaChannelProperty );
- }
- set
- {
- SetValue( UsingAlphaChannelProperty, value );
- }
- }
-
- private static void OnUsingAlphaChannelPropertyChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ColorPicker colorPicker = ( ColorPicker )d;
- if( colorPicker != null )
- colorPicker.OnUsingAlphaChannelChanged();
- }
-
- private void OnUsingAlphaChannelChanged()
- {
- SelectedColorText = GetFormatedColorString( SelectedColor );
- }
-
- #endregion //UsingAlphaChannel
-
- #endregion //Properties
-
- #region Constructors
-
- static ColorPicker()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( ColorPicker ), new FrameworkPropertyMetadata( typeof( ColorPicker ) ) );
- }
-
- public ColorPicker()
- {
-
-#if VS2008
- this.RecentColors = new ObservableCollection();
-#else
- this.SetCurrentValue( ColorPicker.RecentColorsProperty, new ObservableCollection() );
-#endif
-
- Keyboard.AddKeyDownHandler( this, OnKeyDown );
- Mouse.AddPreviewMouseDownOutsideCapturedElementHandler( this, OnMouseDownOutsideCapturedElement );
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
-
- if( _availableColors != null )
- _availableColors.SelectionChanged -= Color_SelectionChanged;
-
- _availableColors = GetTemplateChild( PART_AvailableColors ) as ListBox;
- if( _availableColors != null )
- _availableColors.SelectionChanged += Color_SelectionChanged;
-
- if( _standardColors != null )
- _standardColors.SelectionChanged -= Color_SelectionChanged;
-
- _standardColors = GetTemplateChild( PART_StandardColors ) as ListBox;
- if( _standardColors != null )
- _standardColors.SelectionChanged += Color_SelectionChanged;
-
- if( _recentColors != null )
- _recentColors.SelectionChanged -= Color_SelectionChanged;
-
- _recentColors = GetTemplateChild( PART_RecentColors ) as ListBox;
- if( _recentColors != null )
- _recentColors.SelectionChanged += Color_SelectionChanged;
-
- if( _popup != null )
- _popup.Opened -= Popup_Opened;
-
- _popup = GetTemplateChild( PART_ColorPickerPalettePopup ) as Popup;
- if( _popup != null )
- _popup.Opened += Popup_Opened;
-
- _toggleButton = this.Template.FindName( PART_ColorPickerToggleButton, this ) as ToggleButton;
- }
-
- protected override void OnMouseUp( MouseButtonEventArgs e )
- {
- base.OnMouseUp( e );
-
- // Close ColorPicker on MouseUp to prevent action of MouseUp on controls behind the ColorPicker.
- if( _selectionChanged )
- {
- CloseColorPicker( true );
- _selectionChanged = false;
- }
- }
-
-
-#endregion //Base Class Overrides
-
- #region Event Handlers
-
- private void OnKeyDown( object sender, KeyEventArgs e )
- {
- if( !IsOpen )
- {
- if( KeyboardUtilities.IsKeyModifyingPopupState( e ) )
- {
- IsOpen = true;
- // Focus will be on ListBoxItem in Popup_Opened().
- e.Handled = true;
- }
- }
- else
- {
- if( KeyboardUtilities.IsKeyModifyingPopupState( e ) )
- {
- CloseColorPicker( true );
- e.Handled = true;
- }
- else if( e.Key == Key.Escape )
- {
- this.SelectedColor = _initialColor;
- CloseColorPicker( true );
- e.Handled = true;
- }
- }
- }
-
- private void OnMouseDownOutsideCapturedElement( object sender, MouseButtonEventArgs e )
- {
- CloseColorPicker( true );
- }
-
- private void Color_SelectionChanged( object sender, SelectionChangedEventArgs e )
- {
- ListBox lb = ( ListBox )sender;
-
- if( e.AddedItems.Count > 0 )
- {
- var colorItem = ( ColorItem )e.AddedItems[ 0 ];
- SelectedColor = colorItem.Color;
- if( !string.IsNullOrEmpty( colorItem.Name ) )
- {
- this.SelectedColorText = colorItem.Name;
- }
- UpdateRecentColors( colorItem );
- _selectionChanged = true;
- lb.SelectedIndex = -1; //for now I don't care about keeping track of the selected color
- }
- }
-
- private void Popup_Opened( object sender, EventArgs e )
- {
- if( ( _availableColors != null ) && ShowAvailableColors )
- {
- FocusOnListBoxItem( _availableColors );
- }
- else if( ( _standardColors != null ) && ShowStandardColors )
- FocusOnListBoxItem( _standardColors );
- else if( ( _recentColors != null ) && ShowRecentColors )
- FocusOnListBoxItem( _recentColors );
- }
-
- private void FocusOnListBoxItem( ListBox listBox )
- {
- ListBoxItem listBoxItem = ( ListBoxItem )listBox.ItemContainerGenerator.ContainerFromItem( listBox.SelectedItem );
- if( ( listBoxItem == null ) && ( listBox.Items.Count > 0 ) )
- listBoxItem = ( ListBoxItem )listBox.ItemContainerGenerator.ContainerFromItem( listBox.Items[ 0 ] );
- if( listBoxItem != null )
- listBoxItem.Focus();
- }
-
- #endregion //Event Handlers
-
- #region Events
-
- #region SelectedColorChangedEvent
-
- public static readonly RoutedEvent SelectedColorChangedEvent = EventManager.RegisterRoutedEvent( "SelectedColorChanged", RoutingStrategy.Bubble, typeof( RoutedPropertyChangedEventHandler ), typeof( ColorPicker ) );
- public event RoutedPropertyChangedEventHandler SelectedColorChanged
- {
- add
- {
- AddHandler( SelectedColorChangedEvent, value );
- }
- remove
- {
- RemoveHandler( SelectedColorChangedEvent, value );
- }
- }
-
- #endregion
-
- #region OpenedEvent
-
- public static readonly RoutedEvent OpenedEvent = EventManager.RegisterRoutedEvent( "OpenedEvent", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( ColorPicker ) );
- public event RoutedEventHandler Opened
- {
- add
- {
- AddHandler( OpenedEvent, value );
- }
- remove
- {
- RemoveHandler( OpenedEvent, value );
- }
- }
-
- #endregion //OpenedEvent
-
- #region ClosedEvent
-
- public static readonly RoutedEvent ClosedEvent = EventManager.RegisterRoutedEvent( "ClosedEvent", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( ColorPicker ) );
- public event RoutedEventHandler Closed
- {
- add
- {
- AddHandler( ClosedEvent, value );
- }
- remove
- {
- RemoveHandler( ClosedEvent, value );
- }
- }
-
- #endregion //ClosedEvent
-
- #endregion //Events
-
- #region Methods
-
- private void CloseColorPicker( bool isFocusOnColorPicker )
- {
- if( IsOpen )
- IsOpen = false;
- ReleaseMouseCapture();
-
- if( isFocusOnColorPicker && ( _toggleButton != null) )
- _toggleButton.Focus();
- this.UpdateRecentColors( new ColorItem( SelectedColor, SelectedColorText ) );
- }
-
- private void UpdateRecentColors( ColorItem colorItem )
- {
- if( !RecentColors.Contains( colorItem ) )
- RecentColors.Add( colorItem );
-
- if( RecentColors.Count > 10 ) //don't allow more than ten, maybe make a property that can be set by the user.
- RecentColors.RemoveAt( 0 );
- }
-
- private string GetFormatedColorString( Color? colorToFormat )
- {
- if( ( colorToFormat == null ) || !colorToFormat.HasValue )
- return string.Empty;
-
- return ColorUtilities.FormatColorString( colorToFormat.Value.GetColorName(), UsingAlphaChannel );
- }
-
- private static ObservableCollection CreateStandardColors()
- {
- ObservableCollection standardColors = new ObservableCollection();
- standardColors.Add( new ColorItem( Colors.Transparent, "Transparent" ) );
- standardColors.Add( new ColorItem( Colors.White, "White" ) );
- standardColors.Add( new ColorItem( Colors.Gray, "Gray" ) );
- standardColors.Add( new ColorItem( Colors.Black, "Black" ) );
- standardColors.Add( new ColorItem( Colors.Red, "Red" ) );
- standardColors.Add( new ColorItem( Colors.Green, "Green" ) );
- standardColors.Add( new ColorItem( Colors.Blue, "Blue" ) );
- standardColors.Add( new ColorItem( Colors.Yellow, "Yellow" ) );
- standardColors.Add( new ColorItem( Colors.Orange, "Orange" ) );
- standardColors.Add( new ColorItem( Colors.Purple, "Purple" ) );
- return standardColors;
- }
-
- private static ObservableCollection CreateAvailableColors()
- {
- ObservableCollection standardColors = new ObservableCollection();
-
- foreach( var item in ColorUtilities.KnownColors )
- {
- if( !String.Equals( item.Key, "Transparent" ) )
- {
- var colorItem = new ColorItem( item.Value, item.Key );
- if( !standardColors.Contains( colorItem ) )
- standardColors.Add( colorItem );
- }
- }
-
- return standardColors;
- }
-
- #endregion //Methods
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Implementation/ColorPickerTabItem.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Implementation/ColorPickerTabItem.cs
deleted file mode 100644
index 370263a6..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Implementation/ColorPickerTabItem.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Windows.Controls;
-using System.Windows.Input;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class ColorPickerTabItem : TabItem
- {
- protected override void OnMouseLeftButtonDown( MouseButtonEventArgs e )
- {
- if( e.Source == this || !this.IsSelected )
- return;
-
- base.OnMouseLeftButtonDown( e );
- }
-
- protected override void OnMouseLeftButtonUp( MouseButtonEventArgs e )
- {
- //Selection on Mouse Up
- if( e.Source == this || !this.IsSelected )
- {
- base.OnMouseLeftButtonDown( e );
- }
-
- base.OnMouseLeftButtonUp( e );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Implementation/ColorSorter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Implementation/ColorSorter.cs
deleted file mode 100644
index 30fa8ec5..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Implementation/ColorSorter.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows.Media;
-
-namespace Xceed.Wpf.Toolkit
-{
- internal class ColorSorter : IComparer
- {
- public int Compare( object firstItem, object secondItem )
- {
- if( firstItem == null || secondItem == null )
- return -1;
-
- ColorItem colorItem1 = ( ColorItem )firstItem;
- ColorItem colorItem2 = ( ColorItem )secondItem;
-
- if( (colorItem1.Color == null) || !colorItem1.Color.HasValue ||
- (colorItem2.Color == null) || !colorItem2.Color.HasValue )
- return -1;
-
- System.Drawing.Color drawingColor1 = System.Drawing.Color.FromArgb( colorItem1.Color.Value.A, colorItem1.Color.Value.R, colorItem1.Color.Value.G, colorItem1.Color.Value.B );
- System.Drawing.Color drawingColor2 = System.Drawing.Color.FromArgb( colorItem2.Color.Value.A, colorItem2.Color.Value.R, colorItem2.Color.Value.G, colorItem2.Color.Value.B );
-
- // Compare Hue
- double hueColor1 = Math.Round( ( double )drawingColor1.GetHue(), 3 );
- double hueColor2 = Math.Round( ( double )drawingColor2.GetHue(), 3 );
-
- if( hueColor1 > hueColor2 )
- return 1;
- else if( hueColor1 < hueColor2 )
- return -1;
- else
- {
- // Hue is equal, compare Saturation
- double satColor1 = Math.Round( ( double )drawingColor1.GetSaturation(), 3 );
- double satColor2 = Math.Round( ( double )drawingColor2.GetSaturation(), 3 );
-
- if( satColor1 > satColor2 )
- return 1;
- else if( satColor1 < satColor2 )
- return -1;
- else
- {
- // Saturation is equal, compare Brightness
- double brightColor1 = Math.Round( ( double )drawingColor1.GetBrightness(), 3 );
- double brightColor2 = Math.Round( ( double )drawingColor2.GetBrightness(), 3 );
-
- if( brightColor1 > brightColor2 )
- return 1;
- else if( brightColor1 < brightColor2 )
- return -1;
- }
- }
-
- return 0;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index ca5926c0..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,502 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml
deleted file mode 100644
index aa31e288..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml
+++ /dev/null
@@ -1,521 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/CancelRoutedEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/CancelRoutedEventArgs.cs
deleted file mode 100644
index d58c61e5..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/CancelRoutedEventArgs.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- public delegate void CancelRoutedEventHandler( object sender, CancelRoutedEventArgs e );
-
- ///
- /// An event data class that allows to inform the sender that the handler wants to cancel
- /// the ongoing action.
- ///
- /// The handler can set the "Cancel" property to false to cancel the action.
- ///
- public class CancelRoutedEventArgs : RoutedEventArgs
- {
- public CancelRoutedEventArgs()
- : base()
- {
- }
-
- public CancelRoutedEventArgs( RoutedEvent routedEvent )
- : base( routedEvent )
- {
- }
-
- public CancelRoutedEventArgs( RoutedEvent routedEvent, object source )
- : base( routedEvent, source )
- {
- }
-
- #region Cancel Property
-
- public bool Cancel
- {
- get;
- set;
- }
-
- #endregion Cancel Property
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/AditionConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/AditionConverter.cs
deleted file mode 100644
index dcd4f140..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/AditionConverter.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using System.Text;
-using System.Windows.Data;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class AdditionConverter : IValueConverter
- {
- public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
- {
- if( ( value != null ) && ( parameter != null ) )
- {
- var firstValue = ( double )value;
- var secondValue = double.Parse( parameter as string );
-
- return firstValue + secondValue;
- }
-
- return 0d;
- }
-
- public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/BorderThicknessToStrokeThicknessConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/BorderThicknessToStrokeThicknessConverter.cs
deleted file mode 100644
index cda549e1..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/BorderThicknessToStrokeThicknessConverter.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Windows.Data;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class BorderThicknessToStrokeThicknessConverter : IValueConverter
- {
- #region IValueConverter Members
-
- public object Convert( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- Thickness thickness = ( Thickness )value;
- return ( thickness.Bottom + thickness.Left + thickness.Right + thickness.Top ) / 4;
- }
-
- public object ConvertBack( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- int? thick = ( int? )value;
- int thickValue = thick.HasValue ? thick.Value : 0;
-
- return new Thickness( thickValue, thickValue, thickValue, thickValue );
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/CalculatorMemoryToVisibilityConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/CalculatorMemoryToVisibilityConverter.cs
deleted file mode 100644
index 5d8ff375..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/CalculatorMemoryToVisibilityConverter.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Windows.Data;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class CalculatorMemoryToVisibilityConverter : IValueConverter
- {
- public object Convert( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- return ( decimal )value == decimal.Zero ? Visibility.Hidden : Visibility.Visible;
- }
-
- public object ConvertBack( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/CenterTitleConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/CenterTitleConverter.cs
deleted file mode 100644
index e1711fe9..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/CenterTitleConverter.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows.Data;
-using System.Globalization;
-using System.Windows;
-using System.Windows.Media;
-using System.Windows.Controls;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class CenterTitleConverter : IMultiValueConverter
- {
- public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
- {
- // Parameters: DesiredSize, WindowWidth, HeaderColumns
- double titleTextWidth = ((Size)values[0]).Width;
- double windowWidth = (double)values[1];
-
- ColumnDefinitionCollection headerColumns = (ColumnDefinitionCollection)values[2];
- double titleColWidth = headerColumns[2].ActualWidth;
- double buttonsColWidth = headerColumns[3].ActualWidth;
-
-
- // Result (1) Title is Centered across all HeaderColumns
- if ((titleTextWidth + buttonsColWidth * 2) < windowWidth)
- return 1;
-
- // Result (2) Title is Centered in HeaderColumns[2]
- if (titleTextWidth < titleColWidth)
- return 2;
-
- // Result (3) Title is Left-Aligned in HeaderColumns[2]
- return 3;
- }
-
- public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ColorBlendConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ColorBlendConverter.cs
deleted file mode 100644
index b40f1574..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ColorBlendConverter.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows.Data;
-using System.Windows.Media;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- ///
- /// This converter allow to blend two colors into one based on a specified ratio
- ///
- public class ColorBlendConverter : IValueConverter
- {
- private double _blendedColorRatio = 0;
-
- ///
- /// The ratio of the blended color. Must be between 0 and 1.
- ///
- public double BlendedColorRatio
- {
- get { return _blendedColorRatio; }
-
- set
- {
- if( value < 0d || value > 1d )
- throw new ArgumentException( "BlendedColorRatio must be greater than or equal to 0 and lower than or equal to 1 " );
-
- _blendedColorRatio = value;
- }
- }
-
- ///
- /// The color to blend with the source color
- ///
- public Color BlendedColor { get; set; }
-
- public object Convert( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- if( value == null || value.GetType() != typeof( Color ) )
- return null;
-
- Color color = ( Color )value;
- return new Color()
- {
- A = this.BlendValue( color.A, this.BlendedColor.A ),
- R = this.BlendValue( color.R, this.BlendedColor.R ),
- G = this.BlendValue( color.G, this.BlendedColor.G ),
- B = this.BlendValue( color.B, this.BlendedColor.B )
- };
- }
-
- private byte BlendValue( byte original, byte blend )
- {
- double blendRatio = this.BlendedColorRatio;
- double sourceRatio = 1 - blendRatio;
-
- double result = ( ( ( double )original ) * sourceRatio ) + ( ( ( double )blend ) * blendRatio );
- result = Math.Round( result );
- result = Math.Min( 255d, Math.Max( 0d, result ) );
- return System.Convert.ToByte( result );
- }
-
- public object ConvertBack( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ColorModeToTabItemSelectedConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ColorModeToTabItemSelectedConverter.cs
deleted file mode 100644
index dced284a..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ColorModeToTabItemSelectedConverter.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Globalization;
-using System.Windows.Data;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class ColorModeToTabItemSelectedConverter : IValueConverter
- {
- public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
- {
- var colorMode = ( ColorMode )value;
- return (colorMode == ColorMode.ColorPalette) ? 0 : 1;
- }
-
- public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
- {
- var index = ( int )value;
- return ( index == 0 ) ? ColorMode.ColorPalette : ColorMode.ColorCanvas;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ColorToSolidColorBrushConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ColorToSolidColorBrushConverter.cs
deleted file mode 100644
index efe72b02..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ColorToSolidColorBrushConverter.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows.Data;
-using System.Windows.Media;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class ColorToSolidColorBrushConverter : IValueConverter
- {
- #region IValueConverter Members
-
- ///
- /// Converts a Color to a SolidColorBrush.
- ///
- /// The Color produced by the binding source.
- /// The type of the binding target property.
- /// The converter parameter to use.
- /// The culture to use in the converter.
- ///
- /// A converted SolidColorBrush. If the method returns null, the valid null value is used.
- ///
- public object Convert( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- if( value != null )
- return new SolidColorBrush( ( Color )value );
-
- return value;
- }
-
-
- ///
- /// Converts a SolidColorBrush to a Color.
- ///
- /// Currently not used in toolkit, but provided for developer use in their own projects
- /// The SolidColorBrush that is produced by the binding target.
- /// The type to convert to.
- /// The converter parameter to use.
- /// The culture to use in the converter.
- ///
- /// A converted value. If the method returns null, the valid null value is used.
- ///
- public object ConvertBack( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- if( value != null )
- return ( ( SolidColorBrush )value ).Color;
-
- return value;
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/CornerRadiusToDoubleConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/CornerRadiusToDoubleConverter.cs
deleted file mode 100644
index 1eb772bc..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/CornerRadiusToDoubleConverter.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows.Data;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class CornerRadiusToDoubleConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- double radius = 0.0;
-
- if (value != null)
- radius = ((CornerRadius)value).TopLeft;
-
- return radius;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- double radius = 0.0;
-
- if (value != null)
- radius = (double)value;
-
- return new CornerRadius(radius);
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/HalfConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/HalfConverter.cs
deleted file mode 100644
index 390da4cd..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/HalfConverter.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using System.Text;
-using System.Windows.Data;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class HalfConverter : IValueConverter
- {
- public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
- {
- double size = ( double )value;
- double modifier = (parameter != null) ? double.Parse( ( string )parameter ) : 0d;
- if( modifier != 0 )
- return Math.Max(0, size - modifier) / 2;
-
- return ( size / 2 );
- }
-
- public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/IntToThicknessConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/IntToThicknessConverter.cs
deleted file mode 100644
index 8a906ad9..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/IntToThicknessConverter.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows.Data;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class IntToThicknessConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- int thickValue = 0;
- if (value != null)
- thickValue = (int)value;
-
- if (parameter != null)
- {
- if (parameter.ToString().ToUpper() == "LEFT")
- return new Thickness(thickValue, 0, 0, 0);
- }
-
- return new Thickness(thickValue);
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/InverseBoolConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/InverseBoolConverter.cs
deleted file mode 100644
index 56a6d0c2..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/InverseBoolConverter.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows.Data;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class InverseBoolConverter : IValueConverter
- {
- #region IValueConverter Members
-
- public object Convert( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- return !( bool )value;
- }
-
- public object ConvertBack( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- throw new NotImplementedException();
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/NullToBoolConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/NullToBoolConverter.cs
deleted file mode 100644
index 75650e12..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/NullToBoolConverter.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Globalization;
-using System.Windows.Data;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class NullToBoolConverter : IValueConverter
- {
- public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
- {
- return (value == null);
- }
-
- public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ObjectTypeToNameConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ObjectTypeToNameConverter.cs
deleted file mode 100644
index d059569e..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ObjectTypeToNameConverter.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.ComponentModel;
-using System.Linq;
-using System.Windows.Data;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class ObjectTypeToNameConverter : IValueConverter
- {
- public object Convert( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- if( value != null )
- {
- if( value is Type )
- {
- var displayNameAttribute = ( ( Type )value ).GetCustomAttributes( false ).OfType().FirstOrDefault();
- return ( displayNameAttribute != null ) ? displayNameAttribute.DisplayName : ( ( Type )value ).Name;
- }
-
- var type = value.GetType();
- var valueString = value.ToString();
- if( string.IsNullOrEmpty( valueString )
- || ( valueString == type.UnderlyingSystemType.ToString() ) )
- {
- var displayNameAttribute = type.GetCustomAttributes( false ).OfType().FirstOrDefault();
- return ( displayNameAttribute != null ) ? displayNameAttribute.DisplayName : type.Name;
- }
-
- return value;
- }
- return null;
- }
- public object ConvertBack( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/RoundedValueConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/RoundedValueConverter.cs
deleted file mode 100644
index ed3c07f8..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/RoundedValueConverter.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Globalization;
-using System.Windows;
-using System.Windows.Data;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class RoundedValueConverter : IValueConverter
- {
- #region Precision Property
-
- public int Precision
- {
- get
- {
- return _precision;
- }
- set
- {
- _precision = value;
- }
- }
-
- private int _precision = 0;
-
- #endregion
-
- public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
- {
- if( value is double )
- {
- return Math.Round( ( double )value, _precision );
- }
- else if( value is Point )
- {
- return new Point( Math.Round( ( ( Point )value ).X, _precision ), Math.Round( ( ( Point )value ).Y, _precision ) );
- }
- else
- {
- return value;
- }
- }
-
- public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
- {
- return value;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/SolidColorBrushToColorConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/SolidColorBrushToColorConverter.cs
deleted file mode 100644
index 86cc37b8..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/SolidColorBrushToColorConverter.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows.Data;
-using System.Windows.Media;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class SolidColorBrushToColorConverter : IValueConverter
- {
- #region IValueConverter Members
-
- public object Convert( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- SolidColorBrush brush = value as SolidColorBrush;
- if( brush != null )
- return brush.Color;
-
- return default( Color? );
- }
-
- public object ConvertBack( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- if( value != null )
- {
- Color color = ( Color )value;
- return new SolidColorBrush( color );
- }
-
- return default( SolidColorBrush );
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessSideRemovalConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessSideRemovalConverter.cs
deleted file mode 100644
index fdcefa48..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessSideRemovalConverter.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Globalization;
-using System.Windows;
-using System.Windows.Data;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class ThicknessSideRemovalConverter : IValueConverter
- {
- #region IValueConverter Members
-
- public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
- {
- var thickness = (Thickness)value;
- var sideToRemove = int.Parse( (string)parameter );
- switch( sideToRemove )
- {
- case 0: thickness.Left = 0d; break;
- case 1: thickness.Top = 0d; break;
- case 2: thickness.Right = 0d; break;
- case 3: thickness.Bottom = 0d; break;
- default: throw new InvalidContentException("parameter should be from 0 to 3 to specify the side to remove.");
- }
- return thickness;
- }
-
- public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
- {
- throw new NotImplementedException();
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessToDoubleConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessToDoubleConverter.cs
deleted file mode 100644
index f78807d0..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessToDoubleConverter.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows.Data;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class ThicknessToDoubleConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- double thickness = 1.0;
-
- if (value != null)
- thickness = ((Thickness)value).Top;
-
- return thickness;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- double thickness = 1.0;
-
- if (value != null)
- thickness = (double)value;
-
- return new Thickness(thickness);
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/VisibilityToBoolConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/VisibilityToBoolConverter.cs
deleted file mode 100644
index e535f3b0..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/VisibilityToBoolConverter.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Globalization;
-using System.Windows;
-using System.Windows.Data;
-using Xceed.Wpf.Toolkit.Core;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class VisibilityToBoolConverter : IValueConverter
- {
- #region Inverted Property
-
- public bool Inverted
- {
- get
- {
- return _inverted;
- }
- set
- {
- _inverted = value;
- }
- }
-
- private bool _inverted; //false
-
- #endregion
-
- #region Not Property
-
- public bool Not
- {
- get
- {
- return _not;
- }
- set
- {
- _not = value;
- }
- }
-
- private bool _not; //false
-
- #endregion
-
- public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
- {
- return this.Inverted ? this.BoolToVisibility( value ) : this.VisibilityToBool( value );
- }
-
- public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
- {
- return this.Inverted ? this.VisibilityToBool( value ) : this.BoolToVisibility( value );
- }
-
- private object VisibilityToBool( object value )
- {
- if( !( value is Visibility ) )
- throw new InvalidOperationException( ErrorMessages.GetMessage( "SuppliedValueWasNotVisibility" ) );
-
- return ( ( ( Visibility )value ) == Visibility.Visible ) ^ Not;
- }
-
- private object BoolToVisibility( object value )
- {
- if( !( value is bool ) )
- throw new InvalidOperationException( ErrorMessages.GetMessage( "SuppliedValueWasNotBool" ) );
-
- return ( ( bool )value ^ Not ) ? Visibility.Visible : Visibility.Collapsed;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/WindowContentBorderMarginConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/WindowContentBorderMarginConverter.cs
deleted file mode 100644
index e09d4cff..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/WindowContentBorderMarginConverter.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows.Data;
-using System.Globalization;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- ///
- /// Sets the margin for the thumb grip, the top buttons, or for the content border in the WindowControl.
- ///
- public class WindowContentBorderMarginConverter : IMultiValueConverter
- {
- public object Convert( object[] values, Type targetType, object parameter, CultureInfo culture )
- {
- double horizontalContentBorderOffset = ( double )values[ 0 ];
- double verticalContentBorderOffset = ( double )values[ 1 ];
-
- switch( ( string )parameter )
- {
- // Content Border Margin in the WindowControl
- case "0":
- return new Thickness( horizontalContentBorderOffset
- , 0d
- , horizontalContentBorderOffset
- , verticalContentBorderOffset );
- // Thumb Grip Margin in the WindowControl
- case "1":
- return new Thickness( 0d
- , 0d
- , horizontalContentBorderOffset
- , verticalContentBorderOffset );
- // Header Buttons Margin in the WindowControl
- case "2":
- return new Thickness( 0d
- , 0d
- , horizontalContentBorderOffset
- , 0d );
- default:
- throw new NotSupportedException( "'parameter' for WindowContentBorderMarginConverter is not valid." );
- }
- }
-
- public object[] ConvertBack( object value, Type[] targetTypes, object parameter, CultureInfo culture )
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/WindowControlBackgroundConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/WindowControlBackgroundConverter.cs
deleted file mode 100644
index 1135f2f3..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/WindowControlBackgroundConverter.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows.Data;
-using System.Globalization;
-using System.Windows.Media;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class WindowControlBackgroundConverter : IMultiValueConverter
- {
- ///
- /// Used in the WindowContainer Template to calculate the resulting background brush
- /// from the WindowBackground (values[0]) and WindowOpacity (values[1]) propreties.
- ///
- ///
- ///
- ///
- ///
- ///
- public object Convert( object[] values, Type targetType, object parameter, CultureInfo culture )
- {
- Brush backgroundColor = ( Brush )values[ 0 ];
- double opacity = ( double )values[ 1 ];
-
- if( backgroundColor != null )
- {
- // Do not override any possible opacity value specifically set by the user.
- // Only use WindowOpacity value if the user did not set an opacity first.
- if( backgroundColor.ReadLocalValue( Brush.OpacityProperty ) == System.Windows.DependencyProperty.UnsetValue )
- {
- backgroundColor = backgroundColor.Clone();
- backgroundColor.Opacity = opacity;
- }
- }
- return backgroundColor;
- }
-
- public object[] ConvertBack( object value, Type[] targetTypes, object parameter, CultureInfo culture )
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/WizardPageButtonVisibilityConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/WizardPageButtonVisibilityConverter.cs
deleted file mode 100644
index bfec6ea8..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/WizardPageButtonVisibilityConverter.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Windows.Data;
-
-namespace Xceed.Wpf.Toolkit.Core.Converters
-{
- public class WizardPageButtonVisibilityConverter : IMultiValueConverter
- {
- public object Convert( object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- if( values == null || values.Length != 2 )
- throw new ArgumentException( "Wrong number of arguments for WizardPageButtonVisibilityConverter." );
-
- Visibility wizardVisibility = ( (values[ 0 ] == null) || (values[ 0 ] == DependencyProperty.UnsetValue) )
- ? Visibility.Hidden
- : ( Visibility )values[ 0 ];
-
- WizardPageButtonVisibility wizardPageVisibility = ( (values[ 1 ] == null) || (values[ 1 ] == DependencyProperty.UnsetValue) )
- ? WizardPageButtonVisibility.Hidden
- : ( WizardPageButtonVisibility )values[ 1 ];
-
- Visibility visibility = Visibility.Visible;
-
- switch( wizardPageVisibility )
- {
- case WizardPageButtonVisibility.Inherit:
- visibility = wizardVisibility;
- break;
- case WizardPageButtonVisibility.Collapsed:
- visibility = Visibility.Collapsed;
- break;
- case WizardPageButtonVisibility.Hidden:
- visibility = Visibility.Hidden;
- break;
- case WizardPageButtonVisibility.Visible:
- visibility = Visibility.Visible;
- break;
- }
-
- return visibility;
- }
-
- public object[] ConvertBack( object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture )
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/EditableKeyValuePair.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/EditableKeyValuePair.cs
deleted file mode 100644
index ae3aaceb..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/EditableKeyValuePair.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- public class EditableKeyValuePair : CustomTypeDescriptor
- {
- #region Members
-
- private PropertyDescriptorCollection _properties;
-
- #endregion
-
- #region Properties
-
- public TKey Key
- {
- get;
- set;
- }
-
- public TValue Value
- {
- get;
- set;
- }
-
- #endregion
-
- #region Constructors
-
- //Necessary for adding new items in CollectionEditor
- public EditableKeyValuePair()
- {
- var propertyList = new List();
-
- var KeyDescriptor = TypeDescriptor.CreateProperty( this.GetType(), "Key", typeof( TKey ) );
- propertyList.Add( KeyDescriptor );
-
- var ValueDescriptor = TypeDescriptor.CreateProperty( this.GetType(), "Value", typeof( TValue ) );
- propertyList.Add( ValueDescriptor );
-
- _properties = new PropertyDescriptorCollection( propertyList.ToArray() );
- }
-
- public EditableKeyValuePair( TKey key, TValue value )
- : this()
- {
- this.Key = key;
- this.Value = value;
- }
-
- #endregion
-
- #region Overrides
-
- public override PropertyDescriptorCollection GetProperties( Attribute[] attributes )
- {
- return this.GetProperties();
- }
-
- public override PropertyDescriptorCollection GetProperties()
- {
- return _properties;
- }
-
- public override object GetPropertyOwner( PropertyDescriptor pd )
- {
- return this;
- }
-
- public override string ToString()
- {
- return "[" + this.Key + "," + this.Value + "]";
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/ErrorMessages.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/ErrorMessages.cs
deleted file mode 100644
index c44e86f9..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/ErrorMessages.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Resources;
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- internal static class ErrorMessages
- {
- #region Static Fields
-
-
- public const string EndAngleCannotBeSetDirectlyInSlice = "EndAngleCannotBeSetDirectlyInSlice";
- public const string SliceCannotBeSetDirectlyInEndAngle = "SliceCannotBeSetDirectlyInEndAngle";
- public const string SliceOOR = "SliceOOR";
- public const string AnimationAccelerationRatioOOR = "AnimationAccelerationRatioOOR";
- public const string AnimationDecelerationRatioOOR = "AnimationDecelerationRatioOOR";
- public const string ZoomboxContentMustBeUIElement = "ZoomboxContentMustBeUIElement";
- public const string ViewModeInvalidForSource = "ViewModeInvalidForSource";
- public const string ZoomboxTemplateNeedsContent = "ZoomboxTemplateNeedsContent";
- public const string ZoomboxHasViewFinderButNotDisplay = "ZoomboxHasViewFinderButNotDisplay";
- public const string PositionOnlyAccessibleOnAbsolute = "PositionOnlyAccessibleOnAbsolute";
- public const string ZoomboxViewAlreadyInitialized = "ZoomboxViewAlreadyInitialized";
- public const string ScaleOnlyAccessibleOnAbsolute = "ScaleOnlyAccessibleOnAbsolute";
- public const string RegionOnlyAccessibleOnRegionalView = "RegionOnlyAccessibleOnRegionalView";
- public const string UnableToConvertToZoomboxView = "UnableToConvertToZoomboxView";
- public const string ViewStackCannotBeManipulatedNow = "ViewStackCannotBeManipulatedNow";
-
-
- public const string SuppliedValueWasNotVisibility = "SuppliedValueWasNotVisibility";
- public const string NegativeTimeSpanNotSupported = "NegativeTimeSpanNotSupported";
- public const string NegativeSpeedNotSupported = "NegativeSpeedNotSupported";
- public const string InvalidRatePropertyAccessed = "InvalidRatePropertyAccessed";
-
- public const string AlreadyInColumnCollection = "Value already belongs to another 'ColumnDefinitionCollection'.";
- public const string AlreadyInRowCollection = "Value already belongs to another 'RowDefinitionCollection'.";
- public const string AlreadyInStackDefinition = "Value already belongs to another 'StackDefinitionCollection'.";
- public const string ArrayDestTooShort = "'array' destination not long enough.";
- public const string CollectionDisposed = "Collection was disposed, enumerator operations not valid.";
- public const string CollectionModified = "Collection was modified; enumeration operation may not execute.";
- public const string ColumnValueIsReadOnly = "Cannot modify 'ColumnDefinitionCollection' in read-only state.";
- public const string DefaultAnimatorCantAnimate = "DefaultAnimatorCantAnimate";
- public const string DefaultAnimationRateAnimationRateDefault = "DefaultAnimationRateAnimationRateDefault";
- public const string DefaultAnimatorIterativeAnimationDefault = "DefaultAnimatorIterativeAnimationDefault";
- public const string DestMultidimensional = "Destination is multidimensional. Expected array of rank 1.";
- public const string EnumerationFinished = "Enumeration already finished.";
- public const string EnumerationNotStarted = "Enumeration has not started. Call MoveNext.";
- public const string InvalidDefaultStackLength = "The default stack length must be Auto or an explicit value.";
- public const string MustBeColumnDefinition = "'ColumnDefinitionCollection' must be type 'ColumnDefinition'.";
- public const string MustBeRowDefinition = "'RowDefinitionCollection' must be type 'RowDefinition'.";
- public const string MustBeStackDefinition = "'StackDefinitionCollection' must be type 'StackDefinition'.";
- public const string RowValueIsReadOnly = "Cannot modify 'StackDefinitionCollection' in read-only state.";
- public const string StackValueIsReadOnly = "Cannot modify 'StackDefinitionCollection' in read-only state.";
- public const string UnexpectedType = "Expected type '{0}', got '{1}'.";
-
-
- private static readonly ResourceManager _resourceManager;
-
- #endregion
-
- #region Constructor
-
- static ErrorMessages()
- {
- _resourceManager = new ResourceManager( "Xceed.Wpf.Toolkit.Core.ErrorMessages", typeof( ErrorMessages ).Assembly );
- }
-
- #endregion
-
- public static string GetMessage( string msgId )
- {
- return _resourceManager.GetString( msgId );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/ErrorMessages.resx b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/ErrorMessages.resx
deleted file mode 100644
index 8addfd76..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/ErrorMessages.resx
+++ /dev/null
@@ -1,228 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- AnimationAccelerationRatio must be between 0.0 and 1.0.
-
-
- AnimationDecelerationRatio must be between 0.0 and 1.0.
-
-
- ItemAnimationState can only be used once the animation helper has been assigned
-
-
- Cannot convert back to a range.
-
-
- Container model was already removed from children collection.
-
-
- The DefaultAnimationRate property cannot be set to AnimationRate.Default. It must have a valid AnimationRate value.
-
-
- The DefaultAnimator cannot actually be used for animation.
-
-
- The DefaultAnimator property cannot be set to IterativeAnimation.Default. It must be a valid IterativeAnimator value or null.
-
-
- The EndAngle property cannot be set directly while a Pie's Mode is Slice. You must set the Slice property instead.
-
-
- GlassEnabled can be set only in Full Trust enviornments
-
-
- Unable to return a {0} value for an AnimationRate value of '{1}'. This AnimationRate is represented as a {2} value.
-
-
- item must be a Visual
-
-
- item must be either a Model3D or a Visual3D.
-
-
- The method or operation is not implemented.
-
-
- Speed must be greater than or equal to zero.
-
-
- Duration (TimeSpan) must be greater than or equal to zero.
-
-
- Operation not supported on the platform
-
-
- orderedItems must contain every item in the visible items.
-
-
- The Position property can only be accessed on an absolute view.
-
-
- The Region property can only be accessed on a region-based view.
-
-
- The Scale property can only be accessed on an absolute view.
-
-
- SetNewToValue set on a completed animation helper
-
-
- The Slice property cannot be set directly while a Pie's Mode is EndAngle. You must set the EndAngle property instead.
-
-
- Slice must be between 0.0 and 1.0.
-
-
- Error converting from bool value to Visibility value. Supplied value was not of type bool.
-
-
- Error converting from Visibility value to bool value. Supplied value was not of type Visibility.
-
-
- To and from matrix are equal
-
-
- Unable to convert object '{0}' to ZoomboxView.
-
-
- Value to convert must be a number.
-
-
- The ViewStackMode must be Default or Manual while ViewStackSource is in use.
-
-
- The ViewStack cannot be directly manipulated. Operation is not valid while ViewStackSource is in use. Access and modify members of the Zoombox.ViewStackSource instead.
-
-
- VisibleItemCount and orderedItems count must be equal.
-
-
- The Content property of a Zoombox control must specify a UIElement.
-
-
- The Zoombox template contains a ViewFinder element but it does not contain a ZoomboxViewFinderDisplay element
-
-
- The Zoombox template does not contain a content presenter.
-
-
- The ZoomboxView instance is already initialized for a different type of view: {0}
-
-
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/IndexChangedEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/IndexChangedEventArgs.cs
deleted file mode 100644
index 7c376726..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/IndexChangedEventArgs.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- public class IndexChangedEventArgs : PropertyChangedEventArgs
- {
- #region Constructors
-
- public IndexChangedEventArgs( RoutedEvent routedEvent, int oldIndex, int newIndex )
- : base( routedEvent, oldIndex, newIndex )
- {
- }
-
- #endregion
-
- protected override void InvokeEventHandler( Delegate genericHandler, object genericTarget )
- {
- ( ( IndexChangedEventHandler )genericHandler )( genericTarget, this );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/IndexChangedEventHandler.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/IndexChangedEventHandler.cs
deleted file mode 100644
index 9a81349f..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/IndexChangedEventHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- public delegate void IndexChangedEventHandler( object sender, IndexChangedEventArgs e );
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/IValidateInput.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/IValidateInput.cs
deleted file mode 100644
index 83d0562a..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/IValidateInput.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Xceed.Wpf.Toolkit.Core.Input
-{
- public interface IValidateInput
- {
- event InputValidationErrorEventHandler InputValidationError;
- bool CommitInput();
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/InputValidationErrorEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/InputValidationErrorEventArgs.cs
deleted file mode 100644
index bc7c6151..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/InputValidationErrorEventArgs.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Xceed.Wpf.Toolkit.Core.Input
-{
- public delegate void InputValidationErrorEventHandler( object sender, InputValidationErrorEventArgs e );
-
- public class InputValidationErrorEventArgs : EventArgs
- {
- #region Constructors
-
- public InputValidationErrorEventArgs( Exception e )
- {
- Exception = e;
- }
-
- #endregion
-
- #region Exception Property
-
- public Exception Exception
- {
- get
- {
- return exception;
- }
- private set
- {
- exception = value;
- }
- }
-
- private Exception exception;
-
- #endregion
-
- #region ThrowException Property
-
- public bool ThrowException
- {
- get
- {
- return _throwException;
- }
- set
- {
- _throwException = value;
- }
- }
-
- private bool _throwException;
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/KeyModifier.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/KeyModifier.cs
deleted file mode 100644
index 0e82cf02..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/KeyModifier.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-
-namespace Xceed.Wpf.Toolkit.Core.Input
-{
- public enum KeyModifier
- {
- None,
- Blocked,
- Ctrl,
- LeftCtrl,
- RightCtrl,
- Shift,
- LeftShift,
- RightShift,
- Alt,
- LeftAlt,
- RightAlt,
- Exact,
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/KeyModifierCollection.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/KeyModifierCollection.cs
deleted file mode 100644
index e1c47a14..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/KeyModifierCollection.cs
+++ /dev/null
@@ -1,223 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Windows.Input;
-
-namespace Xceed.Wpf.Toolkit.Core.Input
-{
- [TypeConverter( typeof( KeyModifierCollectionConverter ) )]
- public class KeyModifierCollection : Collection
- {
- #region AreActive Property
-
- public bool AreActive
- {
- get
- {
- if( this.Count == 0 )
- return true;
-
- // if the Blocked modifier is present, then the action is not allowed
- // so simply return false
- if( this.Contains( KeyModifier.Blocked ) )
- return false;
-
- if( this.Contains( KeyModifier.Exact ) )
- return this.IsExactMatch();
-
- return this.MatchAny();
- }
- }
-
- #endregion
-
- private static bool IsKeyPressed( KeyModifier modifier, ICollection keys )
- {
- switch( modifier )
- {
- case KeyModifier.Alt:
- return keys.Contains( Key.LeftAlt )
- || keys.Contains( Key.RightAlt );
-
- case KeyModifier.LeftAlt:
- return keys.Contains( Key.LeftAlt );
-
- case KeyModifier.RightAlt:
- return keys.Contains( Key.RightAlt );
-
- case KeyModifier.Ctrl:
- return keys.Contains( Key.LeftCtrl )
- || keys.Contains( Key.RightCtrl );
-
- case KeyModifier.LeftCtrl:
- return keys.Contains( Key.LeftCtrl );
-
- case KeyModifier.RightCtrl:
- return keys.Contains( Key.RightCtrl );
-
- case KeyModifier.Shift:
- return keys.Contains( Key.LeftShift )
- || keys.Contains( Key.RightShift );
-
- case KeyModifier.LeftShift:
- return keys.Contains( Key.LeftShift );
-
- case KeyModifier.RightShift:
- return keys.Contains( Key.RightShift );
-
- case KeyModifier.None:
- return true;
-
- default:
- throw new NotSupportedException( "Unknown modifier" );
- }
- }
-
- private static bool HasModifier( Key key, ICollection modifiers )
- {
- switch( key )
- {
- case Key.LeftAlt:
- return modifiers.Contains( KeyModifier.Alt )
- || modifiers.Contains( KeyModifier.LeftAlt );
-
- case Key.RightAlt:
- return modifiers.Contains( KeyModifier.Alt )
- || modifiers.Contains( KeyModifier.RightAlt );
-
- case Key.LeftCtrl:
- return modifiers.Contains( KeyModifier.Ctrl )
- || modifiers.Contains( KeyModifier.LeftCtrl );
-
- case Key.RightCtrl:
- return modifiers.Contains( KeyModifier.Ctrl )
- || modifiers.Contains( KeyModifier.RightCtrl );
-
- case Key.LeftShift:
- return modifiers.Contains( KeyModifier.Shift )
- || modifiers.Contains( KeyModifier.LeftShift );
-
- case Key.RightShift:
- return modifiers.Contains( KeyModifier.Shift )
- || modifiers.Contains( KeyModifier.RightShift );
-
- default:
- throw new NotSupportedException( "Unknown key" );
- }
- }
-
- private bool IsExactMatch()
- {
- HashSet modifiers = this.GetKeyModifiers();
- HashSet keys = this.GetKeysPressed();
-
- // No key must be pressed for the modifier None.
- if( this.Contains( KeyModifier.None ) )
- return ( modifiers.Count == 0 )
- && ( keys.Count == 0 );
-
- // Make sure every modifier has a matching key pressed.
- foreach( KeyModifier modifier in modifiers )
- {
- if( !KeyModifierCollection.IsKeyPressed( modifier, keys ) )
- return false;
- }
-
- // Make sure every key pressed has a matching modifier.
- foreach( Key key in keys )
- {
- if( !KeyModifierCollection.HasModifier( key, modifiers ) )
- return false;
- }
-
- return true;
- }
-
- private bool MatchAny()
- {
- if( this.Contains( KeyModifier.None ) )
- return true;
-
- HashSet modifiers = this.GetKeyModifiers();
- HashSet keys = this.GetKeysPressed();
-
- foreach( KeyModifier modifier in modifiers )
- {
- if( KeyModifierCollection.IsKeyPressed( modifier, keys ) )
- return true;
- }
-
- return false;
- }
-
- private HashSet GetKeyModifiers()
- {
- HashSet modifiers = new HashSet();
-
- foreach( KeyModifier modifier in this )
- {
- switch( modifier )
- {
- case KeyModifier.Alt:
- case KeyModifier.LeftAlt:
- case KeyModifier.RightAlt:
- case KeyModifier.Ctrl:
- case KeyModifier.LeftCtrl:
- case KeyModifier.RightCtrl:
- case KeyModifier.Shift:
- case KeyModifier.LeftShift:
- case KeyModifier.RightShift:
- {
- if( !modifiers.Contains( modifier ) )
- {
- modifiers.Add( modifier );
- }
- }
- break;
-
- default:
- break;
- }
- }
-
- return modifiers;
- }
-
- private HashSet GetKeysPressed()
- {
- HashSet keys = new HashSet();
-
- if( Keyboard.IsKeyDown( Key.LeftAlt ) )
- keys.Add( Key.LeftAlt );
- if( Keyboard.IsKeyDown( Key.RightAlt ) )
- keys.Add( Key.RightAlt );
- if( Keyboard.IsKeyDown( Key.LeftCtrl ) )
- keys.Add( Key.LeftCtrl );
- if( Keyboard.IsKeyDown( Key.RightCtrl ) )
- keys.Add( Key.RightCtrl );
- if( Keyboard.IsKeyDown( Key.LeftShift ) )
- keys.Add( Key.LeftShift );
- if( Keyboard.IsKeyDown( Key.RightShift ) )
- keys.Add( Key.RightShift );
-
- return keys;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/KeyModifierCollectionConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/KeyModifierCollectionConverter.cs
deleted file mode 100644
index cec587da..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Input/KeyModifierCollectionConverter.cs
+++ /dev/null
@@ -1,122 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.ComponentModel;
-using System.ComponentModel.Design.Serialization;
-using System.Globalization;
-using System.Reflection;
-using System.Security;
-
-namespace Xceed.Wpf.Toolkit.Core.Input
-{
- public sealed class KeyModifierCollectionConverter : TypeConverter
- {
- #region Static Fields
-
- private static readonly TypeConverter _keyModifierConverter = TypeDescriptor.GetConverter( typeof( KeyModifier ) );
-
- #endregion
-
- public override bool CanConvertFrom( ITypeDescriptorContext typeDescriptorContext, Type type )
- {
- return _keyModifierConverter.CanConvertFrom( typeDescriptorContext, type );
- }
-
- public override bool CanConvertTo( ITypeDescriptorContext typeDescriptorContext, Type type )
- {
- return ( type == typeof( InstanceDescriptor )
- || type == typeof( KeyModifierCollection )
- || type == typeof( string ) );
- }
-
- public override object ConvertFrom( ITypeDescriptorContext typeDescriptorContext,
- CultureInfo cultureInfo, object value )
- {
- KeyModifierCollection result = new KeyModifierCollection();
- string stringValue = value as string;
-
- // convert null as None
- if( value == null
- || ( stringValue != null && stringValue.Trim() == string.Empty ) )
- {
- result.Add( KeyModifier.None );
- }
- else
- {
- // respect the following separators: '+', ' ', '|', or ','
- foreach( string token in stringValue.Split( new char[] { '+', ' ', '|', ',' },
- StringSplitOptions.RemoveEmptyEntries ) )
- result.Add( ( KeyModifier )_keyModifierConverter.ConvertFrom( typeDescriptorContext, cultureInfo, token ) );
-
- // if nothing added, assume None
- if( result.Count == 0 )
- result.Add( KeyModifier.None );
- }
- return result;
- }
-
- public override object ConvertTo( ITypeDescriptorContext typeDescriptorContext,
- CultureInfo cultureInfo, object value, Type destinationType )
- {
- // special handling for null or an empty collection
- if( value == null || ( ( KeyModifierCollection )value ).Count == 0 )
- {
- if( destinationType == typeof( InstanceDescriptor ) )
- {
- object result = null;
- try
- {
- result = ConstructInstanceDescriptor();
- }
- catch( SecurityException )
- {
- }
- return result;
- }
- else if( destinationType == typeof( string ) )
- {
- return _keyModifierConverter.ConvertTo( typeDescriptorContext,
- cultureInfo, KeyModifier.None, destinationType );
- }
- }
-
- // return a '+' delimited string containing the modifiers
- if( destinationType == typeof( string ) )
- {
- string result = string.Empty;
- foreach( KeyModifier modifier in ( KeyModifierCollection )value )
- {
- if( result != string.Empty )
- result = result + '+';
-
- result = result + _keyModifierConverter.ConvertTo( typeDescriptorContext,
- cultureInfo, modifier, destinationType );
- }
- return result;
- }
-
- // unexpected type requested so return null
- return null;
- }
-
- private static object ConstructInstanceDescriptor()
- {
- ConstructorInfo ci = typeof( KeyModifierCollection ).GetConstructor( new Type[] { } );
- return new InstanceDescriptor( ci, new Object[] { } );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/InvalidContentException.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/InvalidContentException.cs
deleted file mode 100644
index 793cb9e1..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/InvalidContentException.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- public class InvalidContentException : Exception
- {
- #region Constructors
-
- public InvalidContentException( string message )
- : base( message )
- {
- }
-
- public InvalidContentException( string message, Exception innerException )
- : base( message, innerException )
- {
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/InvalidTemplateException.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/InvalidTemplateException.cs
deleted file mode 100644
index 97fc54bf..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/InvalidTemplateException.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- public class InvalidTemplateException : Exception
- {
- #region Constructors
-
- public InvalidTemplateException( string message )
- : base( message )
- {
- }
-
- public InvalidTemplateException( string message, Exception innerException )
- : base( message, innerException )
- {
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/LocationEnum.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/LocationEnum.cs
deleted file mode 100644
index 1d67d3fd..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/LocationEnum.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- public enum Location
- {
- Left,
- Right
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/AnimationRate.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/AnimationRate.cs
deleted file mode 100644
index 3ec7e7ba..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/AnimationRate.cs
+++ /dev/null
@@ -1,346 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.ComponentModel;
-using System.Runtime.InteropServices;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-using Xceed.Wpf.Toolkit.Core;
-
-namespace Xceed.Wpf.Toolkit.Media.Animation
-{
- [TypeConverter( typeof( AnimationRateConverter ) )]
- [StructLayout( LayoutKind.Explicit )]
- public struct AnimationRate
- {
- #region Static Fields
-
- private static AnimationRate _default = new AnimationRate( true );
-
- #endregion
-
- #region Constructors
-
- public AnimationRate( TimeSpan duration )
- {
- if( duration < TimeSpan.Zero )
- {
- throw new ArgumentException( ErrorMessages.GetMessage( ErrorMessages.NegativeTimeSpanNotSupported ) );
- }
- _speed = 0d;
- _duration = duration.Ticks;
- _rateType = RateType.TimeSpan;
- }
-
- public AnimationRate( double speed )
- {
- if( DoubleHelper.IsNaN( speed ) || speed < 0d )
- {
- throw new ArgumentException( ErrorMessages.GetMessage( ErrorMessages.NegativeSpeedNotSupported ) );
- }
- _duration = 0;
- _speed = speed;
- _rateType = RateType.Speed;
- }
-
- private AnimationRate( bool ignore )
- {
- _duration = 0;
- _speed = double.NaN;
- _rateType = RateType.Speed;
- }
-
- #endregion
-
- #region Default Property
-
- public static AnimationRate Default
- {
- get
- {
- return _default;
- }
- }
-
- #endregion
-
- #region HasDuration Property
-
- public bool HasDuration
- {
- get
- {
- return ( _rateType == RateType.TimeSpan );
- }
- }
-
- #endregion
-
- #region Duration Property
-
- public TimeSpan Duration
- {
- get
- {
- if( this.HasDuration )
- return TimeSpan.FromTicks( _duration );
-
- throw new InvalidOperationException(
- string.Format(
- ErrorMessages.GetMessage( ErrorMessages.InvalidRatePropertyAccessed ),
- "Duration",
- this,
- "Speed" ) );
- }
- }
-
- #endregion
-
- #region HasSpeed Property
-
- public bool HasSpeed
- {
- get
- {
- return ( _rateType == RateType.Speed );
- }
- }
-
- #endregion
-
- #region Speed Property
-
- public double Speed
- {
- get
- {
- if( this.HasSpeed )
- return _speed;
-
- throw new InvalidOperationException(
- string.Format(
- ErrorMessages.GetMessage( ErrorMessages.InvalidRatePropertyAccessed ),
- "Speed",
- this,
- "Duration" ) );
- }
- }
-
- #endregion
-
- public AnimationRate Add( AnimationRate animationRate )
- {
- return this + animationRate;
- }
-
- public override bool Equals( Object value )
- {
- if( value == null )
- return false;
-
- if( value is AnimationRate )
- return this.Equals( ( AnimationRate )value );
-
- return false;
- }
-
- public bool Equals( AnimationRate animationRate )
- {
- if( this.HasDuration )
- {
- if( animationRate.HasDuration )
- return _duration == animationRate._duration;
-
- return false;
- }
- else // HasSpeed
- {
- if( animationRate.HasSpeed )
- {
- if( DoubleHelper.IsNaN( _speed ) )
- return DoubleHelper.IsNaN( animationRate._speed );
-
- return _speed == animationRate._speed;
- }
-
- return false;
- }
- }
-
- public static bool Equals( AnimationRate t1, AnimationRate t2 )
- {
- return t1.Equals( t2 );
- }
-
- public override int GetHashCode()
- {
- if( this.HasDuration )
- return _duration.GetHashCode();
-
- return _speed.GetHashCode();
- }
-
- public AnimationRate Subtract( AnimationRate animationRate )
- {
- return this - animationRate;
- }
-
- public override string ToString()
- {
- if( this.HasDuration )
- return TypeDescriptor.GetConverter( _duration ).ConvertToString( _duration );
-
- return TypeDescriptor.GetConverter( _speed ).ConvertToString( _speed );
- }
-
- #region Operators Methods
-
- public static implicit operator AnimationRate( TimeSpan duration )
- {
- if( duration < TimeSpan.Zero )
- throw new ArgumentException( ErrorMessages.GetMessage( ErrorMessages.NegativeTimeSpanNotSupported ) );
-
- return new AnimationRate( duration );
- }
-
- public static implicit operator AnimationRate( double speed )
- {
- if( DoubleHelper.IsNaN( speed ) || speed < 0 )
- throw new ArgumentException( ErrorMessages.GetMessage( ErrorMessages.NegativeSpeedNotSupported ) );
-
- return new AnimationRate( speed );
- }
-
- public static implicit operator AnimationRate( int speed )
- {
- if( DoubleHelper.IsNaN( speed ) || speed < 0 )
- throw new ArgumentException( ErrorMessages.GetMessage( ErrorMessages.NegativeSpeedNotSupported ) );
-
- return new AnimationRate( ( double )speed );
- }
-
- public static AnimationRate operator +( AnimationRate t1, AnimationRate t2 )
- {
- if( t1.HasDuration && t2.HasDuration )
- return new AnimationRate( t1._duration + t2._duration );
-
- if( t1.HasSpeed && t2.HasSpeed )
- return new AnimationRate( t1._speed + t2._speed );
-
- return ( AnimationRate )0d;
- }
-
- public static AnimationRate operator -( AnimationRate t1, AnimationRate t2 )
- {
- if( t1.HasDuration && t2.HasDuration )
- return new AnimationRate( t1._duration - t2._duration );
-
- if( t1.HasSpeed && t2.HasSpeed )
- return new AnimationRate( t1._speed - t2._speed );
-
- return ( AnimationRate )0d;
- }
-
- public static bool operator ==( AnimationRate t1, AnimationRate t2 )
- {
- return t1.Equals( t2 );
- }
-
- public static bool operator !=( AnimationRate t1, AnimationRate t2 )
- {
- return !( t1.Equals( t2 ) );
- }
-
- public static bool operator >( AnimationRate t1, AnimationRate t2 )
- {
- if( t1.HasDuration && t2.HasDuration )
- return t1._duration > t2._duration;
-
- if( t1.HasSpeed && t2.HasSpeed )
- return ( t1._speed > t2._speed ) && !DoubleHelper.AreVirtuallyEqual( t1._speed, t2._speed );
-
- // arbitrary: assume a Speed is greater than a Duration
- return t1.HasSpeed;
- }
-
- public static bool operator >=( AnimationRate t1, AnimationRate t2 )
- {
- return !( t1 < t2 );
- }
-
- public static bool operator <( AnimationRate t1, AnimationRate t2 )
- {
- if( t1.HasDuration && t2.HasDuration )
- return t1._duration < t2._duration;
-
- if( t1.HasSpeed && t2.HasSpeed )
- return ( t1._speed < t2._speed ) && !DoubleHelper.AreVirtuallyEqual( t1._speed, t2._speed );
-
- // arbitrary: assume a Speed is greater than a Duration
- return t1.HasDuration;
- }
-
- public static bool operator <=( AnimationRate t1, AnimationRate t2 )
- {
- return !( t1 > t2 );
- }
-
- public static int Compare( AnimationRate t1, AnimationRate t2 )
- {
- if( t1 < t2 )
- return -1;
-
- if( t1 > t2 )
- return 1;
-
- // Neither is greater than the other
- return 0;
- }
-
- public static AnimationRate Plus( AnimationRate animationRate )
- {
- return animationRate;
- }
-
- public static AnimationRate operator +( AnimationRate animationRate )
- {
- return animationRate;
- }
-
- #endregion
-
- #region Private Fields
-
- [FieldOffset( 0 )]
- long _duration;
- [FieldOffset( 0 )]
- double _speed;
- [FieldOffset( 8 )]
- RateType _rateType;
-
- #endregion
-
- #region RateType Nested Type
-
- private enum RateType
- {
- TimeSpan,
- Speed,
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/AnimationRateConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/AnimationRateConverter.cs
deleted file mode 100644
index c8b9024f..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/AnimationRateConverter.cs
+++ /dev/null
@@ -1,120 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.ComponentModel;
-using System.ComponentModel.Design.Serialization;
-using System.Globalization;
-using System.Reflection;
-
-namespace Xceed.Wpf.Toolkit.Media.Animation
-{
- public class AnimationRateConverter : TypeConverter
- {
- public override bool CanConvertFrom( ITypeDescriptorContext td, Type t )
- {
- return ( t == typeof( string ) )
- || ( t == typeof( double ) )
- || ( t == typeof( int ) )
- || ( t == typeof( TimeSpan ) );
- }
-
- public override bool CanConvertTo( ITypeDescriptorContext context, Type destinationType )
- {
- return ( destinationType == typeof( InstanceDescriptor ) )
- || ( destinationType == typeof( string ) )
- || ( destinationType == typeof( double ) )
- || ( destinationType == typeof( TimeSpan ) );
- }
-
- public override object ConvertFrom(
- ITypeDescriptorContext td,
- CultureInfo cultureInfo,
- object value )
- {
- Type valueType = value.GetType();
- if( value is string )
- {
- string stringValue = value as string;
- if( ( value as string ).Contains( ":" ) )
- {
- TimeSpan duration = TimeSpan.Zero;
- duration = ( TimeSpan )TypeDescriptor.GetConverter( duration ).ConvertFrom( td, cultureInfo, value );
- return new AnimationRate( duration );
- }
- else
- {
- double speed = 0;
- speed = ( double )TypeDescriptor.GetConverter( speed ).ConvertFrom( td, cultureInfo, value );
- return new AnimationRate( speed );
- }
- }
- else if( valueType == typeof( double ) )
- {
- return ( AnimationRate )( double )value;
- }
- else if( valueType == typeof( int ) )
- {
- return ( AnimationRate )( int )value;
- }
- else // TimeSpan
- {
- return ( AnimationRate )( TimeSpan )value;
- }
- }
-
- public override object ConvertTo(
- ITypeDescriptorContext context,
- CultureInfo cultureInfo,
- object value,
- Type destinationType )
- {
- if( destinationType != null && value is AnimationRate )
- {
- AnimationRate rateValue = ( AnimationRate )value;
-
- if( destinationType == typeof( InstanceDescriptor ) )
- {
- MemberInfo mi;
- if( rateValue.HasDuration )
- {
- mi = typeof( AnimationRate ).GetConstructor( new Type[] { typeof( TimeSpan ) } );
- return new InstanceDescriptor( mi, new object[] { rateValue.Duration } );
- }
- else if( rateValue.HasSpeed )
- {
- mi = typeof( AnimationRate ).GetConstructor( new Type[] { typeof( double ) } );
- return new InstanceDescriptor( mi, new object[] { rateValue.Speed } );
- }
- }
- else if( destinationType == typeof( string ) )
- {
- return rateValue.ToString();
- }
- else if( destinationType == typeof( double ) )
- {
- return rateValue.HasSpeed ? rateValue.Speed : 0.0d;
- }
- else if( destinationType == typeof( TimeSpan ) )
- {
- return rateValue.HasDuration ? rateValue.Duration : TimeSpan.FromSeconds( 0 );
- }
- }
-
- return base.ConvertTo( context, cultureInfo, value, destinationType );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/IterativeAnimationEquation.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/IterativeAnimationEquation.cs
deleted file mode 100644
index 1cc8fcb1..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/IterativeAnimationEquation.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.ComponentModel;
-
-namespace Xceed.Wpf.Toolkit.Media.Animation
-{
- [TypeConverter( typeof( IterativeEquationConverter ) )]
- public class IterativeEquation
- {
- #region Constructors
-
- public IterativeEquation( IterativeAnimationEquationDelegate equation )
- {
- _equation = equation;
- }
-
- internal IterativeEquation()
- {
- }
-
- #endregion
-
- public virtual T Evaluate( TimeSpan currentTime, T from, T to, TimeSpan duration )
- {
- return _equation( currentTime, from, to, duration );
- }
-
- #region Private Fields
-
- private readonly IterativeAnimationEquationDelegate _equation;
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/IterativeAnimationEquationDelegate.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/IterativeAnimationEquationDelegate.cs
deleted file mode 100644
index dbb3d684..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/IterativeAnimationEquationDelegate.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-
-namespace Xceed.Wpf.Toolkit.Media.Animation
-{
- public delegate T IterativeAnimationEquationDelegate( TimeSpan currentTime, T from, T to, TimeSpan duration );
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/IterativeEquationConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/IterativeEquationConverter.cs
deleted file mode 100644
index 57f56b0e..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/IterativeEquationConverter.cs
+++ /dev/null
@@ -1,145 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.ComponentModel;
-using System.Globalization;
-
-namespace Xceed.Wpf.Toolkit.Media.Animation
-{
- public class IterativeEquationConverter : TypeConverter
- {
- public override bool CanConvertFrom( ITypeDescriptorContext typeDescriptorContext, Type type )
- {
- return type == typeof( string );
- }
-
- public override bool CanConvertTo( ITypeDescriptorContext typeDescriptorContext, Type type )
- {
- return type == typeof( IterativeEquation );
- }
-
- public override object ConvertFrom(
- ITypeDescriptorContext typeDescriptorContext,
- CultureInfo cultureInfo,
- object value )
- {
- IterativeEquation result = null;
-
- if( value is string )
- {
- switch( value as string )
- {
- case "BackEaseIn":
- result = PennerEquations.BackEaseIn as IterativeEquation;
- break;
- case "BackEaseInOut":
- result = PennerEquations.BackEaseInOut as IterativeEquation;
- break;
- case "BackEaseOut":
- result = PennerEquations.BackEaseOut as IterativeEquation;
- break;
- case "BounceEaseIn":
- result = PennerEquations.BounceEaseIn as IterativeEquation;
- break;
- case "BounceEaseInOut":
- result = PennerEquations.BounceEaseInOut as IterativeEquation;
- break;
- case "BounceEaseOut":
- result = PennerEquations.BounceEaseOut as IterativeEquation;
- break;
- case "CircEaseIn":
- result = PennerEquations.CircEaseIn as IterativeEquation;
- break;
- case "CircEaseInOut":
- result = PennerEquations.CircEaseInOut as IterativeEquation;
- break;
- case "CircEaseOut":
- result = PennerEquations.CircEaseOut as IterativeEquation;
- break;
- case "CubicEaseIn":
- result = PennerEquations.CubicEaseIn as IterativeEquation;
- break;
- case "CubicEaseInOut":
- result = PennerEquations.CubicEaseInOut as IterativeEquation;
- break;
- case "CubicEaseOut":
- result = PennerEquations.CubicEaseOut as IterativeEquation;
- break;
- case "ElasticEaseIn":
- result = PennerEquations.ElasticEaseIn as IterativeEquation;
- break;
- case "ElasticEaseInOut":
- result = PennerEquations.ElasticEaseInOut as IterativeEquation;
- break;
- case "ElasticEaseOut":
- result = PennerEquations.ElasticEaseOut as IterativeEquation;
- break;
- case "ExpoEaseIn":
- result = PennerEquations.ExpoEaseIn as IterativeEquation;
- break;
- case "ExpoEaseInOut":
- result = PennerEquations.ExpoEaseInOut as IterativeEquation;
- break;
- case "ExpoEaseOut":
- result = PennerEquations.ExpoEaseOut as IterativeEquation;
- break;
- case "Linear":
- result = PennerEquations.Linear as IterativeEquation;
- break;
- case "QuadEaseIn":
- result = PennerEquations.QuadEaseIn as IterativeEquation;
- break;
- case "QuadEaseInOut":
- result = PennerEquations.QuadEaseInOut as IterativeEquation;
- break;
- case "QuadEaseOut":
- result = PennerEquations.QuadEaseOut as IterativeEquation;
- break;
- case "QuartEaseIn":
- result = PennerEquations.QuartEaseIn as IterativeEquation;
- break;
- case "QuartEaseInOut":
- result = PennerEquations.QuartEaseInOut as IterativeEquation;
- break;
- case "QuartEaseOut":
- result = PennerEquations.QuartEaseOut as IterativeEquation;
- break;
- case "QuintEaseIn":
- result = PennerEquations.QuintEaseIn as IterativeEquation;
- break;
- case "QuintEaseInOut":
- result = PennerEquations.QuintEaseInOut as IterativeEquation;
- break;
- case "QuintEaseOut":
- result = PennerEquations.QuintEaseOut as IterativeEquation;
- break;
- case "SineEaseIn":
- result = PennerEquations.SineEaseIn as IterativeEquation;
- break;
- case "SineEaseInOut":
- result = PennerEquations.SineEaseInOut as IterativeEquation;
- break;
- case "SineEaseOut":
- result = PennerEquations.SineEaseOut as IterativeEquation;
- break;
- }
- }
-
- return result;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/PennerEquation.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/PennerEquation.cs
deleted file mode 100644
index 41c3a77a..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/PennerEquation.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-
-namespace Xceed.Wpf.Toolkit.Media.Animation
-{
- public class PennerEquation : IterativeEquation
- {
- #region Constructors
-
- internal PennerEquation( PennerEquationDelegate pennerImpl )
- {
- _pennerImpl = pennerImpl;
- }
-
- #endregion
-
- public override double Evaluate( TimeSpan currentTime, double from, double to, TimeSpan duration )
- {
- double t = currentTime.TotalSeconds;
- double b = from;
- double c = to - from;
- double d = duration.TotalSeconds;
-
- return _pennerImpl( t, b, c, d );
- }
-
- #region Private Fields
-
- private readonly PennerEquationDelegate _pennerImpl;
-
- #endregion
-
- #region PennerEquationDelegate Delegate
-
- internal delegate double PennerEquationDelegate( double t, double b, double c, double d );
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/PennerEquations.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/PennerEquations.cs
deleted file mode 100644
index 4b7765a6..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/Animation/PennerEquations.cs
+++ /dev/null
@@ -1,851 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-
-namespace Xceed.Wpf.Toolkit.Media.Animation
-{
- public static class PennerEquations
- {
- #region BackEaseIn Static Property
-
- public static PennerEquation BackEaseIn
- {
- get
- {
- if( _backEaseIn == null )
- {
- _backEaseIn = new PennerEquation( BackEaseInImpl );
- }
- return _backEaseIn;
- }
- }
-
- private static PennerEquation _backEaseIn;
-
- #endregion
-
- #region BackEaseInOut Static Property
-
- public static PennerEquation BackEaseInOut
- {
- get
- {
- if( _backEaseInOut == null )
- {
- _backEaseInOut = new PennerEquation( BackEaseInOutImpl );
- }
- return _backEaseInOut;
- }
- }
-
- private static PennerEquation _backEaseInOut;
-
- #endregion
-
- #region BackEaseOut Static Property
-
- public static PennerEquation BackEaseOut
- {
- get
- {
- if( _backEaseOut == null )
- {
- _backEaseOut = new PennerEquation( BackEaseOutImpl );
- }
- return _backEaseOut;
- }
- }
-
- private static PennerEquation _backEaseOut;
-
- #endregion
-
- #region BounceEaseIn Static Property
-
- public static PennerEquation BounceEaseIn
- {
- get
- {
- if( _bounceEaseIn == null )
- {
- _bounceEaseIn = new PennerEquation( BounceEaseInImpl );
- }
- return _bounceEaseIn;
- }
- }
-
- private static PennerEquation _bounceEaseIn;
-
- #endregion
-
- #region BounceEaseInOut Static Property
-
- public static PennerEquation BounceEaseInOut
- {
- get
- {
- if( _bounceEaseInOut == null )
- {
- _bounceEaseInOut = new PennerEquation( BounceEaseInOutImpl );
- }
- return _bounceEaseInOut;
- }
- }
-
- private static PennerEquation _bounceEaseInOut;
-
- #endregion
-
- #region BounceEaseOut Static Property
-
- public static PennerEquation BounceEaseOut
- {
- get
- {
- if( _bounceEaseOut == null )
- {
- _bounceEaseOut = new PennerEquation( BounceEaseOutImpl );
- }
- return _bounceEaseOut;
- }
- }
-
- private static PennerEquation _bounceEaseOut;
-
- #endregion
-
- #region CircEaseIn Static Property
-
- public static PennerEquation CircEaseIn
- {
- get
- {
- if( _circEaseIn == null )
- {
- _circEaseIn = new PennerEquation( CircEaseInImpl );
- }
- return _circEaseIn;
- }
- }
-
- private static PennerEquation _circEaseIn;
-
- #endregion
-
- #region CircEaseInOut Static Property
-
- public static PennerEquation CircEaseInOut
- {
- get
- {
- if( _circEaseInOut == null )
- {
- _circEaseInOut = new PennerEquation( CircEaseInOutImpl );
- }
- return _circEaseInOut;
- }
- }
-
- private static PennerEquation _circEaseInOut;
-
- #endregion
-
- #region CircEaseOut Static Property
-
- public static PennerEquation CircEaseOut
- {
- get
- {
- if( _circEaseOut == null )
- {
- _circEaseOut = new PennerEquation( CircEaseOutImpl );
- }
- return _circEaseOut;
- }
- }
-
- private static PennerEquation _circEaseOut;
-
- #endregion
-
- #region CubicEaseIn Static Property
-
- public static PennerEquation CubicEaseIn
- {
- get
- {
- if( _cubicEaseIn == null )
- {
- _cubicEaseIn = new PennerEquation( CubicEaseInImpl );
- }
- return _cubicEaseIn;
- }
- }
-
- private static PennerEquation _cubicEaseIn;
-
- #endregion
-
- #region CubicEaseInOut Static Property
-
- public static PennerEquation CubicEaseInOut
- {
- get
- {
- if( _cubicEaseInOut == null )
- {
- _cubicEaseInOut = new PennerEquation( CubicEaseInOutImpl );
- }
- return _cubicEaseInOut;
- }
- }
-
- private static PennerEquation _cubicEaseInOut;
-
- #endregion
-
- #region CubicEaseOut Static Property
-
- public static PennerEquation CubicEaseOut
- {
- get
- {
- if( _cubicEaseOut == null )
- {
- _cubicEaseOut = new PennerEquation( CubicEaseOutImpl );
- }
- return _cubicEaseOut;
- }
- }
-
- private static PennerEquation _cubicEaseOut;
-
- #endregion
-
- #region ElasticEaseIn Static Property
-
- public static PennerEquation ElasticEaseIn
- {
- get
- {
- if( _elasticEaseIn == null )
- {
- _elasticEaseIn = new PennerEquation( ElasticEaseInImpl );
- }
- return _elasticEaseIn;
- }
- }
-
- private static PennerEquation _elasticEaseIn;
-
- #endregion
-
- #region ElasticEaseInOut Static Property
-
- public static PennerEquation ElasticEaseInOut
- {
- get
- {
- if( _elasticEaseInOut == null )
- {
- _elasticEaseInOut = new PennerEquation( ElasticEaseInOutImpl );
- }
- return _elasticEaseInOut;
- }
- }
-
- private static PennerEquation _elasticEaseInOut;
-
- #endregion
-
- #region ElasticEaseOut Static Property
-
- public static PennerEquation ElasticEaseOut
- {
- get
- {
- if( _elasticEaseOut == null )
- {
- _elasticEaseOut = new PennerEquation( ElasticEaseOutImpl );
- }
- return _elasticEaseOut;
- }
- }
-
- private static PennerEquation _elasticEaseOut;
-
- #endregion
-
- #region ExpoEaseIn Static Property
-
- public static PennerEquation ExpoEaseIn
- {
- get
- {
- if( _expoEaseIn == null )
- {
- _expoEaseIn = new PennerEquation( ExpoEaseInImpl );
- }
- return _expoEaseIn;
- }
- }
-
- private static PennerEquation _expoEaseIn;
-
- #endregion
-
- #region ExpoEaseInOut Static Property
-
- public static PennerEquation ExpoEaseInOut
- {
- get
- {
- if( _expoEaseInOut == null )
- {
- _expoEaseInOut = new PennerEquation( ExpoEaseInOutImpl );
- }
- return _expoEaseInOut;
- }
- }
-
- private static PennerEquation _expoEaseInOut;
-
- #endregion
-
- #region ExpoEaseOut Static Property
-
- public static PennerEquation ExpoEaseOut
- {
- get
- {
- if( _expoEaseOut == null )
- {
- _expoEaseOut = new PennerEquation( ExpoEaseOutImpl );
- }
- return _expoEaseOut;
- }
- }
-
- private static PennerEquation _expoEaseOut;
-
- #endregion
-
- #region Linear Static Property
-
- public static PennerEquation Linear
- {
- get
- {
- if( _linear == null )
- {
- _linear = new PennerEquation( LinearImpl );
- }
- return _linear;
- }
- }
-
- private static PennerEquation _linear;
-
- #endregion
-
- #region QuadEaseIn Static Property
-
- public static PennerEquation QuadEaseIn
- {
- get
- {
- if( _quadEaseIn == null )
- {
- _quadEaseIn = new PennerEquation( QuadEaseInImpl );
- }
- return _quadEaseIn;
- }
- }
-
- private static PennerEquation _quadEaseIn;
-
- #endregion
-
- #region QuadEaseInOut Static Property
-
- public static PennerEquation QuadEaseInOut
- {
- get
- {
- if( _quadEaseInOut == null )
- {
- _quadEaseInOut = new PennerEquation( QuadEaseInOutImpl );
- }
- return _quadEaseInOut;
- }
- }
-
- private static PennerEquation _quadEaseInOut;
-
- #endregion
-
- #region QuadEaseOut Static Property
-
- public static PennerEquation QuadEaseOut
- {
- get
- {
- if( _quadEaseOut == null )
- {
- _quadEaseOut = new PennerEquation( QuadEaseOutImpl );
- }
- return _quadEaseOut;
- }
- }
-
- private static PennerEquation _quadEaseOut;
-
- #endregion
-
- #region QuartEaseIn Static Property
-
- public static PennerEquation QuartEaseIn
- {
- get
- {
- if( _quartEaseIn == null )
- {
- _quartEaseIn = new PennerEquation( QuartEaseInImpl );
- }
- return _quartEaseIn;
- }
- }
-
- private static PennerEquation _quartEaseIn;
-
- #endregion
-
- #region QuartEaseInOut Static Property
-
- public static PennerEquation QuartEaseInOut
- {
- get
- {
- if( _quartEaseInOut == null )
- {
- _quartEaseInOut = new PennerEquation( QuartEaseInOutImpl );
- }
- return _quartEaseInOut;
- }
- }
-
- private static PennerEquation _quartEaseInOut;
-
- #endregion
-
- #region QuartEaseOut Static Property
-
- public static PennerEquation QuartEaseOut
- {
- get
- {
- if( _quartEaseOut == null )
- {
- _quartEaseOut = new PennerEquation( QuartEaseOutImpl );
- }
- return _quartEaseOut;
- }
- }
-
- private static PennerEquation _quartEaseOut;
-
- #endregion
-
- #region QuintEaseIn Static Property
-
- public static PennerEquation QuintEaseIn
- {
- get
- {
- if( _quintEaseIn == null )
- {
- _quintEaseIn = new PennerEquation( QuintEaseInImpl );
- }
- return _quintEaseIn;
- }
- }
-
- private static PennerEquation _quintEaseIn;
-
- #endregion
-
- #region QuintEaseInOut Static Property
-
- public static PennerEquation QuintEaseInOut
- {
- get
- {
- if( _quintEaseInOut == null )
- {
- _quintEaseInOut = new PennerEquation( QuintEaseInOutImpl );
- }
- return _quintEaseInOut;
- }
- }
-
- private static PennerEquation _quintEaseInOut;
-
- #endregion
-
- #region QuintEaseOut Static Property
-
- public static PennerEquation QuintEaseOut
- {
- get
- {
- if( _quintEaseOut == null )
- {
- _quintEaseOut = new PennerEquation( QuintEaseOutImpl );
- }
- return _quintEaseOut;
- }
- }
-
- private static PennerEquation _quintEaseOut;
-
- #endregion
-
- #region SineEaseIn Static Property
-
- public static PennerEquation SineEaseIn
- {
- get
- {
- if( _sineEaseIn == null )
- {
- _sineEaseIn = new PennerEquation( SineEaseInImpl );
- }
- return _sineEaseIn;
- }
- }
-
- private static PennerEquation _sineEaseIn;
-
- #endregion
-
- #region SineEaseInOut Static Property
-
- public static PennerEquation SineEaseInOut
- {
- get
- {
- if( _sineEaseInOut == null )
- {
- _sineEaseInOut = new PennerEquation( SineEaseInOutImpl );
- }
- return _sineEaseInOut;
- }
- }
-
- private static PennerEquation _sineEaseInOut;
-
- #endregion
-
- #region SineEaseOut Static Property
-
- public static PennerEquation SineEaseOut
- {
- get
- {
- if( _sineEaseOut == null )
- {
- _sineEaseOut = new PennerEquation( SineEaseOutImpl );
- }
- return _sineEaseOut;
- }
- }
-
- private static PennerEquation _sineEaseOut;
-
- #endregion
-
- #region Back Equations Methods
-
- private static double BackEaseOutImpl( double t, double b, double c, double d )
- {
- return c * ( ( t = t / d - 1 ) * t * ( ( 1.70158 + 1 ) * t + 1.70158 ) + 1 ) + b;
- }
-
- private static double BackEaseInImpl( double t, double b, double c, double d )
- {
- return c * ( t /= d ) * t * ( ( 1.70158 + 1 ) * t - 1.70158 ) + b;
- }
-
- private static double BackEaseInOutImpl( double t, double b, double c, double d )
- {
- double s = 1.70158;
- if( ( t /= d / 2 ) < 1 )
- return c / 2 * ( t * t * ( ( ( s *= ( 1.525 ) ) + 1 ) * t - s ) ) + b;
- return c / 2 * ( ( t -= 2 ) * t * ( ( ( s *= ( 1.525 ) ) + 1 ) * t + s ) + 2 ) + b;
- }
-
- #endregion
-
- #region Bounce Equations Methods
-
- private static double BounceEaseOutImpl( double t, double b, double c, double d )
- {
- if( ( t /= d ) < ( 1 / 2.75 ) )
- {
- return c * ( 7.5625 * t * t ) + b;
- }
- else if( t < ( 2 / 2.75 ) )
- {
- return c * ( 7.5625 * ( t -= ( 1.5 / 2.75 ) ) * t + .75 ) + b;
- }
- else if( t < ( 2.5 / 2.75 ) )
- {
- return c * ( 7.5625 * ( t -= ( 2.25 / 2.75 ) ) * t + .9375 ) + b;
- }
- else
- {
- return c * ( 7.5625 * ( t -= ( 2.625 / 2.75 ) ) * t + .984375 ) + b;
- }
- }
-
- private static double BounceEaseInImpl( double t, double b, double c, double d )
- {
- return c - PennerEquations.BounceEaseOutImpl( d - t, 0, c, d ) + b;
- }
-
- private static double BounceEaseInOutImpl( double t, double b, double c, double d )
- {
- if( t < d / 2 )
- {
- return PennerEquations.BounceEaseInImpl( t * 2, 0, c, d ) * .5 + b;
- }
- else
- {
- return PennerEquations.BounceEaseOutImpl( t * 2 - d, 0, c, d ) * .5 + c * .5 + b;
- }
- }
-
- #endregion
-
- #region Circular Equations Methods
-
- private static double CircEaseOutImpl( double t, double b, double c, double d )
- {
- return c * Math.Sqrt( 1 - ( t = t / d - 1 ) * t ) + b;
- }
-
- private static double CircEaseInImpl( double t, double b, double c, double d )
- {
- return -c * ( Math.Sqrt( 1 - ( t /= d ) * t ) - 1 ) + b;
- }
-
- private static double CircEaseInOutImpl( double t, double b, double c, double d )
- {
- if( ( t /= d / 2 ) < 1 )
- return -c / 2 * ( Math.Sqrt( 1 - t * t ) - 1 ) + b;
-
- return c / 2 * ( Math.Sqrt( 1 - ( t -= 2 ) * t ) + 1 ) + b;
- }
-
- #endregion
-
- #region Cubic Equations Methods
-
- private static double CubicEaseOutImpl( double t, double b, double c, double d )
- {
- return c * ( ( t = t / d - 1 ) * t * t + 1 ) + b;
- }
-
- private static double CubicEaseInImpl( double t, double b, double c, double d )
- {
- return c * ( t /= d ) * t * t + b;
- }
-
- private static double CubicEaseInOutImpl( double t, double b, double c, double d )
- {
- if( ( t /= d / 2 ) < 1 )
- return c / 2 * t * t * t + b;
-
- return c / 2 * ( ( t -= 2 ) * t * t + 2 ) + b;
- }
-
- #endregion
-
- #region Elastic Equations Methods
-
- private static double ElasticEaseOutImpl( double t, double b, double c, double d )
- {
- if( ( t /= d ) == 1 )
- return b + c;
-
- double p = d * .3;
- double s = p / 4;
-
- return ( c * Math.Pow( 2, -10 * t ) * Math.Sin( ( t * d - s ) * ( 2 * Math.PI ) / p ) + c + b );
- }
-
- private static double ElasticEaseInImpl( double t, double b, double c, double d )
- {
- if( ( t /= d ) == 1 )
- return b + c;
-
- double p = d * .3;
- double s = p / 4;
-
- return -( c * Math.Pow( 2, 10 * ( t -= 1 ) ) * Math.Sin( ( t * d - s ) * ( 2 * Math.PI ) / p ) ) + b;
- }
-
- private static double ElasticEaseInOutImpl( double t, double b, double c, double d )
- {
- if( ( t /= d / 2 ) == 2 )
- return b + c;
-
- double p = d * ( .3 * 1.5 );
- double s = p / 4;
-
- if( t < 1 )
- return -.5 * ( c * Math.Pow( 2, 10 * ( t -= 1 ) ) * Math.Sin( ( t * d - s ) * ( 2 * Math.PI ) / p ) ) + b;
- return c * Math.Pow( 2, -10 * ( t -= 1 ) ) * Math.Sin( ( t * d - s ) * ( 2 * Math.PI ) / p ) * .5 + c + b;
- }
-
- #endregion
-
- #region Expo Equations Methods
-
- private static double ExpoEaseOutImpl( double t, double b, double c, double d )
- {
- return ( t == d ) ? b + c : c * ( -Math.Pow( 2, -10 * t / d ) + 1 ) + b;
- }
-
- private static double ExpoEaseInImpl( double t, double b, double c, double d )
- {
- return ( t == 0 ) ? b : c * Math.Pow( 2, 10 * ( t / d - 1 ) ) + b;
- }
-
- private static double ExpoEaseInOutImpl( double t, double b, double c, double d )
- {
- if( t == 0 )
- return b;
-
- if( t == d )
- return b + c;
-
- if( ( t /= d / 2 ) < 1 )
- return c / 2 * Math.Pow( 2, 10 * ( t - 1 ) ) + b;
-
- return c / 2 * ( -Math.Pow( 2, -10 * --t ) + 2 ) + b;
- }
-
- #endregion
-
- #region Linear Equations Methods
-
- private static double LinearImpl( double t, double b, double c, double d )
- {
- return c * ( t / d ) + b;
- }
-
- #endregion
-
- #region Quad Equations Methods
-
- private static double QuadEaseOutImpl( double t, double b, double c, double d )
- {
- return -c * ( t /= d ) * ( t - 2 ) + b;
- }
-
- private static double QuadEaseInImpl( double t, double b, double c, double d )
- {
- return c * ( t /= d ) * t + b;
- }
-
- private static double QuadEaseInOutImpl( double t, double b, double c, double d )
- {
- if( ( t /= d / 2 ) < 1 )
- return c / 2 * t * t + b;
-
- return -c / 2 * ( ( --t ) * ( t - 2 ) - 1 ) + b;
- }
-
- #endregion
-
- #region Quartic Equations Methods
-
- private static double QuartEaseOutImpl( double t, double b, double c, double d )
- {
- return -c * ( ( t = t / d - 1 ) * t * t * t - 1 ) + b;
- }
-
- private static double QuartEaseInImpl( double t, double b, double c, double d )
- {
- return c * ( t /= d ) * t * t * t + b;
- }
-
- private static double QuartEaseInOutImpl( double t, double b, double c, double d )
- {
- if( ( t /= d / 2 ) < 1 )
- return c / 2 * t * t * t * t + b;
-
- return -c / 2 * ( ( t -= 2 ) * t * t * t - 2 ) + b;
- }
-
- #endregion
-
- #region Quintic Equations Methods
-
- private static double QuintEaseOutImpl( double t, double b, double c, double d )
- {
- return c * ( ( t = t / d - 1 ) * t * t * t * t + 1 ) + b;
- }
-
- private static double QuintEaseInImpl( double t, double b, double c, double d )
- {
- return c * ( t /= d ) * t * t * t * t + b;
- }
-
- private static double QuintEaseInOutImpl( double t, double b, double c, double d )
- {
- if( ( t /= d / 2 ) < 1 )
- return c / 2 * t * t * t * t * t + b;
- return c / 2 * ( ( t -= 2 ) * t * t * t * t + 2 ) + b;
- }
-
- #endregion
-
- #region Sine Equations Methods
-
- private static double SineEaseOutImpl( double t, double b, double c, double d )
- {
- return c * Math.Sin( t / d * ( Math.PI / 2 ) ) + b;
- }
-
- private static double SineEaseInImpl( double t, double b, double c, double d )
- {
- return -c * Math.Cos( t / d * ( Math.PI / 2 ) ) + c + b;
- }
-
- private static double SineEaseInOutImpl( double t, double b, double c, double d )
- {
- if( ( t /= d / 2 ) < 1 )
- return c / 2 * ( Math.Sin( Math.PI * t / 2 ) ) + b;
-
- return -c / 2 * ( Math.Cos( Math.PI * --t / 2 ) - 2 ) + b;
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/WindowColors.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/WindowColors.cs
deleted file mode 100644
index 7a3f193e..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Media/WindowColors.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows.Media;
-
-namespace Xceed.Wpf.Toolkit.Core.Media
-{
- ///
- /// Contains system colors and configurations that can be used by the control themes.
- ///
- /// Mainly extracted from the registry because theses values are not exposed by the standard .NET API.
- ///
- public static class WindowColors
- {
- private static Color? _colorizationMode;
- private static bool? _colorizationOpaqueBlend;
-
- ///
- /// Relative to the \HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor Registry key.
- ///
- /// Gets the window chrome color.
- ///
- public static Color ColorizationColor
- {
- get
- {
- if( _colorizationMode.HasValue )
- return _colorizationMode.Value;
-
- try
- {
- _colorizationMode = WindowColors.GetDWMColorValue( "ColorizationColor" );
- }
- catch
- {
- // If for any reason (for example, a SecurityException for XBAP apps)
- // we cannot read the value in the registry, fall back on some color.
- _colorizationMode = Color.FromArgb(255, 175, 175, 175);
- }
-
- return _colorizationMode.Value;
- }
- }
-
- ///
- /// Relative to the \HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationOpaqueBlend Registry key:
- ///
- /// Gets whether transparency is disabled.
- ///
- /// Returns true if transparency is disabled; false otherwise.
- ///
- public static bool ColorizationOpaqueBlend
- {
- get
- {
- if( _colorizationOpaqueBlend.HasValue )
- return _colorizationOpaqueBlend.Value;
-
- try
- {
- _colorizationOpaqueBlend = WindowColors.GetDWMBoolValue( "ColorizationOpaqueBlend" );
- }
- catch
- {
- // If for any reason (for example, a SecurityException for XBAP apps)
- // we cannot read the value in the registry, fall back on some color.
- _colorizationOpaqueBlend = false;
- }
-
- return _colorizationOpaqueBlend.Value;
- }
- }
-
- private static int GetDWMIntValue( string keyName )
- {
- // This value is not accessible throught the standard WPF API.
- // We must dig into the registry to get the value.
- var curUser = Microsoft.Win32.Registry.CurrentUser;
- var subKey = curUser.CreateSubKey(
- @"Software\Microsoft\Windows\DWM",
- Microsoft.Win32.RegistryKeyPermissionCheck.ReadSubTree
-#if VS2008
- );
-#else
- ,Microsoft.Win32.RegistryOptions.None );
-#endif
- return ( int )subKey.GetValue( keyName );
- }
-
- private static Color GetDWMColorValue( string keyName )
- {
- int value = WindowColors.GetDWMIntValue( keyName );
- byte[] bytes = BitConverter.GetBytes( value );
- return new Color()
- {
- B = bytes[ 0 ],
- G = bytes[ 1 ],
- R = bytes[ 2 ],
- A = 255
- };
- }
-
- private static bool GetDWMBoolValue( string keyName )
- {
- int value = WindowColors.GetDWMIntValue( keyName );
- return ( value != 0 );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/PropertyChangedEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/PropertyChangedEventArgs.cs
deleted file mode 100644
index af191752..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/PropertyChangedEventArgs.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- public class PropertyChangedEventArgs : RoutedEventArgs
- {
- #region Constructors
-
- public PropertyChangedEventArgs( RoutedEvent Event, T oldValue, T newValue )
- : base()
- {
- _oldValue = oldValue;
- _newValue = newValue;
- this.RoutedEvent = Event;
- }
-
- #endregion
-
- #region NewValue Property
-
- public T NewValue
- {
- get
- {
- return _newValue;
- }
- }
-
- private readonly T _newValue;
-
- #endregion
-
- #region OldValue Property
-
- public T OldValue
- {
- get
- {
- return _oldValue;
- }
- }
-
- private readonly T _oldValue;
-
- #endregion
-
- protected override void InvokeEventHandler( Delegate genericHandler, object genericTarget )
- {
- PropertyChangedEventHandler handler = ( PropertyChangedEventHandler )genericHandler;
- handler( genericTarget, this );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/PropertyChangedEventHandler.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/PropertyChangedEventHandler.cs
deleted file mode 100644
index f05278e7..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/PropertyChangedEventHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- public delegate void PropertyChangedEventHandler( object sender, PropertyChangedEventArgs e );
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/QueryTextFromValueEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/QueryTextFromValueEventArgs.cs
deleted file mode 100644
index 9a5459f7..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/QueryTextFromValueEventArgs.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- public class QueryTextFromValueEventArgs : EventArgs
- {
- public QueryTextFromValueEventArgs( object value, string text )
- {
- m_value = value;
- m_text = text;
- }
-
- #region Value Property
-
- private object m_value;
-
- public object Value
- {
- get { return m_value; }
- }
-
- #endregion Value Property
-
- #region Text Property
-
- private string m_text;
-
- public string Text
- {
- get { return m_text; }
- set { m_text = value; }
- }
-
- #endregion Text Property
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/QueryValueFromTextEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/QueryValueFromTextEventArgs.cs
deleted file mode 100644
index b4c8ea12..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/QueryValueFromTextEventArgs.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- public class QueryValueFromTextEventArgs : EventArgs
- {
- public QueryValueFromTextEventArgs( string text, object value )
- {
- m_text = text;
- m_value = value;
- }
-
- #region Text Property
-
- private string m_text;
-
- public string Text
- {
- get { return m_text; }
- }
-
- #endregion Text Property
-
- #region Value Property
-
- private object m_value;
-
- public object Value
- {
- get { return m_value; }
- set { m_value = value; }
- }
-
- #endregion Value Property
-
- #region HasParsingError Property
-
- private bool m_hasParsingError;
-
- public bool HasParsingError
- {
- get { return m_hasParsingError; }
- set { m_hasParsingError = value; }
- }
-
- #endregion HasParsingError Property
-
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/UIElementAdorner.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/UIElementAdorner.cs
deleted file mode 100644
index 22eed4df..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/UIElementAdorner.cs
+++ /dev/null
@@ -1,240 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Collections;
-using System.Windows;
-using System.Windows.Documents;
-using System.Windows.Media;
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- ///
- /// An adorner that can display one and only one UIElement.
- /// That element can be a panel, which contains multiple other elements.
- /// The element is added to the adorner's visual and logical trees, enabling it to
- /// particpate in dependency property value inheritance, amongst other things.
- ///
- internal class UIElementAdorner : Adorner where TElement : UIElement
- {
- #region Fields
-
- TElement _child = null;
- double _offsetLeft = 0;
- double _offsetTop = 0;
-
- #endregion // Fields
-
- #region Constructor
-
- ///
- /// Constructor.
- ///
- /// The element to which the adorner will be bound.
- public UIElementAdorner( UIElement adornedElement )
- : base( adornedElement )
- {
- }
-
- #endregion // Constructor
-
- #region Public Interface
-
- #region Child
-
- ///
- /// Gets/sets the child element hosted in the adorner.
- ///
- public TElement Child
- {
- get
- {
- return _child;
- }
- set
- {
- if( value == _child )
- return;
-
- if( _child != null )
- {
- base.RemoveLogicalChild( _child );
- base.RemoveVisualChild( _child );
- }
-
- _child = value;
-
- if( _child != null )
- {
- base.AddLogicalChild( _child );
- base.AddVisualChild( _child );
- }
- }
- }
-
- #endregion // Child
-
- #region GetDesiredTransform
-
- ///
- /// Override.
- ///
- ///
- ///
- public override GeneralTransform GetDesiredTransform( GeneralTransform transform )
- {
- GeneralTransformGroup result = new GeneralTransformGroup();
- result.Children.Add( base.GetDesiredTransform( transform ) );
- result.Children.Add( new TranslateTransform( _offsetLeft, _offsetTop ) );
- return result;
- }
-
- #endregion // GetDesiredTransform
-
- #region OffsetLeft
-
- ///
- /// Gets/sets the horizontal offset of the adorner.
- ///
- public double OffsetLeft
- {
- get
- {
- return _offsetLeft;
- }
- set
- {
- _offsetLeft = value;
- UpdateLocation();
- }
- }
-
- #endregion // OffsetLeft
-
- #region SetOffsets
-
- ///
- /// Updates the location of the adorner in one atomic operation.
- ///
- public void SetOffsets( double left, double top )
- {
- _offsetLeft = left;
- _offsetTop = top;
- this.UpdateLocation();
- }
-
- #endregion // SetOffsets
-
- #region OffsetTop
-
- ///
- /// Gets/sets the vertical offset of the adorner.
- ///
- public double OffsetTop
- {
- get
- {
- return _offsetTop;
- }
- set
- {
- _offsetTop = value;
- UpdateLocation();
- }
- }
-
- #endregion // OffsetTop
-
- #endregion // Public Interface
-
- #region Protected Overrides
-
- ///
- /// Override.
- ///
- ///
- ///
- protected override Size MeasureOverride( Size constraint )
- {
- if( _child == null )
- return base.MeasureOverride( constraint );
-
- _child.Measure( constraint );
- return _child.DesiredSize;
- }
-
- ///
- /// Override.
- ///
- ///
- ///
- protected override Size ArrangeOverride( Size finalSize )
- {
- if( _child == null )
- return base.ArrangeOverride( finalSize );
-
- _child.Arrange( new Rect( finalSize ) );
- return finalSize;
- }
-
- ///
- /// Override.
- ///
- protected override IEnumerator LogicalChildren
- {
- get
- {
- ArrayList list = new ArrayList();
- if( _child != null )
- list.Add( _child );
- return list.GetEnumerator();
- }
- }
-
- ///
- /// Override.
- ///
- ///
- ///
- protected override Visual GetVisualChild( int index )
- {
- return _child;
- }
-
- ///
- /// Override.
- ///
- protected override int VisualChildrenCount
- {
- get
- {
- return _child == null ? 0 : 1;
- }
- }
-
- #endregion // Protected Overrides
-
- #region Private Helpers
-
- void UpdateLocation()
- {
- AdornerLayer adornerLayer = base.Parent as AdornerLayer;
- if( adornerLayer != null )
- adornerLayer.Update( base.AdornedElement );
- }
-
- #endregion // Private Helpers
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/CalculatorUtilities.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/CalculatorUtilities.cs
deleted file mode 100644
index 05be50dc..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/CalculatorUtilities.cs
+++ /dev/null
@@ -1,285 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Globalization;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- static class CalculatorUtilities
- {
- public static Calculator.CalculatorButtonType GetCalculatorButtonTypeFromText( string text )
- {
- switch( text )
- {
- case "0":
- return Calculator.CalculatorButtonType.Zero;
- case "1":
- return Calculator.CalculatorButtonType.One;
- case "2":
- return Calculator.CalculatorButtonType.Two;
- case "3":
- return Calculator.CalculatorButtonType.Three;
- case "4":
- return Calculator.CalculatorButtonType.Four;
- case "5":
- return Calculator.CalculatorButtonType.Five;
- case "6":
- return Calculator.CalculatorButtonType.Six;
- case "7":
- return Calculator.CalculatorButtonType.Seven;
- case "8":
- return Calculator.CalculatorButtonType.Eight;
- case "9":
- return Calculator.CalculatorButtonType.Nine;
- case "+":
- return Calculator.CalculatorButtonType.Add;
- case "-":
- return Calculator.CalculatorButtonType.Subtract;
- case "*":
- return Calculator.CalculatorButtonType.Multiply;
- case "/":
- return Calculator.CalculatorButtonType.Divide;
- case "%":
- return Calculator.CalculatorButtonType.Percent;
- case "\b":
- return Calculator.CalculatorButtonType.Back;
- case "\r":
- case "=":
- return Calculator.CalculatorButtonType.Equal;
- }
-
- //the check for the decimal is not in the switch statement. To help localize we check against the current culture's decimal seperator
- if( text == CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator )
- return Calculator.CalculatorButtonType.Decimal;
-
- //check for the escape key
- if( text == ( ( char )27 ).ToString() )
- return Calculator.CalculatorButtonType.Clear;
-
- return Calculator.CalculatorButtonType.None;
- }
-
- public static Button FindButtonByCalculatorButtonType( DependencyObject parent, Calculator.CalculatorButtonType type )
- {
- if( parent == null )
- return null;
-
- for( int i = 0; i < VisualTreeHelper.GetChildrenCount( parent ); i++ )
- {
- var child = VisualTreeHelper.GetChild( parent, i );
- if( child == null )
- continue;
-
- object buttonType = child.GetValue( Button.CommandParameterProperty );
-
- if( buttonType != null && ( Calculator.CalculatorButtonType )buttonType == type )
- {
- return child as Button;
- }
- else
- {
- var result = FindButtonByCalculatorButtonType( child, type );
-
- if( result != null )
- return result;
- }
- }
- return null;
- }
-
- public static string GetCalculatorButtonContent( Calculator.CalculatorButtonType type )
- {
- string content = string.Empty;
- switch( type )
- {
- case Calculator.CalculatorButtonType.Add:
- content = "+";
- break;
- case Calculator.CalculatorButtonType.Back:
- content = "Back";
- break;
- case Calculator.CalculatorButtonType.Cancel:
- content = "CE";
- break;
- case Calculator.CalculatorButtonType.Clear:
- content = "C";
- break;
- case Calculator.CalculatorButtonType.Decimal:
- content = CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator;
- break;
- case Calculator.CalculatorButtonType.Divide:
- content = "/";
- break;
- case Calculator.CalculatorButtonType.Eight:
- content = "8";
- break;
- case Calculator.CalculatorButtonType.Equal:
- content = "=";
- break;
- case Calculator.CalculatorButtonType.Five:
- content = "5";
- break;
- case Calculator.CalculatorButtonType.Four:
- content = "4";
- break;
- case Calculator.CalculatorButtonType.Fraction:
- content = "1/x";
- break;
- case Calculator.CalculatorButtonType.MAdd:
- content = "M+";
- break;
- case Calculator.CalculatorButtonType.MC:
- content = "MC";
- break;
- case Calculator.CalculatorButtonType.MR:
- content = "MR";
- break;
- case Calculator.CalculatorButtonType.MS:
- content = "MS";
- break;
- case Calculator.CalculatorButtonType.MSub:
- content = "M-";
- break;
- case Calculator.CalculatorButtonType.Multiply:
- content = "*";
- break;
- case Calculator.CalculatorButtonType.Nine:
- content = "9";
- break;
- case Calculator.CalculatorButtonType.None:
- break;
- case Calculator.CalculatorButtonType.One:
- content = "1";
- break;
- case Calculator.CalculatorButtonType.Percent:
- content = "%";
- break;
- case Calculator.CalculatorButtonType.Seven:
- content = "7";
- break;
- case Calculator.CalculatorButtonType.Negate:
- content = "+/-";
- break;
- case Calculator.CalculatorButtonType.Six:
- content = "6";
- break;
- case Calculator.CalculatorButtonType.Sqrt:
- content = "Sqrt";
- break;
- case Calculator.CalculatorButtonType.Subtract:
- content = "-";
- break;
- case Calculator.CalculatorButtonType.Three:
- content = "3";
- break;
- case Calculator.CalculatorButtonType.Two:
- content = "2";
- break;
- case Calculator.CalculatorButtonType.Zero:
- content = "0";
- break;
- }
- return content;
- }
-
- public static bool IsDigit( Calculator.CalculatorButtonType buttonType )
- {
- switch( buttonType )
- {
- case Calculator.CalculatorButtonType.Zero:
- case Calculator.CalculatorButtonType.One:
- case Calculator.CalculatorButtonType.Two:
- case Calculator.CalculatorButtonType.Three:
- case Calculator.CalculatorButtonType.Four:
- case Calculator.CalculatorButtonType.Five:
- case Calculator.CalculatorButtonType.Six:
- case Calculator.CalculatorButtonType.Seven:
- case Calculator.CalculatorButtonType.Eight:
- case Calculator.CalculatorButtonType.Nine:
- case Calculator.CalculatorButtonType.Decimal:
- return true;
- default:
- return false;
- }
- }
-
- public static bool IsMemory( Calculator.CalculatorButtonType buttonType )
- {
- switch( buttonType )
- {
- case Calculator.CalculatorButtonType.MAdd:
- case Calculator.CalculatorButtonType.MC:
- case Calculator.CalculatorButtonType.MR:
- case Calculator.CalculatorButtonType.MS:
- case Calculator.CalculatorButtonType.MSub:
- return true;
- default:
- return false;
- }
- }
-
- public static decimal ParseDecimal( string text )
- {
- decimal result;
- var success = Decimal.TryParse( text, NumberStyles.Any, CultureInfo.CurrentCulture, out result );
- return success ? result : decimal.Zero;
- }
-
- public static decimal Add( decimal firstNumber, decimal secondNumber )
- {
- return firstNumber + secondNumber;
- }
-
- public static decimal Subtract( decimal firstNumber, decimal secondNumber )
- {
- return firstNumber - secondNumber;
- }
-
- public static decimal Multiply( decimal firstNumber, decimal secondNumber )
- {
- return firstNumber * secondNumber;
- }
-
- public static decimal Divide( decimal firstNumber, decimal secondNumber )
- {
- return firstNumber / secondNumber;
- }
-
- public static decimal Percent( decimal firstNumber, decimal secondNumber )
- {
- return firstNumber * secondNumber / 100M;
- }
-
- public static decimal SquareRoot( decimal operand )
- {
- return Convert.ToDecimal( Math.Sqrt( Convert.ToDouble( operand ) ) );
- }
-
- public static decimal Fraction( decimal operand )
- {
- return 1 / operand;
- }
-
- public static decimal Negate( decimal operand )
- {
- return operand * -1M;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ChangeTypeHelper.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ChangeTypeHelper.cs
deleted file mode 100644
index 48ef9fc9..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ChangeTypeHelper.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Text;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal static class ChangeTypeHelper
- {
- internal static object ChangeType( object value, Type conversionType, IFormatProvider provider )
- {
- if( conversionType == null )
- {
- throw new ArgumentNullException( "conversionType" );
- }
- if( conversionType == typeof( Guid ) )
- {
- return new Guid( value.ToString() );
- }
- else if( conversionType == typeof( Guid? ) )
- {
- if( value == null )
- return null;
- return new Guid( value.ToString() );
- }
- else if( conversionType.IsGenericType && conversionType.GetGenericTypeDefinition().Equals( typeof( Nullable<> ) ) )
- {
- if( value == null )
- return null;
- NullableConverter nullableConverter = new NullableConverter( conversionType );
- conversionType = nullableConverter.UnderlyingType;
- }
-
- return System.Convert.ChangeType( value, conversionType, provider );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ColorUtilities.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ColorUtilities.cs
deleted file mode 100644
index c00f05bb..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ColorUtilities.cs
+++ /dev/null
@@ -1,206 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Windows.Media;
-using Xceed.Wpf.Toolkit.Primitives;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- static class ColorUtilities
- {
- public static readonly Dictionary KnownColors = GetKnownColors();
-
- public static string GetColorName( this Color color )
- {
- string colorName = KnownColors.Where( kvp => kvp.Value.Equals( color ) ).Select( kvp => kvp.Key ).FirstOrDefault();
-
- if( String.IsNullOrEmpty( colorName ) )
- colorName = color.ToString();
-
- return colorName;
- }
-
- public static string FormatColorString( string stringToFormat, bool isUsingAlphaChannel )
- {
- if( !isUsingAlphaChannel && ( stringToFormat.Length == 9 ) )
- return stringToFormat.Remove( 1, 2 );
- return stringToFormat;
- }
-
- private static Dictionary GetKnownColors()
- {
- var colorProperties = typeof( Colors ).GetProperties( BindingFlags.Static | BindingFlags.Public );
- return colorProperties.ToDictionary( p => p.Name, p => ( Color )p.GetValue( null, null ) );
- }
-
- ///
- /// Converts an RGB color to an HSV color.
- ///
- ///
- ///
- ///
- ///
- public static HsvColor ConvertRgbToHsv( int r, int g, int b )
- {
- double delta, min;
- double h = 0, s, v;
-
- min = Math.Min( Math.Min( r, g ), b );
- v = Math.Max( Math.Max( r, g ), b );
- delta = v - min;
-
- if( v == 0.0 )
- {
- s = 0;
- }
- else
- s = delta / v;
-
- if( s == 0 )
- h = 0.0;
-
- else
- {
- if( r == v )
- h = ( g - b ) / delta;
- else if( g == v )
- h = 2 + ( b - r ) / delta;
- else if( b == v )
- h = 4 + ( r - g ) / delta;
-
- h *= 60;
- if( h < 0.0 )
- h = h + 360;
-
- }
-
- return new HsvColor
- {
- H = h,
- S = s,
- V = v / 255
- };
- }
-
- ///
- /// Converts an HSV color to an RGB color.
- ///
- ///
- ///
- ///
- ///
- public static Color ConvertHsvToRgb( double h, double s, double v )
- {
- double r = 0, g = 0, b = 0;
-
- if( s == 0 )
- {
- r = v;
- g = v;
- b = v;
- }
- else
- {
- int i;
- double f, p, q, t;
-
- if( h == 360 )
- h = 0;
- else
- h = h / 60;
-
- i = ( int )Math.Truncate( h );
- f = h - i;
-
- p = v * ( 1.0 - s );
- q = v * ( 1.0 - ( s * f ) );
- t = v * ( 1.0 - ( s * ( 1.0 - f ) ) );
-
- switch( i )
- {
- case 0:
- {
- r = v;
- g = t;
- b = p;
- break;
- }
- case 1:
- {
- r = q;
- g = v;
- b = p;
- break;
- }
- case 2:
- {
- r = p;
- g = v;
- b = t;
- break;
- }
- case 3:
- {
- r = p;
- g = q;
- b = v;
- break;
- }
- case 4:
- {
- r = t;
- g = p;
- b = v;
- break;
- }
- default:
- {
- r = v;
- g = p;
- b = q;
- break;
- }
- }
-
- }
-
- return Color.FromArgb( 255, ( byte )( Math.Round(r * 255) ), ( byte )( Math.Round(g * 255) ), ( byte )( Math.Round(b * 255) ) );
- }
-
- ///
- /// Generates a list of colors with hues ranging from 0 360 and a saturation and value of 1.
- ///
- ///
- public static List GenerateHsvSpectrum()
- {
- var colorsList = new List();
- int hStep = 60;
-
- for( int h = 0; h < 360; h+= hStep )
- {
- colorsList.Add( ColorUtilities.ConvertHsvToRgb( h, 1, 1 ) );
- }
-
- colorsList.Add( ColorUtilities.ConvertHsvToRgb( 0, 1, 1 ) );
-
- return colorsList;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ContextMenuUtilities.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ContextMenuUtilities.cs
deleted file mode 100644
index a5ba5140..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ContextMenuUtilities.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Windows;
-using System.Windows.Media;
-using Xceed.Wpf.Toolkit.PropertyGrid;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- public class ContextMenuUtilities
- {
- public static readonly DependencyProperty OpenOnMouseLeftButtonClickProperty = DependencyProperty.RegisterAttached( "OpenOnMouseLeftButtonClick", typeof( bool ), typeof( ContextMenuUtilities ), new FrameworkPropertyMetadata( false, OpenOnMouseLeftButtonClickChanged ) );
- public static void SetOpenOnMouseLeftButtonClick( FrameworkElement element, bool value )
- {
- element.SetValue( OpenOnMouseLeftButtonClickProperty, value );
- }
- public static bool GetOpenOnMouseLeftButtonClick( FrameworkElement element )
- {
- return ( bool )element.GetValue( OpenOnMouseLeftButtonClickProperty );
- }
-
- public static void OpenOnMouseLeftButtonClickChanged( DependencyObject sender, DependencyPropertyChangedEventArgs e )
- {
- var control = sender as FrameworkElement;
- if( control != null )
- {
- if( ( bool )e.NewValue )
- {
- control.PreviewMouseLeftButtonDown += ContextMenuUtilities.Control_PreviewMouseLeftButtonDown;
- }
- else
- {
- control.PreviewMouseLeftButtonDown -= ContextMenuUtilities.Control_PreviewMouseLeftButtonDown;
- }
- }
- }
-
- private static void Control_PreviewMouseLeftButtonDown( object sender, System.Windows.Input.MouseButtonEventArgs e )
- {
- var control = sender as FrameworkElement;
- if( (control != null) && (control.ContextMenu != null) )
- {
- // Get PropertyItemBase parent
- var parent = VisualTreeHelper.GetParent( control );
- while( parent != null )
- {
- var propertyItemBase = parent as PropertyItemBase;
- if( propertyItemBase != null )
- {
- // Set the ContextMenu.DataContext to the PropertyItem associated to the clicked image.
- control.ContextMenu.DataContext = propertyItemBase;
- break;
- }
- parent = VisualTreeHelper.GetParent( parent );
- }
-
- control.ContextMenu.PlacementTarget = control;
- control.ContextMenu.IsOpen = true;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/DateTimeUtilities.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/DateTimeUtilities.cs
deleted file mode 100644
index 7749a5ea..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/DateTimeUtilities.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal static class DateTimeUtilities
- {
- public static DateTime GetContextNow( DateTimeKind kind )
- {
- if( kind == DateTimeKind.Unspecified )
- return DateTime.SpecifyKind( DateTime.Now, DateTimeKind.Unspecified );
-
- return ( kind == DateTimeKind.Utc )
- ? DateTime.UtcNow
- : DateTime.Now;
- }
-
- public static bool IsSameDate( DateTime? date1, DateTime? date2 )
- {
- if( date1 == null || date2 == null )
- return false;
-
- return ( date1.Value.Date == date2.Value.Date );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/DoubleHelper.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/DoubleHelper.cs
deleted file mode 100644
index f77c43bc..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/DoubleHelper.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal static class DoubleHelper
- {
- public static bool AreVirtuallyEqual( double d1, double d2 )
- {
- if( double.IsPositiveInfinity( d1 ) )
- return double.IsPositiveInfinity( d2 );
-
- if( double.IsNegativeInfinity( d1 ) )
- return double.IsNegativeInfinity( d2 );
-
- if( IsNaN( d1 ) )
- return IsNaN( d2 );
-
- double n = d1 - d2;
- double d = ( Math.Abs( d1 ) + Math.Abs( d2 ) + 10 ) * 1.0e-15;
- return ( -d < n ) && ( d > n );
- }
-
- public static bool AreVirtuallyEqual( Size s1, Size s2 )
- {
- return ( AreVirtuallyEqual( s1.Width, s2.Width )
- && AreVirtuallyEqual( s1.Height, s2.Height ) );
- }
-
- public static bool AreVirtuallyEqual( Point p1, Point p2 )
- {
- return ( AreVirtuallyEqual( p1.X, p2.X )
- && AreVirtuallyEqual( p1.Y, p2.Y ) );
- }
-
- public static bool AreVirtuallyEqual( Rect r1, Rect r2 )
- {
- return ( AreVirtuallyEqual( r1.TopLeft, r2.TopLeft )
- && AreVirtuallyEqual( r1.BottomRight, r2.BottomRight ) );
- }
-
- public static bool AreVirtuallyEqual( Vector v1, Vector v2 )
- {
- return ( AreVirtuallyEqual( v1.X, v2.X )
- && AreVirtuallyEqual( v1.Y, v2.Y ) );
- }
-
- public static bool AreVirtuallyEqual( Segment s1, Segment s2 )
- {
- // note: Segment struct already uses "virtually equal" approach
- return ( s1 == s2 );
- }
-
- public static bool IsNaN( double value )
- {
- // used reflector to borrow the high performance IsNan function
- // from the WPF MS.Internal namespace
- NanUnion t = new NanUnion();
- t.DoubleValue = value;
-
- UInt64 exp = t.UintValue & 0xfff0000000000000;
- UInt64 man = t.UintValue & 0x000fffffffffffff;
-
- return ( exp == 0x7ff0000000000000 || exp == 0xfff0000000000000 ) && ( man != 0 );
- }
-
- #region NanUnion Nested Types
-
- [StructLayout( LayoutKind.Explicit )]
- private struct NanUnion
- {
- [FieldOffset( 0 )]
- internal double DoubleValue;
- [FieldOffset( 0 )]
- internal UInt64 UintValue;
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/EllipseHelper.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/EllipseHelper.cs
deleted file mode 100644
index 2a6c88cc..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/EllipseHelper.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal static class EllipseHelper
- {
- public static Point PointOfRadialIntersection( Rect ellipseRect, double angle )
- {
- // given by the formula:
- //
- // x = a cos q,
- // y = b sin q,
- //
- // where a is the elliptical radius along the major axis
- // b is the elliptical radius along the minor axis
- // q is the central angle from the major axis
-
- double a = ellipseRect.Width / 2;
- double b = ellipseRect.Height / 2;
-
- // since this is WPF, we can assume angle is currently specified in degrees, so convert to radians
- double q = angle * Math.PI / 180;
-
- return RectHelper.Center( ellipseRect ) + new Vector( a * Math.Cos( q ), b * Math.Sin( q ) );
- }
-
- public static double RadialDistanceFromCenter( Rect ellipseRect, double angle )
- {
- // given by the formula:
- //
- // 2 2
- // 2 a b
- // r = -----------------
- // 2 2 2 2
- // a sin q + b cos q
- //
- // where a is the elliptical radius along the major axis
- // b is the elliptical radius along the minor axis
- // q is the central angle from the major axis
-
- double a = ellipseRect.Width / 2;
- double b = ellipseRect.Height / 2;
-
- // since this is WPF, we can assume angle is currently specified in degrees, so convert to radians
- double q = angle * Math.PI / 180;
-
- double sinq = Math.Sin( q );
- double cosq = Math.Cos( q );
- return Math.Sqrt( ( a * a * b * b ) / ( ( a * a * sinq * sinq ) + ( b * b * cosq * cosq ) ) );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/FontUtilities.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/FontUtilities.cs
deleted file mode 100644
index 89ff8d8d..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/FontUtilities.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows.Media;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal class FontUtilities
- {
- internal static IEnumerable Families
- {
- get
- {
-#if !VS2008
- // Workaround for a WPF 4 bug.
- foreach( FontFamily font in Fonts.SystemFontFamilies )
- {
- try
- {
- // In WPF 4, this will throw an exception.
- var throwAcess = font.FamilyNames;
- }
- catch
- {
- // It throws. Go to the next font family.
- continue;
- }
-
- // If it does not throw, return the font.
- yield return font;
- }
-#else
- return Fonts.SystemFontFamilies;
-#endif
- }
- }
-
- internal static IEnumerable Weights
- {
- get
- {
- yield return FontWeights.Black;
- yield return FontWeights.Bold;
- yield return FontWeights.ExtraBlack;
- yield return FontWeights.ExtraBold;
- yield return FontWeights.ExtraLight;
- yield return FontWeights.Light;
- yield return FontWeights.Medium;
- yield return FontWeights.Normal;
- yield return FontWeights.SemiBold;
- yield return FontWeights.Thin;
- }
- }
-
- internal static IEnumerable Styles
- {
- get
- {
- yield return FontStyles.Italic;
- yield return FontStyles.Normal;
- }
- }
-
- internal static IEnumerable Stretches
- {
- get
- {
- yield return FontStretches.Condensed;
- yield return FontStretches.Expanded;
- yield return FontStretches.ExtraCondensed;
- yield return FontStretches.ExtraExpanded;
- yield return FontStretches.Normal;
- yield return FontStretches.SemiCondensed;
- yield return FontStretches.SemiExpanded;
- yield return FontStretches.UltraCondensed;
- yield return FontStretches.UltraExpanded;
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/GeneralUtilities.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/GeneralUtilities.cs
deleted file mode 100644
index de0e4f27..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/GeneralUtilities.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Media;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal sealed class GeneralUtilities : DependencyObject
- {
- private GeneralUtilities() { }
-
- #region StubValue attached property
-
- internal static readonly DependencyProperty StubValueProperty = DependencyProperty.RegisterAttached(
- "StubValue",
- typeof( object ),
- typeof( GeneralUtilities ),
- new FrameworkPropertyMetadata( null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault ) );
-
- internal static object GetStubValue( DependencyObject obj )
- {
- return ( object )obj.GetValue( GeneralUtilities.StubValueProperty );
- }
-
- internal static void SetStubValue( DependencyObject obj, object value )
- {
- obj.SetValue( GeneralUtilities.StubValueProperty, value );
- }
-
- #endregion StubValue attached property
-
- public static object GetPathValue( object sourceObject, string path )
- {
- var targetObj = new GeneralUtilities();
- BindingOperations.SetBinding( targetObj, GeneralUtilities.StubValueProperty, new Binding( path ) { Source = sourceObject } );
- object value = GeneralUtilities.GetStubValue( targetObj );
- BindingOperations.ClearBinding( targetObj, GeneralUtilities.StubValueProperty );
- return value;
- }
-
- public static object GetBindingValue( object sourceObject, Binding binding )
- {
- Binding bindingClone = new Binding()
- {
- BindsDirectlyToSource = binding.BindsDirectlyToSource,
- Converter = binding.Converter,
- ConverterCulture = binding.ConverterCulture,
- ConverterParameter = binding.ConverterParameter,
- FallbackValue = binding.FallbackValue,
- Mode = BindingMode.OneTime,
- Path = binding.Path,
- StringFormat = binding.StringFormat,
- TargetNullValue = binding.TargetNullValue,
- XPath = binding.XPath
- };
-
- bindingClone.Source = sourceObject;
-
- var targetObj = new GeneralUtilities();
- BindingOperations.SetBinding( targetObj, GeneralUtilities.StubValueProperty, bindingClone );
- object value = GeneralUtilities.GetStubValue( targetObj );
- BindingOperations.ClearBinding( targetObj, GeneralUtilities.StubValueProperty );
- return value;
- }
-
- internal static bool CanConvertValue( object value, object targetType )
- {
- return ( ( value != null )
- && ( !object.Equals( value.GetType(), targetType ) )
- && ( !object.Equals( targetType, typeof( object ) ) ) );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/KeyboardUtilities.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/KeyboardUtilities.cs
deleted file mode 100644
index 9ab3ee99..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/KeyboardUtilities.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows.Input;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal class KeyboardUtilities
- {
- internal static bool IsKeyModifyingPopupState( KeyEventArgs e )
- {
- return ( ( ( ( Keyboard.Modifiers & ModifierKeys.Alt ) == ModifierKeys.Alt ) && ( ( e.SystemKey == Key.Down ) || ( e.SystemKey == Key.Up ) ) )
- || ( e.Key == Key.F4 ) );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ListUtilities.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ListUtilities.cs
deleted file mode 100644
index c559e02c..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ListUtilities.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Xceed.Wpf.Toolkit.PropertyGrid.Editors;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal class ListUtilities
- {
- internal static Type GetListItemType( Type listType )
- {
- Type iListOfT = listType.GetInterfaces().FirstOrDefault(
- ( i ) => i.IsGenericType && i.GetGenericTypeDefinition() == typeof( IList<> ) );
-
- return ( iListOfT != null )
- ? iListOfT.GetGenericArguments()[ 0 ]
- : null;
- }
-
- internal static Type GetCollectionItemType( Type colType )
- {
- Type iCollectionOfT = null;
- var isCollectionOfT = colType.IsGenericType && (colType.GetGenericTypeDefinition() == typeof( ICollection<> ) );
- if( isCollectionOfT )
- {
- iCollectionOfT = colType;
- }
- else
- {
- iCollectionOfT = colType.GetInterfaces().FirstOrDefault(( i ) => i.IsGenericType && i.GetGenericTypeDefinition() == typeof( ICollection<> ) );
- }
-
- return (iCollectionOfT != null)
- ? iCollectionOfT.GetGenericArguments()[ 0 ]
- : null;
- }
-
- internal static Type[] GetDictionaryItemsType( Type dictType )
- {
- var isDict = dictType.IsGenericType
- && ((dictType.GetGenericTypeDefinition() == typeof( Dictionary<,>) ) || (dictType.GetGenericTypeDefinition() == typeof( IDictionary<,>) ));
-
- return isDict
- ? new Type[] { dictType.GetGenericArguments()[ 0 ], dictType.GetGenericArguments()[ 1 ] }
- : null;
- }
-
- internal static object CreateEditableKeyValuePair( object key, Type keyType, object value, Type valueType )
- {
- var itemType = ListUtilities.CreateEditableKeyValuePairType( keyType, valueType );
- return Activator.CreateInstance( itemType, key, value );
- }
-
- internal static Type CreateEditableKeyValuePairType( Type keyType, Type valueType )
- {
- //return an EditableKeyValuePair< TKey, TValue> Type from keyType and valueType
- var itemGenType = typeof( EditableKeyValuePair<,> );
- Type[] itemGenTypeArgs = { keyType, valueType };
- return itemGenType.MakeGenericType( itemGenTypeArgs );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/PointHelper.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/PointHelper.cs
deleted file mode 100644
index 613a3f09..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/PointHelper.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal static class PointHelper
- {
- public static double DistanceBetween( Point p1, Point p2 )
- {
- return Math.Sqrt( Math.Pow( p1.X - p2.X, 2 ) + Math.Pow( p1.Y - p2.Y, 2 ) );
- }
-
- public static Point Empty
- {
- get
- {
- return new Point( double.NaN, double.NaN );
- }
- }
-
- public static bool IsEmpty( Point point )
- {
- return DoubleHelper.IsNaN( point.X ) && DoubleHelper.IsNaN( point.Y );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/PropertyChangedExt.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/PropertyChangedExt.cs
deleted file mode 100644
index 510b47c0..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/PropertyChangedExt.cs
+++ /dev/null
@@ -1,127 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.ComponentModel;
-using System.Linq.Expressions;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal static class PropertyChangedExt
- {
- #region Notify Methods
-
- public static void Notify(
- this INotifyPropertyChanged sender,
- PropertyChangedEventHandler handler,
- Expression> expression )
- {
- if( sender == null )
- throw new ArgumentNullException( "sender" );
-
- if( expression == null )
- throw new ArgumentNullException( "expression" );
-
- var body = expression.Body as MemberExpression;
- if( body == null )
- throw new ArgumentException( "The expression must target a property or field.", "expression" );
-
- string propertyName = PropertyChangedExt.GetPropertyName( body, sender.GetType() );
-
- PropertyChangedExt.NotifyCore( sender, handler, propertyName );
- }
-
- public static void Notify( this INotifyPropertyChanged sender, PropertyChangedEventHandler handler, string propertyName )
- {
- if( sender == null )
- throw new ArgumentNullException( "sender" );
-
- if( propertyName == null )
- throw new ArgumentNullException( "propertyName" );
-
- ReflectionHelper.ValidatePropertyName( sender, propertyName );
-
- PropertyChangedExt.NotifyCore( sender, handler, propertyName );
- }
-
- private static void NotifyCore( INotifyPropertyChanged sender, PropertyChangedEventHandler handler, string propertyName )
- {
- if( handler != null )
- {
- handler( sender, new PropertyChangedEventArgs( propertyName ) );
- }
- }
-
- #endregion
-
- #region PropertyChanged Verification Methods
-
- internal static bool PropertyChanged( string propertyName, PropertyChangedEventArgs e, bool targetPropertyOnly )
- {
- string target = e.PropertyName;
- if( target == propertyName )
- return true;
-
- return ( !targetPropertyOnly )
- && ( string.IsNullOrEmpty( target ) );
- }
-
- internal static bool PropertyChanged(
- Expression> expression,
- PropertyChangedEventArgs e,
- bool targetPropertyOnly )
- {
- var body = expression.Body as MemberExpression;
- if( body == null )
- throw new ArgumentException( "The expression must target a property or field.", "expression" );
-
- return PropertyChangedExt.PropertyChanged( body, typeof( TOwner ), e, targetPropertyOnly );
- }
-
- internal static bool PropertyChanged(
- Expression> expression,
- PropertyChangedEventArgs e,
- bool targetPropertyOnly )
- {
- var body = expression.Body as MemberExpression;
- if( body == null )
- throw new ArgumentException( "The expression must target a property or field.", "expression" );
-
- return PropertyChangedExt.PropertyChanged( body, typeof( TOwner ), e, targetPropertyOnly );
- }
-
- private static bool PropertyChanged( MemberExpression expression, Type ownerType, PropertyChangedEventArgs e, bool targetPropertyOnly )
- {
- var propertyName = PropertyChangedExt.GetPropertyName( expression, ownerType );
-
- return PropertyChangedExt.PropertyChanged( propertyName, e, targetPropertyOnly );
- }
-
- #endregion
-
- private static string GetPropertyName( MemberExpression expression, Type ownerType )
- {
- var targetType = expression.Expression.Type;
- if( !targetType.IsAssignableFrom( ownerType ) )
- throw new ArgumentException( "The expression must target a property or field on the appropriate owner.", "expression" );
-
- return ReflectionHelper.GetPropertyOrFieldName( expression );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/RectHelper.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/RectHelper.cs
deleted file mode 100644
index 028ad56a..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/RectHelper.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal static class RectHelper
- {
- public static Point Center( Rect rect )
- {
- return new Point( rect.Left + rect.Width / 2, rect.Top + rect.Height / 2 );
- }
-
- public static Nullable GetNearestPointOfIntersectionBetweenRectAndSegment( Rect rect, Segment segment, Point point )
- {
- Nullable result = null;
- double distance = double.PositiveInfinity;
-
- Segment leftIntersection = segment.Intersection( new Segment( rect.BottomLeft, rect.TopLeft ) );
- Segment topIntersection = segment.Intersection( new Segment( rect.TopLeft, rect.TopRight ) );
- Segment rightIntersection = segment.Intersection( new Segment( rect.TopRight, rect.BottomRight ) );
- Segment bottomIntersection = segment.Intersection( new Segment( rect.BottomRight, rect.BottomLeft ) );
-
- RectHelper.AdjustResultForIntersectionWithSide( ref result, ref distance, leftIntersection, point );
- RectHelper.AdjustResultForIntersectionWithSide( ref result, ref distance, topIntersection, point );
- RectHelper.AdjustResultForIntersectionWithSide( ref result, ref distance, rightIntersection, point );
- RectHelper.AdjustResultForIntersectionWithSide( ref result, ref distance, bottomIntersection, point );
-
- return result;
- }
-
- public static Rect GetRectCenteredOnPoint( Point center, Size size )
- {
- return new Rect( new Point( center.X - size.Width / 2, center.Y - size.Height / 2 ), size );
- }
-
- private static void AdjustResultForIntersectionWithSide( ref Nullable result, ref double distance, Segment intersection, Point point )
- {
- if( !intersection.IsEmpty )
- {
- if( intersection.Contains( point ) )
- {
- distance = 0;
- result = point;
- return;
- }
-
- double p1Distance = PointHelper.DistanceBetween( point, intersection.P1 );
- double p2Distance = double.PositiveInfinity;
- if( !intersection.IsPoint )
- {
- p2Distance = PointHelper.DistanceBetween( point, intersection.P2 );
- }
-
- if( Math.Min( p1Distance, p2Distance ) < distance )
- {
- if( p1Distance < p2Distance )
- {
- distance = p1Distance;
- result = intersection.P1;
- }
- else
- {
- distance = p2Distance;
- result = intersection.P2;
- }
- }
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ReflectionHelper.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ReflectionHelper.cs
deleted file mode 100644
index e4b4aa8c..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ReflectionHelper.cs
+++ /dev/null
@@ -1,139 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Linq.Expressions;
-using System.Reflection;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal static class ReflectionHelper
- {
- ///
- /// Check the existence of the specified public instance (i.e. non static) property against
- /// the type of the specified source object. If the property is not defined by the type,
- /// a debug assertion will fail. Typically used to validate the parameter of a
- /// RaisePropertyChanged method.
- ///
- /// The object for which the type will be checked.
- /// The name of the property.
- [System.Diagnostics.Conditional( "DEBUG" )]
- internal static void ValidatePublicPropertyName( object sourceObject, string propertyName )
- {
- if( sourceObject == null )
- throw new ArgumentNullException( "sourceObject" );
-
- if( propertyName == null )
- throw new ArgumentNullException( "propertyName" );
-
- System.Diagnostics.Debug.Assert( sourceObject.GetType().GetProperty( propertyName, System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.FlattenHierarchy | System.Reflection.BindingFlags.Public ) != null,
- string.Format( "Public property {0} not found on object of type {1}.", propertyName, sourceObject.GetType().FullName ) );
- }
-
- ///
- /// Check the existence of the specified instance (i.e. non static) property against
- /// the type of the specified source object. If the property is not defined by the type,
- /// a debug assertion will fail. Typically used to validate the parameter of a
- /// RaisePropertyChanged method.
- ///
- /// The object for which the type will be checked.
- /// The name of the property.
- [System.Diagnostics.Conditional( "DEBUG" )]
- internal static void ValidatePropertyName( object sourceObject, string propertyName )
- {
- if( sourceObject == null )
- throw new ArgumentNullException( "sourceObject" );
-
- if( propertyName == null )
- throw new ArgumentNullException( "propertyName" );
-
- System.Diagnostics.Debug.Assert( sourceObject.GetType().GetProperty( propertyName, System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.FlattenHierarchy | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic ) != null,
- string.Format( "Public property {0} not found on object of type {1}.", propertyName, sourceObject.GetType().FullName ) );
- }
-
- internal static bool TryGetEnumDescriptionAttributeValue( Enum enumeration, out string description )
- {
- try
- {
- FieldInfo fieldInfo = enumeration.GetType().GetField( enumeration.ToString() );
- DescriptionAttribute[] attributes = fieldInfo.GetCustomAttributes( typeof( DescriptionAttribute ), true ) as DescriptionAttribute[];
- if( ( attributes != null ) && ( attributes.Length > 0 ) )
- {
- description = attributes[ 0 ].Description;
- return true;
- }
- }
- catch
- {
- }
-
- description = String.Empty;
- return false;
- }
-
- [DebuggerStepThrough]
- internal static string GetPropertyOrFieldName( MemberExpression expression )
- {
- string propertyOrFieldName;
- if( !ReflectionHelper.TryGetPropertyOrFieldName( expression, out propertyOrFieldName ) )
- throw new InvalidOperationException( "Unable to retrieve the property or field name." );
-
- return propertyOrFieldName;
- }
-
- [DebuggerStepThrough]
- internal static string GetPropertyOrFieldName( Expression> expression )
- {
- string propertyOrFieldName;
- if( !ReflectionHelper.TryGetPropertyOrFieldName( expression, out propertyOrFieldName ) )
- throw new InvalidOperationException( "Unable to retrieve the property or field name." );
-
- return propertyOrFieldName;
- }
-
- [DebuggerStepThrough]
- internal static bool TryGetPropertyOrFieldName( MemberExpression expression, out string propertyOrFieldName )
- {
- propertyOrFieldName = null;
-
- if( expression == null )
- return false;
-
- propertyOrFieldName = expression.Member.Name;
-
- return true;
- }
-
- [DebuggerStepThrough]
- internal static bool TryGetPropertyOrFieldName( Expression> expression, out string propertyOrFieldName )
- {
- propertyOrFieldName = null;
-
- if( expression == null )
- return false;
-
- return ReflectionHelper.TryGetPropertyOrFieldName( expression.Body as MemberExpression, out propertyOrFieldName );
- }
-
- public static bool IsPublicInstanceProperty( Type type, string propertyName )
- {
- BindingFlags flags = ( System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.FlattenHierarchy | System.Reflection.BindingFlags.Public );
- return type.GetProperty( propertyName, flags ) != null;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ResourceHelper.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ResourceHelper.cs
deleted file mode 100644
index 2b80831c..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ResourceHelper.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.IO;
-using System.Reflection;
-using System.Resources;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal class ResourceHelper
- {
- internal static Stream LoadResourceStream( Assembly assembly, string resId )
- {
- string basename = System.IO.Path.GetFileNameWithoutExtension( assembly.ManifestModule.Name ) + ".g";
- ResourceManager resourceManager = new ResourceManager( basename, assembly );
-
- // resource names are lower case and contain only forward slashes
- resId = resId.ToLower();
- resId = resId.Replace( '\\', '/' );
- return ( resourceManager.GetObject( resId ) as Stream );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/RoutedEventHelper.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/RoutedEventHelper.cs
deleted file mode 100644
index 7467beb3..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/RoutedEventHelper.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal static class RoutedEventHelper
- {
- internal static void RaiseEvent( DependencyObject target, RoutedEventArgs args )
- {
- if( target is UIElement )
- {
- ( target as UIElement ).RaiseEvent( args );
- }
- else if( target is ContentElement )
- {
- ( target as ContentElement ).RaiseEvent( args );
- }
- }
-
- internal static void AddHandler( DependencyObject element, RoutedEvent routedEvent, Delegate handler )
- {
- UIElement uie = element as UIElement;
- if( uie != null )
- {
- uie.AddHandler( routedEvent, handler );
- }
- else
- {
- ContentElement ce = element as ContentElement;
- if( ce != null )
- {
- ce.AddHandler( routedEvent, handler );
- }
- }
- }
-
- internal static void RemoveHandler( DependencyObject element, RoutedEvent routedEvent, Delegate handler )
- {
- UIElement uie = element as UIElement;
- if( uie != null )
- {
- uie.RemoveHandler( routedEvent, handler );
- }
- else
- {
- ContentElement ce = element as ContentElement;
- if( ce != null )
- {
- ce.RemoveHandler( routedEvent, handler );
- }
- }
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/Segment.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/Segment.cs
deleted file mode 100644
index bf01e59e..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/Segment.cs
+++ /dev/null
@@ -1,384 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal struct Segment
- {
- #region Constructors
-
- public Segment( Point point )
- {
- _p1 = point;
- _p2 = point;
- _isP1Excluded = false;
- _isP2Excluded = false;
- }
-
- public Segment( Point p1, Point p2 )
- {
- _p1 = p1;
- _p2 = p2;
- _isP1Excluded = false;
- _isP2Excluded = false;
- }
-
- public Segment( Point p1, Point p2, bool excludeP1, bool excludeP2 )
- {
- _p1 = p1;
- _p2 = p2;
- _isP1Excluded = excludeP1;
- _isP2Excluded = excludeP2;
- }
-
- #endregion
-
- #region Empty Static Properties
-
- public static Segment Empty
- {
- get
- {
- Segment result = new Segment( new Point( 0, 0 ) );
- result._isP1Excluded = true;
- result._isP2Excluded = true;
- return result;
- }
- }
-
- #endregion
-
- #region P1 Property
-
- public Point P1
- {
- get
- {
- return _p1;
- }
- }
-
- #endregion
-
- #region P2 Property
-
- public Point P2
- {
- get
- {
- return _p2;
- }
- }
-
- #endregion
-
- #region IsP1Excluded Property
-
- public bool IsP1Excluded
- {
- get
- {
- return _isP1Excluded;
- }
- }
-
- #endregion
-
- #region IsP2Excluded Property
-
- public bool IsP2Excluded
- {
- get
- {
- return _isP2Excluded;
- }
- }
-
- #endregion
-
- #region IsEmpty Property
-
- public bool IsEmpty
- {
- get
- {
- return DoubleHelper.AreVirtuallyEqual( _p1, _p2 ) && ( _isP1Excluded || _isP2Excluded );
- }
- }
-
- #endregion
-
- #region IsPoint Property
-
- public bool IsPoint
- {
- get
- {
- return DoubleHelper.AreVirtuallyEqual( _p1, _p2 );
- }
- }
-
- #endregion
-
- #region Length Property
-
- public double Length
- {
- get
- {
- return ( this.P2 - this.P1 ).Length;
- }
- }
-
- #endregion
-
- #region Slope Property
-
- public double Slope
- {
- get
- {
- return ( this.P2.X == this.P1.X ) ? double.NaN : ( this.P2.Y - this.P1.Y ) / ( this.P2.X - this.P1.X );
- }
- }
-
- #endregion
-
- public bool Contains( Point point )
- {
- if( IsEmpty )
- return false;
-
- // if the point is an endpoint, ensure that it is not excluded
- if( DoubleHelper.AreVirtuallyEqual( _p1, point ) )
- return _isP1Excluded;
-
- if( DoubleHelper.AreVirtuallyEqual( _p2, point ) )
- return _isP2Excluded;
-
- bool result = false;
-
- // ensure that a line through P1 and the point is parallel to the current segment
- if( DoubleHelper.AreVirtuallyEqual( Slope, new Segment( _p1, point ).Slope ) )
- {
- // finally, ensure that the point is between the segment's endpoints
- result = ( point.X >= Math.Min( _p1.X, _p2.X ) )
- && ( point.X <= Math.Max( _p1.X, _p2.X ) )
- && ( point.Y >= Math.Min( _p1.Y, _p2.Y ) )
- && ( point.Y <= Math.Max( _p1.Y, _p2.Y ) );
- }
- return result;
- }
-
- public bool Contains( Segment segment )
- {
- return ( segment == this.Intersection( segment ) );
- }
-
- public override bool Equals( object o )
- {
- if( !( o is Segment ) )
- return false;
-
- Segment other = ( Segment )o;
-
- // empty segments are always considered equal
- if( this.IsEmpty )
- return other.IsEmpty;
-
- // segments are considered equal if
- // 1) the endpoints are equal and equally excluded
- // 2) the opposing endpoints are equal and equally excluded
- if( DoubleHelper.AreVirtuallyEqual( _p1, other._p1 ) )
- {
- return ( DoubleHelper.AreVirtuallyEqual( _p2, other._p2 )
- && _isP1Excluded == other._isP1Excluded
- && _isP2Excluded == other._isP2Excluded );
- }
- else
- {
- return ( DoubleHelper.AreVirtuallyEqual( _p1, other._p2 )
- && DoubleHelper.AreVirtuallyEqual( _p2, other._p1 )
- && _isP1Excluded == other._isP2Excluded
- && _isP2Excluded == other._isP1Excluded );
- }
- }
-
- public override int GetHashCode()
- {
- return _p1.GetHashCode() ^ _p2.GetHashCode() ^ _isP1Excluded.GetHashCode() ^ _isP2Excluded.GetHashCode();
- }
-
- public Segment Intersection( Segment segment )
- {
- // if either segment is empty, the intersection is also empty
- if( this.IsEmpty || segment.IsEmpty )
- return Segment.Empty;
-
- // if the segments are equal, just return a new equal segment
- if( this == segment )
- return new Segment( this._p1, this._p2, this._isP1Excluded, this._isP2Excluded );
-
- // if either segment is a Point, just see if the point is contained in the other segment
- if( this.IsPoint )
- return segment.Contains( this._p1 ) ? new Segment( this._p1 ) : Segment.Empty;
-
- if( segment.IsPoint )
- return this.Contains( segment._p1 ) ? new Segment( segment._p1 ) : Segment.Empty;
-
- // okay, no easy answer, so let's do the math...
- Point p1 = this._p1;
- Vector v1 = this._p2 - this._p1;
- Point p2 = segment._p1;
- Vector v2 = segment._p2 - segment._p1;
- Vector endpointVector = p2 - p1;
-
- double xProd = Vector.CrossProduct( v1, v2 );
-
- // if segments are not parallel, then look for intersection on each segment
- if( !DoubleHelper.AreVirtuallyEqual( Slope, segment.Slope ) )
- {
- // check for intersection on other segment
- double s = ( Vector.CrossProduct( endpointVector, v1 ) ) / xProd;
- if( s < 0 || s > 1 )
- return Segment.Empty;
-
- // check for intersection on this segment
- s = ( Vector.CrossProduct( endpointVector, v2 ) ) / xProd;
- if( s < 0 || s > 1 )
- return Segment.Empty;
-
- // intersection of segments is a point
- return new Segment( p1 + s * v1 );
- }
-
- // segments are parallel
- xProd = Vector.CrossProduct( endpointVector, v1 );
- if( xProd * xProd > 1.0e-06 * v1.LengthSquared * endpointVector.LengthSquared )
- {
- // segments do not intersect
- return Segment.Empty;
- }
-
- // intersection is overlapping segment
- Segment result = new Segment();
-
- // to determine the overlapping segment, create reference segments where the endpoints are *not* excluded
- Segment refThis = new Segment( this._p1, this._p2 );
- Segment refSegment = new Segment( segment._p1, segment._p2 );
-
- // check whether this segment is contained in the other segment
- bool includeThisP1 = refSegment.Contains( refThis._p1 );
- bool includeThisP2 = refSegment.Contains( refThis._p2 );
- if( includeThisP1 && includeThisP2 )
- {
- result._p1 = this._p1;
- result._p2 = this._p2;
- result._isP1Excluded = this._isP1Excluded || !segment.Contains( this._p1 );
- result._isP2Excluded = this._isP2Excluded || !segment.Contains( this._p2 );
- return result;
- }
-
- // check whether the other segment is contained in this segment
- bool includeSegmentP1 = refThis.Contains( refSegment._p1 );
- bool includeSegmentP2 = refThis.Contains( refSegment._p2 );
- if( includeSegmentP1 && includeSegmentP2 )
- {
- result._p1 = segment._p1;
- result._p2 = segment._p2;
- result._isP1Excluded = segment._isP1Excluded || !this.Contains( segment._p1 );
- result._isP2Excluded = segment._isP2Excluded || !this.Contains( segment._p2 );
- return result;
- }
-
- // the intersection must include one endpoint from this segment and one endpoint from the other segment
- if( includeThisP1 )
- {
- result._p1 = this._p1;
- result._isP1Excluded = this._isP1Excluded || !segment.Contains( this._p1 );
- }
- else
- {
- result._p1 = this._p2;
- result._isP1Excluded = this._isP2Excluded || !segment.Contains( this._p2 );
- }
- if( includeSegmentP1 )
- {
- result._p2 = segment._p1;
- result._isP2Excluded = segment._isP1Excluded || !this.Contains( segment._p1 );
- }
- else
- {
- result._p2 = segment._p2;
- result._isP2Excluded = segment._isP2Excluded || !this.Contains( segment._p2 );
- }
- return result;
- }
-
- public override string ToString()
- {
- string s = base.ToString();
-
- if( this.IsEmpty )
- {
- s = s + ": {Empty}";
- }
- else if( this.IsPoint )
- {
- s = s + ", Point: " + _p1.ToString();
- }
- else
- {
- s = s + ": " + _p1.ToString() + ( _isP1Excluded ? " (excl)" : " (incl)" )
- + " to " + _p2.ToString() + ( _isP2Excluded ? " (excl)" : " (incl)" );
- }
-
- return s;
- }
-
- #region Operators Methods
-
- public static bool operator ==( Segment s1, Segment s2 )
- {
- if( ( object )s1 == null )
- return ( object )s2 == null;
-
- if( ( object )s2 == null )
- return ( object )s1 == null;
-
- return s1.Equals( s2 );
- }
-
- public static bool operator !=( Segment s1, Segment s2 )
- {
- return !( s1 == s2 );
- }
-
- #endregion
-
- #region Private Fields
-
- private bool _isP1Excluded;
- private bool _isP2Excluded;
- private Point _p1;
- private Point _p2;
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/TreeHelper.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/TreeHelper.cs
deleted file mode 100644
index 28a1720e..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/TreeHelper.cs
+++ /dev/null
@@ -1,235 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Windows.Media;
-using System.Windows.Controls.Primitives;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal static class TreeHelper
- {
- ///
- /// Tries its best to return the specified element's parent. It will
- /// try to find, in this order, the VisualParent, LogicalParent, LogicalTemplatedParent.
- /// It only works for Visual, FrameworkElement or FrameworkContentElement.
- ///
- /// The element to which to return the parent. It will only
- /// work if element is a Visual, a FrameworkElement or a FrameworkContentElement.
- /// If the logical parent is not found (Parent), we check the TemplatedParent
- /// (see FrameworkElement.Parent documentation). But, we never actually witnessed
- /// this situation.
- public static DependencyObject GetParent( DependencyObject element )
- {
- return TreeHelper.GetParent( element, true );
- }
-
- private static DependencyObject GetParent( DependencyObject element, bool recurseIntoPopup )
- {
- if( recurseIntoPopup )
- {
- // Case 126732 : To correctly detect parent of a popup we must do that exception case
- Popup popup = element as Popup;
-
- if( ( popup != null ) && ( popup.PlacementTarget != null ) )
- return popup.PlacementTarget;
- }
-
- Visual visual = element as Visual;
- DependencyObject parent = ( visual == null ) ? null : VisualTreeHelper.GetParent( visual );
-
- if( parent == null )
- {
- // No Visual parent. Check in the logical tree.
- FrameworkElement fe = element as FrameworkElement;
-
- if( fe != null )
- {
- parent = fe.Parent;
-
- if( parent == null )
- {
- parent = fe.TemplatedParent;
- }
- }
- else
- {
- FrameworkContentElement fce = element as FrameworkContentElement;
-
- if( fce != null )
- {
- parent = fce.Parent;
-
- if( parent == null )
- {
- parent = fce.TemplatedParent;
- }
- }
- }
- }
-
- return parent;
- }
-
- ///
- /// This will search for a parent of the specified type.
- ///
- /// The type of the element to find
- /// The node where the search begins. This element is not checked.
- /// Returns the found element. Null if nothing is found.
- public static T FindParent( DependencyObject startingObject ) where T : DependencyObject
- {
- return TreeHelper.FindParent( startingObject, false, null );
- }
-
- ///
- /// This will search for a parent of the specified type.
- ///
- /// The type of the element to find
- /// The node where the search begins.
- /// Should the specified startingObject be checked first.
- /// Returns the found element. Null if nothing is found.
- public static T FindParent( DependencyObject startingObject, bool checkStartingObject ) where T : DependencyObject
- {
- return TreeHelper.FindParent( startingObject, checkStartingObject, null );
- }
-
- ///
- /// This will search for a parent of the specified type.
- ///
- /// The type of the element to find
- /// The node where the search begins.
- /// Should the specified startingObject be checked first.
- /// Provide a callback to check additional properties
- /// of the found elements. Can be left Null if no additional criteria are needed.
- /// Returns the found element. Null if nothing is found.
- /// Button button = TreeHelper.FindParent<Button>( this, foundChild => foundChild.Focusable );
- public static T FindParent( DependencyObject startingObject, bool checkStartingObject, Func additionalCheck ) where T : DependencyObject
- {
- T foundElement;
- DependencyObject parent = ( checkStartingObject ? startingObject : TreeHelper.GetParent( startingObject, true ) );
-
- while( parent != null )
- {
- foundElement = parent as T;
-
- if( foundElement != null )
- {
- if( additionalCheck == null )
- {
- return foundElement;
- }
- else
- {
- if( additionalCheck( foundElement ) )
- return foundElement;
- }
- }
-
- parent = TreeHelper.GetParent( parent, true );
- }
-
- return null;
- }
-
- ///
- /// This will search for a child of the specified type. The search is performed
- /// hierarchically, breadth first (as opposed to depth first).
- ///
- /// The type of the element to find
- /// The root of the tree to search for. This element itself is not checked.
- /// Returns the found element. Null if nothing is found.
- public static T FindChild( DependencyObject parent ) where T : DependencyObject
- {
- return TreeHelper.FindChild( parent, null );
- }
-
- ///
- /// This will search for a child of the specified type. The search is performed
- /// hierarchically, breadth first (as opposed to depth first).
- ///
- /// The type of the element to find
- /// The root of the tree to search for. This element itself is not checked.
- /// Provide a callback to check additional properties
- /// of the found elements. Can be left Null if no additional criteria are needed.
- /// Returns the found element. Null if nothing is found.
- /// Button button = TreeHelper.FindChild<Button>( this, foundChild => foundChild.Focusable );
- public static T FindChild( DependencyObject parent, Func additionalCheck ) where T : DependencyObject
- {
- int childrenCount = VisualTreeHelper.GetChildrenCount( parent );
- T child;
-
- for( int index = 0; index < childrenCount; index++ )
- {
- child = VisualTreeHelper.GetChild( parent, index ) as T;
-
- if( child != null )
- {
- if( additionalCheck == null )
- {
- return child;
- }
- else
- {
- if( additionalCheck( child ) )
- return child;
- }
- }
- }
-
- for( int index = 0; index < childrenCount; index++ )
- {
- child = TreeHelper.FindChild( VisualTreeHelper.GetChild( parent, index ), additionalCheck );
-
- if( child != null )
- return child;
- }
-
- return null;
- }
-
- ///
- /// Returns true if the specified element is a child of parent somewhere in the visual
- /// tree. This method will work for Visual, FrameworkElement and FrameworkContentElement.
- ///
- /// The element that is potentially a child of the specified parent.
- /// The element that is potentially a parent of the specified element.
- public static bool IsDescendantOf( DependencyObject element, DependencyObject parent )
- {
- return TreeHelper.IsDescendantOf( element, parent, true );
- }
-
- ///
- /// Returns true if the specified element is a child of parent somewhere in the visual
- /// tree. This method will work for Visual, FrameworkElement and FrameworkContentElement.
- ///
- /// The element that is potentially a child of the specified parent.
- /// The element that is potentially a parent of the specified element.
- public static bool IsDescendantOf( DependencyObject element, DependencyObject parent, bool recurseIntoPopup )
- {
- while( element != null )
- {
- if( element == parent )
- return true;
-
- element = TreeHelper.GetParent( element, recurseIntoPopup );
- }
-
- return false;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ValueChangeHelper.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ValueChangeHelper.cs
deleted file mode 100644
index 0c67b3ba..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/ValueChangeHelper.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Collections;
-using System.Windows.Data;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- ///
- /// This helper class will raise events when a specific
- /// path value on one or many items changes.
- ///
- internal class ValueChangeHelper : DependencyObject
- {
-
- #region Value Property
- ///
- /// This private property serves as the target of a binding that monitors the value of the binding
- /// of each item in the source.
- ///
- private static readonly DependencyProperty ValueProperty = DependencyProperty.Register( "Value", typeof( object ), typeof( ValueChangeHelper ), new UIPropertyMetadata( null, OnValueChanged ) );
- private object Value
- {
- get
- {
- return ( object )GetValue( ValueProperty );
- }
- set
- {
- SetValue( ValueProperty, value );
- }
- }
-
- private static void OnValueChanged( DependencyObject sender, DependencyPropertyChangedEventArgs args )
- {
- ( ( ValueChangeHelper )sender ).RaiseValueChanged();
- }
- #endregion
-
- public event EventHandler ValueChanged;
-
- #region Constructor
-
- public ValueChangeHelper(Action changeCallback)
- {
- if( changeCallback == null )
- throw new ArgumentNullException( "changeCallback" );
-
- this.ValueChanged += ( s, args ) => changeCallback();
- }
-
- #endregion
-
- #region Methods
-
- public void UpdateValueSource( object sourceItem, string path )
- {
- BindingBase binding = null;
- if( sourceItem != null && path != null )
- {
- binding = new Binding( path ) { Source = sourceItem };
- }
-
- this.UpdateBinding( binding );
- }
-
- public void UpdateValueSource( IEnumerable sourceItems, string path )
- {
- BindingBase binding = null;
- if( sourceItems != null && path != null )
- {
- MultiBinding multiBinding = new MultiBinding();
- multiBinding.Converter = new BlankMultiValueConverter();
-
- foreach( var item in sourceItems )
- {
- multiBinding.Bindings.Add( new Binding( path ) { Source = item } );
- }
-
- binding = multiBinding;
- }
-
- this.UpdateBinding( binding );
- }
-
- private void UpdateBinding( BindingBase binding )
- {
- if( binding != null )
- {
- BindingOperations.SetBinding( this, ValueChangeHelper.ValueProperty, binding );
- }
- else
- {
- this.ClearBinding();
- }
- }
-
- private void ClearBinding()
- {
- BindingOperations.ClearBinding( this, ValueChangeHelper.ValueProperty );
- }
-
- private void RaiseValueChanged()
- {
- if( this.ValueChanged != null )
- {
- this.ValueChanged( this, EventArgs.Empty );
- }
- }
-
- #endregion
-
- #region BlankMultiValueConverter private class
-
- private class BlankMultiValueConverter : IMultiValueConverter
- {
- public object Convert( object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- // We will not use the result anyway. We just want the change notification to kick in.
- // Return a new object to have a different value.
- return new object();
- }
-
- public object[] ConvertBack( object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture )
- {
- throw new InvalidOperationException();
- }
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/VisualTreeHelperEx.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/VisualTreeHelperEx.cs
deleted file mode 100644
index b29d30d0..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/VisualTreeHelperEx.cs
+++ /dev/null
@@ -1,135 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Windows.Media;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- public static class VisualTreeHelperEx
- {
- public static DependencyObject FindAncestorByType( DependencyObject element, Type type, bool specificTypeOnly )
- {
- if( element == null )
- return null;
-
- if( specificTypeOnly ? ( element.GetType() == type )
- : ( element.GetType() == type ) || ( element.GetType().IsSubclassOf( type ) ) )
- return element;
-
- return VisualTreeHelperEx.FindAncestorByType( VisualTreeHelper.GetParent( element ), type, specificTypeOnly );
- }
-
- public static T FindAncestorByType( DependencyObject depObj ) where T : DependencyObject
- {
- if( depObj == null )
- {
- return default( T );
- }
- if( depObj is T )
- {
- return ( T )depObj;
- }
-
- T parent = default( T );
-
- parent = VisualTreeHelperEx.FindAncestorByType( VisualTreeHelper.GetParent( depObj ) );
-
- return parent;
- }
-
- public static Visual FindDescendantByName( Visual element, string name )
- {
- if( element != null && ( element is FrameworkElement ) && ( element as FrameworkElement ).Name == name )
- return element;
-
- Visual foundElement = null;
- if( element is FrameworkElement )
- ( element as FrameworkElement ).ApplyTemplate();
-
- for( int i = 0; i < VisualTreeHelper.GetChildrenCount( element ); i++ )
- {
- Visual visual = VisualTreeHelper.GetChild( element, i ) as Visual;
- foundElement = VisualTreeHelperEx.FindDescendantByName( visual, name );
- if( foundElement != null )
- break;
- }
-
- return foundElement;
- }
-
- public static Visual FindDescendantByType( Visual element, Type type )
- {
- return VisualTreeHelperEx.FindDescendantByType( element, type, true );
- }
-
- public static Visual FindDescendantByType( Visual element, Type type, bool specificTypeOnly )
- {
- if( element == null )
- return null;
-
- if( specificTypeOnly ? ( element.GetType() == type )
- : ( element.GetType() == type ) || ( element.GetType().IsSubclassOf( type ) ) )
- return element;
-
- Visual foundElement = null;
- if( element is FrameworkElement )
- ( element as FrameworkElement ).ApplyTemplate();
-
- for( int i = 0; i < VisualTreeHelper.GetChildrenCount( element ); i++ )
- {
- Visual visual = VisualTreeHelper.GetChild( element, i ) as Visual;
- foundElement = VisualTreeHelperEx.FindDescendantByType( visual, type, specificTypeOnly );
- if( foundElement != null )
- break;
- }
-
- return foundElement;
- }
-
- public static T FindDescendantByType( Visual element ) where T : Visual
- {
- Visual temp = VisualTreeHelperEx.FindDescendantByType( element, typeof( T ) );
-
- return ( T )temp;
- }
-
- public static Visual FindDescendantWithPropertyValue( Visual element,
- DependencyProperty dp, object value )
- {
- if( element == null )
- return null;
-
- if( element.GetValue( dp ).Equals( value ) )
- return element;
-
- Visual foundElement = null;
- if( element is FrameworkElement )
- ( element as FrameworkElement ).ApplyTemplate();
-
- for( int i = 0; i < VisualTreeHelper.GetChildrenCount( element ); i++ )
- {
- Visual visual = VisualTreeHelper.GetChild( element, i ) as Visual;
- foundElement = VisualTreeHelperEx.FindDescendantWithPropertyValue( visual, dp, value );
- if( foundElement != null )
- break;
- }
-
- return foundElement;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/WeakEventListener.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/WeakEventListener.cs
deleted file mode 100644
index 90f32750..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/WeakEventListener.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal class WeakEventListener : IWeakEventListener where TArgs : EventArgs
- {
- private Action _callback;
-
- public WeakEventListener(Action callback)
- {
- if( callback == null )
- throw new ArgumentNullException( "callback" );
-
- _callback = callback;
- }
-
- public bool ReceiveWeakEvent( Type managerType, object sender, EventArgs e )
- {
- _callback(sender, (TArgs)e);
- return true;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/WindowUtilities.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/WindowUtilities.cs
deleted file mode 100644
index 580cd09b..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/WindowUtilities.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Core.Utilities
-{
- internal class WindowUtilities
- {
-
-
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/VersionResourceDictionary.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/VersionResourceDictionary.cs
deleted file mode 100644
index 0ae57913..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/VersionResourceDictionary.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.ComponentModel;
-using System.Diagnostics;
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- public class VersionResourceDictionary : ResourceDictionary, ISupportInitialize
- {
- private int _initializingCount;
- private string _assemblyName;
- private string _sourcePath;
-
-
- public VersionResourceDictionary() { }
-
- public VersionResourceDictionary(string assemblyName, string sourcePath)
- {
- ( ( ISupportInitialize )this ).BeginInit();
- this.AssemblyName = assemblyName;
- this.SourcePath = sourcePath;
- ( ( ISupportInitialize )this ).EndInit();
- }
-
- public string AssemblyName
- {
- get { return _assemblyName; }
- set
- {
- this.EnsureInitialization();
- _assemblyName = value;
- }
- }
-
- public string SourcePath
- {
- get { return _sourcePath; }
- set
- {
- this.EnsureInitialization();
- _sourcePath = value;
- }
- }
-
- private void EnsureInitialization()
- {
- if( _initializingCount <= 0 )
- throw new InvalidOperationException( "VersionResourceDictionary properties can only be set while initializing." );
- }
-
- void ISupportInitialize.BeginInit()
- {
- base.BeginInit();
- _initializingCount++;
- }
-
- void ISupportInitialize.EndInit()
- {
- _initializingCount--;
- Debug.Assert( _initializingCount >= 0 );
-
- if( _initializingCount <= 0 )
- {
- if( this.Source != null )
- throw new InvalidOperationException( "Source property cannot be initialized on the VersionResourceDictionary" );
-
- if( string.IsNullOrEmpty( this.AssemblyName ) || string.IsNullOrEmpty( this.SourcePath ) )
- throw new InvalidOperationException( "AssemblyName and SourcePath must be set during initialization" );
-
- //Using an absolute path is necessary in VS2015 for themes different than Windows 8.
- string uriStr = string.Format( @"pack://application:,,,/{0};v{1};component/{2}", this.AssemblyName, _XceedVersionInfo.Version, this.SourcePath );
- this.Source = new Uri( uriStr, UriKind.Absolute );
- }
-
- base.EndInit();
- }
-
-
- private enum InitState
- {
- NotInitialized,
- Initializing,
- Initialized
- };
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/WeakCollectionChangedWrapper.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/WeakCollectionChangedWrapper.cs
deleted file mode 100644
index c07e4186..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/WeakCollectionChangedWrapper.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Collections;
-using System.Collections.Specialized;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-
-namespace Xceed.Wpf.Toolkit.Core
-{
- internal class WeakCollectionChangedWrapper : IList, ICollection, INotifyCollectionChanged
- {
- private WeakEventListener _innerListListener;
- private IList _innerList;
-
- public WeakCollectionChangedWrapper( IList sourceList )
- {
- _innerList = sourceList;
- var notifyList = _innerList as INotifyCollectionChanged;
- if( notifyList != null )
- {
- _innerListListener = new WeakEventListener( OnInnerCollectionChanged );
- CollectionChangedEventManager.AddListener( notifyList, _innerListListener );
- }
- }
-
- public event NotifyCollectionChangedEventHandler CollectionChanged;
-
- private void OnInnerCollectionChanged( object sender, NotifyCollectionChangedEventArgs args )
- {
- if( this.CollectionChanged != null )
- {
- this.CollectionChanged( this, args );
- }
- }
-
- internal void ReleaseEvents()
- {
- if( _innerListListener != null )
- {
- CollectionChangedEventManager.RemoveListener( ( INotifyCollectionChanged )_innerList, _innerListListener );
- _innerListListener = null;
- }
- }
-
- #region IList Members
-
- int IList.Add( object value )
- {
- return _innerList.Add( value );
- }
-
- void IList.Clear()
- {
- _innerList.Clear();
- }
-
- bool IList.Contains( object value )
- {
- return _innerList.Contains( value );
- }
-
- int IList.IndexOf( object value )
- {
- return _innerList.IndexOf( value );
- }
-
- void IList.Insert( int index, object value )
- {
- _innerList.Insert( index, value );
- }
-
- bool IList.IsFixedSize
- {
- get { return _innerList.IsFixedSize; }
- }
-
- bool IList.IsReadOnly
- {
- get { return _innerList.IsReadOnly; }
- }
-
- void IList.Remove( object value )
- {
- _innerList.Remove( value );
- }
-
- void IList.RemoveAt( int index )
- {
- _innerList.RemoveAt( index );
- }
-
- object IList.this[ int index ]
- {
- get { return _innerList[ index ]; }
- set { _innerList[ index ] = value; }
- }
- #endregion
-
- #region ICollection Members
-
- void ICollection.CopyTo( Array array, int index )
- {
- _innerList.CopyTo( array, index );
- }
-
- int ICollection.Count
- {
- get { return _innerList.Count; }
- }
-
- bool ICollection.IsSynchronized
- {
- get { return _innerList.IsSynchronized; }
- }
-
- object ICollection.SyncRoot
- {
- get { return _innerList.SyncRoot; }
- }
-
- #endregion
-
- #region IEnumerable Members
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return _innerList.GetEnumerator();
- }
-
- #endregion
-
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs
deleted file mode 100644
index 169a40a1..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs
+++ /dev/null
@@ -1,473 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-using System.Windows.Controls.Primitives;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-using Xceed.Wpf.Toolkit.Primitives;
-#if VS2008
-using Microsoft.Windows.Controls;
-using Microsoft.Windows.Controls.Primitives;
-#endif
-
-namespace Xceed.Wpf.Toolkit
-{
- [TemplatePart( Name = PART_Calendar, Type = typeof( Calendar ) )]
- [TemplatePart( Name = PART_TimeUpDown, Type = typeof( TimePicker ) )]
- public class DateTimePicker : DateTimePickerBase
- {
- private const string PART_Calendar = "PART_Calendar";
- private const string PART_TimeUpDown = "PART_TimeUpDown";
-
- #region Members
-
- private Calendar _calendar;
- private TimePicker _timePicker;
- private DateTime? _calendarTemporaryDateTime;
- private DateTime? _calendarIntendedDateTime;
-
- #endregion //Members
-
- #region Properties
-
- #region AutoCloseCalendar
-
- public static readonly DependencyProperty AutoCloseCalendarProperty = DependencyProperty.Register( "AutoCloseCalendar", typeof( bool ), typeof( DateTimePicker ), new UIPropertyMetadata( false ) );
- public bool AutoCloseCalendar
- {
- get
- {
- return ( bool )GetValue( AutoCloseCalendarProperty );
- }
- set
- {
- SetValue( AutoCloseCalendarProperty, value );
- }
- }
-
- #endregion //AutoCloseCalendar
-
- #region CalendarDisplayMode
-
- public static readonly DependencyProperty CalendarDisplayModeProperty = DependencyProperty.Register( "CalendarDisplayMode", typeof( CalendarMode )
- , typeof( DateTimePicker ), new UIPropertyMetadata( CalendarMode.Month ) );
- public CalendarMode CalendarDisplayMode
- {
- get
- {
- return (CalendarMode)GetValue( CalendarDisplayModeProperty );
- }
- set
- {
- SetValue( CalendarDisplayModeProperty, value );
- }
- }
-
- #endregion //CalendarDisplayMode
-
- #region CalendarWidth
-
- public static readonly DependencyProperty CalendarWidthProperty = DependencyProperty.Register( "CalendarWidth", typeof( double )
- , typeof( DateTimePicker ), new UIPropertyMetadata( 178d ) );
- public double CalendarWidth
- {
- get
- {
- return ( double )GetValue( CalendarWidthProperty );
- }
- set
- {
- SetValue( CalendarWidthProperty, value );
- }
- }
-
- #endregion //CalendarWidth
-
- #region TimeFormat
-
- public static readonly DependencyProperty TimeFormatProperty = DependencyProperty.Register( "TimeFormat", typeof( DateTimeFormat ), typeof( DateTimePicker ), new UIPropertyMetadata( DateTimeFormat.ShortTime ) );
- public DateTimeFormat TimeFormat
- {
- get
- {
- return ( DateTimeFormat )GetValue( TimeFormatProperty );
- }
- set
- {
- SetValue( TimeFormatProperty, value );
- }
- }
-
- #endregion //TimeFormat
-
- #region TimeFormatString
-
- public static readonly DependencyProperty TimeFormatStringProperty = DependencyProperty.Register( "TimeFormatString", typeof( string ), typeof( DateTimePicker ), new UIPropertyMetadata( default( String ) ), IsTimeFormatStringValid );
- public string TimeFormatString
- {
- get
- {
- return ( string )GetValue( TimeFormatStringProperty );
- }
- set
- {
- SetValue( TimeFormatStringProperty, value );
- }
- }
-
- private static bool IsTimeFormatStringValid(object value)
- {
- return DateTimeUpDown.IsFormatStringValid( value );
- }
-
- #endregion //TimeFormatString
-
- #region TimePickerAllowSpin
-
- public static readonly DependencyProperty TimePickerAllowSpinProperty = DependencyProperty.Register( "TimePickerAllowSpin", typeof( bool ), typeof( DateTimePicker ), new UIPropertyMetadata( true ) );
- public bool TimePickerAllowSpin
- {
- get
- {
- return (bool)GetValue( TimePickerAllowSpinProperty );
- }
- set
- {
- SetValue( TimePickerAllowSpinProperty, value );
- }
- }
-
- #endregion //TimePickerAllowSpin
-
- #region TimePickerShowButtonSpinner
-
- public static readonly DependencyProperty TimePickerShowButtonSpinnerProperty = DependencyProperty.Register( "TimePickerShowButtonSpinner", typeof( bool ), typeof( DateTimePicker ), new UIPropertyMetadata( true ) );
- public bool TimePickerShowButtonSpinner
- {
- get
- {
- return (bool)GetValue( TimePickerShowButtonSpinnerProperty );
- }
- set
- {
- SetValue( TimePickerShowButtonSpinnerProperty, value );
- }
- }
-
- #endregion //TimePickerShowButtonSpinner
-
- #region TimePickerVisibility
-
- public static readonly DependencyProperty TimePickerVisibilityProperty = DependencyProperty.Register( "TimePickerVisibility", typeof( Visibility ), typeof( DateTimePicker ), new UIPropertyMetadata( Visibility.Visible ) );
- public Visibility TimePickerVisibility
- {
- get
- {
- return ( Visibility )GetValue( TimePickerVisibilityProperty );
- }
- set
- {
- SetValue( TimePickerVisibilityProperty, value );
- }
- }
-
- #endregion //TimePickerVisibility
-
- #region TimeWatermark
-
- public static readonly DependencyProperty TimeWatermarkProperty = DependencyProperty.Register( "TimeWatermark", typeof( object ), typeof( DateTimePicker ), new UIPropertyMetadata( null ) );
- public object TimeWatermark
- {
- get
- {
- return ( object )GetValue( TimeWatermarkProperty );
- }
- set
- {
- SetValue( TimeWatermarkProperty, value );
- }
- }
-
- #endregion //TimeWatermark
-
- #region TimeWatermarkTemplate
-
- public static readonly DependencyProperty TimeWatermarkTemplateProperty = DependencyProperty.Register( "TimeWatermarkTemplate", typeof( DataTemplate ), typeof( DateTimePicker ), new UIPropertyMetadata( null ) );
- public DataTemplate TimeWatermarkTemplate
- {
- get
- {
- return ( DataTemplate )GetValue( TimeWatermarkTemplateProperty );
- }
- set
- {
- SetValue( TimeWatermarkTemplateProperty, value );
- }
- }
-
- #endregion //TimeWatermarkTemplate
-
- #endregion //Properties
-
- #region Constructors
-
- static DateTimePicker()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( DateTimePicker ), new FrameworkPropertyMetadata( typeof( DateTimePicker ) ) );
- UpdateValueOnEnterKeyProperty.OverrideMetadata( typeof( DateTimePicker ), new FrameworkPropertyMetadata( true ) );
- }
-
- public DateTimePicker()
- {
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
-
- if( _calendar != null )
- _calendar.SelectedDatesChanged -= Calendar_SelectedDatesChanged;
-
- _calendar = GetTemplateChild( PART_Calendar ) as Calendar;
-
- if( _calendar != null )
- {
- _calendar.SelectedDatesChanged += Calendar_SelectedDatesChanged;
- _calendar.SelectedDate = Value ?? null;
- _calendar.DisplayDate = Value ?? this.ContextNow;
- this.SetBlackOutDates();
- }
-
- if( _timePicker != null )
- {
- _timePicker.ValueChanged -= this.TimePicker_ValueChanged;
- }
- _timePicker = GetTemplateChild( PART_TimeUpDown ) as TimePicker;
- if( _timePicker != null )
- {
- _timePicker.ValueChanged += this.TimePicker_ValueChanged;
- }
- }
-
- protected override void OnPreviewMouseUp( MouseButtonEventArgs e )
- {
- if( Mouse.Captured is CalendarItem)
- {
- Mouse.Capture( null );
-
- // Do not close calendar on Year/Month Selection. Close only on Day selection.
- if( AutoCloseCalendar && (_calendar != null) && ( _calendar.DisplayMode == CalendarMode.Month ) )
- {
- ClosePopup( true );
- }
- }
- base.OnPreviewMouseUp( e );
- }
-
- protected override void OnValueChanged( DateTime? oldValue, DateTime? newValue )
- {
- //The calendar only select the Date part, not the time part.
- DateTime? newValueDate = (newValue != null)
- ? newValue.Value.Date
- : (DateTime?)null;
-
- if( _calendar != null && _calendar.SelectedDate != newValueDate)
- {
- _calendar.SelectedDate = newValueDate;
- _calendar.DisplayDate = newValue.GetValueOrDefault( this.ContextNow );
- }
-
- //If we change any part of the datetime without
- //using the calendar when the actual date is temporary,
- //clear the temporary value.
- if( (_calendar != null) && (_calendarTemporaryDateTime != null) && (newValue != _calendarTemporaryDateTime ))
- {
- _calendarTemporaryDateTime = null;
- _calendarIntendedDateTime = null;
- }
-
- base.OnValueChanged( oldValue, newValue );
- }
-
- protected override void OnIsOpenChanged( bool oldValue, bool newValue )
- {
- base.OnIsOpenChanged( oldValue, newValue );
-
- if( !newValue )
- {
- _calendarTemporaryDateTime = null;
- _calendarIntendedDateTime = null;
- }
- }
-
- protected override void OnPreviewKeyDown( KeyEventArgs e )
- {
- //if the calendar is open then we don't want to modify the behavior of navigating the calendar control with the Up/Down keys.
- if( !IsOpen )
- base.OnPreviewKeyDown( e );
- }
-
- protected override void OnMaximumChanged( DateTime? oldValue, DateTime? newValue )
- {
- base.OnMaximumChanged( oldValue, newValue );
-
- this.SetBlackOutDates();
- }
-
- protected override void OnMinimumChanged( DateTime? oldValue, DateTime? newValue )
- {
- base.OnMinimumChanged( oldValue, newValue );
-
- this.SetBlackOutDates();
- }
-
- #endregion //Base Class Overrides
-
- #region Event Handlers
-
- protected override void HandleKeyDown( object sender, KeyEventArgs e )
- {
- // The base call will handle the Ctrl+Down, Enter and Esc keys
- // in order to open or close the popup.
- // Do not close the Calendar if the call is handled
- // by the TimePicker inside the DateTimePicker template.
- if( IsOpen
- && ( _timePicker != null)
- && _timePicker.IsKeyboardFocusWithin
- && ( _timePicker.IsOpen || e.Handled ) )
- return;
-
- base.HandleKeyDown( sender, e );
- }
-
- private void TimePicker_ValueChanged( object sender, RoutedPropertyChangedEventArgs e )
- {
- e.Handled = true;
-
- // if UpdateValueOnEnterKey is true,
- // Sync Value on Text only when Enter Key is pressed.
- if( this.UpdateValueOnEnterKey )
- {
- var newTime = e.NewValue as DateTime?;
- if( newTime != null )
- {
- _fireSelectionChangedEvent = false;
- var currentDate = this.ConvertTextToValue( this.TextBox.Text );
- var date = currentDate ?? this.ContextNow;
- var newValue = new DateTime( date.Year, date.Month, date.Day, newTime.Value.Hour, newTime.Value.Minute, newTime.Value.Second, newTime.Value.Millisecond, date.Kind );
- this.TextBox.Text = newValue.ToString( this.GetFormatString( this.Format ), this.CultureInfo );
- _fireSelectionChangedEvent = true;
- }
- }
- }
-
- private void Calendar_SelectedDatesChanged( object sender, SelectionChangedEventArgs e )
- {
- if( e.AddedItems.Count > 0 )
- {
- var newDate = ( DateTime? )e.AddedItems[ 0 ];
-
- if( newDate != null )
- {
- //The Calendar will always return a date with an "Unspecified" Kind.
- //Force the expected kind to the value.
- newDate = DateTime.SpecifyKind( newDate.Value, this.Kind );
-
- // Only change the year, month, and day part of the value. Keep everything to the last "tick."
- // "Milliseconds" aren't precise enough. Use a mathematical scheme instead.
- if( _calendarIntendedDateTime != null )
- {
- newDate = newDate.Value.Date + _calendarIntendedDateTime.Value.TimeOfDay;
- _calendarTemporaryDateTime = null;
- _calendarIntendedDateTime = null;
- }
- else if( Value != null )
- {
- newDate = newDate.Value.Date + Value.Value.TimeOfDay;
- }
-
- // Always be sure that the time part of the selected value is always
- // within the bound of the min max. The time part could be altered
- // if the calendar's selected date match the Minimum or Maximum date.
- // Keep in memory the intended time of day, in case that the selected
- // calendar date is only transitory (browsing the calendar with the keyboard)
- var limitedDateTime = this.GetClippedMinMaxValue( newDate );
-
- if( limitedDateTime.Value != newDate.Value )
- {
- _calendarTemporaryDateTime = limitedDateTime;
- _calendarIntendedDateTime = newDate;
- newDate = limitedDateTime;
- }
- }
-
- if( this.UpdateValueOnEnterKey )
- {
- _fireSelectionChangedEvent = false;
- this.TextBox.Text = newDate.Value.ToString( this.GetFormatString( this.Format ), this.CultureInfo );
- _fireSelectionChangedEvent = true;
- }
- else
- {
- if( !object.Equals( newDate, Value ) )
- {
- this.Value = newDate;
- }
- }
- }
- }
-
- protected override void Popup_Opened( object sender, EventArgs e )
- {
- base.Popup_Opened( sender, e );
-
- if( _calendar != null )
- _calendar.Focus();
- }
-
- #endregion //Event Handlers
-
- #region Methods
-
- private void SetBlackOutDates()
- {
- if( _calendar != null )
- {
- _calendar.BlackoutDates.Clear();
-
- if( ( this.Minimum != null ) && this.Minimum.HasValue && ( this.Minimum.Value != DateTime.MinValue ) )
- {
- DateTime minDate = this.Minimum.Value;
- _calendar.BlackoutDates.Add( new CalendarDateRange( DateTime.MinValue, minDate.AddDays( -1 ) ) );
- }
- if( ( this.Maximum != null ) && this.Maximum.HasValue && ( this.Maximum.Value != DateTime.MaxValue ) )
- {
- DateTime maxDate = this.Maximum.Value;
- _calendar.BlackoutDates.Add( new CalendarDateRange( maxDate.AddDays( 1 ), DateTime.MaxValue ) );
- }
- }
- }
-
- #endregion //Methods
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index 6334e716..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,275 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml
deleted file mode 100644
index d2e08202..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml
+++ /dev/null
@@ -1,283 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeFormat.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeFormat.cs
deleted file mode 100644
index b5bba325..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeFormat.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit
-{
- public enum DateTimeFormat
- {
- Custom,
- FullDateTime,
- LongDate,
- LongTime,
- MonthDay,
- RFC1123,
- ShortDate,
- ShortTime,
- SortableDateTime,
- UniversalSortableDateTime,
- YearMonth
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeInfo.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeInfo.cs
deleted file mode 100644
index 9f17e145..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeInfo.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit
-{
- internal class DateTimeInfo
- {
- public string Content
- {
- get;
- set;
- }
- public string Format
- {
- get;
- set;
- }
- public bool IsReadOnly
- {
- get;
- set;
- }
- public int Length
- {
- get;
- set;
- }
- public int StartPosition
- {
- get;
- set;
- }
- public DateTimePart Type
- {
- get;
- set;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs
deleted file mode 100644
index 60cf05cc..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs
+++ /dev/null
@@ -1,190 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-
-namespace Xceed.Wpf.Toolkit
-{
- internal class DateTimeParser
- {
- public static bool TryParse( string value, string format, DateTime currentDate, CultureInfo cultureInfo, out DateTime result )
- {
- bool success = false;
- result = currentDate;
-
- if( string.IsNullOrEmpty( value ) || string.IsNullOrEmpty( format ) )
- return false;
-
- var dateTimeString = ComputeDateTimeString( value, format, currentDate, cultureInfo ).Trim();
-
- if( !String.IsNullOrEmpty( dateTimeString ) )
- success = DateTime.TryParse( dateTimeString, cultureInfo.DateTimeFormat, DateTimeStyles.None, out result );
-
- if( !success )
- result = currentDate;
-
- return success;
- }
-
- private static string ComputeDateTimeString( string dateTime, string format, DateTime currentDate, CultureInfo cultureInfo )
- {
- Dictionary dateParts = GetDateParts( currentDate, cultureInfo );
- string[] timeParts = new string[ 3 ] { currentDate.Hour.ToString(), currentDate.Minute.ToString(), currentDate.Second.ToString() };
- string millisecondsPart = currentDate.Millisecond.ToString();
- string designator = "";
- string[] dateTimeSeparators = new string[] { ",", " ", "-", ".", "/", cultureInfo.DateTimeFormat.DateSeparator, cultureInfo.DateTimeFormat.TimeSeparator };
-
- UpdateSortableDateTimeString( ref dateTime, ref format, cultureInfo );
-
- var dateTimeParts = new List();
- var formats = new List();
- var isContainingDateTimeSeparators = dateTimeSeparators.Any( s => dateTime.Contains( s ) );
- if( isContainingDateTimeSeparators )
- {
- dateTimeParts = dateTime.Split( dateTimeSeparators, StringSplitOptions.RemoveEmptyEntries ).ToList();
- formats = format.Split( dateTimeSeparators, StringSplitOptions.RemoveEmptyEntries ).ToList();
- }
- else
- {
- string currentformat = "";
- string currentString = "";
- var formatArray = format.ToCharArray();
- for( int i = 0; i < formatArray.Count(); ++i )
- {
- var c = formatArray[ i ];
- if( !currentformat.Contains( c ) )
- {
- if( !string.IsNullOrEmpty( currentformat ) )
- {
- formats.Add( currentformat );
- dateTimeParts.Add( currentString );
- }
- currentformat = c.ToString();
- currentString = (i < dateTime.Length) ? dateTime[ i ].ToString() : "";
- }
- else
- {
- currentformat = string.Concat( currentformat, c );
- currentString = string.Concat( currentString, (i < dateTime.Length) ? dateTime[ i ] : '\0' );
- }
- }
- if( !string.IsNullOrEmpty( currentformat ) )
- {
- formats.Add( currentformat );
- dateTimeParts.Add( currentString );
- }
- }
-
- //Auto-complete missing date parts
- if( dateTimeParts.Count < formats.Count )
- {
- while( dateTimeParts.Count != formats.Count )
- {
- dateTimeParts.Add( "0" );
- }
- }
-
- //something went wrong
- if( dateTimeParts.Count != formats.Count )
- return string.Empty;
-
- for( int i = 0; i < formats.Count; i++ )
- {
- var f = formats[ i ];
- if( !f.Contains( "ddd" ) && !f.Contains( "GMT" ) )
- {
- if( f.Contains( "M" ) )
- dateParts[ "Month" ] = dateTimeParts[ i ];
- else if( f.Contains( "d" ) )
- dateParts[ "Day" ] = dateTimeParts[ i ];
- else if( f.Contains( "y" ) )
- {
- dateParts[ "Year" ] = dateTimeParts[ i ] != "0" ? dateTimeParts[ i ] : "0000";
-
- if( dateParts[ "Year" ].Length == 2 )
- dateParts[ "Year" ] = string.Format( "{0}{1}", currentDate.Year / 100, dateParts[ "Year" ] );
- }
- else if( f.Contains( "h" ) || f.Contains( "H" ) )
- timeParts[ 0 ] = dateTimeParts[ i ];
- else if( f.Contains( "m" ) )
- timeParts[ 1 ] = dateTimeParts[ i ];
- else if( f.Contains( "s" ) )
- timeParts[ 2 ] = dateTimeParts[ i ];
- else if( f.Contains( "f" ) )
- millisecondsPart = dateTimeParts[ i ];
- else if( f.Contains( "t" ) )
- designator = dateTimeParts[ i ];
- }
- }
-
- var date = string.Join( cultureInfo.DateTimeFormat.DateSeparator, dateParts.Select( x => x.Value ).ToArray() );
- var time = string.Join( cultureInfo.DateTimeFormat.TimeSeparator, timeParts );
- time += "." + millisecondsPart;
-
- return String.Format( "{0} {1} {2}", date, time, designator );
- }
-
- private static void UpdateSortableDateTimeString( ref string dateTime, ref string format, CultureInfo cultureInfo )
- {
- if( format == cultureInfo.DateTimeFormat.SortableDateTimePattern )
- {
- format = format.Replace( "'", "" ).Replace( "T", " " );
- dateTime = dateTime.Replace( "'", "" ).Replace( "T", " " );
- }
- else if( format == cultureInfo.DateTimeFormat.UniversalSortableDateTimePattern )
- {
- format = format.Replace( "'", "" ).Replace( "Z", "" );
- dateTime = dateTime.Replace( "'", "" ).Replace( "Z", "" );
- }
- }
-
- private static Dictionary GetDateParts( DateTime currentDate, CultureInfo cultureInfo )
- {
- Dictionary dateParts = new Dictionary();
- var dateTimeSeparators = new[] { ",", " ", "-", ".", "/", cultureInfo.DateTimeFormat.DateSeparator, cultureInfo.DateTimeFormat.TimeSeparator };
- var dateFormatParts = cultureInfo.DateTimeFormat.ShortDatePattern.Split( dateTimeSeparators, StringSplitOptions.RemoveEmptyEntries ).ToList();
- dateFormatParts.ForEach( item =>
- {
- string key = string.Empty;
- string value = string.Empty;
-
- if( item.Contains( "M" ) )
- {
- key = "Month";
- value = currentDate.Month.ToString();
- }
- else if( item.Contains( "d" ) )
- {
- key = "Day";
- value = currentDate.Day.ToString();
- }
- else if( item.Contains( "y" ) )
- {
- key = "Year";
- value = currentDate.Year.ToString("D4");
- }
- if( !dateParts.ContainsKey( key ) )
- {
- dateParts.Add( key, value );
- }
- } );
- return dateParts;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimePart.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimePart.cs
deleted file mode 100644
index bc3b660e..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimePart.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit
-{
- public enum DateTimePart
- {
- Day,
- DayName,
- AmPmDesignator,
- Millisecond,
- Hour12,
- Hour24,
- Minute,
- Month,
- MonthName,
- Other,
- Period,
- TimeZone,
- Second,
- Year
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs
deleted file mode 100644
index 344516f9..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs
+++ /dev/null
@@ -1,963 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Globalization;
-using System.Windows;
-using Xceed.Wpf.Toolkit.Primitives;
-using System.Windows.Controls;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class DateTimeUpDown : DateTimeUpDownBase
- {
- #region Members
-
- private DateTime? _lastValidDate; //null
- private bool _setKindInternal = false;
-
- #endregion
-
- #region Properties
-
- #region Format
-
- public static readonly DependencyProperty FormatProperty = DependencyProperty.Register( "Format", typeof( DateTimeFormat ), typeof( DateTimeUpDown ), new UIPropertyMetadata( DateTimeFormat.FullDateTime, OnFormatChanged ) );
- public DateTimeFormat Format
- {
- get
- {
- return ( DateTimeFormat )GetValue( FormatProperty );
- }
- set
- {
- SetValue( FormatProperty, value );
- }
- }
-
- private static void OnFormatChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- DateTimeUpDown dateTimeUpDown = o as DateTimeUpDown;
- if( dateTimeUpDown != null )
- dateTimeUpDown.OnFormatChanged( ( DateTimeFormat )e.OldValue, ( DateTimeFormat )e.NewValue );
- }
-
- protected virtual void OnFormatChanged( DateTimeFormat oldValue, DateTimeFormat newValue )
- {
- FormatUpdated();
- }
-
- #endregion //Format
-
- #region FormatString
-
- public static readonly DependencyProperty FormatStringProperty = DependencyProperty.Register( "FormatString", typeof( string ), typeof( DateTimeUpDown ), new UIPropertyMetadata( default( String ), OnFormatStringChanged ), IsFormatStringValid );
- public string FormatString
- {
- get
- {
- return ( string )GetValue( FormatStringProperty );
- }
- set
- {
- SetValue( FormatStringProperty, value );
- }
- }
-
- internal static bool IsFormatStringValid( object value )
- {
- try
- {
- // Test the format string if it is used.
- DateTime.MinValue.ToString( ( string )value, CultureInfo.CurrentCulture );
- }
- catch
- {
- return false;
- }
-
- return true;
- }
-
- private static void OnFormatStringChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- DateTimeUpDown dateTimeUpDown = o as DateTimeUpDown;
- if( dateTimeUpDown != null )
- dateTimeUpDown.OnFormatStringChanged( ( string )e.OldValue, ( string )e.NewValue );
- }
-
- protected virtual void OnFormatStringChanged( string oldValue, string newValue )
- {
- FormatUpdated();
- }
-
- #endregion //FormatString
-
- #region Kind
-
- public static readonly DependencyProperty KindProperty = DependencyProperty.Register( "Kind", typeof( DateTimeKind ), typeof( DateTimeUpDown ),
- new FrameworkPropertyMetadata( DateTimeKind.Unspecified, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnKindChanged ) );
- public DateTimeKind Kind
- {
- get
- {
- return ( DateTimeKind )GetValue( KindProperty );
- }
- set
- {
- SetValue( KindProperty, value );
- }
- }
-
- private static void OnKindChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- DateTimeUpDown dateTimeUpDown = o as DateTimeUpDown;
- if( dateTimeUpDown != null )
- dateTimeUpDown.OnKindChanged( ( DateTimeKind )e.OldValue, ( DateTimeKind )e.NewValue );
- }
-
- protected virtual void OnKindChanged( DateTimeKind oldValue, DateTimeKind newValue )
- {
- //Upate the value based on kind. (Postpone to EndInit if not yet initialized)
- if( !_setKindInternal
- && this.Value != null
- && this.IsInitialized )
- {
- this.Value = this.ConvertToKind( this.Value.Value, newValue );
- }
- }
-
- private void SetKindInternal( DateTimeKind kind )
- {
- _setKindInternal = true;
- try
- {
-#if VS2008
- // Warning : Binding could be lost
- this.Kind = kind;
-#else
- //We use SetCurrentValue to not erase the possible underlying
- //OneWay Binding. (This will also update correctly any
- //possible TwoWay bindings).
- this.SetCurrentValue( DateTimeUpDown.KindProperty, kind );
-#endif
- }
- finally
- {
- _setKindInternal = false;
- }
- }
-
- #endregion //Kind
-
- #region ContextNow (Private)
-
- internal DateTime ContextNow
- {
- get
- {
- return DateTimeUtilities.GetContextNow( this.Kind );
- }
- }
-
- #endregion
-
- #endregion //Properties
-
- #region Constructors
-
- static DateTimeUpDown()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( DateTimeUpDown ), new FrameworkPropertyMetadata( typeof( DateTimeUpDown ) ) );
- MaximumProperty.OverrideMetadata( typeof( DateTimeUpDown ), new FrameworkPropertyMetadata( DateTime.MaxValue ) );
- MinimumProperty.OverrideMetadata( typeof( DateTimeUpDown ), new FrameworkPropertyMetadata( DateTime.MinValue ) );
- UpdateValueOnEnterKeyProperty.OverrideMetadata( typeof( DateTimeUpDown ), new FrameworkPropertyMetadata( true ) );
- }
-
- public DateTimeUpDown()
- {
- this.Loaded += this.DateTimeUpDown_Loaded;
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- public override bool CommitInput()
- {
- bool isSyncValid = this.SyncTextAndValueProperties( true, Text );
- _lastValidDate = this.Value;
- return isSyncValid;
- }
-
- protected override void OnCultureInfoChanged( CultureInfo oldValue, CultureInfo newValue )
- {
- FormatUpdated();
- }
-
- protected override void OnIncrement()
- {
- if( this.IsCurrentValueValid() )
- {
- this.Increment( this.Step );
- }
- }
-
- protected override void OnDecrement()
- {
- if( this.IsCurrentValueValid() )
- {
- this.Increment( -this.Step );
- }
- }
-
- protected override void OnTextChanged( string previousValue, string currentValue )
- {
- if( !_processTextChanged )
- return;
-
- base.OnTextChanged( previousValue, currentValue );
- }
-
- protected override DateTime? ConvertTextToValue( string text )
- {
- if( string.IsNullOrEmpty( text ) )
- return null;
-
- DateTime result;
- this.TryParseDateTime( text, out result );
-
- //Do not force "unspecified" to a time-zone specific
- //parsed text value. This would result in a lost of precision and
- //corrupt data. Let the value impose the Kind to the
- //DateTimePicker.
- if( this.Kind != DateTimeKind.Unspecified )
- {
-
- //Keep the current kind (Local or Utc)
- //by imposing it to the parsed text value.
- //
- //Note: A parsed UTC text value may be
- // adjusted with a Local kind and time.
- result = this.ConvertToKind( result, this.Kind );
- }
-
- if( this.ClipValueToMinMax )
- {
- return this.GetClippedMinMaxValue( result );
- }
-
- this.ValidateDefaultMinMax( result );
-
- return result;
- }
-
- protected override string ConvertValueToText()
- {
- if( Value == null )
- return string.Empty;
-
- return Value.Value.ToString( GetFormatString( Format ), CultureInfo );
- }
-
- protected override void SetValidSpinDirection()
- {
- ValidSpinDirections validDirections = ValidSpinDirections.None;
-
- if( !IsReadOnly )
- {
- if( this.IsLowerThan( this.Value, this.Maximum ) || !this.Value.HasValue || !this.Maximum.HasValue )
- validDirections = validDirections | ValidSpinDirections.Increase;
-
- if( this.IsGreaterThan( this.Value, this.Minimum ) || !this.Value.HasValue || !this.Minimum.HasValue )
- validDirections = validDirections | ValidSpinDirections.Decrease;
- }
-
- if( this.Spinner != null )
- this.Spinner.ValidSpinDirection = validDirections;
- }
-
- protected override object OnCoerceValue( object newValue )
- {
- //Since only changing the "kind" of a date
- //Ex. "2001-01-01 12:00 AM, Kind=Utc" to "2001-01-01 12:00 AM Kind=Local"
- //by setting the "Value" property won't trigger a property changed,
- //but will call this callback (coerce), we update the Kind here.
- DateTime? value = ( DateTime? )base.OnCoerceValue( newValue );
-
- //Let the initialized determine the final "kind" value.
- if(value != null && this.IsInitialized)
- {
- //Update kind based on value kind
- this.SetKindInternal( value.Value.Kind );
- }
-
- return value;
- }
-
- protected override void OnValueChanged( DateTime? oldValue, DateTime? newValue )
- {
- DateTimeInfo info = _selectedDateTimeInfo;
-
- //this only occurs when the user manually type in a value for the Value Property
- if( info == null )
- info = (this.CurrentDateTimePart != DateTimePart.Other) ? this.GetDateTimeInfo( this.CurrentDateTimePart ) : _dateTimeInfoList[ 0 ];
-
- //whenever the value changes we need to parse out the value into out DateTimeInfo segments so we can keep track of the individual pieces
- //but only if it is not null
- if( newValue != null )
- ParseValueIntoDateTimeInfo( this.Value );
-
- base.OnValueChanged( oldValue, newValue );
-
- if( !_isTextChangedFromUI )
- {
- _lastValidDate = newValue;
- }
-
- if( TextBox != null )
- {
- //we loose our selection when the Value is set so we need to reselect it without firing the selection changed event
- _fireSelectionChangedEvent = false;
- TextBox.Select( info.StartPosition, info.Length );
- _fireSelectionChangedEvent = true;
- }
- }
-
- protected override bool IsCurrentValueValid()
- {
- DateTime result;
-
- if( string.IsNullOrEmpty( this.TextBox.Text ) )
- return true;
-
- return this.TryParseDateTime( this.TextBox.Text, out result );
- }
-
- protected override void OnInitialized( EventArgs e )
- {
- base.OnInitialized( e );
- if( this.Value != null )
- {
- DateTimeKind valueKind = this.Value.Value.Kind;
-
- if( valueKind != this.Kind )
- {
- //Conflit between "Kind" property and the "Value.Kind" value.
- //Priority to the one that is not "Unspecified".
- if( this.Kind == DateTimeKind.Unspecified )
- {
- this.SetKindInternal( valueKind );
- }
- else
- {
- this.Value = this.ConvertToKind( this.Value.Value, this.Kind );
- }
- }
- }
- }
-
- protected override void PerformMouseSelection()
- {
- if( this.UpdateValueOnEnterKey )
- {
- this.ParseValueIntoDateTimeInfo( this.ConvertTextToValue( this.TextBox.Text ) );
- }
- base.PerformMouseSelection();
- }
-
- protected internal override void PerformKeyboardSelection( int nextSelectionStart )
- {
- if( this.UpdateValueOnEnterKey )
- {
- this.ParseValueIntoDateTimeInfo( this.ConvertTextToValue( this.TextBox.Text ) );
- }
- base.PerformKeyboardSelection( nextSelectionStart );
- }
-
- protected override void InitializeDateTimeInfoList( DateTime? value )
- {
- _dateTimeInfoList.Clear();
- _selectedDateTimeInfo = null;
-
- string format = GetFormatString( Format );
-
- if( string.IsNullOrEmpty( format ) )
- return;
-
- while( format.Length > 0 )
- {
- int elementLength = GetElementLengthByFormat( format );
- DateTimeInfo info = null;
-
- switch( format[ 0 ] )
- {
- case '"':
- case '\'':
- {
- int closingQuotePosition = format.IndexOf( format[ 0 ], 1 );
- info = new DateTimeInfo
- {
- IsReadOnly = true,
- Type = DateTimePart.Other,
- Length = 1,
- Content = format.Substring( 1, Math.Max( 1, closingQuotePosition - 1 ) )
- };
- elementLength = Math.Max( 1, closingQuotePosition + 1 );
- break;
- }
- case 'D':
- case 'd':
- {
- string d = format.Substring( 0, elementLength );
- if( elementLength == 1 )
- d = "%" + d;
-
- if( elementLength > 2 )
- info = new DateTimeInfo
- {
- IsReadOnly = true,
- Type = DateTimePart.DayName,
- Length = elementLength,
- Format = d
- };
- else
- info = new DateTimeInfo
- {
- IsReadOnly = false,
- Type = DateTimePart.Day,
- Length = elementLength,
- Format = d
- };
- break;
- }
- case 'F':
- case 'f':
- {
- string f = format.Substring( 0, elementLength );
- if( elementLength == 1 )
- f = "%" + f;
-
- info = new DateTimeInfo
- {
- IsReadOnly = false,
- Type = DateTimePart.Millisecond,
- Length = elementLength,
- Format = f
- };
- break;
- }
- case 'h':
- {
- string h = format.Substring( 0, elementLength );
- if( elementLength == 1 )
- h = "%" + h;
-
- info = new DateTimeInfo
- {
- IsReadOnly = false,
- Type = DateTimePart.Hour12,
- Length = elementLength,
- Format = h
- };
- break;
- }
- case 'H':
- {
- string H = format.Substring( 0, elementLength );
- if( elementLength == 1 )
- H = "%" + H;
-
- info = new DateTimeInfo
- {
- IsReadOnly = false,
- Type = DateTimePart.Hour24,
- Length = elementLength,
- Format = H
- };
- break;
- }
- case 'M':
- {
- string M = format.Substring( 0, elementLength );
- if( elementLength == 1 )
- M = "%" + M;
-
- if( elementLength >= 3 )
- info = new DateTimeInfo
- {
- IsReadOnly = false,
- Type = DateTimePart.MonthName,
- Length = elementLength,
- Format = M
- };
- else
- info = new DateTimeInfo
- {
- IsReadOnly = false,
- Type = DateTimePart.Month,
- Length = elementLength,
- Format = M
- };
- break;
- }
- case 'S':
- case 's':
- {
- string s = format.Substring( 0, elementLength );
- if( elementLength == 1 )
- s = "%" + s;
-
- info = new DateTimeInfo
- {
- IsReadOnly = false,
- Type = DateTimePart.Second,
- Length = elementLength,
- Format = s
- };
- break;
- }
- case 'T':
- case 't':
- {
- string t = format.Substring( 0, elementLength );
- if( elementLength == 1 )
- t = "%" + t;
-
- info = new DateTimeInfo
- {
- IsReadOnly = false,
- Type = DateTimePart.AmPmDesignator,
- Length = elementLength,
- Format = t
- };
- break;
- }
- case 'Y':
- case 'y':
- {
- string y = format.Substring( 0, elementLength );
- if( elementLength == 1 )
- y = "%" + y;
-
- info = new DateTimeInfo
- {
- IsReadOnly = false,
- Type = DateTimePart.Year,
- Length = elementLength,
- Format = y
- };
- break;
- }
- case '\\':
- {
- if( format.Length >= 2 )
- {
- info = new DateTimeInfo
- {
- IsReadOnly = true,
- Content = format.Substring( 1, 1 ),
- Length = 1,
- Type = DateTimePart.Other
- };
- elementLength = 2;
- }
- break;
- }
- case 'g':
- {
- string g = format.Substring( 0, elementLength );
- if( elementLength == 1 )
- g = "%" + g;
-
- info = new DateTimeInfo
- {
- IsReadOnly = true,
- Type = DateTimePart.Period,
- Length = elementLength,
- Format = format.Substring( 0, elementLength )
- };
- break;
- }
- case 'm':
- {
- string m = format.Substring( 0, elementLength );
- if( elementLength == 1 )
- m = "%" + m;
-
- info = new DateTimeInfo
- {
- IsReadOnly = false,
- Type = DateTimePart.Minute,
- Length = elementLength,
- Format = m
- };
- break;
- }
- case 'z':
- {
- string z = format.Substring( 0, elementLength );
- if( elementLength == 1 )
- z = "%" + z;
-
- info = new DateTimeInfo
- {
- IsReadOnly = true,
- Type = DateTimePart.TimeZone,
- Length = elementLength,
- Format = z
- };
- break;
- }
- default:
- {
- elementLength = 1;
- info = new DateTimeInfo
- {
- IsReadOnly = true,
- Length = 1,
- Content = format[ 0 ].ToString(),
- Type = DateTimePart.Other
- };
- break;
- }
- }
-
- _dateTimeInfoList.Add( info );
- format = format.Substring( elementLength );
- }
- }
-
- protected override bool IsLowerThan( DateTime? value1, DateTime? value2 )
- {
- if( value1 == null || value2 == null )
- return false;
-
- return (value1.Value < value2.Value);
- }
-
- protected override bool IsGreaterThan( DateTime? value1, DateTime? value2 )
- {
- if( value1 == null || value2 == null )
- return false;
-
- return (value1.Value > value2.Value);
- }
-
- protected override void OnUpdateValueOnEnterKeyChanged( bool oldValue, bool newValue )
- {
- throw new NotSupportedException( "DateTimeUpDown controls do not support modifying UpdateValueOnEnterKey property." );
- }
-
-
-#endregion //Base Class Overrides
-
- #region Methods
-
- public void SelectAll()
- {
- _fireSelectionChangedEvent = false;
- TextBox.SelectAll();
- _fireSelectionChangedEvent = true;
- }
-
- private void FormatUpdated()
- {
- InitializeDateTimeInfoList( this.Value );
- if( Value != null )
- ParseValueIntoDateTimeInfo( this.Value );
-
- // Update the Text representation of the value.
- _processTextChanged = false;
-
- this.SyncTextAndValueProperties( false, null );
-
- _processTextChanged = true;
-
- }
-
- private static int GetElementLengthByFormat( string format )
- {
- for( int i = 1; i < format.Length; i++ )
- {
- if( String.Compare( format[ i ].ToString(), format[ 0 ].ToString(), false ) != 0 )
- {
- return i;
- }
- }
- return format.Length;
- }
-
- private void Increment( int step )
- {
- _fireSelectionChangedEvent = false;
-
- var currentValue = this.ConvertTextToValue( this.TextBox.Text );
- if( currentValue.HasValue )
- {
- var newValue = this.UpdateDateTime( currentValue, step );
- this.TextBox.Text = newValue.Value.ToString( this.GetFormatString( this.Format ), this.CultureInfo );
- }
- else
- {
- this.TextBox.Text = ( this.DefaultValue != null )
- ? this.DefaultValue.Value.ToString( this.GetFormatString( this.Format ), this.CultureInfo )
- : this.ContextNow.ToString( this.GetFormatString( this.Format ), this.CultureInfo );
- }
-
- if( this.TextBox != null )
- {
- DateTimeInfo info = _selectedDateTimeInfo;
- //this only occurs when the user manually type in a value for the Value Property
- if( info == null )
- info = ( this.CurrentDateTimePart != DateTimePart.Other ) ? this.GetDateTimeInfo( this.CurrentDateTimePart ) : _dateTimeInfoList[ 0 ];
-
- //whenever the value changes we need to parse out the value into out DateTimeInfo segments so we can keep track of the individual pieces
- this.ParseValueIntoDateTimeInfo( this.ConvertTextToValue( this.TextBox.Text ) );
-
- //we loose our selection when the Value is set so we need to reselect it without firing the selection changed event
- this.TextBox.Select( info.StartPosition, info.Length );
- }
- _fireSelectionChangedEvent = true;
-
- this.SyncTextAndValueProperties( true, Text );
- }
-
- private void ParseValueIntoDateTimeInfo( DateTime? newDate )
- {
- string text = string.Empty;
-
- _dateTimeInfoList.ForEach( info =>
- {
- if( info.Format == null )
- {
- info.StartPosition = text.Length;
- info.Length = info.Content.Length;
- text += info.Content;
- }
- else if( newDate != null )
- {
- DateTime date = newDate.Value;
- info.StartPosition = text.Length;
- info.Content = date.ToString( info.Format, CultureInfo.DateTimeFormat );
- info.Length = info.Content.Length;
- text += info.Content;
- }
- } );
- }
-
- internal string GetFormatString( DateTimeFormat dateTimeFormat )
- {
- switch( dateTimeFormat )
- {
- case DateTimeFormat.ShortDate:
- return CultureInfo.DateTimeFormat.ShortDatePattern;
- case DateTimeFormat.LongDate:
- return CultureInfo.DateTimeFormat.LongDatePattern;
- case DateTimeFormat.ShortTime:
- return CultureInfo.DateTimeFormat.ShortTimePattern;
- case DateTimeFormat.LongTime:
- return CultureInfo.DateTimeFormat.LongTimePattern;
- case DateTimeFormat.FullDateTime:
- return CultureInfo.DateTimeFormat.FullDateTimePattern;
- case DateTimeFormat.MonthDay:
- return CultureInfo.DateTimeFormat.MonthDayPattern;
- case DateTimeFormat.RFC1123:
- return CultureInfo.DateTimeFormat.RFC1123Pattern;
- case DateTimeFormat.SortableDateTime:
- return CultureInfo.DateTimeFormat.SortableDateTimePattern;
- case DateTimeFormat.UniversalSortableDateTime:
- return CultureInfo.DateTimeFormat.UniversalSortableDateTimePattern;
- case DateTimeFormat.YearMonth:
- return CultureInfo.DateTimeFormat.YearMonthPattern;
- case DateTimeFormat.Custom:
- {
- switch( this.FormatString )
- {
- case "d":
- return CultureInfo.DateTimeFormat.ShortDatePattern;
- case "t":
- return CultureInfo.DateTimeFormat.ShortTimePattern;
- case "T":
- return CultureInfo.DateTimeFormat.LongTimePattern;
- case "D":
- return CultureInfo.DateTimeFormat.LongDatePattern;
- case "f":
- return CultureInfo.DateTimeFormat.LongDatePattern + " " + CultureInfo.DateTimeFormat.ShortTimePattern;
- case "F":
- return CultureInfo.DateTimeFormat.FullDateTimePattern;
- case "g":
- return CultureInfo.DateTimeFormat.ShortDatePattern + " " + CultureInfo.DateTimeFormat.ShortTimePattern;
- case "G":
- return CultureInfo.DateTimeFormat.ShortDatePattern + " " + CultureInfo.DateTimeFormat.LongTimePattern;
- case "m":
- return CultureInfo.DateTimeFormat.MonthDayPattern;
- case "y":
- return CultureInfo.DateTimeFormat.YearMonthPattern;
- case "r":
- return CultureInfo.DateTimeFormat.RFC1123Pattern;
- case "s":
- return CultureInfo.DateTimeFormat.SortableDateTimePattern;
- case "u":
- return CultureInfo.DateTimeFormat.UniversalSortableDateTimePattern;
- default:
- return FormatString;
- }
- }
- default:
- throw new ArgumentException( "Not a supported format" );
- }
- }
-
- private DateTime? UpdateDateTime( DateTime? currentDateTime, int value )
- {
- DateTimeInfo info = _selectedDateTimeInfo;
-
- //this only occurs when the user manually type in a value for the Value Property
- if( info == null )
- info = (this.CurrentDateTimePart != DateTimePart.Other) ? this.GetDateTimeInfo( this.CurrentDateTimePart ) : _dateTimeInfoList[ 0 ];
-
- DateTime? result = null;
-
- try
- {
- switch( info.Type )
- {
- case DateTimePart.Year:
- {
- result = ( ( DateTime )currentDateTime).AddYears( value );
- break;
- }
- case DateTimePart.Month:
- case DateTimePart.MonthName:
- {
- result = ( ( DateTime )currentDateTime).AddMonths( value );
- break;
- }
- case DateTimePart.Day:
- case DateTimePart.DayName:
- {
- result = ( ( DateTime )currentDateTime).AddDays( value );
- break;
- }
- case DateTimePart.Hour12:
- case DateTimePart.Hour24:
- {
- result = ( ( DateTime )currentDateTime).AddHours( value );
- break;
- }
- case DateTimePart.Minute:
- {
- result = ( ( DateTime )currentDateTime).AddMinutes( value );
- break;
- }
- case DateTimePart.Second:
- {
- result = ( ( DateTime )currentDateTime).AddSeconds( value );
- break;
- }
- case DateTimePart.Millisecond:
- {
- result = ( ( DateTime )currentDateTime).AddMilliseconds( value );
- break;
- }
- case DateTimePart.AmPmDesignator:
- {
- result = ( ( DateTime )currentDateTime).AddHours( value * 12 );
- break;
- }
- default:
- {
- break;
- }
- }
- }
- catch
- {
- //this can occur if the date/time = 1/1/0001 12:00:00 AM which is the smallest date allowed.
- //I could write code that would validate the date each and everytime but I think that it would be more
- //efficient if I just handle the edge case and allow an exeption to occur and swallow it instead.
- }
-
- return this.CoerceValueMinMax( result );
- }
-
- private bool TryParseDateTime( string text, out DateTime result )
- {
- bool isValid = false;
- result = this.ContextNow;
-
- DateTime current = this.ContextNow;
- try
- {
- current = (this.Value.HasValue)
- ? this.Value.Value
- : DateTime.Parse( this.ContextNow.ToString(), this.CultureInfo.DateTimeFormat );
-
- isValid = DateTimeParser.TryParse( text, this.GetFormatString( Format ), current, this.CultureInfo, out result );
- }
- catch( FormatException )
- {
- isValid = false;
- }
-
- if( !isValid )
- {
- isValid = DateTime.TryParseExact( text, this.GetFormatString( this.Format ), this.CultureInfo, DateTimeStyles.None, out result );
- }
-
- if( !isValid )
- {
- result = ( _lastValidDate != null ) ? _lastValidDate.Value : current;
- }
-
- return isValid;
- }
-
- private DateTime ConvertToKind( DateTime dateTime, DateTimeKind kind )
- {
- //Same kind, just return same value.
- if( kind == dateTime.Kind )
- return dateTime;
-
- //"ToLocalTime()" from an unspecified will assume
- // That the time was originaly Utc and affect the datetime value.
- // Just "Force" the "Kind" instead.
- if( dateTime.Kind == DateTimeKind.Unspecified
- || kind == DateTimeKind.Unspecified )
- return DateTime.SpecifyKind( dateTime, kind );
-
- return ( kind == DateTimeKind.Local )
- ? dateTime.ToLocalTime()
- : dateTime.ToUniversalTime();
- }
-
- #endregion //Methods
-
- #region Event Handlers
-
- private void DateTimeUpDown_Loaded( object sender, RoutedEventArgs e )
- {
- if( ( this.Format == DateTimeFormat.Custom ) && ( string.IsNullOrEmpty( this.FormatString ) ) )
- {
- throw new InvalidOperationException( "A FormatString is necessary when Format is set to Custom." );
- }
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index e60fb629..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Themes/Generic.xaml
deleted file mode 100644
index bae925ff..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Themes/Generic.xaml
+++ /dev/null
@@ -1,128 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs
deleted file mode 100644
index 11b77e7a..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs
+++ /dev/null
@@ -1,562 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.ComponentModel;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Input;
-using Xceed.Wpf.Toolkit.Primitives;
-using System.Windows.Media;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-
-namespace Xceed.Wpf.Toolkit
-{
- [TemplatePart( Name = PART_DropDownButton, Type = typeof( ToggleButton ) )]
- [TemplatePart( Name = PART_ContentPresenter, Type = typeof( ContentPresenter ) )]
- [TemplatePart( Name = PART_Popup, Type = typeof( Popup ) )]
- public class DropDownButton : ContentControl, ICommandSource
- {
- private const string PART_DropDownButton = "PART_DropDownButton";
- private const string PART_ContentPresenter = "PART_ContentPresenter";
- private const string PART_Popup = "PART_Popup";
-
- #region Members
-
- private ContentPresenter _contentPresenter;
- private Popup _popup;
-
- #endregion
-
- #region Constructors
-
- static DropDownButton()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( DropDownButton ), new FrameworkPropertyMetadata( typeof( DropDownButton ) ) );
-
- EventManager.RegisterClassHandler( typeof( DropDownButton ), AccessKeyManager.AccessKeyPressedEvent, new AccessKeyPressedEventHandler( OnAccessKeyPressed ) );
- }
-
- public DropDownButton()
- {
- Keyboard.AddKeyDownHandler( this, OnKeyDown );
- Mouse.AddPreviewMouseDownOutsideCapturedElementHandler( this, OnMouseDownOutsideCapturedElement );
- }
-
- #endregion //Constructors
-
- #region Properties
-
- private System.Windows.Controls.Primitives.ButtonBase _button;
- protected System.Windows.Controls.Primitives.ButtonBase Button
- {
- get
- {
- return _button;
- }
- set
- {
- if( _button != null )
- _button.Click -= DropDownButton_Click;
-
- _button = value;
-
- if( _button != null )
- _button.Click += DropDownButton_Click;
- }
- }
-
- #region DropDownContent
-
- public static readonly DependencyProperty DropDownContentProperty = DependencyProperty.Register( "DropDownContent", typeof( object ), typeof( DropDownButton ), new UIPropertyMetadata( null, OnDropDownContentChanged ) );
- public object DropDownContent
- {
- get
- {
- return ( object )GetValue( DropDownContentProperty );
- }
- set
- {
- SetValue( DropDownContentProperty, value );
- }
- }
-
- private static void OnDropDownContentChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- DropDownButton dropDownButton = o as DropDownButton;
- if( dropDownButton != null )
- dropDownButton.OnDropDownContentChanged( ( object )e.OldValue, ( object )e.NewValue );
- }
-
- protected virtual void OnDropDownContentChanged( object oldValue, object newValue )
- {
- // TODO: Add your property changed side-effects. Descendants can override as well.
- }
-
- #endregion //DropDownContent
-
- #region DropDownContentBackground
-
- public static readonly DependencyProperty DropDownContentBackgroundProperty = DependencyProperty.Register( "DropDownContentBackground", typeof( Brush ), typeof( DropDownButton ), new UIPropertyMetadata( null ) );
- public Brush DropDownContentBackground
- {
- get
- {
- return ( Brush )GetValue( DropDownContentBackgroundProperty );
- }
- set
- {
- SetValue( DropDownContentBackgroundProperty, value );
- }
- }
-
- #endregion //DropDownContentBackground
-
- #region DropDownPosition
-
- public static readonly DependencyProperty DropDownPositionProperty = DependencyProperty.Register( "DropDownPosition", typeof( PlacementMode )
- , typeof( DropDownButton ), new UIPropertyMetadata( PlacementMode.Bottom ) );
- public PlacementMode DropDownPosition
- {
- get
- {
- return (PlacementMode)GetValue( DropDownPositionProperty );
- }
- set
- {
- SetValue( DropDownPositionProperty, value );
- }
- }
-
- #endregion
-
- #region IsDefault
-
- public static readonly DependencyProperty IsDefaultProperty = DependencyProperty.Register( "IsDefault", typeof( bool ), typeof( DropDownButton ), new UIPropertyMetadata( false, OnIsDefaultChanged ) );
- public bool IsDefault
- {
- get
- {
- return ( bool )GetValue( IsDefaultProperty );
- }
- set
- {
- SetValue( IsDefaultProperty, value );
- }
- }
-
- private static void OnIsDefaultChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- var dropDownButton = o as DropDownButton;
- if( dropDownButton != null )
- dropDownButton.OnIsDefaultChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- protected virtual void OnIsDefaultChanged( bool oldValue, bool newValue )
- {
- if( newValue )
- {
- AccessKeyManager.Register( "\r", this );
- }
- else
- {
- AccessKeyManager.Unregister( "\r", this );
- }
- }
-
- #endregion //IsDefault
-
- #region IsOpen
-
- public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register( "IsOpen", typeof( bool ), typeof( DropDownButton ), new UIPropertyMetadata( false, OnIsOpenChanged ) );
- public bool IsOpen
- {
- get
- {
- return ( bool )GetValue( IsOpenProperty );
- }
- set
- {
- SetValue( IsOpenProperty, value );
- }
- }
-
- private static void OnIsOpenChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- DropDownButton dropDownButton = o as DropDownButton;
- if( dropDownButton != null )
- dropDownButton.OnIsOpenChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- protected virtual void OnIsOpenChanged( bool oldValue, bool newValue )
- {
- if( newValue )
- RaiseRoutedEvent( DropDownButton.OpenedEvent );
- else
- RaiseRoutedEvent( DropDownButton.ClosedEvent );
- }
-
- #endregion //IsOpen
-
- #region MaxDropDownHeight
-
- public static readonly DependencyProperty MaxDropDownHeightProperty = DependencyProperty.Register( "MaxDropDownHeight", typeof( double )
- , typeof( DropDownButton ), new UIPropertyMetadata( SystemParameters.PrimaryScreenHeight / 2.0, OnMaxDropDownHeightChanged ) );
- public double MaxDropDownHeight
- {
- get
- {
- return (double)GetValue( MaxDropDownHeightProperty );
- }
- set
- {
- SetValue( MaxDropDownHeightProperty, value );
- }
- }
-
- private static void OnMaxDropDownHeightChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- var dropDownButton = o as DropDownButton;
- if( dropDownButton != null )
- dropDownButton.OnMaxDropDownHeightChanged( (double)e.OldValue, (double)e.NewValue );
- }
-
- protected virtual void OnMaxDropDownHeightChanged( double oldValue, double newValue )
- {
- // TODO: Add your property changed side-effects. Descendants can override as well.
- }
-
- #endregion
-
- #endregion //Properties
-
- #region Base Class Overrides
-
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
- this.Button = this.GetTemplateChild( PART_DropDownButton ) as ToggleButton;
-
- _contentPresenter = GetTemplateChild( PART_ContentPresenter ) as ContentPresenter;
-
- if( _popup != null )
- _popup.Opened -= Popup_Opened;
-
- _popup = GetTemplateChild( PART_Popup ) as Popup;
-
- if( _popup != null )
- _popup.Opened += Popup_Opened;
- }
-
- protected override void OnIsKeyboardFocusWithinChanged( DependencyPropertyChangedEventArgs e )
- {
- base.OnIsKeyboardFocusWithinChanged( e );
- if( !( bool )e.NewValue )
- {
- this.CloseDropDown( false );
- }
- }
-
- protected override void OnGotFocus( RoutedEventArgs e )
- {
- base.OnGotFocus( e );
- if( this.Button != null )
- {
- this.Button.Focus();
- }
- }
-
- protected override void OnAccessKey( AccessKeyEventArgs e )
- {
- if( e.IsMultiple )
- {
- base.OnAccessKey( e );
- }
- else
- {
- this.OnClick();
- }
- }
-
- #endregion //Base Class Overrides
-
- #region Events
-
- public static readonly RoutedEvent ClickEvent = EventManager.RegisterRoutedEvent( "Click", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( DropDownButton ) );
- public event RoutedEventHandler Click
- {
- add
- {
- AddHandler( ClickEvent, value );
- }
- remove
- {
- RemoveHandler( ClickEvent, value );
- }
- }
-
- public static readonly RoutedEvent OpenedEvent = EventManager.RegisterRoutedEvent( "Opened", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( DropDownButton ) );
- public event RoutedEventHandler Opened
- {
- add
- {
- AddHandler( OpenedEvent, value );
- }
- remove
- {
- RemoveHandler( OpenedEvent, value );
- }
- }
-
- public static readonly RoutedEvent ClosedEvent = EventManager.RegisterRoutedEvent( "Closed", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( DropDownButton ) );
- public event RoutedEventHandler Closed
- {
- add
- {
- AddHandler( ClosedEvent, value );
- }
- remove
- {
- RemoveHandler( ClosedEvent, value );
- }
- }
-
- #endregion //Events
-
- #region Event Handlers
-
- private static void OnAccessKeyPressed( object sender, AccessKeyPressedEventArgs e )
- {
- if( !e.Handled && ( e.Scope == null ) && ( e.Target == null ) )
- {
- e.Target = sender as DropDownButton;
- }
- }
-
- private void OnKeyDown( object sender, KeyEventArgs e )
- {
- if( !IsOpen )
- {
- if( KeyboardUtilities.IsKeyModifyingPopupState( e ) )
- {
- IsOpen = true;
- // ContentPresenter items will get focus in Popup_Opened().
- e.Handled = true;
- }
- }
- else
- {
- if( KeyboardUtilities.IsKeyModifyingPopupState( e ) )
- {
- CloseDropDown( true );
- e.Handled = true;
- }
- else if( e.Key == Key.Escape )
- {
- CloseDropDown( true );
- e.Handled = true;
- }
- }
- }
-
- private void OnMouseDownOutsideCapturedElement( object sender, MouseButtonEventArgs e )
- {
- CloseDropDown( true );
- }
-
- private void DropDownButton_Click( object sender, RoutedEventArgs e )
- {
- OnClick();
- }
-
- void CanExecuteChanged( object sender, EventArgs e )
- {
- CanExecuteChanged();
- }
-
- private void Popup_Opened( object sender, EventArgs e )
- {
- // Set the focus on the content of the ContentPresenter.
- if( _contentPresenter != null )
- {
- _contentPresenter.MoveFocus(new TraversalRequest(FocusNavigationDirection.First));
- }
- }
-
- #endregion //Event Handlers
-
- #region Methods
-
- private void CanExecuteChanged()
- {
- if( Command != null )
- {
- RoutedCommand command = Command as RoutedCommand;
-
- // If a RoutedCommand.
- if( command != null )
- IsEnabled = command.CanExecute( CommandParameter, CommandTarget ) ? true : false;
- // If a not RoutedCommand.
- else
- IsEnabled = Command.CanExecute( CommandParameter ) ? true : false;
- }
- }
-
- ///
- /// Closes the drop down.
- ///
- private void CloseDropDown( bool isFocusOnButton )
- {
- if( IsOpen )
- {
- IsOpen = false;
- }
- ReleaseMouseCapture();
-
- if( isFocusOnButton && (this.Button != null) )
- {
- Button.Focus();
- }
- }
-
- protected virtual void OnClick()
- {
- RaiseRoutedEvent( DropDownButton.ClickEvent );
- RaiseCommand();
- }
-
- ///
- /// Raises routed events.
- ///
- private void RaiseRoutedEvent( RoutedEvent routedEvent )
- {
- RoutedEventArgs args = new RoutedEventArgs( routedEvent, this );
- RaiseEvent( args );
- }
-
- ///
- /// Raises the command's Execute event.
- ///
- private void RaiseCommand()
- {
- if( Command != null )
- {
- RoutedCommand routedCommand = Command as RoutedCommand;
-
- if( routedCommand == null )
- ( ( ICommand )Command ).Execute( CommandParameter );
- else
- routedCommand.Execute( CommandParameter, CommandTarget );
- }
- }
-
- ///
- /// Unhooks a command from the Command property.
- ///
- /// The old command.
- /// The new command.
- private void UnhookCommand( ICommand oldCommand, ICommand newCommand )
- {
- EventHandler handler = CanExecuteChanged;
- oldCommand.CanExecuteChanged -= handler;
- }
-
- ///
- /// Hooks up a command to the CanExecuteChnaged event handler.
- ///
- /// The old command.
- /// The new command.
- private void HookUpCommand( ICommand oldCommand, ICommand newCommand )
- {
- EventHandler handler = new EventHandler( CanExecuteChanged );
- canExecuteChangedHandler = handler;
- if( newCommand != null )
- newCommand.CanExecuteChanged += canExecuteChangedHandler;
- }
-
- #endregion //Methods
-
- #region ICommandSource Members
-
- // Keeps a copy of the CanExecuteChnaged handler so it doesn't get garbage collected.
- private EventHandler canExecuteChangedHandler;
-
- #region Command
-
- public static readonly DependencyProperty CommandProperty = DependencyProperty.Register( "Command", typeof( ICommand ), typeof( DropDownButton ), new PropertyMetadata( ( ICommand )null, OnCommandChanged ) );
- [TypeConverter( typeof( CommandConverter ) )]
- public ICommand Command
- {
- get
- {
- return ( ICommand )GetValue( CommandProperty );
- }
- set
- {
- SetValue( CommandProperty, value );
- }
- }
-
- private static void OnCommandChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- DropDownButton dropDownButton = d as DropDownButton;
- if( dropDownButton != null )
- dropDownButton.OnCommandChanged( ( ICommand )e.OldValue, ( ICommand )e.NewValue );
- }
-
- protected virtual void OnCommandChanged( ICommand oldValue, ICommand newValue )
- {
- // If old command is not null, then we need to remove the handlers.
- if( oldValue != null )
- UnhookCommand( oldValue, newValue );
-
- HookUpCommand( oldValue, newValue );
-
- CanExecuteChanged(); //may need to call this when changing the command parameter or target.
- }
-
- #endregion //Command
-
- public static readonly DependencyProperty CommandParameterProperty = DependencyProperty.Register( "CommandParameter", typeof( object ), typeof( DropDownButton ), new PropertyMetadata( null ) );
- public object CommandParameter
- {
- get
- {
- return GetValue( CommandParameterProperty );
- }
- set
- {
- SetValue( CommandParameterProperty, value );
- }
- }
-
- public static readonly DependencyProperty CommandTargetProperty = DependencyProperty.Register( "CommandTarget", typeof( IInputElement ), typeof( DropDownButton ), new PropertyMetadata( null ) );
- public IInputElement CommandTarget
- {
- get
- {
- return ( IInputElement )GetValue( CommandTargetProperty );
- }
- set
- {
- SetValue( CommandTargetProperty, value );
- }
- }
-
- #endregion //ICommandSource Members
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index f7faa69a..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml
deleted file mode 100644
index a54bfbf6..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml
+++ /dev/null
@@ -1,174 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/IconButton/Implementation/IconButton.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/IconButton/Implementation/IconButton.cs
deleted file mode 100644
index 9f08c400..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/IconButton/Implementation/IconButton.cs
+++ /dev/null
@@ -1,185 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class IconButton : Button
- {
- #region Constructors
-
- static IconButton()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( IconButton ), new FrameworkPropertyMetadata( typeof( IconButton ) ) );
- }
-
- public IconButton()
- {
- }
-
- #endregion //Constructors
-
- #region Properties
-
- #region Icon
-
- public static readonly DependencyProperty IconProperty = DependencyProperty.Register( "Icon", typeof( Image ), typeof( IconButton ), new FrameworkPropertyMetadata( null ) );
- public Image Icon
- {
- get
- {
- return ( Image )this.GetValue( IconButton.IconProperty );
- }
- set
- {
- this.SetValue( IconButton.IconProperty, value );
- }
- }
-
- #endregion //Icon
-
- #region IconLocation
-
- public static readonly DependencyProperty IconLocationProperty = DependencyProperty.Register( "IconLocation", typeof( Location ),
- typeof( IconButton ), new FrameworkPropertyMetadata( Location.Left ) );
- public Location IconLocation
- {
- get
- {
- return ( Location )this.GetValue( IconButton.IconLocationProperty );
- }
- set
- {
- this.SetValue( IconButton.IconLocationProperty, value );
- }
- }
-
- #endregion //IconLocation
-
- #region MouseOverBackground
-
- public static readonly DependencyProperty MouseOverBackgroundProperty = DependencyProperty.Register( "MouseOverBackground", typeof( Brush ), typeof( IconButton ), new FrameworkPropertyMetadata( null ) );
-
- public Brush MouseOverBackground
- {
- get
- {
- return ( Brush )this.GetValue( IconButton.MouseOverBackgroundProperty );
- }
- set
- {
- this.SetValue( IconButton.MouseOverBackgroundProperty, value );
- }
- }
-
- #endregion //MouseOverBackground
-
- #region MouseOverBorderBrush
-
- public static readonly DependencyProperty MouseOverBorderBrushProperty = DependencyProperty.Register( "MouseOverBorderBrush", typeof( Brush ), typeof( IconButton ), new FrameworkPropertyMetadata( null ) );
-
- public Brush MouseOverBorderBrush
- {
- get
- {
- return ( Brush )this.GetValue( IconButton.MouseOverBorderBrushProperty );
- }
- set
- {
- this.SetValue( IconButton.MouseOverBorderBrushProperty, value );
- }
- }
-
- #endregion //MouseOverBorderBrush
-
- #region MouseOverForeground
-
- public static readonly DependencyProperty MouseOverForegroundProperty = DependencyProperty.Register( "MouseOverForeground", typeof( Brush ), typeof( IconButton ), new FrameworkPropertyMetadata( null ) );
-
- public Brush MouseOverForeground
- {
- get
- {
- return ( Brush )this.GetValue( IconButton.MouseOverForegroundProperty );
- }
- set
- {
- this.SetValue( IconButton.MouseOverForegroundProperty, value );
- }
- }
-
- #endregion //MouseOverForeground
-
- #region MousePressedBackground
-
- public static readonly DependencyProperty MousePressedBackgroundProperty = DependencyProperty.Register( "MousePressedBackground", typeof( Brush ), typeof( IconButton ), new FrameworkPropertyMetadata( null ) );
-
- public Brush MousePressedBackground
- {
- get
- {
- return ( Brush )this.GetValue( IconButton.MousePressedBackgroundProperty );
- }
- set
- {
- this.SetValue( IconButton.MousePressedBackgroundProperty, value );
- }
- }
-
- #endregion //MousePressedBackground
-
- #region MousePressedBorderBrush
-
- public static readonly DependencyProperty MousePressedBorderBrushProperty = DependencyProperty.Register( "MousePressedBorderBrush", typeof( Brush ), typeof( IconButton ), new FrameworkPropertyMetadata( null ) );
-
- public Brush MousePressedBorderBrush
- {
- get
- {
- return ( Brush )this.GetValue( IconButton.MousePressedBorderBrushProperty );
- }
- set
- {
- this.SetValue( IconButton.MousePressedBorderBrushProperty, value );
- }
- }
-
- #endregion //MousePressedBorderBrush
-
- #region MousePressedForeground
-
- public static readonly DependencyProperty MousePressedForegroundProperty = DependencyProperty.Register( "MousePressedForeground", typeof( Brush ), typeof( IconButton ), new FrameworkPropertyMetadata( null ) );
-
- public Brush MousePressedForeground
- {
- get
- {
- return ( Brush )this.GetValue( IconButton.MousePressedForegroundProperty );
- }
- set
- {
- this.SetValue( IconButton.MousePressedForegroundProperty, value );
- }
- }
-
- #endregion //MousePressedForeground
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/IconButton/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/IconButton/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index 6edb1d07..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/IconButton/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,166 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/IconButton/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/IconButton/Themes/Generic.xaml
deleted file mode 100644
index 6edb1d07..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/IconButton/Themes/Generic.xaml
+++ /dev/null
@@ -1,166 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/Converters/RadiusConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/Converters/RadiusConverter.cs
deleted file mode 100644
index d752ad10..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/Converters/RadiusConverter.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows.Data;
-
-namespace Xceed.Wpf.Toolkit.Mag.Converters
-{
- public class RadiusConverter : IValueConverter
- {
- #region IValueConverter Members
-
- public object Convert( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- return ( double )value * 2;
- }
-
- public object ConvertBack( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
- {
- throw new NotImplementedException();
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/FrameType.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/FrameType.cs
deleted file mode 100644
index cd1bfa2c..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/FrameType.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit
-{
- public enum FrameType
- {
- Circle,
- Rectangle
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/Magnifier.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/Magnifier.cs
deleted file mode 100644
index 7e1f8d78..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/Magnifier.cs
+++ /dev/null
@@ -1,311 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-
-namespace Xceed.Wpf.Toolkit
-{
- [TemplatePart( Name = PART_VisualBrush, Type = typeof( VisualBrush ) )]
- public class Magnifier : Control
- {
- private const double DEFAULT_SIZE = 100d;
- private const string PART_VisualBrush = "PART_VisualBrush";
-
- #region Private Members
-
- private VisualBrush _visualBrush = new VisualBrush();
-
- #endregion //Private Members
-
- #region Properties
-
- #region FrameType
-
- public static readonly DependencyProperty FrameTypeProperty = DependencyProperty.Register( "FrameType", typeof( FrameType ), typeof( Magnifier ), new UIPropertyMetadata( FrameType.Circle, OnFrameTypeChanged ) );
- public FrameType FrameType
- {
- get
- {
- return ( FrameType )GetValue( FrameTypeProperty );
- }
- set
- {
- SetValue( FrameTypeProperty, value );
- }
- }
-
- private static void OnFrameTypeChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- Magnifier m = ( Magnifier )d;
- m.OnFrameTypeChanged( ( FrameType )e.OldValue, ( FrameType )e.NewValue );
- }
-
- protected virtual void OnFrameTypeChanged( FrameType oldValue, FrameType newValue )
- {
- this.UpdateSizeFromRadius();
- }
-
- #endregion //FrameType
-
- #region IsUsingZoomOnMouseWheel
-
- public static readonly DependencyProperty IsUsingZoomOnMouseWheelProperty = DependencyProperty.Register( "IsUsingZoomOnMouseWheel", typeof( bool )
- , typeof( Magnifier ), new UIPropertyMetadata( true ) );
- public bool IsUsingZoomOnMouseWheel
- {
- get
- {
- return (bool)GetValue( IsUsingZoomOnMouseWheelProperty );
- }
- set
- {
- SetValue( IsUsingZoomOnMouseWheelProperty, value );
- }
- }
-
- #endregion //IsUsingZoomOnMouseWheel
-
- #region IsFrozen
-
- public bool IsFrozen
- {
- get;
- private set;
- }
-
- #endregion
-
- #region Radius
-
- public static readonly DependencyProperty RadiusProperty = DependencyProperty.Register( "Radius", typeof( double ), typeof( Magnifier ), new FrameworkPropertyMetadata( ( Magnifier.DEFAULT_SIZE / 2 ), new PropertyChangedCallback( OnRadiusPropertyChanged ) ) );
- public double Radius
- {
- get
- {
- return ( double )GetValue( RadiusProperty );
- }
- set
- {
- SetValue( RadiusProperty, value );
- }
- }
-
- private static void OnRadiusPropertyChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- Magnifier m = ( Magnifier )d;
- m.OnRadiusChanged( e );
- }
-
- protected virtual void OnRadiusChanged( DependencyPropertyChangedEventArgs e )
- {
- this.UpdateSizeFromRadius();
- }
-
- #endregion
-
- #region Target
-
- public static readonly DependencyProperty TargetProperty = DependencyProperty.Register( "Target", typeof( UIElement ), typeof( Magnifier ) );
- public UIElement Target
- {
- get
- {
- return ( UIElement )GetValue( TargetProperty );
- }
- set
- {
- SetValue( TargetProperty, value );
- }
- }
-
- #endregion //Target
-
- #region ViewBox
-
- internal Rect ViewBox
- {
- get
- {
- return _visualBrush.Viewbox;
- }
- set
- {
- _visualBrush.Viewbox = value;
- }
- }
-
- #endregion
-
- #region ZoomFactor
-
- public static readonly DependencyProperty ZoomFactorProperty = DependencyProperty.Register( "ZoomFactor", typeof( double ), typeof( Magnifier ), new FrameworkPropertyMetadata( 0.5, OnZoomFactorPropertyChanged), OnValidationCallback );
- public double ZoomFactor
- {
- get
- {
- return ( double )GetValue( ZoomFactorProperty );
- }
- set
- {
- SetValue( ZoomFactorProperty, value );
- }
- }
-
- private static bool OnValidationCallback( object baseValue )
- {
- double zoomFactor = ( double )baseValue;
- return ( zoomFactor >= 0 );
- }
-
- private static void OnZoomFactorPropertyChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- Magnifier m = ( Magnifier )d;
- m.OnZoomFactorChanged( e );
- }
-
- protected virtual void OnZoomFactorChanged( DependencyPropertyChangedEventArgs e )
- {
- UpdateViewBox();
- }
-
- #endregion //ZoomFactor
-
- #region ZoomFactorOnMouseWheel
-
- public static readonly DependencyProperty ZoomFactorOnMouseWheelProperty = DependencyProperty.Register( "ZoomFactorOnMouseWheel", typeof( double )
- , typeof( Magnifier ), new FrameworkPropertyMetadata( 0.1d, OnZoomFactorOnMouseWheelPropertyChanged ), OnZoomFactorOnMouseWheelValidationCallback );
- public double ZoomFactorOnMouseWheel
- {
- get
- {
- return (double)GetValue( ZoomFactorOnMouseWheelProperty );
- }
- set
- {
- SetValue( ZoomFactorOnMouseWheelProperty, value );
- }
- }
-
- private static bool OnZoomFactorOnMouseWheelValidationCallback( object baseValue )
- {
- double zoomFactorOnMouseWheel = (double)baseValue;
- return (zoomFactorOnMouseWheel >= 0);
- }
-
- private static void OnZoomFactorOnMouseWheelPropertyChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- Magnifier m = (Magnifier)d;
- m.OnZoomFactorOnMouseWheelChanged( e );
- }
-
- protected virtual void OnZoomFactorOnMouseWheelChanged( DependencyPropertyChangedEventArgs e )
- {
- }
-
- #endregion //ZoomFactorOnMouseWheel
-
- #endregion //Properties
-
- #region Constructors
-
- ///
- /// Initializes static members of the class.
- ///
- static Magnifier()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( Magnifier ), new FrameworkPropertyMetadata( typeof( Magnifier ) ) );
- HeightProperty.OverrideMetadata( typeof( Magnifier ), new FrameworkPropertyMetadata( Magnifier.DEFAULT_SIZE ) );
- WidthProperty.OverrideMetadata( typeof( Magnifier ), new FrameworkPropertyMetadata( Magnifier.DEFAULT_SIZE ) );
- }
-
- public Magnifier()
- {
- this.SizeChanged += new SizeChangedEventHandler( OnSizeChangedEvent );
- }
-
- private void OnSizeChangedEvent( object sender, SizeChangedEventArgs e )
- {
- UpdateViewBox();
- }
-
- private void UpdateSizeFromRadius()
- {
- if( this.FrameType == Toolkit.FrameType.Circle )
- {
- double newSize = Radius * 2;
- if(!DoubleHelper.AreVirtuallyEqual( Width, newSize ))
- {
- Width = newSize;
- }
-
- if(!DoubleHelper.AreVirtuallyEqual( Height, newSize ))
- {
- Height = newSize;
- }
- }
- }
-
- #endregion
-
- #region Base Class Overrides
-
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
-
- VisualBrush newBrush = GetTemplateChild( PART_VisualBrush ) as VisualBrush;
-
- // Just create a brush as placeholder even if there is no such brush.
- // This avoids having to "if" each access to the _visualBrush member.
- // Do not keep the current _visualBrush whatsoever to avoid memory leaks.
- if( newBrush == null )
- {
- newBrush = new VisualBrush();
- }
-
- newBrush.Viewbox = _visualBrush.Viewbox;
- _visualBrush = newBrush;
- }
-
- #endregion // Base Class Overrides
-
- #region Public Methods
-
- public void Freeze( bool freeze )
- {
- this.IsFrozen = freeze;
- }
-
- #endregion
-
- #region Private Methods
-
- private void UpdateViewBox()
- {
- if( !IsInitialized )
- return;
-
- ViewBox = new Rect(
- ViewBox.Location,
- new Size( ActualWidth * ZoomFactor , ActualHeight * ZoomFactor ) );
- }
-
- #endregion //Methods
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/MagnifierAdorner.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/MagnifierAdorner.cs
deleted file mode 100644
index b0ef685c..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/MagnifierAdorner.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Windows;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class MagnifierAdorner : Adorner
- {
- #region Members
-
- private Magnifier _magnifier;
- private Point _currentMousePosition;
- private double _currentZoomFactor;
-
- #endregion
-
- #region Constructors
-
- public MagnifierAdorner( UIElement element, Magnifier magnifier )
- : base( element )
- {
- _magnifier = magnifier;
- _currentZoomFactor = _magnifier.ZoomFactor;
- UpdateViewBox();
- AddVisualChild( _magnifier );
-
- Loaded += ( s, e ) => InputManager.Current.PostProcessInput += OnProcessInput;
- Unloaded += ( s, e ) => InputManager.Current.PostProcessInput -= OnProcessInput;
- }
-
-
- #endregion
-
- #region Private/Internal methods
-
- private void OnProcessInput( object sender, ProcessInputEventArgs e )
- {
- Point pt = Mouse.GetPosition( this );
-
- if( (_currentMousePosition == pt) && (_magnifier.ZoomFactor == _currentZoomFactor) )
- return;
-
- if( _magnifier.IsFrozen )
- return;
-
- _currentMousePosition = pt;
- _currentZoomFactor = _magnifier.ZoomFactor;
- UpdateViewBox();
- InvalidateArrange();
- }
-
- internal void UpdateViewBox()
- {
- var viewBoxLocation = CalculateViewBoxLocation();
- _magnifier.ViewBox = new Rect( viewBoxLocation, _magnifier.ViewBox.Size );
- }
-
- private Point CalculateViewBoxLocation()
- {
- double offsetX = 0, offsetY = 0;
-
- Point adorner = Mouse.GetPosition( this );
- Point element = Mouse.GetPosition( AdornedElement );
-
- offsetX = element.X - adorner.X;
- offsetY = element.Y - adorner.Y;
-
- //An element will use the offset from its parent (StackPanel, Grid, etc.) to be rendered.
- //When this element is put in a VisualBrush, the element will draw with that offset applied.
- //To fix this: we add that parent offset to Magnifier location.
- Vector parentOffsetVector = VisualTreeHelper.GetOffset( _magnifier.Target );
- Point parentOffset = new Point( parentOffsetVector.X, parentOffsetVector.Y );
-
- double left = _currentMousePosition.X - ( ( _magnifier.ViewBox.Width / 2 ) + offsetX ) + parentOffset.X;
- double top = _currentMousePosition.Y - ( ( _magnifier.ViewBox.Height / 2 ) + offsetY ) + parentOffset.Y;
- return new Point( left, top );
- }
-
- #endregion
-
- #region Overrides
-
- protected override Visual GetVisualChild( int index )
- {
- return _magnifier;
- }
-
- protected override int VisualChildrenCount
- {
- get
- {
- return 1;
- }
- }
-
- protected override Size MeasureOverride( Size constraint )
- {
- _magnifier.Measure( constraint );
- return base.MeasureOverride( constraint );
- }
-
- protected override Size ArrangeOverride( Size finalSize )
- {
- double x = _currentMousePosition.X - ( _magnifier.Width / 2 );
- double y = _currentMousePosition.Y - ( _magnifier.Height / 2 );
- _magnifier.Arrange( new Rect( x, y, _magnifier.Width, _magnifier.Height ) );
- return base.ArrangeOverride( finalSize );
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/MagnifierManager.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/MagnifierManager.cs
deleted file mode 100644
index 88856103..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Implementation/MagnifierManager.cs
+++ /dev/null
@@ -1,146 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Windows.Documents;
-using System.Windows.Input;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class MagnifierManager : DependencyObject
- {
- #region Members
-
- private MagnifierAdorner _adorner;
- private UIElement _element;
-
- #endregion //Members
-
- #region Properties
-
- public static readonly DependencyProperty CurrentProperty = DependencyProperty.RegisterAttached( "Magnifier", typeof( Magnifier ), typeof( UIElement ), new FrameworkPropertyMetadata( null, OnMagnifierChanged ) );
- public static void SetMagnifier( UIElement element, Magnifier value )
- {
- element.SetValue( CurrentProperty, value );
- }
- public static Magnifier GetMagnifier( UIElement element )
- {
- return ( Magnifier )element.GetValue( CurrentProperty );
- }
-
- private static void OnMagnifierChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- UIElement target = d as UIElement;
-
- if( target == null )
- throw new ArgumentException( "Magnifier can only be attached to a UIElement." );
-
- MagnifierManager manager = new MagnifierManager();
- manager.AttachToMagnifier( target, e.NewValue as Magnifier );
- }
-
- #endregion //Properties
-
- #region Event Handlers
-
- private void Element_MouseLeave( object sender, MouseEventArgs e )
- {
- var magnifier = MagnifierManager.GetMagnifier( _element ) as Magnifier;
- if( ( magnifier != null ) && magnifier.IsFrozen )
- return;
-
- HideAdorner();
- }
-
- private void Element_MouseEnter( object sender, MouseEventArgs e )
- {
- ShowAdorner();
- }
-
- private void Element_MouseWheel( object sender, MouseWheelEventArgs e )
- {
- var magnifier = MagnifierManager.GetMagnifier( _element ) as Magnifier;
- if( (magnifier != null) && magnifier.IsUsingZoomOnMouseWheel )
- {
- if( e.Delta < 0 )
- {
- var newValue = magnifier.ZoomFactor + magnifier.ZoomFactorOnMouseWheel;
-#if VS2008
- magnifier.ZoomFactor = newValue;
-#else
- magnifier.SetCurrentValue( Magnifier.ZoomFactorProperty, newValue );
-#endif
- }
- else if ( e.Delta > 0 )
- {
- var newValue = (magnifier.ZoomFactor >= magnifier.ZoomFactorOnMouseWheel) ? magnifier.ZoomFactor - magnifier.ZoomFactorOnMouseWheel : 0d;
-#if VS2008
- magnifier.ZoomFactor = newValue;
-#else
- magnifier.SetCurrentValue( Magnifier.ZoomFactorProperty, newValue );
-#endif
- }
- _adorner.UpdateViewBox();
- }
- }
-
- #endregion //Event Handlers
-
- #region Methods
-
- private void AttachToMagnifier( UIElement element, Magnifier magnifier )
- {
- _element = element;
- _element.MouseEnter += this.Element_MouseEnter;
- _element.MouseLeave += this.Element_MouseLeave;
- _element.MouseWheel += this.Element_MouseWheel;
-
- magnifier.Target = _element;
-
- _adorner = new MagnifierAdorner( _element, magnifier );
- }
-
- void ShowAdorner()
- {
- VerifyAdornerLayer();
- _adorner.Visibility = Visibility.Visible;
- }
-
- bool VerifyAdornerLayer()
- {
- if( _adorner.Parent != null )
- return true;
-
- AdornerLayer layer = AdornerLayer.GetAdornerLayer( _element );
- if( layer == null )
- return false;
-
- layer.Add( _adorner );
- return true;
- }
-
- void HideAdorner()
- {
- if( _adorner.Visibility == Visibility.Visible )
- {
- _adorner.Visibility = Visibility.Collapsed;
- }
- }
-
-#endregion //Methods
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Themes/Generic.xaml
deleted file mode 100644
index 5bad5932..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Magnifier/Themes/Generic.xaml
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/AutoCompletingMaskEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/AutoCompletingMaskEventArgs.cs
deleted file mode 100644
index 7e582501..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/AutoCompletingMaskEventArgs.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.ComponentModel;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class AutoCompletingMaskEventArgs : CancelEventArgs
- {
- public AutoCompletingMaskEventArgs( MaskedTextProvider maskedTextProvider, int startPosition, int selectionLength, string input )
- {
- m_autoCompleteStartPosition = -1;
-
- m_maskedTextProvider = maskedTextProvider;
- m_startPosition = startPosition;
- m_selectionLength = selectionLength;
- m_input = input;
- }
-
- #region MaskedTextProvider PROPERTY
-
- private MaskedTextProvider m_maskedTextProvider;
-
- public MaskedTextProvider MaskedTextProvider
- {
- get { return m_maskedTextProvider; }
- }
-
- #endregion MaskedTextProvider PROPERTY
-
- #region StartPosition PROPERTY
-
- private int m_startPosition;
-
- public int StartPosition
- {
- get { return m_startPosition; }
- }
-
- #endregion StartPosition PROPERTY
-
- #region SelectionLength PROPERTY
-
- private int m_selectionLength;
-
- public int SelectionLength
- {
- get { return m_selectionLength; }
- }
-
- #endregion SelectionLength PROPERTY
-
- #region Input PROPERTY
-
- private string m_input;
-
- public string Input
- {
- get { return m_input; }
- }
-
- #endregion Input PROPERTY
-
-
- #region AutoCompleteStartPosition PROPERTY
-
- private int m_autoCompleteStartPosition;
-
- public int AutoCompleteStartPosition
- {
- get { return m_autoCompleteStartPosition; }
- set { m_autoCompleteStartPosition = value; }
- }
-
- #endregion AutoCompleteStartPosition PROPERTY
-
- #region AutoCompleteText PROPERTY
-
- private string m_autoCompleteText;
-
- public string AutoCompleteText
- {
- get { return m_autoCompleteText; }
- set { m_autoCompleteText = value; }
- }
-
- #endregion AutoCompleteText PROPERTY
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/InsertKeyModeEnum.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/InsertKeyModeEnum.cs
deleted file mode 100644
index a8cbe8fd..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/InsertKeyModeEnum.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Xceed.Wpf.Toolkit
-{
- public enum InsertKeyMode
- {
- Default = 0,
- Insert = 1,
- Overwrite = 2
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskFormatEnum.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskFormatEnum.cs
deleted file mode 100644
index 6114a0cd..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskFormatEnum.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Xceed.Wpf.Toolkit
-{
- public enum MaskFormat
- {
- ExcludePromptAndLiterals,
- IncludeLiterals,
- IncludePrompt,
- IncludePromptAndLiterals
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs
deleted file mode 100644
index f9c7932a..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs
+++ /dev/null
@@ -1,1955 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows.Controls;
-using System.Windows;
-using System.Windows.Data;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.Windows.Input;
-using System.Diagnostics;
-using System.Windows.Documents;
-using System.Globalization;
-using System.Windows.Controls.Primitives;
-using System.Reflection;
-
-using System.Collections;
-using System.Security;
-using System.Security.Permissions;
-using System.Windows.Automation;
-using Xceed.Wpf.Toolkit.Primitives;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class MaskedTextBox : ValueRangeTextBox
- {
- #region STATIC MEMBERS
-
- private static readonly char[] MaskChars = { '0', '9', '#', 'L', '?', '&', 'C', 'A', 'a', '.', ',', ':', '/', '$', '<', '>', '|', '\\' };
-
- private static char DefaultPasswordChar = '\0';
-
- private static string NullMaskString = "<>";
-
- private static string GetRawText( MaskedTextProvider provider )
- {
- return provider.ToString( true, false, false, 0, provider.Length );
- }
-
- public static string GetFormatSpecifierFromMask( string mask, IFormatProvider formatProvider )
- {
- List notUsed;
-
- return MaskedTextBox.GetFormatSpecifierFromMask(
- mask,
- MaskedTextBox.MaskChars,
- formatProvider,
- true,
- out notUsed );
- }
-
- private static string GetFormatSpecifierFromMask(
- string mask,
- char[] maskChars,
- IFormatProvider formatProvider,
- bool includeNonSeparatorLiteralsInValue,
- out List unhandledLiteralsPositions )
- {
- unhandledLiteralsPositions = new List();
-
- NumberFormatInfo numberFormatInfo = NumberFormatInfo.GetInstance( formatProvider );
-
- StringBuilder formatSpecifierBuilder = new StringBuilder( 32 );
-
- // Space will be considered as a separator literals and will be included
- // no matter the value of IncludeNonSeparatorLiteralsInValue.
- bool lastCharIsLiteralIdentifier = false;
- int i = 0;
- int j = 0;
-
- while( i < mask.Length )
- {
- char currentChar = mask[ i ];
-
- if( ( currentChar == '\\' ) && ( !lastCharIsLiteralIdentifier ) )
- {
- lastCharIsLiteralIdentifier = true;
- }
- else
- {
- if( ( lastCharIsLiteralIdentifier ) || ( Array.IndexOf( maskChars, currentChar ) < 0 ) )
- {
- lastCharIsLiteralIdentifier = false;
-
- // The currentChar was preceeded by a liteal identifier or is not part of the MaskedTextProvider mask chars.
- formatSpecifierBuilder.Append( '\\' );
- formatSpecifierBuilder.Append( currentChar );
-
- if( ( !includeNonSeparatorLiteralsInValue ) && ( currentChar != ' ' ) )
- unhandledLiteralsPositions.Add( j );
-
- j++;
- }
- else
- {
- // The currentChar is part of the MaskedTextProvider mask chars.
- if( ( currentChar == '0' ) || ( currentChar == '9' ) || ( currentChar == '#' ) )
- {
- formatSpecifierBuilder.Append( '0' );
- j++;
- }
- else if( currentChar == '.' )
- {
- formatSpecifierBuilder.Append( '.' );
- j += numberFormatInfo.NumberDecimalSeparator.Length;
- }
- else if( currentChar == ',' )
- {
- formatSpecifierBuilder.Append( ',' );
- j += numberFormatInfo.NumberGroupSeparator.Length;
- }
- else if( currentChar == '$' )
- {
- string currencySymbol = numberFormatInfo.CurrencySymbol;
-
- formatSpecifierBuilder.Append( '"' );
- formatSpecifierBuilder.Append( currencySymbol );
- formatSpecifierBuilder.Append( '"' );
-
- for( int k = 0; k < currencySymbol.Length; k++ )
- {
- if( !includeNonSeparatorLiteralsInValue )
- unhandledLiteralsPositions.Add( j );
-
- j++;
- }
- }
- else
- {
- formatSpecifierBuilder.Append( currentChar );
-
- if( ( !includeNonSeparatorLiteralsInValue ) && ( currentChar != ' ' ) )
- unhandledLiteralsPositions.Add( j );
-
- j++;
- }
- }
- }
-
- i++;
- }
-
- return formatSpecifierBuilder.ToString();
- }
-
- #endregion STATIC MEMBERS
-
- #region CONSTRUCTORS
-
- static MaskedTextBox()
- {
- MaskedTextBox.TextProperty.OverrideMetadata( typeof( MaskedTextBox ),
- new FrameworkPropertyMetadata(
- null,
- new CoerceValueCallback( MaskedTextBox.TextCoerceValueCallback ) ) );
- }
-
- public MaskedTextBox()
- {
- CommandManager.AddPreviewCanExecuteHandler( this, new CanExecuteRoutedEventHandler( this.OnPreviewCanExecuteCommands ) );
- CommandManager.AddPreviewExecutedHandler( this, new ExecutedRoutedEventHandler( this.OnPreviewExecutedCommands ) );
-
- this.CommandBindings.Add( new CommandBinding( ApplicationCommands.Paste, null, new CanExecuteRoutedEventHandler( this.CanExecutePaste ) ) );
- this.CommandBindings.Add( new CommandBinding( ApplicationCommands.Cut, null, new CanExecuteRoutedEventHandler( this.CanExecuteCut ) ) );
- this.CommandBindings.Add( new CommandBinding( ApplicationCommands.Copy, null, new CanExecuteRoutedEventHandler( this.CanExecuteCopy ) ) );
- this.CommandBindings.Add( new CommandBinding( EditingCommands.ToggleInsert, new ExecutedRoutedEventHandler( this.ToggleInsertExecutedCallback ) ) );
-
- this.CommandBindings.Add( new CommandBinding( EditingCommands.Delete, null, new CanExecuteRoutedEventHandler( this.CanExecuteDelete ) ) );
- this.CommandBindings.Add( new CommandBinding( EditingCommands.DeletePreviousWord, null, new CanExecuteRoutedEventHandler( this.CanExecuteDeletePreviousWord ) ) );
- this.CommandBindings.Add( new CommandBinding( EditingCommands.DeleteNextWord, null, new CanExecuteRoutedEventHandler( this.CanExecuteDeleteNextWord ) ) );
-
- this.CommandBindings.Add( new CommandBinding( EditingCommands.Backspace, null, new CanExecuteRoutedEventHandler( this.CanExecuteBackspace ) ) );
-
- System.Windows.DragDrop.AddPreviewQueryContinueDragHandler( this, new QueryContinueDragEventHandler( this.PreviewQueryContinueDragCallback ) );
- this.AllowDrop = false;
- }
-
- [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1820:TestForEmptyStringsUsingStringLength" )]
- private void InitializeMaskedTextProvider()
- {
- string preInitializedText = this.Text;
-
- string mask = this.Mask;
-
- if( mask == string.Empty )
- {
- m_maskedTextProvider = this.CreateMaskedTextProvider( MaskedTextBox.NullMaskString );
- m_maskIsNull = true;
- }
- else
- {
- m_maskedTextProvider = this.CreateMaskedTextProvider( mask );
- m_maskIsNull = false;
- }
-
- if( ( !m_maskIsNull ) && ( preInitializedText != string.Empty ) )
- {
- bool success = m_maskedTextProvider.Add( preInitializedText );
-
- if( ( !success ) && ( !DesignerProperties.GetIsInDesignMode( this ) ) )
- throw new InvalidOperationException( "An attempt was made to apply a new mask that cannot be applied to the current text." );
- }
- }
-
- #endregion CONSTRUCTORS
-
- #region ISupportInitialize
-
- protected override void OnInitialized( EventArgs e )
- {
- this.InitializeMaskedTextProvider();
-
- this.SetIsMaskCompleted( m_maskedTextProvider.MaskCompleted );
- this.SetIsMaskFull( m_maskedTextProvider.MaskFull );
-
- base.OnInitialized( e );
- }
-
- #endregion ISupportInitialize
-
- #region AllowPromptAsInput Property
-
- public static readonly DependencyProperty AllowPromptAsInputProperty =
- DependencyProperty.Register( "AllowPromptAsInput", typeof( bool ), typeof( MaskedTextBox ),
- new UIPropertyMetadata(
- true,
- new PropertyChangedCallback( MaskedTextBox.AllowPromptAsInputPropertyChangedCallback ) ) );
-
- public bool AllowPromptAsInput
- {
- get
- {
- return ( bool )GetValue( AllowPromptAsInputProperty );
- }
- set
- {
- SetValue( AllowPromptAsInputProperty, value );
- }
- }
-
- private static void AllowPromptAsInputPropertyChangedCallback( object sender, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = sender as MaskedTextBox;
-
- if( !maskedTextBox.IsInitialized )
- return;
-
- if( maskedTextBox.m_maskIsNull )
- return;
-
- maskedTextBox.m_maskedTextProvider = maskedTextBox.CreateMaskedTextProvider( maskedTextBox.Mask );
- }
-
- #endregion AllowPromptAsInput Property
-
- #region ClipboardMaskFormat Property
-
- public MaskFormat ClipboardMaskFormat
- {
- get
- {
- return ( MaskFormat )GetValue( ClipboardMaskFormatProperty );
- }
- set
- {
- SetValue( ClipboardMaskFormatProperty, value );
- }
- }
-
- public static readonly DependencyProperty ClipboardMaskFormatProperty =
- DependencyProperty.Register( "ClipboardMaskFormat", typeof( MaskFormat ), typeof( MaskedTextBox ),
- new UIPropertyMetadata( MaskFormat.IncludeLiterals ) );
-
- #endregion ClipboardMaskFormat Property
-
- #region HidePromptOnLeave Property
-
- public bool HidePromptOnLeave
- {
- get
- {
- return ( bool )GetValue( HidePromptOnLeaveProperty );
- }
- set
- {
- SetValue( HidePromptOnLeaveProperty, value );
- }
- }
-
- public static readonly DependencyProperty HidePromptOnLeaveProperty =
- DependencyProperty.Register( "HidePromptOnLeave", typeof( bool ), typeof( MaskedTextBox ), new UIPropertyMetadata( false ) );
-
- #endregion HidePromptOnLeave Property
-
- #region IncludeLiteralsInValue Property
-
- public bool IncludeLiteralsInValue
- {
- get
- {
- return ( bool )GetValue( IncludeLiteralsInValueProperty );
- }
- set
- {
- SetValue( IncludeLiteralsInValueProperty, value );
- }
- }
-
- public static readonly DependencyProperty IncludeLiteralsInValueProperty =
- DependencyProperty.Register( "IncludeLiteralsInValue", typeof( bool ), typeof( MaskedTextBox ),
- new UIPropertyMetadata(
- true,
- new PropertyChangedCallback( MaskedTextBox.InlcudeLiteralsInValuePropertyChangedCallback ) ) );
-
- private static void InlcudeLiteralsInValuePropertyChangedCallback( object sender, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = sender as MaskedTextBox;
-
- if( !maskedTextBox.IsInitialized )
- return;
-
- maskedTextBox.RefreshConversionHelpers();
- maskedTextBox.RefreshValue();
- }
-
- #endregion IncludeLiteralsInValue Property
-
- #region IncludePromptInValue Property
-
- public bool IncludePromptInValue
- {
- get
- {
- return ( bool )GetValue( IncludePromptInValueProperty );
- }
- set
- {
- SetValue( IncludePromptInValueProperty, value );
- }
- }
-
- public static readonly DependencyProperty IncludePromptInValueProperty =
- DependencyProperty.Register( "IncludePromptInValue", typeof( bool ), typeof( MaskedTextBox ),
- new UIPropertyMetadata(
- false,
- new PropertyChangedCallback( MaskedTextBox.IncludePromptInValuePropertyChangedCallback ) ) );
-
- private static void IncludePromptInValuePropertyChangedCallback( object sender, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = sender as MaskedTextBox;
-
- if( !maskedTextBox.IsInitialized )
- return;
-
- maskedTextBox.RefreshValue();
- }
-
- #endregion IncludePromptInValue Property
-
- #region InsertKeyMode Property
-
- public InsertKeyMode InsertKeyMode
- {
- get
- {
- return ( InsertKeyMode )GetValue( InsertKeyModeProperty );
- }
- set
- {
- SetValue( InsertKeyModeProperty, value );
- }
- }
-
- public static readonly DependencyProperty InsertKeyModeProperty =
- DependencyProperty.Register( "InsertKeyMode", typeof( InsertKeyMode ), typeof( MaskedTextBox ), new UIPropertyMetadata( InsertKeyMode.Default ) );
-
- #endregion InsertKeyMode Property
-
- #region IsMaskCompleted Read-Only Property
-
- private static readonly DependencyPropertyKey IsMaskCompletedPropertyKey =
- DependencyProperty.RegisterReadOnly( "IsMaskCompleted", typeof( bool ), typeof( MaskedTextBox ), new PropertyMetadata( false ) );
-
- public static readonly DependencyProperty IsMaskCompletedProperty = MaskedTextBox.IsMaskCompletedPropertyKey.DependencyProperty;
-
-
- public bool IsMaskCompleted
- {
- get
- {
- return ( bool )this.GetValue( MaskedTextBox.IsMaskCompletedProperty );
- }
- }
-
- private void SetIsMaskCompleted( bool value )
- {
- this.SetValue( MaskedTextBox.IsMaskCompletedPropertyKey, value );
- }
-
- #endregion IsMaskCompleted Read-Only Property
-
- #region IsMaskFull Read-Only Property
-
- private static readonly DependencyPropertyKey IsMaskFullPropertyKey =
- DependencyProperty.RegisterReadOnly( "IsMaskFull", typeof( bool ), typeof( MaskedTextBox ), new PropertyMetadata( false ) );
-
- public static readonly DependencyProperty IsMaskFullProperty = MaskedTextBox.IsMaskFullPropertyKey.DependencyProperty;
-
- public bool IsMaskFull
- {
- get
- {
- return ( bool )this.GetValue( MaskedTextBox.IsMaskFullProperty );
- }
- }
-
- private void SetIsMaskFull( bool value )
- {
- this.SetValue( MaskedTextBox.IsMaskFullPropertyKey, value );
- }
-
- #endregion IsMaskFull Read-Only Property
-
- #region Mask Property
-
- public static readonly DependencyProperty MaskProperty =
- DependencyProperty.Register( "Mask", typeof( string ), typeof( MaskedTextBox ),
- new UIPropertyMetadata(
- string.Empty,
- new PropertyChangedCallback( MaskedTextBox.MaskPropertyChangedCallback ),
- new CoerceValueCallback( MaskedTextBox.MaskCoerceValueCallback ) ) );
-
- public string Mask
- {
- get
- {
- return ( string )this.GetValue( MaskedTextBox.MaskProperty );
- }
- set
- {
- this.SetValue( MaskedTextBox.MaskProperty, value );
- }
- }
-
- [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly" )]
- private static object MaskCoerceValueCallback( DependencyObject sender, object value )
- {
- if( value == null )
- value = string.Empty;
-
- if( value.Equals( string.Empty ) )
- return value;
-
- // Validate the text against the would be new Mask.
-
- MaskedTextBox maskedTextBox = sender as MaskedTextBox;
-
- if( !maskedTextBox.IsInitialized )
- return value;
-
- bool valid;
-
- try
- {
- MaskedTextProvider provider = maskedTextBox.CreateMaskedTextProvider( ( string )value );
-
- string rawText = MaskedTextBox.GetRawText( maskedTextBox.m_maskedTextProvider );
-
- valid = provider.VerifyString( rawText );
- }
- catch( Exception exception )
- {
- throw new InvalidOperationException( "An error occured while testing the current text against the new mask.", exception );
- }
-
- if( !valid )
- throw new ArgumentException( "The mask cannot be applied to the current text.", "Mask" );
-
- return value;
- }
-
- [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1820:TestForEmptyStringsUsingStringLength" )]
- private static void MaskPropertyChangedCallback( DependencyObject sender, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = sender as MaskedTextBox;
-
- if( !maskedTextBox.IsInitialized )
- return;
-
- MaskedTextProvider provider = null;
-
- string mask = ( string )e.NewValue;
-
- if( mask == string.Empty )
- {
- provider = maskedTextBox.CreateMaskedTextProvider( MaskedTextBox.NullMaskString );
- maskedTextBox.m_maskIsNull = true;
- maskedTextBox.Text = "";
- }
- else
- {
- provider = maskedTextBox.CreateMaskedTextProvider( mask );
- maskedTextBox.m_maskIsNull = false;
- }
-
- maskedTextBox.m_maskedTextProvider = provider;
-
- maskedTextBox.RefreshConversionHelpers();
-
- if( maskedTextBox.ValueDataType != null )
- {
- string textFromValue = maskedTextBox.GetTextFromValue( maskedTextBox.Value );
- maskedTextBox.m_maskedTextProvider.Set( textFromValue );
- }
-
- maskedTextBox.RefreshCurrentText( true );
- }
-
- #endregion Mask Property
-
- #region MaskedTextProvider Property
-
- public MaskedTextProvider MaskedTextProvider
- {
- get
- {
- if( !m_maskIsNull )
- return m_maskedTextProvider.Clone() as MaskedTextProvider;
-
- return null;
- }
- }
-
- #endregion MaskedTextProvider Property
-
- #region PromptChar Property
-
- public static readonly DependencyProperty PromptCharProperty =
- DependencyProperty.Register( "PromptChar", typeof( char ), typeof( MaskedTextBox ),
- new UIPropertyMetadata(
- '_',
- new PropertyChangedCallback( MaskedTextBox.PromptCharPropertyChangedCallback ),
- new CoerceValueCallback( MaskedTextBox.PromptCharCoerceValueCallback ) ) );
-
- public char PromptChar
- {
- get
- {
- return ( char )this.GetValue( MaskedTextBox.PromptCharProperty );
- }
- set
- {
- this.SetValue( MaskedTextBox.PromptCharProperty, value );
- }
- }
-
- private static object PromptCharCoerceValueCallback( object sender, object value )
- {
- MaskedTextBox maskedTextBox = sender as MaskedTextBox;
-
- if( !maskedTextBox.IsInitialized )
- return value;
-
- MaskedTextProvider provider = maskedTextBox.m_maskedTextProvider.Clone() as MaskedTextProvider;
-
- try
- {
- provider.PromptChar = ( char )value;
- }
- catch( Exception exception )
- {
- throw new ArgumentException( "The prompt character is invalid.", exception );
- }
-
- return value;
- }
-
- private static void PromptCharPropertyChangedCallback( object sender, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = sender as MaskedTextBox;
-
- if( !maskedTextBox.IsInitialized )
- return;
-
- if( maskedTextBox.m_maskIsNull )
- return;
-
- maskedTextBox.m_maskedTextProvider.PromptChar = ( char )e.NewValue;
-
- maskedTextBox.RefreshCurrentText( true );
- }
-
- #endregion PromptChar Property
-
- #region RejectInputOnFirstFailure Property
-
- public bool RejectInputOnFirstFailure
- {
- get
- {
- return ( bool )GetValue( RejectInputOnFirstFailureProperty );
- }
- set
- {
- SetValue( RejectInputOnFirstFailureProperty, value );
- }
- }
-
- public static readonly DependencyProperty RejectInputOnFirstFailureProperty =
- DependencyProperty.Register( "RejectInputOnFirstFailure", typeof( bool ), typeof( MaskedTextBox ), new UIPropertyMetadata( true ) );
-
- #endregion RejectInputOnFirstFailure Property
-
- #region ResetOnPrompt Property
-
- public bool ResetOnPrompt
- {
- get
- {
- return ( bool )GetValue( ResetOnPromptProperty );
- }
- set
- {
- SetValue( ResetOnPromptProperty, value );
- }
- }
-
- public static readonly DependencyProperty ResetOnPromptProperty =
- DependencyProperty.Register( "ResetOnPrompt", typeof( bool ), typeof( MaskedTextBox ),
- new UIPropertyMetadata(
- true,
- new PropertyChangedCallback( MaskedTextBox.ResetOnPromptPropertyChangedCallback ) ) );
-
- private static void ResetOnPromptPropertyChangedCallback( object sender, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = sender as MaskedTextBox;
-
- if( !maskedTextBox.IsInitialized )
- return;
-
- if( maskedTextBox.m_maskIsNull )
- return;
-
- maskedTextBox.m_maskedTextProvider.ResetOnPrompt = ( bool )e.NewValue;
- }
-
- #endregion ResetOnPrompt Property
-
- #region ResetOnSpace Property
-
- public bool ResetOnSpace
- {
- get
- {
- return ( bool )GetValue( ResetOnSpaceProperty );
- }
- set
- {
- SetValue( ResetOnSpaceProperty, value );
- }
- }
-
- public static readonly DependencyProperty ResetOnSpaceProperty =
- DependencyProperty.Register( "ResetOnSpace", typeof( bool ), typeof( MaskedTextBox ),
- new UIPropertyMetadata(
- true,
- new PropertyChangedCallback( MaskedTextBox.ResetOnSpacePropertyChangedCallback ) ) );
-
- private static void ResetOnSpacePropertyChangedCallback( object sender, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = sender as MaskedTextBox;
-
- if( !maskedTextBox.IsInitialized )
- return;
-
- if( maskedTextBox.m_maskIsNull )
- return;
-
- maskedTextBox.m_maskedTextProvider.ResetOnSpace = ( bool )e.NewValue;
- }
-
- #endregion ResetOnSpace Property
-
- #region RestrictToAscii Property
-
- public bool RestrictToAscii
- {
- get
- {
- return ( bool )GetValue( RestrictToAsciiProperty );
- }
- set
- {
- SetValue( RestrictToAsciiProperty, value );
- }
- }
-
- public static readonly DependencyProperty RestrictToAsciiProperty =
- DependencyProperty.Register( "RestrictToAscii", typeof( bool ), typeof( MaskedTextBox ),
- new UIPropertyMetadata(
- false,
- new PropertyChangedCallback( MaskedTextBox.RestrictToAsciiPropertyChangedCallback ),
- new CoerceValueCallback( MaskedTextBox.RestrictToAsciiCoerceValueCallback ) ) );
-
- [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly" )]
- private static object RestrictToAsciiCoerceValueCallback( object sender, object value )
- {
- MaskedTextBox maskedTextBox = sender as MaskedTextBox;
-
- if( !maskedTextBox.IsInitialized )
- return value;
-
- if( maskedTextBox.m_maskIsNull )
- return value;
-
- bool restrictToAscii = ( bool )value;
-
- if( !restrictToAscii )
- return value;
-
- // Validate the text to make sure that it is only made of Ascii characters.
-
- MaskedTextProvider provider = maskedTextBox.CreateMaskedTextProvider(
- maskedTextBox.Mask,
- maskedTextBox.GetCultureInfo(),
- maskedTextBox.AllowPromptAsInput,
- maskedTextBox.PromptChar,
- MaskedTextBox.DefaultPasswordChar,
- restrictToAscii );
-
- if( !provider.VerifyString( maskedTextBox.Text ) )
- throw new ArgumentException( "The current text cannot be restricted to ASCII characters. The RestrictToAscii property is set to true.", "RestrictToAscii" );
-
- return restrictToAscii;
- }
-
- private static void RestrictToAsciiPropertyChangedCallback( object sender, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = sender as MaskedTextBox;
-
- if( !maskedTextBox.IsInitialized )
- return;
-
- if( maskedTextBox.m_maskIsNull )
- return;
-
- maskedTextBox.m_maskedTextProvider = maskedTextBox.CreateMaskedTextProvider( maskedTextBox.Mask );
-
- maskedTextBox.RefreshCurrentText( true );
- }
-
- #endregion RestrictToAscii Property
-
- #region SkipLiterals Property
-
- public bool SkipLiterals
- {
- get
- {
- return ( bool )GetValue( SkipLiteralsProperty );
- }
- set
- {
- SetValue( SkipLiteralsProperty, value );
- }
- }
-
- public static readonly DependencyProperty SkipLiteralsProperty =
- DependencyProperty.Register( "SkipLiterals", typeof( bool ), typeof( MaskedTextBox ),
- new UIPropertyMetadata(
- true,
- new PropertyChangedCallback( MaskedTextBox.SkipLiteralsPropertyChangedCallback ) ) );
-
- private static void SkipLiteralsPropertyChangedCallback( object sender, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = sender as MaskedTextBox;
-
- if( !maskedTextBox.IsInitialized )
- return;
-
- if( maskedTextBox.m_maskIsNull )
- return;
-
- maskedTextBox.m_maskedTextProvider.SkipLiterals = ( bool )e.NewValue;
- }
-
- #endregion SkipLiterals Property
-
- #region Text Property
-
- private static object TextCoerceValueCallback( DependencyObject sender, object value )
- {
- MaskedTextBox maskedTextBox = sender as MaskedTextBox;
-
- if( !maskedTextBox.IsInitialized )
- return DependencyProperty.UnsetValue;
-
- if( maskedTextBox.IsInIMEComposition )
- {
- // In IME Composition. We must return an uncoerced value or else the IME decorator won't disappear after text input.
- return value;
- }
-
- if( value == null )
- value = string.Empty;
-
- if( ( maskedTextBox.IsForcingText ) || ( maskedTextBox.m_maskIsNull ) )
- return value;
-
- // Only direct affectation to the Text property or binding of the Text property should
- // come through here. All other cases should pre-validate the text and affect it through the ForceText method.
- string text = maskedTextBox.ValidateText( ( string )value );
-
- return text;
- }
-
- private string ValidateText( string text )
- {
- string coercedText = text;
-
- if( this.RejectInputOnFirstFailure )
- {
- MaskedTextProvider provider = m_maskedTextProvider.Clone() as MaskedTextProvider;
-
- int notUsed;
- MaskedTextResultHint hint;
-
- //0 – Digit zero to 9[ Required ]
- //9 – Digit 0 – 9[ Optional ]
- //A – Alpha Numeric. [Required]
- //a – Alpha Numeric. [Optional]
- //L – Letters a-z, A-Z[ Required ]
- //? – Letters a-z, A-Z[ Optional ]
- //C – Any non-control character [Optional]
- //< - When first, all following characters are in lower case.
- //> - When first, all following characters are in upper case.
- if( provider.Set( text, out notUsed, out hint ) || provider.Mask.StartsWith( ">" ) || provider.Mask.StartsWith( "<" ) )
- {
- coercedText = this.GetFormattedString( provider, text );
- }
- else
- {
- // Coerce the text to remain the same.
- coercedText = this.GetFormattedString( m_maskedTextProvider, text );
-
- // The TextPropertyChangedCallback won't be called.
- // Therefore, we must sync the maskedTextProvider.
- m_maskedTextProvider.Set( coercedText );
- }
- }
- else
- {
- MaskedTextProvider provider = ( MaskedTextProvider )m_maskedTextProvider.Clone();
-
- int caretIndex;
-
- if( this.CanReplace( provider, text, 0, m_maskedTextProvider.Length, this.RejectInputOnFirstFailure, out caretIndex ) )
- {
- coercedText = this.GetFormattedString( provider, text );
- }
- else
- {
- // Coerce the text to remain the same.
- coercedText = this.GetFormattedString( m_maskedTextProvider, text );
-
- // The TextPropertyChangedCallback won't be called.
- // Therefore, we must sync the maskedTextProvider.
- m_maskedTextProvider.Set( coercedText );
- }
- }
-
- return coercedText;
- }
-
- protected override void OnTextChanged( TextChangedEventArgs e )
- {
- if( !m_maskIsNull )
- {
- if( ( this.IsInValueChanged ) || ( !this.IsForcingText ) )
- {
- string newText = this.Text;
-
- if( m_maskIsNull )
- {
- this.CaretIndex = newText.Length;
- }
- else
- {
- m_maskedTextProvider.Set( newText );
-
- if( m_maskedTextProvider.Mask.StartsWith( ">" ) || m_maskedTextProvider.Mask.StartsWith( "<" ) )
- {
- this.CaretIndex = newText.Length;
- }
- else
- {
- int caretIndex = m_maskedTextProvider.FindUnassignedEditPositionFrom( 0, true );
-
- if( caretIndex == -1 )
- caretIndex = m_maskedTextProvider.Length;
-
- this.CaretIndex = caretIndex;
- }
- }
- }
- }
-
- // m_maskedTextProvider can be null in the designer. With WPF 3.5 SP1, sometimes,
- // TextChanged will be triggered before OnInitialized is called.
- if( m_maskedTextProvider != null )
- {
- this.SetIsMaskCompleted( m_maskedTextProvider.MaskCompleted );
- this.SetIsMaskFull( m_maskedTextProvider.MaskFull );
- }
-
- base.OnTextChanged( e );
- }
-
- #endregion Text Property
-
-
- #region COMMANDS
-
- private void OnPreviewCanExecuteCommands( object sender, CanExecuteRoutedEventArgs e )
- {
- if( m_maskIsNull )
- return;
-
- RoutedUICommand routedUICommand = e.Command as RoutedUICommand;
-
- if( ( routedUICommand != null )
- && ( ( routedUICommand.Name == "Space" ) || ( routedUICommand.Name == "ShiftSpace" ) ) )
- {
- if( this.IsReadOnly )
- {
- e.CanExecute = false;
- }
- else
- {
- MaskedTextProvider provider = ( MaskedTextProvider )m_maskedTextProvider.Clone();
- int caretIndex;
- e.CanExecute = this.CanReplace( provider, " ", this.SelectionStart, this.SelectionLength, this.RejectInputOnFirstFailure, out caretIndex );
- }
-
- e.Handled = true;
- }
- else if( ( e.Command == ApplicationCommands.Undo ) || ( e.Command == ApplicationCommands.Redo ) )
- {
- e.CanExecute = false;
- e.Handled = true;
- }
- }
-
- private void OnPreviewExecutedCommands( object sender, ExecutedRoutedEventArgs e )
- {
- if( m_maskIsNull )
- return;
-
- if( e.Command == EditingCommands.Delete )
- {
- e.Handled = true;
- this.Delete( this.SelectionStart, this.SelectionLength, true );
- }
- else if( e.Command == EditingCommands.DeleteNextWord )
- {
- e.Handled = true;
- EditingCommands.SelectRightByWord.Execute( null, this as IInputElement );
- this.Delete( this.SelectionStart, this.SelectionLength, true );
- }
- else if( e.Command == EditingCommands.DeletePreviousWord )
- {
- e.Handled = true;
- EditingCommands.SelectLeftByWord.Execute( null, this as IInputElement );
- this.Delete( this.SelectionStart, this.SelectionLength, false );
- }
- else if( e.Command == EditingCommands.Backspace )
- {
- e.Handled = true;
- this.Delete( this.SelectionStart, this.SelectionLength, false );
- }
- else if( e.Command == ApplicationCommands.Cut )
- {
- e.Handled = true;
-
- if( ApplicationCommands.Copy.CanExecute( null, this as IInputElement ) )
- ApplicationCommands.Copy.Execute( null, this as IInputElement );
-
- this.Delete( this.SelectionStart, this.SelectionLength, true );
- }
- else if( e.Command == ApplicationCommands.Copy )
- {
- e.Handled = true;
- this.ExecuteCopy();
- }
- else if( e.Command == ApplicationCommands.Paste )
- {
- e.Handled = true;
-
- string clipboardContent = ( string )Clipboard.GetDataObject().GetData( "System.String" );
- this.Replace( clipboardContent, this.SelectionStart, this.SelectionLength );
- }
- else
- {
- RoutedUICommand routedUICommand = e.Command as RoutedUICommand;
-
- if( ( routedUICommand != null )
- && ( ( routedUICommand.Name == "Space" ) || ( routedUICommand.Name == "ShiftSpace" ) ) )
- {
- e.Handled = true;
- this.ProcessTextInput( " " );
- }
- }
- }
-
- private void CanExecuteDelete( object sender, CanExecuteRoutedEventArgs e )
- {
- if( m_maskIsNull )
- return;
-
- e.CanExecute = this.CanDelete( this.SelectionStart, this.SelectionLength, true, this.MaskedTextProvider.Clone() as MaskedTextProvider );
- e.Handled = true;
-
- if( ( !e.CanExecute ) && ( this.BeepOnError ) )
- System.Media.SystemSounds.Beep.Play();
- }
-
- private void CanExecuteDeletePreviousWord( object sender, CanExecuteRoutedEventArgs e )
- {
- if( m_maskIsNull )
- return;
-
- bool canDeletePreviousWord = ( !this.IsReadOnly ) && ( EditingCommands.SelectLeftByWord.CanExecute( null, this as IInputElement ) );
-
- if( canDeletePreviousWord )
- {
- int cachedSelectionStart = this.SelectionStart;
- int cachedSelectionLength = this.SelectionLength;
-
- EditingCommands.SelectLeftByWord.Execute( null, this as IInputElement );
-
- canDeletePreviousWord = this.CanDelete( this.SelectionStart, this.SelectionLength, false, this.MaskedTextProvider.Clone() as MaskedTextProvider );
-
- if( !canDeletePreviousWord )
- {
- this.SelectionStart = cachedSelectionStart;
- this.SelectionLength = cachedSelectionLength;
- }
- }
-
- e.CanExecute = canDeletePreviousWord;
- e.Handled = true;
-
- if( ( !e.CanExecute ) && ( this.BeepOnError ) )
- System.Media.SystemSounds.Beep.Play();
- }
-
- private void CanExecuteDeleteNextWord( object sender, CanExecuteRoutedEventArgs e )
- {
- if( m_maskIsNull )
- return;
-
- bool canDeleteNextWord = ( !this.IsReadOnly ) && ( EditingCommands.SelectRightByWord.CanExecute( null, this as IInputElement ) );
-
- if( canDeleteNextWord )
- {
- int cachedSelectionStart = this.SelectionStart;
- int cachedSelectionLength = this.SelectionLength;
-
- EditingCommands.SelectRightByWord.Execute( null, this as IInputElement );
-
- canDeleteNextWord = this.CanDelete( this.SelectionStart, this.SelectionLength, true, this.MaskedTextProvider.Clone() as MaskedTextProvider );
-
- if( !canDeleteNextWord )
- {
- this.SelectionStart = cachedSelectionStart;
- this.SelectionLength = cachedSelectionLength;
- }
- }
-
- e.CanExecute = canDeleteNextWord;
- e.Handled = true;
-
- if( ( !e.CanExecute ) && ( this.BeepOnError ) )
- System.Media.SystemSounds.Beep.Play();
- }
-
- private void CanExecuteBackspace( object sender, CanExecuteRoutedEventArgs e )
- {
- if( m_maskIsNull )
- return;
-
- e.CanExecute = this.CanDelete( this.SelectionStart, this.SelectionLength, false, this.MaskedTextProvider.Clone() as MaskedTextProvider );
- e.Handled = true;
-
- if( ( !e.CanExecute ) && ( this.BeepOnError ) )
- System.Media.SystemSounds.Beep.Play();
- }
-
- private void CanExecuteCut( object sender, CanExecuteRoutedEventArgs e )
- {
- if( m_maskIsNull )
- return;
-
- bool canCut = ( !this.IsReadOnly ) && ( this.SelectionLength > 0 );
-
- if( canCut )
- {
- int endPosition = ( this.SelectionLength > 0 ) ? ( ( this.SelectionStart + this.SelectionLength ) - 1 ) : this.SelectionStart;
-
- MaskedTextProvider provider = m_maskedTextProvider.Clone() as MaskedTextProvider;
-
- canCut = provider.RemoveAt( this.SelectionStart, endPosition );
- }
-
- e.CanExecute = canCut;
- e.Handled = true;
-
- if( ( !canCut ) && ( this.BeepOnError ) )
- System.Media.SystemSounds.Beep.Play();
- }
-
- private void CanExecutePaste( object sender, CanExecuteRoutedEventArgs e )
- {
- if( m_maskIsNull )
- return;
-
- bool canPaste = false;
-
- if( !this.IsReadOnly )
- {
- string clipboardContent = string.Empty;
-
- try
- {
- clipboardContent = ( string )Clipboard.GetDataObject().GetData( "System.String" );
-
- if( clipboardContent != null )
- {
- MaskedTextProvider provider = ( MaskedTextProvider )m_maskedTextProvider.Clone();
- int caretIndex;
- canPaste = this.CanReplace( provider, clipboardContent, this.SelectionStart, this.SelectionLength, this.RejectInputOnFirstFailure, out caretIndex );
- }
- }
- catch
- {
- }
- }
-
- e.CanExecute = canPaste;
- e.Handled = true;
-
- if( ( !e.CanExecute ) && ( this.BeepOnError ) )
- System.Media.SystemSounds.Beep.Play();
- }
-
- private void CanExecuteCopy( object sender, CanExecuteRoutedEventArgs e )
- {
- if( m_maskIsNull )
- return;
-
- e.CanExecute = !m_maskedTextProvider.IsPassword;
- e.Handled = true;
-
- if( ( !e.CanExecute ) && ( this.BeepOnError ) )
- System.Media.SystemSounds.Beep.Play();
- }
-
- private void ExecuteCopy()
- {
- string selectedText = this.GetSelectedText();
- try
- {
- new UIPermission( UIPermissionClipboard.AllClipboard ).Demand();
-
- if( selectedText.Length == 0 )
- {
- Clipboard.Clear();
- }
- else
- {
- Clipboard.SetText( selectedText );
- }
- }
- catch( SecurityException )
- {
- }
- }
-
- private void ToggleInsertExecutedCallback( object sender, ExecutedRoutedEventArgs e )
- {
- m_insertToggled = !m_insertToggled;
- }
-
- #endregion COMMANDS
-
- #region DRAG DROP
-
- private void PreviewQueryContinueDragCallback( object sender, QueryContinueDragEventArgs e )
- {
- if( m_maskIsNull )
- return;
-
- e.Action = DragAction.Cancel;
- e.Handled = true;
- }
-
- protected override void OnDragEnter( DragEventArgs e )
- {
- if( !m_maskIsNull )
- {
- e.Effects = DragDropEffects.None;
- e.Handled = true;
- }
-
- base.OnDragEnter( e );
- }
-
- protected override void OnDragOver( DragEventArgs e )
- {
- if( !m_maskIsNull )
- {
- e.Effects = DragDropEffects.None;
- e.Handled = true;
- }
-
- base.OnDragOver( e );
- }
-
- #endregion DRAG DROP
-
-
- #region VALUE FROM TEXT
-
- protected override bool QueryValueFromTextCore( string text, out object value )
- {
- Type valueDataType = this.ValueDataType;
-
- if( valueDataType != null )
- {
- if( ( m_unhandledLiteralsPositions != null )
- && ( m_unhandledLiteralsPositions.Count > 0 ) )
- {
- text = m_maskedTextProvider.ToString( false, false, true, 0, m_maskedTextProvider.Length );
-
- for( int i = m_unhandledLiteralsPositions.Count - 1; i >= 0; i-- )
- {
- text = text.Remove( m_unhandledLiteralsPositions[ i ], 1 );
- }
- }
- }
-
- return base.QueryValueFromTextCore( text, out value );
- }
-
- #endregion VALUE FROM TEXT
-
- #region TEXT FROM VALUE
-
- protected override string QueryTextFromValueCore( object value )
- {
- if( ( m_valueToStringMethodInfo != null ) && ( value != null ) )
- {
- try
- {
- string text = ( string )m_valueToStringMethodInfo.Invoke( value, new object[] { m_formatSpecifier, this.GetActiveFormatProvider() } );
- return text;
- }
- catch
- {
- }
- }
-
- return base.QueryTextFromValueCore( value );
- }
-
- #endregion TEXT FROM VALUE
-
-
- #region PROTECTED METHODS
-
- protected virtual char[] GetMaskCharacters()
- {
- return MaskedTextBox.MaskChars;
- }
-
- private MaskedTextProvider CreateMaskedTextProvider( string mask )
- {
- return this.CreateMaskedTextProvider(
- mask,
- this.GetCultureInfo(),
- this.AllowPromptAsInput,
- this.PromptChar,
- MaskedTextBox.DefaultPasswordChar,
- this.RestrictToAscii );
- }
-
- protected virtual MaskedTextProvider CreateMaskedTextProvider(
- string mask,
- CultureInfo cultureInfo,
- bool allowPromptAsInput,
- char promptChar,
- char passwordChar,
- bool restrictToAscii )
- {
- MaskedTextProvider provider = new MaskedTextProvider(
- mask,
- cultureInfo,
- allowPromptAsInput,
- promptChar,
- passwordChar,
- restrictToAscii );
-
- provider.ResetOnPrompt = this.ResetOnPrompt;
- provider.ResetOnSpace = this.ResetOnSpace;
- provider.SkipLiterals = this.SkipLiterals;
-
- provider.IncludeLiterals = true;
- provider.IncludePrompt = true;
-
- provider.IsPassword = false;
-
- return provider;
- }
-
- internal override void OnIMECompositionEnded( CachedTextInfo cachedTextInfo )
- {
- // End of IME Composition. Restore the critical infos.
- this.ForceText( cachedTextInfo.Text, false );
- this.CaretIndex = cachedTextInfo.CaretIndex;
- this.SelectionStart = cachedTextInfo.SelectionStart;
- this.SelectionLength = cachedTextInfo.SelectionLength;
- }
-
- protected override void OnTextInput( System.Windows.Input.TextCompositionEventArgs e )
- {
- if( this.IsInIMEComposition )
- this.EndIMEComposition();
-
- if( ( m_maskIsNull ) || ( m_maskedTextProvider == null ) || ( this.IsReadOnly ) )
- {
- base.OnTextInput( e );
- return;
- }
-
- e.Handled = true;
-
- if( this.CharacterCasing == CharacterCasing.Upper )
- {
- this.ProcessTextInput( e.Text.ToUpper() );
- }
- else if( this.CharacterCasing == CharacterCasing.Lower )
- {
- this.ProcessTextInput( e.Text.ToLower() );
- }
- else
- {
- this.ProcessTextInput( e.Text );
- }
-
- base.OnTextInput( e );
- }
-
- private void ProcessTextInput( string text )
- {
- if( text.Length == 1 )
- {
- string textOutput = this.MaskedTextOutput;
-
- int caretIndex;
- if( this.PlaceChar( text[ 0 ], this.SelectionStart, this.SelectionLength, this.IsOverwriteMode, out caretIndex ) )
- {
- if( this.MaskedTextOutput != textOutput )
- this.RefreshCurrentText( false );
-
- this.SelectionStart = caretIndex + 1;
- }
- else
- {
- if( this.BeepOnError )
- System.Media.SystemSounds.Beep.Play();
- }
-
- if( this.SelectionLength > 0 )
- this.SelectionLength = 0;
- }
- else
- {
- this.Replace( text, this.SelectionStart, this.SelectionLength );
- }
- }
-
- protected override void ValidateValue( object value )
- {
- base.ValidateValue( value );
-
- // Validate if it fits in the mask
- if( !m_maskIsNull )
- {
- string representation = this.GetTextFromValue( value );
-
- MaskedTextProvider provider = m_maskedTextProvider.Clone() as MaskedTextProvider;
-
- if( !provider.VerifyString( representation ) )
- throw new ArgumentException( "The value representation '" + representation + "' does not match the mask.", "value" );
- }
- }
-
- #endregion PROTECTED METHODS
-
-
- #region INTERNAL PROPERTIES
-
- internal bool IsForcingMask
- {
- get
- {
- return m_forcingMask;
- }
- }
-
- internal string FormatSpecifier
- {
- get
- {
- return m_formatSpecifier;
- }
- set
- {
- m_formatSpecifier = value;
- }
- }
-
- internal override bool IsTextReadyToBeParsed
- {
- get
- {
- return this.IsMaskCompleted;
- }
- }
-
- internal override bool GetIsEditTextEmpty()
- {
- if( !m_maskIsNull )
- return ( this.MaskedTextProvider.AssignedEditPositionCount == 0 );
- return true;
- }
-
- #endregion INTERNAL PROPERTIES
-
- #region INTERNAL METHODS
-
- internal override string GetCurrentText()
- {
- if( m_maskIsNull )
- return base.GetCurrentText();
-
- string displayText = this.GetFormattedString( m_maskedTextProvider, this.Text );
-
- return displayText;
- }
-
- internal override string GetParsableText()
- {
- if( m_maskIsNull )
- return base.GetParsableText();
-
- bool includePrompt = false;
- bool includeLiterals = true;
-
- if( this.ValueDataType == typeof( string ) )
- {
- includePrompt = this.IncludePromptInValue;
- includeLiterals = this.IncludeLiteralsInValue;
- }
-
- return m_maskedTextProvider
- .ToString( false, includePrompt, includeLiterals, 0, m_maskedTextProvider.Length );
- }
-
- internal override void OnFormatProviderChanged()
- {
- MaskedTextProvider provider = new MaskedTextProvider( this.Mask );
-
- m_maskedTextProvider = provider;
-
- this.RefreshConversionHelpers();
- this.RefreshCurrentText( true );
-
- base.OnFormatProviderChanged();
- }
-
- internal override void RefreshConversionHelpers()
- {
- Type type = this.ValueDataType;
-
- if( ( type == null ) || ( !this.IsNumericValueDataType ) )
- {
- m_formatSpecifier = null;
- m_valueToStringMethodInfo = null;
- m_unhandledLiteralsPositions = null;
- return;
- }
-
- m_valueToStringMethodInfo = type.GetMethod( "ToString", new Type[] { typeof( string ), typeof( IFormatProvider ) } );
-
- string mask = m_maskedTextProvider.Mask;
- IFormatProvider activeFormatProvider = this.GetActiveFormatProvider();
-
- char[] maskChars = this.GetMaskCharacters();
-
- List unhandledLiteralsPositions;
-
- m_formatSpecifier = MaskedTextBox.GetFormatSpecifierFromMask(
- mask,
- maskChars,
- activeFormatProvider,
- this.IncludeLiteralsInValue,
- out unhandledLiteralsPositions );
-
- NumberFormatInfo numberFormatInfo = activeFormatProvider.GetFormat( typeof( NumberFormatInfo ) ) as NumberFormatInfo;
-
- if( numberFormatInfo != null )
- {
- string negativeSign = numberFormatInfo.NegativeSign;
-
- if( m_formatSpecifier.Contains( negativeSign ) )
- {
- // We must make sure that the value data type is numeric since we are about to
- // set the format specifier to its Positive,Negative,Zero format pattern.
- // If we do not do this, the negative symbol would double itself when IncludeLiteralsInValue
- // is set to True and a negative symbol is added to the mask as a literal.
- Debug.Assert( this.IsNumericValueDataType );
-
- m_formatSpecifier = m_formatSpecifier + ";" + m_formatSpecifier + ";" + m_formatSpecifier;
- }
- else
- {
-
- }
- }
-
- m_unhandledLiteralsPositions = unhandledLiteralsPositions;
- }
-
- internal void SetValueToStringMethodInfo( MethodInfo valueToStringMethodInfo )
- {
- m_valueToStringMethodInfo = valueToStringMethodInfo;
- }
-
- internal void ForceMask( string mask )
- {
- m_forcingMask = true;
-
- try
- {
- this.Mask = mask;
- }
- finally
- {
- m_forcingMask = false;
- }
- }
-
- #endregion INTERNAL METHODS
-
- #region PRIVATE PROPERTIES
-
- private bool IsOverwriteMode
- {
- get
- {
- if( !m_maskIsNull )
- {
- switch( this.InsertKeyMode )
- {
- case InsertKeyMode.Default:
- {
- return m_insertToggled;
- }
-
- case InsertKeyMode.Insert:
- {
- return false;
- }
-
- case InsertKeyMode.Overwrite:
- {
- return true;
- }
- }
- }
-
- return false;
- }
- }
-
- #endregion PRIVATE PROPERTIES
-
- #region PRIVATE METHODS
-
- private bool PlaceChar( char ch, int startPosition, int length, bool overwrite, out int caretIndex )
- {
- return this.PlaceChar( m_maskedTextProvider, ch, startPosition, length, overwrite, out caretIndex );
- }
-
-
- private bool PlaceChar( MaskedTextProvider provider, char ch, int startPosition, int length, bool overwrite, out int caretPosition )
- {
- if( this.ShouldQueryAutoCompleteMask( provider.Clone() as MaskedTextProvider, ch, startPosition ) )
- {
- AutoCompletingMaskEventArgs e = new AutoCompletingMaskEventArgs(
- m_maskedTextProvider.Clone() as MaskedTextProvider,
- startPosition,
- length,
- ch.ToString() );
-
- this.OnAutoCompletingMask( e );
-
- if( ( !e.Cancel ) && ( e.AutoCompleteStartPosition > -1 ) )
- {
- caretPosition = startPosition;
-
- // AutoComplete the block.
- for( int i = 0; i < e.AutoCompleteText.Length; i++ )
- {
- if( !this.PlaceCharCore( provider, e.AutoCompleteText[ i ], e.AutoCompleteStartPosition + i, 0, true, out caretPosition ) )
- return false;
- }
-
- caretPosition = e.AutoCompleteStartPosition + e.AutoCompleteText.Length;
- return true;
- }
- }
-
- return this.PlaceCharCore( provider, ch, startPosition, length, overwrite, out caretPosition );
- }
-
- private bool ShouldQueryAutoCompleteMask( MaskedTextProvider provider, char ch, int startPosition )
- {
- if( provider.IsEditPosition( startPosition ) )
- {
- int nextSeparatorIndex = provider.FindNonEditPositionFrom( startPosition, true );
-
- if( nextSeparatorIndex != -1 )
- {
- if( provider[ nextSeparatorIndex ].Equals( ch ) )
- {
- int previousSeparatorIndex = provider.FindNonEditPositionFrom( startPosition, false );
-
- if( provider.FindUnassignedEditPositionInRange( previousSeparatorIndex, nextSeparatorIndex, true ) != -1 )
- {
- return true;
- }
- }
- }
- }
-
- return false;
- }
-
- protected virtual void OnAutoCompletingMask( AutoCompletingMaskEventArgs e )
- {
- if( this.AutoCompletingMask != null )
- this.AutoCompletingMask( this, e );
- }
-
- public event EventHandler AutoCompletingMask;
-
-
- private bool PlaceCharCore( MaskedTextProvider provider, char ch, int startPosition, int length, bool overwrite, out int caretPosition )
- {
- caretPosition = startPosition;
-
- if( startPosition < m_maskedTextProvider.Length )
- {
- MaskedTextResultHint notUsed;
-
- if( length > 0 )
- {
- int endPosition = ( startPosition + length ) - 1;
- return provider.Replace( ch, startPosition, endPosition, out caretPosition, out notUsed );
- }
-
- if( overwrite )
- return provider.Replace( ch, startPosition, out caretPosition, out notUsed );
-
- return provider.InsertAt( ch, startPosition, out caretPosition, out notUsed );
- }
-
- return false;
- }
-
- internal void Replace( string text, int startPosition, int selectionLength )
- {
- MaskedTextProvider provider = ( MaskedTextProvider )m_maskedTextProvider.Clone();
- int tentativeCaretIndex;
-
- if( this.CanReplace( provider, text, startPosition, selectionLength, this.RejectInputOnFirstFailure, out tentativeCaretIndex ) )
- {
- System.Diagnostics.Debug.WriteLine( "Replace caret index to: " + tentativeCaretIndex.ToString() );
-
- bool mustRefreshText = this.MaskedTextOutput != provider.ToString();
- m_maskedTextProvider = provider;
-
- if( mustRefreshText )
- this.RefreshCurrentText( false );
-
- this.CaretIndex = tentativeCaretIndex + 1;
- }
- else
- {
- if( this.BeepOnError )
- System.Media.SystemSounds.Beep.Play();
- }
- }
-
- internal virtual bool CanReplace( MaskedTextProvider provider, string text, int startPosition, int selectionLength, bool rejectInputOnFirstFailure, out int tentativeCaretIndex )
- {
- int endPosition = ( startPosition + selectionLength ) - 1;
- tentativeCaretIndex = -1;
-
-
- bool success = false;
-
- foreach( char ch in text )
- {
- if( !m_maskedTextProvider.VerifyEscapeChar( ch, startPosition ) )
- {
- int editPositionFrom = provider.FindEditPositionFrom( startPosition, true );
-
- if( editPositionFrom == MaskedTextProvider.InvalidIndex )
- break;
-
- startPosition = editPositionFrom;
- }
-
- int length = ( endPosition >= startPosition ) ? 1 : 0;
- bool overwrite = length > 0;
-
- if( this.PlaceChar( provider, ch, startPosition, length, overwrite, out tentativeCaretIndex ) )
- {
- // Only one successfully inserted character is enough to declare the replace operation successful.
- success = true;
-
- startPosition = tentativeCaretIndex + 1;
- }
- else if( rejectInputOnFirstFailure )
- {
- return false;
- }
- }
-
- if( ( selectionLength > 0 ) && ( startPosition <= endPosition ) )
- {
-
- // Erase the remaining of the assigned edit character.
- int notUsed;
- MaskedTextResultHint notUsedHint;
- if( !provider.RemoveAt( startPosition, endPosition, out notUsed, out notUsedHint ) )
- success = false;
- }
-
- return success;
- }
-
- private bool CanDelete( int startPosition, int selectionLength, bool deleteForward, MaskedTextProvider provider )
- {
- if( this.IsReadOnly )
- return false;
-
-
- if( selectionLength == 0 )
- {
- if( !deleteForward )
- {
- if( startPosition == 0 )
- return false;
-
- startPosition--;
- }
- else if( ( startPosition + selectionLength ) == provider.Length )
- {
- return false;
- }
- }
-
- MaskedTextResultHint notUsed;
- int tentativeCaretPosition = startPosition;
-
- int endPosition = ( selectionLength > 0 ) ? ( ( startPosition + selectionLength ) - 1 ) : startPosition;
-
- bool success = provider.RemoveAt( startPosition, endPosition, out tentativeCaretPosition, out notUsed );
-
- return success;
- }
-
- private void Delete( int startPosition, int selectionLength, bool deleteForward )
- {
- if( this.IsReadOnly )
- return;
-
-
- if( selectionLength == 0 )
- {
- if( !deleteForward )
- {
- if( startPosition == 0 )
- return;
-
- startPosition--;
- }
- else if( ( startPosition + selectionLength ) == m_maskedTextProvider.Length )
- {
- return;
- }
- }
-
- MaskedTextResultHint hint;
- int tentativeCaretPosition = startPosition;
-
- int endPosition = ( selectionLength > 0 ) ? ( ( startPosition + selectionLength ) - 1 ) : startPosition;
-
- string oldTextOutput = this.MaskedTextOutput;
-
- bool success = m_maskedTextProvider.RemoveAt( startPosition, endPosition, out tentativeCaretPosition, out hint );
-
- if( !success )
- {
- if( this.BeepOnError )
- System.Media.SystemSounds.Beep.Play();
-
- return;
- }
-
- if( this.MaskedTextOutput != oldTextOutput )
- {
- this.RefreshCurrentText( false );
- }
- else if( selectionLength > 0 )
- {
- tentativeCaretPosition = startPosition;
- }
- else if( hint == MaskedTextResultHint.NoEffect )
- {
- if( deleteForward )
- {
- tentativeCaretPosition = m_maskedTextProvider.FindEditPositionFrom( startPosition, true );
- }
- else
- {
- if( m_maskedTextProvider.FindAssignedEditPositionFrom( startPosition, true ) == MaskedTextProvider.InvalidIndex )
- {
- tentativeCaretPosition = m_maskedTextProvider.FindAssignedEditPositionFrom( startPosition, false );
- }
- else
- {
- tentativeCaretPosition = m_maskedTextProvider.FindEditPositionFrom( startPosition, false );
- }
-
- if( tentativeCaretPosition != MaskedTextProvider.InvalidIndex )
- tentativeCaretPosition++;
- }
-
- if( tentativeCaretPosition == MaskedTextProvider.InvalidIndex )
- tentativeCaretPosition = startPosition;
- }
- else if( !deleteForward )
- {
- tentativeCaretPosition = startPosition;
- }
-
- this.CaretIndex = tentativeCaretPosition;
- }
-
- private string MaskedTextOutput
- {
- get
- {
- System.Diagnostics.Debug.Assert( m_maskedTextProvider.EditPositionCount > 0 );
-
- return m_maskedTextProvider.ToString();
- }
- }
-
- private string GetRawText()
- {
- if( m_maskIsNull )
- return this.Text;
-
- return MaskedTextBox.GetRawText( m_maskedTextProvider );
- }
-
- private string GetFormattedString( MaskedTextProvider provider, string text )
- {
- if( provider.Mask.StartsWith( ">" ) )
- return text.ToUpper();
- if( provider.Mask.StartsWith( "<" ) )
- return text.ToLower();
-
- //System.Diagnostics.Debug.Assert( provider.EditPositionCount > 0 );
-
-
- bool includePrompt = ( this.IsReadOnly ) ? false : ( !this.HidePromptOnLeave || this.IsFocused );
-
- string displayString = provider.ToString( false, includePrompt, true, 0, m_maskedTextProvider.Length );
-
- return displayString;
- }
-
- private string GetSelectedText()
- {
- System.Diagnostics.Debug.Assert( !m_maskIsNull );
-
- int selectionLength = this.SelectionLength;
-
- if( selectionLength == 0 )
- return string.Empty;
-
- bool includePrompt = ( this.ClipboardMaskFormat & MaskFormat.IncludePrompt ) != MaskFormat.ExcludePromptAndLiterals;
- bool includeLiterals = ( this.ClipboardMaskFormat & MaskFormat.IncludeLiterals ) != MaskFormat.ExcludePromptAndLiterals;
-
- return m_maskedTextProvider.ToString( true, includePrompt, includeLiterals, this.SelectionStart, selectionLength );
- }
-
- #endregion PRIVATE METHODS
-
- #region PRIVATE FIELDS
-
- private MaskedTextProvider m_maskedTextProvider; // = null;
- private bool m_insertToggled; // = false;
- private bool m_maskIsNull = true;
- private bool m_forcingMask; // = false;
-
- List m_unhandledLiteralsPositions; // = null;
- private string m_formatSpecifier;
- private MethodInfo m_valueToStringMethodInfo; // = null;
-
- #endregion PRIVATE FIELDS
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Icons/Error48.png b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Icons/Error48.png
deleted file mode 100644
index 4304d43b..00000000
Binary files a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Icons/Error48.png and /dev/null differ
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Icons/Information48.png b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Icons/Information48.png
deleted file mode 100644
index 35075187..00000000
Binary files a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Icons/Information48.png and /dev/null differ
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Icons/Question48.png b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Icons/Question48.png
deleted file mode 100644
index dad7dd09..00000000
Binary files a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Icons/Question48.png and /dev/null differ
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Icons/Warning48.png b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Icons/Warning48.png
deleted file mode 100644
index ecb7fe86..00000000
Binary files a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Icons/Warning48.png and /dev/null differ
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/MessageBox.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/MessageBox.cs
deleted file mode 100644
index 80fdf126..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/MessageBox.cs
+++ /dev/null
@@ -1,1203 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Media;
-using System.Windows.Input;
-using System.Text;
-using System.Security.Permissions;
-using System.Security;
-using Xceed.Wpf.Toolkit.Primitives;
-using System.Diagnostics;
-using System.Windows.Media.Imaging;
-using System.Windows.Threading;
-using System.Windows.Interop;
-
-namespace Xceed.Wpf.Toolkit
-{
- [TemplateVisualState( Name = VisualStates.OK, GroupName = VisualStates.MessageBoxButtonsGroup )]
- [TemplateVisualState( Name = VisualStates.OKCancel, GroupName = VisualStates.MessageBoxButtonsGroup )]
- [TemplateVisualState( Name = VisualStates.YesNo, GroupName = VisualStates.MessageBoxButtonsGroup )]
- [TemplateVisualState( Name = VisualStates.YesNoCancel, GroupName = VisualStates.MessageBoxButtonsGroup )]
- [TemplatePart( Name = PART_CancelButton, Type = typeof( Button ) )]
- [TemplatePart( Name = PART_NoButton, Type = typeof( Button ) )]
- [TemplatePart( Name = PART_OkButton, Type = typeof( Button ) )]
- [TemplatePart( Name = PART_YesButton, Type = typeof( Button ) )]
- [TemplatePart( Name = PART_WindowControl, Type = typeof( WindowControl ) )]
- public class MessageBox : WindowControl
- {
- private const string PART_CancelButton = "PART_CancelButton";
- private const string PART_NoButton = "PART_NoButton";
- private const string PART_OkButton = "PART_OkButton";
- private const string PART_YesButton = "PART_YesButton";
- private const string PART_CloseButton = "PART_CloseButton";
- private const string PART_WindowControl = "PART_WindowControl";
-
- #region Private Members
-
- ///
- /// Tracks the MessageBoxButon value passed into the InitializeContainer method
- ///
- private MessageBoxButton _button = MessageBoxButton.OK;
-
- ///
- /// Tracks the MessageBoxResult to set as the default and focused button
- ///
- private MessageBoxResult _defaultResult = MessageBoxResult.None;
-
- ///
- /// Will contain the result when the messagebox is shown inside a WindowContainer
- ///
- private MessageBoxResult _dialogResult = MessageBoxResult.None;
-
- ///
- /// Tracks the owner of the MessageBox
- ///
- private Window _owner;
- private IntPtr _ownerHandle;
-
- private WindowControl _windowControl;
-
- #endregion //Private Members
-
- #region Constructors
-
- static MessageBox()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( MessageBox ), new FrameworkPropertyMetadata( typeof( MessageBox ) ) );
- }
-
- public MessageBox()
- {
- this.Visibility = Visibility.Collapsed;
- this.InitHandlers();
- this.IsVisibleChanged += this.MessageBox_IsVisibleChanged;
- }
-
- #endregion //Constructors
-
- #region Properties
-
- #region Protected Properties
-
- protected Window Container
- {
- get { return ( this.Parent as Window ); }
- }
-
- #endregion //Protected Properties
-
- #region Dependency Properties
-
- #region ButtonRegionBackground
-
- public static readonly DependencyProperty ButtonRegionBackgroundProperty = DependencyProperty.Register( "ButtonRegionBackground", typeof( Brush ), typeof( MessageBox ), new PropertyMetadata( null ) );
- public Brush ButtonRegionBackground
- {
- get
- {
- return ( Brush )GetValue( ButtonRegionBackgroundProperty );
- }
- set
- {
- SetValue( ButtonRegionBackgroundProperty, value );
- }
- }
-
- #endregion //ButtonRegionBackground
-
- #region CancelButtonContent
-
- public static readonly DependencyProperty CancelButtonContentProperty = DependencyProperty.Register( "CancelButtonContent", typeof( object ), typeof( MessageBox ), new UIPropertyMetadata( "Cancel" ) );
- public object CancelButtonContent
- {
- get
- {
- return ( object )GetValue( CancelButtonContentProperty );
- }
- set
- {
- SetValue( CancelButtonContentProperty, value );
- }
- }
-
- #endregion //CancelButtonContent
-
- #region CancelButtonStyle
-
- public static readonly DependencyProperty CancelButtonStyleProperty = DependencyProperty.Register( "CancelButtonStyle", typeof( Style ), typeof( MessageBox ), new PropertyMetadata( null ) );
- public Style CancelButtonStyle
- {
- get
- {
- return ( Style )GetValue( CancelButtonStyleProperty );
- }
- set
- {
- SetValue( CancelButtonStyleProperty, value );
- }
- }
-
- #endregion //CancelButtonStyle
-
- #region ImageSource
-
- public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register( "ImageSource", typeof( ImageSource ), typeof( MessageBox ), new UIPropertyMetadata( default( ImageSource ) ) );
- public ImageSource ImageSource
- {
- get
- {
- return ( ImageSource )GetValue( ImageSourceProperty );
- }
- set
- {
- SetValue( ImageSourceProperty, value );
- }
- }
-
- #endregion //ImageSource
-
- #region OkButtonContent
-
- public static readonly DependencyProperty OkButtonContentProperty = DependencyProperty.Register( "OkButtonContent", typeof( object ), typeof( MessageBox ), new UIPropertyMetadata( "OK" ) );
- public object OkButtonContent
- {
- get
- {
- return ( object )GetValue( OkButtonContentProperty );
- }
- set
- {
- SetValue( OkButtonContentProperty, value );
- }
- }
-
- #endregion //OkButtonContent
-
- #region OkButtonStyle
-
- public static readonly DependencyProperty OkButtonStyleProperty = DependencyProperty.Register( "OkButtonStyle", typeof( Style ), typeof( MessageBox ), new PropertyMetadata( null ) );
- public Style OkButtonStyle
- {
- get
- {
- return ( Style )GetValue( OkButtonStyleProperty );
- }
- set
- {
- SetValue( OkButtonStyleProperty, value );
- }
- }
-
- #endregion //OkButtonStyle
-
- #region MessageBoxResult
-
- ///
- /// Gets the MessageBox result, which is set when the "Closed" event is raised.
- ///
- public MessageBoxResult MessageBoxResult
- {
- get { return _dialogResult; }
- }
-
- #endregion //MessageBoxResult
-
- #region NoButtonContent
-
- public static readonly DependencyProperty NoButtonContentProperty = DependencyProperty.Register( "NoButtonContent", typeof( object ), typeof( MessageBox ), new UIPropertyMetadata( "No" ) );
- public object NoButtonContent
- {
- get
- {
- return ( object )GetValue( NoButtonContentProperty );
- }
- set
- {
- SetValue( NoButtonContentProperty, value );
- }
- }
-
- #endregion //NoButtonContent
-
- #region NoButtonStyle
-
- public static readonly DependencyProperty NoButtonStyleProperty = DependencyProperty.Register( "NoButtonStyle", typeof( Style ), typeof( MessageBox ), new PropertyMetadata( null ) );
- public Style NoButtonStyle
- {
- get
- {
- return ( Style )GetValue( NoButtonStyleProperty );
- }
- set
- {
- SetValue( NoButtonStyleProperty, value );
- }
- }
-
- #endregion //NoButtonStyle
-
- #region Text
-
- public static readonly DependencyProperty TextProperty = DependencyProperty.Register( "Text", typeof( string ), typeof( MessageBox ), new UIPropertyMetadata( String.Empty ) );
- public string Text
- {
- get
- {
- return ( string )GetValue( TextProperty );
- }
- set
- {
- SetValue( TextProperty, value );
- }
- }
-
- #endregion //Text
-
- #region YesButtonContent
-
- public static readonly DependencyProperty YesButtonContentProperty = DependencyProperty.Register( "YesButtonContent", typeof( object ), typeof( MessageBox ), new UIPropertyMetadata( "Yes" ) );
- public object YesButtonContent
- {
- get
- {
- return ( object )GetValue( YesButtonContentProperty );
- }
- set
- {
- SetValue( YesButtonContentProperty, value );
- }
- }
-
- #endregion //YesButtonContent
-
- #region YesButtonStyle
-
- public static readonly DependencyProperty YesButtonStyleProperty = DependencyProperty.Register( "YesButtonStyle", typeof( Style ), typeof( MessageBox ), new PropertyMetadata( null ) );
- public Style YesButtonStyle
- {
- get
- {
- return ( Style )GetValue( YesButtonStyleProperty );
- }
- set
- {
- SetValue( YesButtonStyleProperty, value );
- }
- }
-
- #endregion //YesButtonStyle
-
- #endregion //Dependency Properties
-
- #endregion //Properties
-
- #region Base Class Overrides
-
- internal override bool AllowPublicIsActiveChange
- {
- get { return false; }
- }
-
- ///
- /// Overrides the OnApplyTemplate method.
- ///
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
-
- if( _windowControl != null )
- {
- _windowControl.HeaderDragDelta -= ( o, e ) => this.OnHeaderDragDelta( e );
- _windowControl.HeaderIconDoubleClicked -= ( o, e ) => this.OnHeaderIconDoubleClicked( e );
- _windowControl.CloseButtonClicked -= ( o, e ) => this.OnCloseButtonClicked( e );
- }
- _windowControl = this.GetTemplateChild( PART_WindowControl ) as WindowControl;
- if( _windowControl != null )
- {
- _windowControl.HeaderDragDelta += ( o, e ) => this.OnHeaderDragDelta( e );
- _windowControl.HeaderIconDoubleClicked += ( o, e ) => this.OnHeaderIconDoubleClicked( e );
- _windowControl.CloseButtonClicked += ( o, e ) => this.OnCloseButtonClicked( e );
- }
- this.UpdateBlockMouseInputsPanel();
-
- ChangeVisualState( _button.ToString(), true );
-
- Button closeButton = GetMessageBoxButton( PART_CloseButton );
- if( closeButton != null )
- closeButton.IsEnabled = !object.Equals( _button, MessageBoxButton.YesNo );
-
- Button okButton = GetMessageBoxButton( PART_OkButton );
- if( okButton != null )
- okButton.IsCancel = object.Equals( _button, MessageBoxButton.OK );
-
- SetDefaultResult();
- }
-
- protected override void OnPreviewKeyDown( KeyEventArgs e )
- {
- base.OnPreviewKeyDown( e );
-
- // Prevent MenuItem shortcuts while MessageBox is active.
- if( Keyboard.IsKeyDown( Key.LeftAlt ) || Keyboard.IsKeyDown( Key.RightAlt ) )
- {
- e.Handled = true;
- }
- }
-
- protected override object OnCoerceCloseButtonVisibility( Visibility newValue )
- {
- if( newValue != Visibility.Visible )
- throw new InvalidOperationException( "Close button on MessageBox is always Visible." );
- return newValue;
- }
-
- protected override object OnCoerceWindowStyle( WindowStyle newValue )
- {
- if( newValue != WindowStyle.SingleBorderWindow )
- throw new InvalidOperationException( "Window style on MessageBox is not available." );
- return newValue;
- }
-
- internal override void UpdateBlockMouseInputsPanel()
- {
- if( _windowControl != null )
- {
- _windowControl.IsBlockMouseInputsPanelActive = this.IsBlockMouseInputsPanelActive;
- }
- }
-
-
-
-
- #endregion //Base Class Overrides
-
- #region Methods
-
- #region Public Static
-
- #region Show with Window as Owner
-
-
- ///
- /// Displays a message box that has a message and that returns a result.
- ///
- /// A System.String that specifies the text to display.
- /// A Style that will be applied to the MessageBox instance.
- /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
- public static MessageBoxResult Show( string messageText )
- {
- return Show( messageText, string.Empty, MessageBoxButton.OK, (Style)null );
- }
-
- ///
- /// Displays a message box that has a message and that returns a result.
- ///
- /// A System.Windows.Window that represents the owner of the MessageBox
- /// A System.String that specifies the text to display.
- /// A Style that will be applied to the MessageBox instance.
- /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
- public static MessageBoxResult Show( Window owner, string messageText )
- {
- return Show( owner, messageText, string.Empty, MessageBoxButton.OK, (Style) null );
- }
-
- ///
- /// Displays a message box that has a message and title bar caption; and that returns a result.
- ///
- /// A System.String that specifies the text to display.
- /// A System.String that specifies the title bar caption to display.
- /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
- public static MessageBoxResult Show( string messageText, string caption )
- {
- return Show(messageText, caption, MessageBoxButton.OK, (Style)null);
- }
-
- public static MessageBoxResult Show( Window owner, string messageText, string caption )
- {
- return Show(owner, messageText, caption, (Style)null);
- }
-
- public static MessageBoxResult Show( Window owner, string messageText, string caption, Style messageBoxStyle )
- {
- return Show( owner, messageText, caption, MessageBoxButton.OK, messageBoxStyle );
- }
-
- public static MessageBoxResult Show( string messageText, string caption, MessageBoxButton button )
- {
- return Show(messageText, caption, button, (Style)null);
- }
-
- ///
- /// Displays a message box that has a message and that returns a result.
- ///
- /// A System.String that specifies the text to display.
- /// A System.String that specifies the title bar caption to display.
- /// A System.Windows.MessageBoxButton value that specifies which button or buttons to display.
- /// A Style that will be applied to the MessageBox instance.
- /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
- public static MessageBoxResult Show( string messageText, string caption, MessageBoxButton button, Style messageBoxStyle )
- {
- return ShowCore( null, IntPtr.Zero, messageText, caption, button, MessageBoxImage.None, MessageBoxResult.None, messageBoxStyle );
- }
-
-
- public static MessageBoxResult Show( Window owner, string messageText, string caption, MessageBoxButton button )
- {
- return Show(owner, messageText, caption, button, (Style)null);
- }
-
- public static MessageBoxResult Show( Window owner, string messageText, string caption, MessageBoxButton button, Style messageBoxStyle )
- {
- return ShowCore( owner, IntPtr.Zero, messageText, caption, button, MessageBoxImage.None, MessageBoxResult.None, messageBoxStyle );
- }
-
-
- public static MessageBoxResult Show( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon )
- {
- return Show(messageText, caption, button, icon, (Style)null);
- }
-
- ///
- /// Displays a message box that has a message and that returns a result.
- ///
- /// A System.String that specifies the text to display.
- /// A System.String that specifies the title bar caption to display.
- /// A System.Windows.MessageBoxButton value that specifies which button or buttons to display.
- /// A System.Windows.MessageBoxImage value that specifies the icon to display.
- /// A Style that will be applied to the MessageBox instance.
- /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
- public static MessageBoxResult Show( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, Style messageBoxStyle )
- {
- return ShowCore( null, IntPtr.Zero, messageText, caption, button, icon, MessageBoxResult.None, messageBoxStyle );
- }
-
- public static MessageBoxResult Show( Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon )
- {
- return Show(owner, messageText, caption, button, icon, (Style)null);
- }
-
- public static MessageBoxResult Show( Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, Style messageBoxStyle )
- {
- return ShowCore( owner, IntPtr.Zero, messageText, caption, button, icon, MessageBoxResult.None, messageBoxStyle );
- }
-
-
- public static MessageBoxResult Show( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult )
- {
- return Show(messageText, caption, button, icon, defaultResult, (Style)null);
- }
- ///
- /// Displays a message box that has a message and that returns a result.
- ///
- /// A System.String that specifies the text to display.
- /// A System.String that specifies the title bar caption to display.
- /// A System.Windows.MessageBoxButton value that specifies which button or buttons to display.
- /// A System.Windows.MessageBoxImage value that specifies the icon to display.
- /// A System.Windows.MessageBoxResult value that specifies the default result of the MessageBox.
- /// A Style that will be applied to the MessageBox instance.
- /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
- public static MessageBoxResult Show( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult, Style messageBoxStyle )
- {
- return ShowCore( null, IntPtr.Zero, messageText, caption, button, icon, defaultResult, messageBoxStyle );
- }
-
- public static MessageBoxResult Show( Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult )
- {
- return Show(owner, messageText, caption, button, icon, defaultResult, (Style) null);
- }
-
-
- public static MessageBoxResult Show( Window owner, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult, Style messageBoxStyle )
- {
- return ShowCore( owner, IntPtr.Zero, messageText, caption, button, icon, defaultResult, messageBoxStyle );
- }
-
- #endregion //Show with Window as Owner
-
- #region Show with Window handle as Owner
-
- public static MessageBoxResult Show( IntPtr ownerWindowHandle, string messageText )
- {
- return Show( ownerWindowHandle, messageText, string.Empty, MessageBoxButton.OK, ( Style )null );
- }
-
- public static MessageBoxResult Show( IntPtr ownerWindowHandle, string messageText, string caption )
- {
- return Show( ownerWindowHandle, messageText, caption, ( Style )null );
- }
-
- public static MessageBoxResult Show( IntPtr ownerWindowHandle, string messageText, string caption, Style messageBoxStyle )
- {
- return Show( ownerWindowHandle, messageText, caption, MessageBoxButton.OK, messageBoxStyle );
- }
-
- public static MessageBoxResult Show( IntPtr ownerWindowHandle, string messageText, string caption, MessageBoxButton button )
- {
- return Show( ownerWindowHandle, messageText, caption, button, ( Style )null );
- }
-
- public static MessageBoxResult Show( IntPtr ownerWindowHandle, string messageText, string caption, MessageBoxButton button, Style messageBoxStyle )
- {
- return ShowCore( null, ownerWindowHandle, messageText, caption, button, MessageBoxImage.None, MessageBoxResult.None, messageBoxStyle );
- }
-
- public static MessageBoxResult Show( IntPtr ownerWindowHandle, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon )
- {
- return Show( ownerWindowHandle, messageText, caption, button, icon, ( Style )null );
- }
-
- public static MessageBoxResult Show( IntPtr ownerWindowHandle, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, Style messageBoxStyle )
- {
- return ShowCore( null, ownerWindowHandle, messageText, caption, button, icon, MessageBoxResult.None, messageBoxStyle );
- }
-
- public static MessageBoxResult Show( IntPtr ownerWindowHandle, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult )
- {
- return Show( ownerWindowHandle, messageText, caption, button, icon, defaultResult, ( Style )null );
- }
-
- public static MessageBoxResult Show( IntPtr ownerWindowHandle, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult, Style messageBoxStyle )
- {
- return ShowCore( null, ownerWindowHandle, messageText, caption, button, icon, defaultResult, messageBoxStyle );
- }
-
- #endregion //Show with Window handle as Owner
-
- #endregion //Public Static
-
- #region Public Methods
- ///
- /// Displays this message box when embedded in a WindowContainer parent.
- /// Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.
- ///
- public void ShowMessageBox()
- {
- if( this.Container != null || this.Parent == null )
- throw new InvalidOperationException(
- "This method is not intended to be called while displaying a MessageBox outside of a WindowContainer. Use ShowDialog() instead in that case." );
-
- if( !( this.Parent is WindowContainer ) )
- throw new InvalidOperationException(
- "The MessageBox instance is not intended to be displayed in a container other than a WindowContainer." );
-
- _dialogResult = System.Windows.MessageBoxResult.None;
- this.Visibility = Visibility.Visible;
- }
-
- ///
- /// Displays this message box when embedded in a WindowContainer parent.
- /// Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.
- ///
- public void ShowMessageBox( string messageText )
- {
- this.ShowMessageBoxCore( messageText, string.Empty, MessageBoxButton.OK, MessageBoxImage.None, MessageBoxResult.None );
- }
-
- ///
- /// Displays this message box when embedded in a WindowContainer parent.
- /// Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.
- ///
- public void ShowMessageBox( string messageText, string caption )
- {
- this.ShowMessageBoxCore( messageText, caption, MessageBoxButton.OK, MessageBoxImage.None, MessageBoxResult.None );
- }
-
- ///
- /// Displays this message box when embedded in a WindowContainer parent.
- /// Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.
- ///
- public void ShowMessageBox( string messageText, string caption, MessageBoxButton button )
- {
- this.ShowMessageBoxCore( messageText, caption, button, MessageBoxImage.None, MessageBoxResult.None );
- }
-
- ///
- /// Displays this message box when embedded in a WindowContainer parent.
- /// Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.
- ///
- public void ShowMessageBox( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon )
- {
- this.ShowMessageBoxCore( messageText, caption, button, icon, MessageBoxResult.None );
- }
-
- ///
- /// Displays this message box when embedded in a WindowContainer parent.
- /// Note that this call is not blocking and that you must register to the Closed event in order to handle the dialog result, if any.
- ///
- public void ShowMessageBox( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult )
- {
- this.ShowMessageBoxCore( messageText, caption, button, icon, defaultResult );
- }
-
- ///
- /// Display the MessageBox window and returns only when this MessageBox closes.
- ///
- public bool? ShowDialog()
- {
- if( this.Parent != null )
- throw new InvalidOperationException(
- "This method is not intended to be called while displaying a Message Box inside a WindowContainer. Use 'ShowMessageBox()' instead." );
-
- _dialogResult = System.Windows.MessageBoxResult.None;
- this.Visibility = Visibility.Visible;
- this.CreateContainer();
-
- return this.Container.ShowDialog();
- }
-
- #endregion
-
- #region Protected
- ///
- /// Initializes the MessageBox.
- ///
- /// The Window owner.
- /// The Window Handle owner.
- /// The text.
- /// The caption.
- /// The button.
- /// The image.
- /// The MessageBox result as default.
- protected void InitializeMessageBox( Window owner, IntPtr ownerHandle, string text, string caption, MessageBoxButton button, MessageBoxImage image, MessageBoxResult defaultResult )
- {
- Text = text;
- Caption = caption;
- _button = button;
- _defaultResult = defaultResult;
- _owner = owner;
- _ownerHandle = ownerHandle;
- SetImageSource( image );
- }
-
- ///
- /// Changes the control's visual state(s).
- ///
- /// name of the state
- /// True if state transitions should be used.
- protected void ChangeVisualState( string name, bool useTransitions )
- {
- VisualStateManager.GoToState( this, name, useTransitions );
- }
-
- #endregion //Protected
-
-
-
-
-
- #region Private
-
- private bool IsCurrentWindow( object windowtoTest )
- {
- return object.Equals( _windowControl, windowtoTest );
- }
-
- ///
- /// Closes the MessageBox.
- ///
- private void Close()
- {
- if( this.Container != null )
- {
- // The Window.Closed event callback will call "OnClose"
- this.Container.Close();
- }
- else
- {
- this.OnClose();
- }
- }
-
- ///
- /// Sets the button that represents the _defaultResult to the default button and gives it focus.
- ///
- private void SetDefaultResult()
- {
- var defaultButton = GetDefaultButtonFromDefaultResult();
- if( defaultButton != null )
- {
- defaultButton.IsDefault = true;
- defaultButton.Focus();
- }
- }
-
- ///
- /// Gets the default button from the _defaultResult.
- ///
- /// The default button that represents the defaultResult
- private Button GetDefaultButtonFromDefaultResult()
- {
- Button defaultButton = null;
- switch( _defaultResult )
- {
- case MessageBoxResult.Cancel:
- defaultButton = GetMessageBoxButton( PART_CancelButton );
- break;
- case MessageBoxResult.No:
- defaultButton = GetMessageBoxButton( PART_NoButton );
- break;
- case MessageBoxResult.OK:
- defaultButton = GetMessageBoxButton( PART_OkButton );
- break;
- case MessageBoxResult.Yes:
- defaultButton = GetMessageBoxButton( PART_YesButton );
- break;
- case MessageBoxResult.None:
- defaultButton = GetDefaultButton();
- break;
- }
- return defaultButton;
- }
-
- ///
- /// Gets the default button.
- ///
- /// Used when the _defaultResult is set to None
- /// The button to use as the default
- private Button GetDefaultButton()
- {
- Button defaultButton = null;
- switch( _button )
- {
- case MessageBoxButton.OK:
- case MessageBoxButton.OKCancel:
- defaultButton = GetMessageBoxButton( PART_OkButton );
- break;
- case MessageBoxButton.YesNo:
- case MessageBoxButton.YesNoCancel:
- defaultButton = GetMessageBoxButton( PART_YesButton );
- break;
- }
- return defaultButton;
- }
-
- ///
- /// Gets a message box button.
- ///
- /// The name of the button to get.
- /// The button
- private Button GetMessageBoxButton( string name )
- {
- Button button = GetTemplateChild( name ) as Button;
- return button;
- }
-
- private void ShowMessageBoxCore( string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult )
- {
- this.InitializeMessageBox( null, IntPtr.Zero, messageText, caption, button, icon, defaultResult );
- this.ShowMessageBox();
- }
-
- private void InitHandlers()
- {
- AddHandler( ButtonBase.ClickEvent, new RoutedEventHandler( this.Button_Click ) );
-
- CommandBindings.Add( new CommandBinding( ApplicationCommands.Copy, new ExecutedRoutedEventHandler( ExecuteCopy ) ) );
- }
-
- ///
- /// Shows the MessageBox.
- ///
- /// The message text.
- /// The caption.
- /// The button.
- /// The icon.
- /// The default result.
- ///
- private static MessageBoxResult ShowCore( Window owner, IntPtr ownerHandle, string messageText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult, Style messageBoxStyle )
- {
- if( System.Windows.Interop.BrowserInteropHelper.IsBrowserHosted )
- {
- throw new InvalidOperationException( "Static methods for MessageBoxes are not available in XBAP. Use the instance ShowMessageBox methods instead." );
- }
-
- if( (owner != null) && (ownerHandle != IntPtr.Zero) )
- {
- throw new NotSupportedException( "The owner of a MessageBox can't be both a Window and a WindowHandle." );
- }
-
- var msgBox = new MessageBox();
- msgBox.InitializeMessageBox( owner, ownerHandle, messageText, caption, button, icon, defaultResult );
-
- // Setting the style to null will inhibit any implicit styles
- if( messageBoxStyle != null )
- {
- msgBox.Style = messageBoxStyle;
- }
-
- msgBox.ShowDialog();
- return msgBox.MessageBoxResult;
- }
-
- private delegate Window ComputeOwnerWindowCoreDelegate();
-
- ///
- /// Resolves the owner Window of the MessageBox.
- ///
- /// the owner Window
- private static Window ComputeOwnerWindow()
- {
- Window result = null;
-
- if( Application.Current != null )
- {
- if( Application.Current.Dispatcher.CheckAccess() )
- {
- result = ComputeOwnerWindowCore();
- }
- else
- {
- Application.Current.Dispatcher.BeginInvoke( new Action( () =>
- {
- result = ComputeOwnerWindowCore();
- }
- ) );
- }
- }
-
- return result;
- }
-
- private static Window ComputeOwnerWindowCore()
- {
- Window owner = null;
-
- if( Application.Current != null )
- {
- foreach( Window w in Application.Current.Windows )
- {
- if( w.IsActive )
- {
- owner = w;
- break;
- }
- }
- }
-
- return owner;
- }
-
- ///
- /// Sets the message image source.
- ///
- /// The image to show.
- private void SetImageSource( MessageBoxImage image )
- {
- String iconName = String.Empty;
-
- switch( image )
- {
- case MessageBoxImage.Error:
- {
- iconName = "Error48.png";
- break;
- }
- case MessageBoxImage.Information:
- {
- iconName = "Information48.png";
- break;
- }
- case MessageBoxImage.Question:
- {
- iconName = "Question48.png";
- break;
- }
- case MessageBoxImage.Warning:
- {
- iconName = "Warning48.png";
- break;
- }
- case MessageBoxImage.None:
- default:
- {
- return;
- }
- }
-
- // Use this syntax for other themes to get the icons
- this.ImageSource = new BitmapImage( new Uri( String.Format( "/Xceed.Wpf.Toolkit;component/MessageBox/Icons/{0}", iconName ), UriKind.RelativeOrAbsolute ) );
- }
-
- ///
- /// Creates the container which will host the MessageBox control.
- ///
- ///
- private Window CreateContainer()
- {
- var newWindow = new Window();
- newWindow.AllowsTransparency = true;
- newWindow.Background = Brushes.Transparent;
- newWindow.Content = this;
-
- if( _ownerHandle != IntPtr.Zero )
- {
- var windowHelper = new WindowInteropHelper( newWindow ) { Owner = _ownerHandle };
- newWindow.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner;
- }
- else
- {
- newWindow.Owner = _owner ?? ComputeOwnerWindow();
- if( newWindow.Owner != null )
- newWindow.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner;
- else
- newWindow.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
- }
-
- newWindow.ShowInTaskbar = false;
- newWindow.SizeToContent = System.Windows.SizeToContent.WidthAndHeight;
- newWindow.ResizeMode = System.Windows.ResizeMode.NoResize;
- newWindow.WindowStyle = System.Windows.WindowStyle.None;
- newWindow.Closed += new EventHandler( OnContainerClosed );
- return newWindow;
- }
-
- #endregion //Private
-
- #endregion //Methods
-
- #region Event Handlers
-
- ///
- /// Processes the move of a drag operation on the header.
- ///
- /// The instance containing the event data.
- protected virtual void OnHeaderDragDelta( DragDeltaEventArgs e )
- {
- if( !this.IsCurrentWindow( e.OriginalSource ) )
- return;
-
- e.Handled = true;
-
- DragDeltaEventArgs args = new DragDeltaEventArgs( e.HorizontalChange, e.VerticalChange );
- args.RoutedEvent = HeaderDragDeltaEvent;
- args.Source = this;
- this.RaiseEvent( args );
-
- if( !args.Handled )
- {
- if( this.Container == null )
- {
- double left = 0.0;
-
- if( this.FlowDirection == System.Windows.FlowDirection.RightToLeft )
- left = this.Left - e.HorizontalChange;
- else
- left = this.Left + e.HorizontalChange;
-
- this.Left = left;
- this.Top += e.VerticalChange;
- }
- else
- {
- double left = 0.0;
-
- if( this.FlowDirection == System.Windows.FlowDirection.RightToLeft )
- left = Container.Left - e.HorizontalChange;
- else
- left = Container.Left + e.HorizontalChange;
-
- Container.Left = left;
- Container.Top += e.VerticalChange;
- }
- }
- }
-
- ///
- /// Processes the double-click on the header.
- ///
- /// The instance containing the event data.
- protected virtual void OnHeaderIconDoubleClicked( MouseButtonEventArgs e )
- {
- if( !this.IsCurrentWindow( e.OriginalSource ) )
- return;
-
- e.Handled = true;
-
- MouseButtonEventArgs args = new MouseButtonEventArgs( Mouse.PrimaryDevice, 0, MouseButton.Left );
- args.RoutedEvent = HeaderIconDoubleClickedEvent;
- args.Source = this;
- this.RaiseEvent( args );
-
- if( !args.Handled )
- {
- this.Close();
- }
- }
-
- ///
- /// Processes the close button click.
- ///
- /// The instance containing the event data.
- protected virtual void OnCloseButtonClicked( RoutedEventArgs e )
- {
- if( !this.IsCurrentWindow( e.OriginalSource ) )
- return;
-
- e.Handled = true;
-
- _dialogResult = object.Equals( _button, MessageBoxButton.OK )
- ? MessageBoxResult.OK
- : MessageBoxResult.Cancel;
-
- RoutedEventArgs args = new RoutedEventArgs( CloseButtonClickedEvent, this );
- this.RaiseEvent( args );
-
- if( !args.Handled )
- {
- this.Close();
- }
- }
-
- ///
- /// Sets the MessageBoxResult according to the button pressed and then closes the MessageBox.
- ///
- /// The source of the event.
- /// The instance containing the event data.
- private void Button_Click( object sender, RoutedEventArgs e )
- {
- Button button = e.OriginalSource as Button;
-
- if( button == null )
- return;
-
- switch( button.Name )
- {
- case PART_NoButton:
- _dialogResult = MessageBoxResult.No;
- this.Close();
- break;
- case PART_YesButton:
- _dialogResult = MessageBoxResult.Yes;
- this.Close();
- break;
- case PART_CancelButton:
- _dialogResult = MessageBoxResult.Cancel;
- this.Close();
- break;
- case PART_OkButton:
- _dialogResult = MessageBoxResult.OK;
- this.Close();
- break;
- }
-
- e.Handled = true;
- }
-
- ///
- /// Callack to the Container.Closed event
- ///
- ///
- ///
- private void OnContainerClosed( object sender, EventArgs e )
- {
- this.Container.Closed -= this.OnContainerClosed;
- this.Container.Content = null;
- Debug.Assert( this.Container == null );
- this.OnClose();
- }
-
- private void OnClose()
- {
- this.Visibility = Visibility.Collapsed;
- this.OnClosed( EventArgs.Empty );
- }
-
- private void MessageBox_IsVisibleChanged( object sender, DependencyPropertyChangedEventArgs e )
- {
- if( (bool)e.NewValue )
- {
- Action action = () =>
- {
- //Focus first Focusable Child element of MessageBox to prevent Tab outside MessageBox.
- var defaultButton = this.GetDefaultButtonFromDefaultResult();
- if( defaultButton != null )
- {
- defaultButton.Focus();
- }
- };
-
- Dispatcher.BeginInvoke( DispatcherPriority.ApplicationIdle, action );
- }
- }
-
- #endregion //Event Handlers
-
- #region Events
-
- ///
- /// Occurs when the MessageBox is closed.
- ///
- public event EventHandler Closed;
- protected virtual void OnClosed( EventArgs e )
- {
- if( Closed != null )
- Closed( this, e );
- }
-
-
- #endregion
-
- #region COMMANDS
-
- private void ExecuteCopy( object sender, ExecutedRoutedEventArgs e )
- {
- StringBuilder sb = new StringBuilder();
- sb.Append( "---------------------------" );
- sb.AppendLine();
- sb.Append( Caption );
- sb.AppendLine();
- sb.Append( "---------------------------" );
- sb.AppendLine();
- sb.Append( Text );
- sb.AppendLine();
- sb.Append( "---------------------------" );
- sb.AppendLine();
- switch( _button )
- {
- case MessageBoxButton.OK:
- sb.Append( OkButtonContent.ToString() );
- break;
- case MessageBoxButton.OKCancel:
- sb.Append( OkButtonContent + " " + CancelButtonContent );
- break;
- case MessageBoxButton.YesNo:
- sb.Append( YesButtonContent + " " + NoButtonContent );
- break;
- case MessageBoxButton.YesNoCancel:
- sb.Append( YesButtonContent + " " + NoButtonContent + " " + CancelButtonContent );
- break;
- }
- sb.AppendLine();
- sb.Append( "---------------------------" );
-
- try
- {
- new UIPermission( UIPermissionClipboard.AllClipboard ).Demand();
- Clipboard.SetText( sb.ToString() );
- }
- catch( SecurityException )
- {
- throw new SecurityException();
- }
- }
-
- #endregion COMMANDS
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/VisualStates.MessageBox.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/VisualStates.MessageBox.cs
deleted file mode 100644
index 56b91413..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/VisualStates.MessageBox.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit
-{
- internal static partial class VisualStates
- {
- public const string MessageBoxButtonsGroup = "MessageBoxButtonsGroup";
- public const string OK = "OK";
- public const string OKCancel = "OKCancel";
- public const string YesNo = "YesNo";
- public const string YesNoCancel = "YesNoCancel";
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index 5f514cef..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,238 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Visible
-
-
-
-
-
-
-
-
-
-
- Visible
-
-
-
-
-
-
- Visible
-
-
-
-
-
-
-
-
-
-
- Visible
-
-
-
-
-
-
- Visible
-
-
-
-
-
-
-
-
-
-
- Visible
-
-
-
-
-
-
- Visible
-
-
-
-
-
-
- Visible
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Themes/Generic.xaml
deleted file mode 100644
index 5c3d3796..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Themes/Generic.xaml
+++ /dev/null
@@ -1,238 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MultiLineTextEditor/Images/Notes16.png b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MultiLineTextEditor/Images/Notes16.png
deleted file mode 100644
index ebfaee36..00000000
Binary files a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MultiLineTextEditor/Images/Notes16.png and /dev/null differ
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MultiLineTextEditor/Implementation/MultiLineTextEditor.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MultiLineTextEditor/Implementation/MultiLineTextEditor.cs
deleted file mode 100644
index 39780891..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MultiLineTextEditor/Implementation/MultiLineTextEditor.cs
+++ /dev/null
@@ -1,297 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Input;
-using System.Windows.Threading;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-
-namespace Xceed.Wpf.Toolkit
-{
- [TemplatePart( Name = PART_ResizeThumb, Type = typeof( Thumb ) )]
- [TemplatePart( Name = PART_TextBox, Type = typeof( TextBox ) )]
- [TemplatePart( Name = PART_DropDownButton, Type = typeof( ToggleButton ) )]
- public class MultiLineTextEditor : ContentControl
- {
- private const string PART_ResizeThumb = "PART_ResizeThumb";
- private const string PART_TextBox = "PART_TextBox";
- private const string PART_DropDownButton = "PART_DropDownButton";
-
- #region Members
-
- private Thumb _resizeThumb;
- private TextBox _textBox;
- private ToggleButton _toggleButton;
-
- #endregion //Members
-
- #region Properties
-
- #region DropDownHeight
- public static readonly DependencyProperty DropDownHeightProperty = DependencyProperty.Register( "DropDownHeight", typeof( double ), typeof( MultiLineTextEditor ), new UIPropertyMetadata( 150.0 ) );
- public double DropDownHeight
- {
- get
- {
- return ( double )GetValue( DropDownHeightProperty );
- }
- set
- {
- SetValue( DropDownHeightProperty, value );
- }
- }
- #endregion DropDownHeight
-
- #region DropDownWidth
- public static readonly DependencyProperty DropDownWidthProperty = DependencyProperty.Register( "DropDownWidth", typeof( double ), typeof( MultiLineTextEditor ), new UIPropertyMetadata( 200.0 ) );
- public double DropDownWidth
- {
- get
- {
- return ( double )GetValue( DropDownWidthProperty );
- }
- set
- {
- SetValue( DropDownWidthProperty, value );
- }
- }
- #endregion DropDownWidth
-
- #region IsOpen
-
- public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register( "IsOpen", typeof( bool ), typeof( MultiLineTextEditor ), new UIPropertyMetadata( false, OnIsOpenChanged ) );
- public bool IsOpen
- {
- get
- {
- return ( bool )GetValue( IsOpenProperty );
- }
- set
- {
- SetValue( IsOpenProperty, value );
- }
- }
-
- private static void OnIsOpenChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- MultiLineTextEditor multiLineTextEditor = o as MultiLineTextEditor;
- if( multiLineTextEditor != null )
- multiLineTextEditor.OnIsOpenChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- protected virtual void OnIsOpenChanged( bool oldValue, bool newValue )
- {
- if( _textBox != null )
- {
- // Focus the content of the popup, after its loaded
- Dispatcher.BeginInvoke( new Action( () => _textBox.Focus() ), DispatcherPriority.Background );
- }
- }
-
- #endregion //IsOpen
-
- #region IsSpellCheckEnabled
- public static readonly DependencyProperty IsSpellCheckEnabledProperty = DependencyProperty.Register( "IsSpellCheckEnabled", typeof( bool ), typeof( MultiLineTextEditor ), new UIPropertyMetadata( false ) );
- public bool IsSpellCheckEnabled
- {
- get
- {
- return ( bool )GetValue( IsSpellCheckEnabledProperty );
- }
- set
- {
- SetValue( IsSpellCheckEnabledProperty, value );
- }
- }
- #endregion IsSpellCheckEnabled
-
- #region IsReadOnly
- public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register( "IsReadOnly", typeof( bool ), typeof( MultiLineTextEditor ), new UIPropertyMetadata( false ) );
- public bool IsReadOnly
- {
- get
- {
- return ( bool )GetValue( IsReadOnlyProperty );
- }
- set
- {
- SetValue( IsReadOnlyProperty, value );
- }
- }
- #endregion IsReadOnly
-
- #region Text
-
- public static readonly DependencyProperty TextProperty = DependencyProperty.Register( "Text", typeof( string ), typeof( MultiLineTextEditor ), new FrameworkPropertyMetadata( String.Empty, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnTextChanged ) );
- public string Text
- {
- get
- {
- return ( string )GetValue( TextProperty );
- }
- set
- {
- SetValue( TextProperty, value );
- }
- }
-
- private static void OnTextChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- MultiLineTextEditor textEditor = o as MultiLineTextEditor;
- if( textEditor != null )
- textEditor.OnTextChanged( ( string )e.OldValue, ( string )e.NewValue );
- }
-
- protected virtual void OnTextChanged( string oldValue, string newValue )
- {
-
- }
-
- #endregion //Text
-
- #region TextAlignment
- public static readonly DependencyProperty TextAlignmentProperty = DependencyProperty.Register( "TextAlignment", typeof( TextAlignment ), typeof( MultiLineTextEditor ), new UIPropertyMetadata( TextAlignment.Left ) );
- public TextAlignment TextAlignment
- {
- get
- {
- return ( TextAlignment )GetValue( TextAlignmentProperty );
- }
- set
- {
- SetValue( TextAlignmentProperty, value );
- }
- }
- #endregion TextAlignment
-
- #region TextWrapping
- public static readonly DependencyProperty TextWrappingProperty = DependencyProperty.Register( "TextWrapping", typeof( TextWrapping ), typeof( MultiLineTextEditor ), new UIPropertyMetadata( TextWrapping.NoWrap ) );
- public TextWrapping TextWrapping
- {
- get
- {
- return ( TextWrapping )GetValue( TextWrappingProperty );
- }
- set
- {
- SetValue( TextWrappingProperty, value );
- }
- }
- #endregion TextWrapping
-
- #endregion //Properties
-
- #region Constructors
-
- static MultiLineTextEditor()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( MultiLineTextEditor ), new FrameworkPropertyMetadata( typeof( MultiLineTextEditor ) ) );
- }
-
- public MultiLineTextEditor()
- {
- Keyboard.AddKeyDownHandler( this, OnKeyDown );
- Mouse.AddPreviewMouseDownOutsideCapturedElementHandler( this, OnMouseDownOutsideCapturedElement );
- }
-
- #endregion //Constructors
-
- #region Bass Class Overrides
-
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
-
- if( _resizeThumb != null )
- _resizeThumb.DragDelta -= ResizeThumb_DragDelta;
-
- _resizeThumb = GetTemplateChild( PART_ResizeThumb ) as Thumb;
-
- if( _resizeThumb != null )
- _resizeThumb.DragDelta += ResizeThumb_DragDelta;
-
- _textBox = GetTemplateChild( PART_TextBox ) as TextBox;
- _toggleButton = GetTemplateChild( PART_DropDownButton ) as ToggleButton;
- }
-
-
-
-
- #endregion //Bass Class Overrides
-
- #region Event Handlers
-
- private void OnKeyDown( object sender, KeyEventArgs e )
- {
- if( !IsOpen )
- {
- if( KeyboardUtilities.IsKeyModifyingPopupState( e ) )
- {
- IsOpen = true;
- e.Handled = true;
- }
- }
- else
- {
- if( KeyboardUtilities.IsKeyModifyingPopupState( e )
- || ( e.Key == Key.Escape )
- || ( e.Key == Key.Tab ) )
- {
- CloseEditor();
- e.Handled = true;
- }
- }
- }
-
- private void OnMouseDownOutsideCapturedElement( object sender, MouseButtonEventArgs e )
- {
- CloseEditor();
- }
-
- void ResizeThumb_DragDelta( object sender, DragDeltaEventArgs e )
- {
- double yadjust = DropDownHeight + e.VerticalChange;
- double xadjust = DropDownWidth + e.HorizontalChange;
-
- if( ( xadjust >= 0 ) && ( yadjust >= 0 ) )
- {
- DropDownWidth = xadjust;
- DropDownHeight = yadjust;
- }
- }
-
- #endregion //Event Handlers
-
- #region Methods
-
- private void CloseEditor()
- {
- if( IsOpen )
- IsOpen = false;
- ReleaseMouseCapture();
-
- if( _toggleButton != null )
- {
- _toggleButton.Focus();
- }
- }
-
- #endregion //Methods
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MultiLineTextEditor/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MultiLineTextEditor/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index 2fbc03ae..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MultiLineTextEditor/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,217 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MultiLineTextEditor/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MultiLineTextEditor/Themes/Generic.xaml
deleted file mode 100644
index 378ade61..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MultiLineTextEditor/Themes/Generic.xaml
+++ /dev/null
@@ -1,236 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/AllowedSpecialValuesEnum.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/AllowedSpecialValuesEnum.cs
deleted file mode 100644
index 5eb4628f..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/AllowedSpecialValuesEnum.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-
-namespace Xceed.Wpf.Toolkit
-{
- [Flags]
- public enum AllowedSpecialValues
- {
- None = 0,
- NaN = 1,
- PositiveInfinity = 2,
- NegativeInfinity = 4,
- AnyInfinity = PositiveInfinity | NegativeInfinity,
- Any = NaN | AnyInfinity
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/ByteUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/ByteUpDown.cs
deleted file mode 100644
index f18b2847..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/ByteUpDown.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class ByteUpDown : CommonNumericUpDown
- {
- #region Constructors
-
- static ByteUpDown()
- {
- UpdateMetadata( typeof( ByteUpDown ), ( byte )1, byte.MinValue, byte.MaxValue );
- }
-
- public ByteUpDown()
- : base( Byte.TryParse, Decimal.ToByte, ( v1, v2 ) => v1 < v2, ( v1, v2 ) => v1 > v2 )
- {
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- protected override byte IncrementValue( byte value, byte increment )
- {
- return ( byte )( value + increment );
- }
-
- protected override byte DecrementValue( byte value, byte increment )
- {
- return ( byte )( value - increment );
- }
-
- #endregion //Base Class Overrides
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/CommonNumericUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/CommonNumericUpDown.cs
deleted file mode 100644
index d197c875..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/CommonNumericUpDown.cs
+++ /dev/null
@@ -1,407 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Globalization;
-using System.IO;
-using System.Linq;
-
-namespace Xceed.Wpf.Toolkit
-{
- public abstract class CommonNumericUpDown : NumericUpDown where T : struct, IFormattable, IComparable
- {
- protected delegate bool FromText( string s, NumberStyles style, IFormatProvider provider, out T result );
- protected delegate T FromDecimal( decimal d );
-
- #region Private Members
-
- private FromText _fromText;
- private FromDecimal _fromDecimal;
- private Func _fromLowerThan;
- private Func _fromGreaterThan;
-
- #endregion
-
- #region Properties
-
- #region IsInvalid
-
- internal static readonly DependencyProperty IsInvalidProperty = DependencyProperty.Register( "IsInvalid", typeof( bool ), typeof( CommonNumericUpDown ), new UIPropertyMetadata( false ) );
- internal bool IsInvalid
- {
- get
- {
- return ( bool )GetValue( IsInvalidProperty );
- }
- private set
- {
- SetValue( IsInvalidProperty, value );
- }
- }
-
- #endregion //IsInvalid
-
- #region ParsingNumberStyle
-
- public static readonly DependencyProperty ParsingNumberStyleProperty =
- DependencyProperty.Register( "ParsingNumberStyle", typeof( NumberStyles ), typeof( CommonNumericUpDown ), new UIPropertyMetadata( NumberStyles.Any ) );
-
- public NumberStyles ParsingNumberStyle
- {
- get { return ( NumberStyles )GetValue( ParsingNumberStyleProperty ); }
- set { SetValue( ParsingNumberStyleProperty, value ); }
- }
-
- #endregion //ParsingNumberStyle
-
- #endregion
-
- #region Constructors
-
- protected CommonNumericUpDown( FromText fromText, FromDecimal fromDecimal, Func fromLowerThan, Func fromGreaterThan )
- {
- if( fromText == null )
- throw new ArgumentNullException( "tryParseMethod" );
-
- if( fromDecimal == null )
- throw new ArgumentNullException( "fromDecimal" );
-
- if( fromLowerThan == null )
- throw new ArgumentNullException( "fromLowerThan" );
-
- if( fromGreaterThan == null )
- throw new ArgumentNullException( "fromGreaterThan" );
-
- _fromText = fromText;
- _fromDecimal = fromDecimal;
- _fromLowerThan = fromLowerThan;
- _fromGreaterThan = fromGreaterThan;
- }
-
- #endregion
-
- #region Internal Methods
-
- protected static void UpdateMetadata( Type type, T? increment, T? minValue, T? maxValue )
- {
- DefaultStyleKeyProperty.OverrideMetadata( type, new FrameworkPropertyMetadata( type ) );
- UpdateMetadataCommon( type, increment, minValue, maxValue );
- }
-
- protected void TestInputSpecialValue( AllowedSpecialValues allowedValues, AllowedSpecialValues valueToCompare )
- {
- if( ( allowedValues & valueToCompare ) != valueToCompare )
- {
- switch( valueToCompare )
- {
- case AllowedSpecialValues.NaN:
- throw new InvalidDataException( "Value to parse shouldn't be NaN." );
- case AllowedSpecialValues.PositiveInfinity:
- throw new InvalidDataException( "Value to parse shouldn't be Positive Infinity." );
- case AllowedSpecialValues.NegativeInfinity:
- throw new InvalidDataException( "Value to parse shouldn't be Negative Infinity." );
- }
- }
- }
-
- internal bool IsBetweenMinMax( T? value )
- {
- return !IsLowerThan( value, Minimum ) && !IsGreaterThan( value, Maximum );
- }
-
- #endregion
-
- #region Private Methods
-
- private static void UpdateMetadataCommon( Type type, T? increment, T? minValue, T? maxValue )
- {
- IncrementProperty.OverrideMetadata( type, new FrameworkPropertyMetadata( increment ) );
- MaximumProperty.OverrideMetadata( type, new FrameworkPropertyMetadata( maxValue ) );
- MinimumProperty.OverrideMetadata( type, new FrameworkPropertyMetadata( minValue ) );
- }
-
- private bool IsLowerThan( T? value1, T? value2 )
- {
- if( value1 == null || value2 == null )
- return false;
-
- return _fromLowerThan( value1.Value, value2.Value );
- }
-
- private bool IsGreaterThan( T? value1, T? value2 )
- {
- if( value1 == null || value2 == null )
- return false;
-
- return _fromGreaterThan( value1.Value, value2.Value );
- }
-
- private bool HandleNullSpin()
- {
- if( !Value.HasValue )
- {
- T forcedValue = ( DefaultValue.HasValue )
- ? DefaultValue.Value
- : default( T );
-
- Value = CoerceValueMinMax( forcedValue );
-
- return true;
- }
- else if( !Increment.HasValue )
- {
- return true;
- }
-
- return false;
- }
-
- private T? CoerceValueMinMax( T value )
- {
- if( IsLowerThan( value, Minimum ) )
- return Minimum;
- else if( IsGreaterThan( value, Maximum ) )
- return Maximum;
- else
- return value;
- }
-
- #endregion
-
- #region Base Class Overrides
-
- protected override void OnIncrement()
- {
- if( !HandleNullSpin() )
- {
- // if UpdateValueOnEnterKey is true,
- // Sync Value on Text only when Enter Key is pressed.
- if( this.UpdateValueOnEnterKey )
- {
- var currentValue = this.ConvertTextToValue( this.TextBox.Text );
- var result = this.IncrementValue( currentValue.Value, Increment.Value );
- var newValue = this.CoerceValueMinMax( result );
- this.TextBox.Text = newValue.Value.ToString( this.FormatString, this.CultureInfo );
- }
- else
- {
- var result = this.IncrementValue( Value.Value, Increment.Value );
- this.Value = this.CoerceValueMinMax( result );
- }
- }
- }
-
- protected override void OnDecrement()
- {
- if( !HandleNullSpin() )
- {
- // if UpdateValueOnEnterKey is true,
- // Sync Value on Text only when Enter Key is pressed.
- if( this.UpdateValueOnEnterKey )
- {
- var currentValue = this.ConvertTextToValue( this.TextBox.Text );
- var result = this.DecrementValue( currentValue.Value, Increment.Value );
- var newValue = this.CoerceValueMinMax( result );
- this.TextBox.Text = newValue.Value.ToString( this.FormatString, this.CultureInfo );
- }
- else
- {
- var result = this.DecrementValue( Value.Value, Increment.Value );
- this.Value = this.CoerceValueMinMax( result );
- }
- }
- }
-
- protected override void OnMinimumChanged( T? oldValue, T? newValue )
- {
- base.OnMinimumChanged( oldValue, newValue );
-
- if( this.Value.HasValue && this.ClipValueToMinMax )
- {
- this.Value = this.CoerceValueMinMax( this.Value.Value );
- }
- }
-
- protected override void OnMaximumChanged( T? oldValue, T? newValue )
- {
- base.OnMaximumChanged( oldValue, newValue );
-
- if( this.Value.HasValue && this.ClipValueToMinMax )
- {
- this.Value = this.CoerceValueMinMax( this.Value.Value );
- }
- }
-
- protected override T? ConvertTextToValue( string text )
- {
- T? result = null;
-
- if( String.IsNullOrEmpty( text ) )
- return result;
-
- // Since the conversion from Value to text using a FormartString may not be parsable,
- // we verify that the already existing text is not the exact same value.
- string currentValueText = ConvertValueToText();
- if( object.Equals( currentValueText, text ) )
- {
- this.IsInvalid = false;
- return this.Value;
- }
-
- result = this.ConvertTextToValueCore( currentValueText, text );
-
- if( this.ClipValueToMinMax )
- {
- return this.GetClippedMinMaxValue( result );
- }
-
- ValidateDefaultMinMax( result );
-
- return result;
- }
-
- protected override string ConvertValueToText()
- {
- if( Value == null )
- return string.Empty;
-
- this.IsInvalid = false;
-
- //Manage FormatString of type "{}{0:N2} °" (in xaml) or "{0:N2} °" in code-behind.
- if( FormatString.Contains( "{0" ) )
- return string.Format( CultureInfo, FormatString, Value.Value );
-
- return Value.Value.ToString( FormatString, CultureInfo );
- }
-
- protected override void SetValidSpinDirection()
- {
- ValidSpinDirections validDirections = ValidSpinDirections.None;
-
- // Null increment always prevents spin.
- if( (this.Increment != null) && !IsReadOnly )
- {
- if( IsLowerThan( Value, Maximum ) || !Value.HasValue || !Maximum.HasValue)
- validDirections = validDirections | ValidSpinDirections.Increase;
-
- if( IsGreaterThan( Value, Minimum ) || !Value.HasValue || !Minimum.HasValue )
- validDirections = validDirections | ValidSpinDirections.Decrease;
- }
-
- if( Spinner != null )
- Spinner.ValidSpinDirection = validDirections;
- }
-
- private bool IsPercent( string stringToTest )
- {
- int PIndex = stringToTest.IndexOf( "P" );
- if( PIndex >= 0 )
- {
- //stringToTest contains a "P" between 2 "'", it's considered as text, not percent
- bool isText = (stringToTest.Substring( 0, PIndex ).Contains( "'" )
- && stringToTest.Substring( PIndex, FormatString.Length - PIndex ).Contains( "'" ));
-
- return !isText;
- }
- return false;
- }
-
- private T? ConvertTextToValueCore( string currentValueText, string text )
- {
- T? result;
-
- if( this.IsPercent( this.FormatString ) )
- {
- result = _fromDecimal( ParsePercent( text, CultureInfo ) );
- }
- else
- {
- T outputValue = new T();
- // Problem while converting new text
- if( !_fromText( text, this.ParsingNumberStyle, CultureInfo, out outputValue ) )
- {
- bool shouldThrow = true;
-
- // case 164198: Throw when replacing only the digit part of 99° through UI.
- // Check if CurrentValueText is also failing => it also contains special characters. ex : 90°
- T currentValueTextOutputValue;
- if( !_fromText( currentValueText, this.ParsingNumberStyle, CultureInfo, out currentValueTextOutputValue ) )
- {
- // extract non-digit characters
- var currentValueTextSpecialCharacters = currentValueText.Where( c => !Char.IsDigit( c ) );
- if( currentValueTextSpecialCharacters.Count() > 0 )
- {
- var textSpecialCharacters = text.Where( c => !Char.IsDigit( c ) );
- // same non-digit characters on currentValueText and new text => remove them on new Text to parse it again.
- if( currentValueTextSpecialCharacters.Except( textSpecialCharacters ).ToList().Count == 0 )
- {
- foreach( var character in textSpecialCharacters )
- {
- text = text.Replace( character.ToString(), string.Empty );
- }
- // if without the special characters, parsing is good, do not throw
- if( _fromText( text, this.ParsingNumberStyle, CultureInfo, out outputValue ) )
- {
- shouldThrow = false;
- }
- }
- }
- }
-
- if( shouldThrow )
- {
- this.IsInvalid = true;
- throw new InvalidDataException( "Input string was not in a correct format." );
- }
- }
- result = outputValue;
- }
- return result;
- }
-
- private T? GetClippedMinMaxValue( T? result )
- {
- if( this.IsGreaterThan( result, this.Maximum ) )
- return this.Maximum;
- else if( this.IsLowerThan( result, this.Minimum ) )
- return this.Minimum;
- return result;
- }
-
- private void ValidateDefaultMinMax( T? value )
- {
- // DefaultValue is always accepted.
- if( object.Equals( value, DefaultValue ) )
- return;
-
- if( IsLowerThan( value, Minimum ) )
- throw new ArgumentOutOfRangeException( "Minimum", String.Format( "Value must be greater than MinValue of {0}", Minimum ) );
- else if( IsGreaterThan( value, Maximum ) )
- throw new ArgumentOutOfRangeException( "Maximum", String.Format( "Value must be less than MaxValue of {0}", Maximum ) );
- }
-
- #endregion //Base Class Overrides
-
- #region Abstract Methods
-
- protected abstract T IncrementValue( T value, T increment );
-
- protected abstract T DecrementValue( T value, T increment );
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/DecimalUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/DecimalUpDown.cs
deleted file mode 100644
index 7806ce2a..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/DecimalUpDown.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class DecimalUpDown : CommonNumericUpDown
- {
- #region Constructors
-
- static DecimalUpDown()
- {
- UpdateMetadata( typeof( DecimalUpDown ), 1m, decimal.MinValue, decimal.MaxValue );
- }
-
- public DecimalUpDown()
- : base( Decimal.TryParse, ( d ) => d, ( v1, v2 ) => v1 < v2, ( v1, v2 ) => v1 > v2 )
- {
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- protected override decimal IncrementValue( decimal value, decimal increment )
- {
- return value + increment;
- }
-
- protected override decimal DecrementValue( decimal value, decimal increment )
- {
- return value - increment;
- }
-
- #endregion //Base Class Overrides
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/DoubleUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/DoubleUpDown.cs
deleted file mode 100644
index 8b6e4b85..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/DoubleUpDown.cs
+++ /dev/null
@@ -1,124 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Globalization;
-using System.IO;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class DoubleUpDown : CommonNumericUpDown
- {
- #region Constructors
-
- static DoubleUpDown()
- {
- UpdateMetadata( typeof( DoubleUpDown ), 1d, double.NegativeInfinity, double.PositiveInfinity );
- }
-
- public DoubleUpDown()
- : base( Double.TryParse, Decimal.ToDouble, ( v1, v2 ) => v1 < v2, ( v1, v2 ) => v1 > v2 )
- {
- }
-
- #endregion //Constructors
-
- #region Properties
-
-
- #region AllowInputSpecialValues
-
- public static readonly DependencyProperty AllowInputSpecialValuesProperty =
- DependencyProperty.Register( "AllowInputSpecialValues", typeof( AllowedSpecialValues ), typeof( DoubleUpDown ), new UIPropertyMetadata( AllowedSpecialValues.None ) );
-
- public AllowedSpecialValues AllowInputSpecialValues
- {
- get { return ( AllowedSpecialValues )GetValue( AllowInputSpecialValuesProperty ); }
- set { SetValue( AllowInputSpecialValuesProperty, value ); }
- }
-
- #endregion //AllowInputSpecialValues
-
- #endregion
-
- #region Base Class Overrides
-
- protected override double? OnCoerceIncrement( double? baseValue )
- {
- if( baseValue.HasValue && double.IsNaN( baseValue.Value ) )
- throw new ArgumentException( "NaN is invalid for Increment." );
-
- return base.OnCoerceIncrement( baseValue );
- }
-
- protected override double? OnCoerceMaximum( double? baseValue )
- {
- if( baseValue.HasValue && double.IsNaN( baseValue.Value ) )
- throw new ArgumentException( "NaN is invalid for Maximum." );
-
- return base.OnCoerceMaximum( baseValue );
- }
-
- protected override double? OnCoerceMinimum( double? baseValue )
- {
- if( baseValue.HasValue && double.IsNaN( baseValue.Value ) )
- throw new ArgumentException( "NaN is invalid for Minimum." );
-
- return base.OnCoerceMinimum( baseValue );
- }
-
- protected override double IncrementValue( double value, double increment )
- {
- return value + increment;
- }
-
- protected override double DecrementValue( double value, double increment )
- {
- return value - increment;
- }
-
- protected override void SetValidSpinDirection()
- {
- if( Value.HasValue && double.IsInfinity( Value.Value ) && ( Spinner != null ) )
- {
- Spinner.ValidSpinDirection = ValidSpinDirections.None;
- }
- else
- {
- base.SetValidSpinDirection();
- }
- }
-
- protected override double? ConvertTextToValue( string text )
- {
- double? result = base.ConvertTextToValue( text );
- if( result != null )
- {
- if( double.IsNaN( result.Value ) )
- TestInputSpecialValue( this.AllowInputSpecialValues, AllowedSpecialValues.NaN );
- else if( double.IsPositiveInfinity( result.Value ) )
- TestInputSpecialValue( this.AllowInputSpecialValues, AllowedSpecialValues.PositiveInfinity );
- else if( double.IsNegativeInfinity( result.Value ) )
- TestInputSpecialValue( this.AllowInputSpecialValues, AllowedSpecialValues.NegativeInfinity );
- }
-
- return result;
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/IntegerUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/IntegerUpDown.cs
deleted file mode 100644
index 8ba2d64b..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/IntegerUpDown.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class IntegerUpDown : CommonNumericUpDown
- {
- #region Constructors
-
- static IntegerUpDown()
- {
- UpdateMetadata( typeof( IntegerUpDown ), 1, int.MinValue, int.MaxValue );
- }
-
- public IntegerUpDown()
- : base( Int32.TryParse, Decimal.ToInt32, ( v1, v2 ) => v1 < v2, ( v1, v2 ) => v1 > v2 )
- {
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- protected override int IncrementValue( int value, int increment )
- {
- return value + increment;
- }
-
- protected override int DecrementValue( int value, int increment )
- {
- return value - increment;
- }
-
- #endregion //Base Class Overrides
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/LongUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/LongUpDown.cs
deleted file mode 100644
index e76846ad..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/LongUpDown.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class LongUpDown : CommonNumericUpDown
- {
- #region Constructors
-
- static LongUpDown()
- {
- UpdateMetadata( typeof( LongUpDown ), 1L, long.MinValue, long.MaxValue );
- }
-
- public LongUpDown()
- : base( Int64.TryParse, Decimal.ToInt64, ( v1, v2 ) => v1 < v2, ( v1, v2 ) => v1 > v2 )
- {
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- protected override long IncrementValue( long value, long increment )
- {
- return value + increment;
- }
-
- protected override long DecrementValue( long value, long increment )
- {
- return value - increment;
- }
-
- #endregion //Base Class Overrides
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/NumericUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/NumericUpDown.cs
deleted file mode 100644
index 0d9e0de5..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/NumericUpDown.cs
+++ /dev/null
@@ -1,190 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Globalization;
-using System.Windows;
-using Xceed.Wpf.Toolkit.Primitives;
-
-
-namespace Xceed.Wpf.Toolkit
-{
- public abstract class NumericUpDown : UpDownBase
- {
-#pragma warning disable 0618
-
- #region Properties
-
- #region AutoMoveFocus
-
- public bool AutoMoveFocus
- {
- get
- {
- return ( bool )GetValue( AutoMoveFocusProperty );
- }
- set
- {
- SetValue( AutoMoveFocusProperty, value );
- }
- }
-
- public static readonly DependencyProperty AutoMoveFocusProperty =
- DependencyProperty.Register( "AutoMoveFocus", typeof( bool ), typeof( NumericUpDown ), new UIPropertyMetadata( false ) );
-
- #endregion AutoMoveFocus
-
- #region AutoSelectBehavior
-
- public AutoSelectBehavior AutoSelectBehavior
- {
- get
- {
- return ( AutoSelectBehavior )GetValue( AutoSelectBehaviorProperty );
- }
- set
- {
- SetValue( AutoSelectBehaviorProperty, value );
- }
- }
-
- public static readonly DependencyProperty AutoSelectBehaviorProperty =
- DependencyProperty.Register( "AutoSelectBehavior", typeof( AutoSelectBehavior ), typeof( NumericUpDown ),
- new UIPropertyMetadata( AutoSelectBehavior.OnFocus ) );
-
- #endregion AutoSelectBehavior PROPERTY
-
- #region FormatString
-
- public static readonly DependencyProperty FormatStringProperty = DependencyProperty.Register( "FormatString", typeof( string ), typeof( NumericUpDown ), new UIPropertyMetadata( String.Empty, OnFormatStringChanged ) );
- public string FormatString
- {
- get
- {
- return ( string )GetValue( FormatStringProperty );
- }
- set
- {
- SetValue( FormatStringProperty, value );
- }
- }
-
- private static void OnFormatStringChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- NumericUpDown numericUpDown = o as NumericUpDown;
- if( numericUpDown != null )
- numericUpDown.OnFormatStringChanged( ( string )e.OldValue, ( string )e.NewValue );
- }
-
- protected virtual void OnFormatStringChanged( string oldValue, string newValue )
- {
- if( IsInitialized )
- {
- this.SyncTextAndValueProperties( false, null );
- }
- }
-
- #endregion //FormatString
-
- #region Increment
-
- public static readonly DependencyProperty IncrementProperty = DependencyProperty.Register( "Increment", typeof( T ), typeof( NumericUpDown ), new PropertyMetadata( default( T ), OnIncrementChanged, OnCoerceIncrement ) );
- public T Increment
- {
- get
- {
- return ( T )GetValue( IncrementProperty );
- }
- set
- {
- SetValue( IncrementProperty, value );
- }
- }
-
- private static void OnIncrementChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- NumericUpDown numericUpDown = o as NumericUpDown;
- if( numericUpDown != null )
- numericUpDown.OnIncrementChanged( ( T )e.OldValue, ( T )e.NewValue );
- }
-
- protected virtual void OnIncrementChanged( T oldValue, T newValue )
- {
- if( this.IsInitialized )
- {
- SetValidSpinDirection();
- }
- }
-
- private static object OnCoerceIncrement( DependencyObject d, object baseValue )
- {
- NumericUpDown numericUpDown = d as NumericUpDown;
- if( numericUpDown != null )
- return numericUpDown.OnCoerceIncrement( ( T )baseValue );
-
- return baseValue;
- }
-
- protected virtual T OnCoerceIncrement( T baseValue )
- {
- return baseValue;
- }
-
- #endregion
-
- #region MaxLength
-
- public static readonly DependencyProperty MaxLengthProperty = DependencyProperty.Register( "MaxLength", typeof( int ), typeof( NumericUpDown ), new UIPropertyMetadata( 0 ) );
- public int MaxLength
- {
- get
- {
- return ( int )GetValue( MaxLengthProperty );
- }
- set
- {
- SetValue( MaxLengthProperty, value );
- }
- }
-
- #endregion //MaxLength
-
- #endregion //Properties
-
- #region Overrides
-
-
- #endregion
-
- #region Methods
-
- protected static decimal ParsePercent( string text, IFormatProvider cultureInfo )
- {
- NumberFormatInfo info = NumberFormatInfo.GetInstance( cultureInfo );
-
- text = text.Replace( info.PercentSymbol, null );
-
- decimal result = Decimal.Parse( text, NumberStyles.Any, info );
- result = result / 100;
-
- return result;
- }
-
- #endregion //Methods
- }
-
-#pragma warning restore 0618
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/SByteUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/SByteUpDown.cs
deleted file mode 100644
index f15e28cf..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/SByteUpDown.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit
-{
- internal class SByteUpDown : CommonNumericUpDown
- {
- #region Constructors
-
- static SByteUpDown()
- {
- UpdateMetadata( typeof( SByteUpDown ), ( sbyte )1, sbyte.MinValue, sbyte.MaxValue );
- }
-
- public SByteUpDown()
- : base( sbyte.TryParse, Decimal.ToSByte, ( v1, v2 ) => v1 < v2, ( v1, v2 ) => v1 > v2 )
- {
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- protected override sbyte IncrementValue( sbyte value, sbyte increment )
- {
- return ( sbyte )( value + increment );
- }
-
- protected override sbyte DecrementValue( sbyte value, sbyte increment )
- {
- return ( sbyte )( value - increment );
- }
-
- #endregion //Base Class Overrides
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/ShortUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/ShortUpDown.cs
deleted file mode 100644
index 39ecc075..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/ShortUpDown.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class ShortUpDown : CommonNumericUpDown
- {
- #region Constructors
-
- static ShortUpDown()
- {
- UpdateMetadata( typeof( ShortUpDown ), ( short )1, short.MinValue, short.MaxValue );
- }
-
- public ShortUpDown()
- : base( Int16.TryParse, Decimal.ToInt16, ( v1, v2 ) => v1 < v2, ( v1, v2 ) => v1 > v2 )
- {
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- protected override short IncrementValue( short value, short increment )
- {
- return ( short )( value + increment );
- }
-
- protected override short DecrementValue( short value, short increment )
- {
- return ( short )( value - increment );
- }
-
- #endregion //Base Class Overrides
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/SingleUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/SingleUpDown.cs
deleted file mode 100644
index 462a880c..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/SingleUpDown.cs
+++ /dev/null
@@ -1,124 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Globalization;
-using System.IO;
-
-namespace Xceed.Wpf.Toolkit
-{
- public class SingleUpDown : CommonNumericUpDown
- {
- #region Constructors
-
- static SingleUpDown()
- {
- UpdateMetadata( typeof( SingleUpDown ), 1f, float.NegativeInfinity, float.PositiveInfinity );
- }
-
- public SingleUpDown()
- : base( Single.TryParse, Decimal.ToSingle, ( v1, v2 ) => v1 < v2, ( v1, v2 ) => v1 > v2 )
- {
- }
-
- #endregion //Constructors
-
- #region Properties
-
- #region AllowInputSpecialValues
-
- public static readonly DependencyProperty AllowInputSpecialValuesProperty =
- DependencyProperty.Register( "AllowInputSpecialValues", typeof( AllowedSpecialValues ), typeof( SingleUpDown ), new UIPropertyMetadata( AllowedSpecialValues.None ) );
-
- public AllowedSpecialValues AllowInputSpecialValues
- {
- get { return ( AllowedSpecialValues )GetValue( AllowInputSpecialValuesProperty ); }
- set { SetValue( AllowInputSpecialValuesProperty, value ); }
- }
-
- #endregion //AllowInputSpecialValues
-
- #endregion
-
- #region Base Class Overrides
-
- protected override float? OnCoerceIncrement( float? baseValue )
- {
- if( baseValue.HasValue && float.IsNaN( baseValue.Value ) )
- throw new ArgumentException( "NaN is invalid for Increment." );
-
- return base.OnCoerceIncrement( baseValue );
- }
-
- protected override float? OnCoerceMaximum( float? baseValue )
- {
- if( baseValue.HasValue && float.IsNaN( baseValue.Value ) )
- throw new ArgumentException( "NaN is invalid for Maximum." );
-
- return base.OnCoerceMaximum( baseValue );
- }
-
- protected override float? OnCoerceMinimum( float? baseValue )
- {
- if( baseValue.HasValue && float.IsNaN( baseValue.Value ) )
- throw new ArgumentException( "NaN is invalid for Minimum." );
-
- return base.OnCoerceMinimum( baseValue );
- }
-
- protected override float IncrementValue( float value, float increment )
- {
- return value + increment;
- }
-
- protected override float DecrementValue( float value, float increment )
- {
- return value - increment;
- }
-
- protected override void SetValidSpinDirection()
- {
- if( Value.HasValue && float.IsInfinity( Value.Value ) && ( Spinner != null ) )
- {
- Spinner.ValidSpinDirection = ValidSpinDirections.None;
- }
- else
- {
- base.SetValidSpinDirection();
- }
- }
-
- protected override float? ConvertTextToValue( string text )
- {
- float? result = base.ConvertTextToValue( text );
-
- if( result != null )
- {
- if( float.IsNaN( result.Value ) )
- TestInputSpecialValue( this.AllowInputSpecialValues, AllowedSpecialValues.NaN );
- else if( float.IsPositiveInfinity( result.Value ) )
- TestInputSpecialValue( this.AllowInputSpecialValues, AllowedSpecialValues.PositiveInfinity );
- else if( float.IsNegativeInfinity( result.Value ) )
- TestInputSpecialValue( this.AllowInputSpecialValues, AllowedSpecialValues.NegativeInfinity );
- }
-
- return result;
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/UIntegerUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/UIntegerUpDown.cs
deleted file mode 100644
index c2ecc707..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/UIntegerUpDown.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit
-{
- internal class UIntegerUpDown : CommonNumericUpDown
- {
- #region Constructors
-
- static UIntegerUpDown()
- {
- UpdateMetadata( typeof( UIntegerUpDown ), ( uint )1, uint.MinValue, uint.MaxValue );
- }
-
- public UIntegerUpDown()
- : base( uint.TryParse, Decimal.ToUInt32, ( v1, v2 ) => v1 < v2, ( v1, v2 ) => v1 > v2 )
- {
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- protected override uint IncrementValue( uint value, uint increment )
- {
- return ( uint )( value + increment );
- }
-
- protected override uint DecrementValue( uint value, uint increment )
- {
- return ( uint )( value - increment );
- }
-
- #endregion //Base Class Overrides
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/ULongUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/ULongUpDown.cs
deleted file mode 100644
index 185050cb..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/ULongUpDown.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit
-{
- internal class ULongUpDown : CommonNumericUpDown
- {
- #region Constructors
-
- static ULongUpDown()
- {
- UpdateMetadata( typeof( ULongUpDown ), ( ulong )1, ulong.MinValue, ulong.MaxValue );
- }
-
- public ULongUpDown()
- : base( ulong.TryParse, Decimal.ToUInt64, ( v1, v2 ) => v1 < v2, ( v1, v2 ) => v1 > v2 )
- {
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- protected override ulong IncrementValue( ulong value, ulong increment )
- {
- return ( ulong )( value + increment );
- }
-
- protected override ulong DecrementValue( ulong value, ulong increment )
- {
- return ( ulong )( value - increment );
- }
-
- #endregion //Base Class Overrides
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/UShortUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/UShortUpDown.cs
deleted file mode 100644
index c3992441..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/UShortUpDown.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit
-{
- internal class UShortUpDown : CommonNumericUpDown
- {
- #region Constructors
-
- static UShortUpDown()
- {
- UpdateMetadata( typeof( UShortUpDown ), ( ushort )1, ushort.MinValue, ushort.MaxValue );
- }
-
- public UShortUpDown()
- : base( ushort.TryParse, Decimal.ToUInt16, ( v1, v2 ) => v1 < v2, ( v1, v2 ) => v1 > v2 )
- {
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- protected override ushort IncrementValue( ushort value, ushort increment )
- {
- return ( ushort )( value + increment );
- }
-
- protected override ushort DecrementValue( ushort value, ushort increment )
- {
- return ( ushort )( value - increment );
- }
-
- #endregion //Base Class Overrides
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index b2e8549f..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,214 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Themes/Generic.xaml
deleted file mode 100644
index cebeb172..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Themes/Generic.xaml
+++ /dev/null
@@ -1,202 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Obselete/MaskedTextBox/Implementation/MaskedTextBox.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Obselete/MaskedTextBox/Implementation/MaskedTextBox.cs
deleted file mode 100644
index b118f7fb..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Obselete/MaskedTextBox/Implementation/MaskedTextBox.cs
+++ /dev/null
@@ -1,723 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.ComponentModel;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-
-namespace Xceed.Wpf.Toolkit.Obselete
-{
- [Obsolete("Legacy implementation of MaskedTextBox. Use Xceed.Wpf.Toolkit.MaskedTextBox instead.", true)]
- public class MaskedTextBox : TextBox
- {
- #region Members
-
- ///
- /// Flags if the Text and Value properties are in the process of being sync'd
- ///
- private bool _isSyncingTextAndValueProperties;
- private bool _isInitialized;
- private bool _convertExceptionOccurred = false;
-
- #endregion //Members
-
- #region Properties
-
- protected MaskedTextProvider MaskProvider
- {
- get;
- set;
- }
-
- #region IncludePrompt
-
- public static readonly DependencyProperty IncludePromptProperty = DependencyProperty.Register( "IncludePrompt", typeof( bool ), typeof( MaskedTextBox ), new UIPropertyMetadata( false, OnIncludePromptPropertyChanged ) );
- public bool IncludePrompt
- {
- get
- {
- return ( bool )GetValue( IncludePromptProperty );
- }
- set
- {
- SetValue( IncludePromptProperty, value );
- }
- }
-
- private static void OnIncludePromptPropertyChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = o as MaskedTextBox;
- if( maskedTextBox != null )
- maskedTextBox.OnIncludePromptChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- protected virtual void OnIncludePromptChanged( bool oldValue, bool newValue )
- {
- UpdateMaskProvider( Mask );
- }
-
- #endregion //IncludePrompt
-
- #region IncludeLiterals
-
- public static readonly DependencyProperty IncludeLiteralsProperty = DependencyProperty.Register( "IncludeLiterals", typeof( bool ), typeof( MaskedTextBox ), new UIPropertyMetadata( true, OnIncludeLiteralsPropertyChanged ) );
- public bool IncludeLiterals
- {
- get
- {
- return ( bool )GetValue( IncludeLiteralsProperty );
- }
- set
- {
- SetValue( IncludeLiteralsProperty, value );
- }
- }
-
- private static void OnIncludeLiteralsPropertyChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = o as MaskedTextBox;
- if( maskedTextBox != null )
- maskedTextBox.OnIncludeLiteralsChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- protected virtual void OnIncludeLiteralsChanged( bool oldValue, bool newValue )
- {
- UpdateMaskProvider( Mask );
- }
-
- #endregion //IncludeLiterals
-
- #region Mask
-
- public static readonly DependencyProperty MaskProperty = DependencyProperty.Register( "Mask", typeof( string ), typeof( MaskedTextBox ), new UIPropertyMetadata( "<>", OnMaskPropertyChanged ) );
- public string Mask
- {
- get
- {
- return ( string )GetValue( MaskProperty );
- }
- set
- {
- SetValue( MaskProperty, value );
- }
- }
-
- private static void OnMaskPropertyChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = o as MaskedTextBox;
- if( maskedTextBox != null )
- maskedTextBox.OnMaskChanged( ( string )e.OldValue, ( string )e.NewValue );
- }
-
- protected virtual void OnMaskChanged( string oldValue, string newValue )
- {
- UpdateMaskProvider( newValue );
- UpdateText( 0 );
- }
-
- #endregion //Mask
-
- #region PromptChar
-
- public static readonly DependencyProperty PromptCharProperty = DependencyProperty.Register( "PromptChar", typeof( char ), typeof( MaskedTextBox ), new UIPropertyMetadata( '_', OnPromptCharChanged ) );
- public char PromptChar
- {
- get
- {
- return ( char )GetValue( PromptCharProperty );
- }
- set
- {
- SetValue( PromptCharProperty, value );
- }
- }
-
- private static void OnPromptCharChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = o as MaskedTextBox;
- if( maskedTextBox != null )
- maskedTextBox.OnPromptCharChanged( ( char )e.OldValue, ( char )e.NewValue );
- }
-
- protected virtual void OnPromptCharChanged( char oldValue, char newValue )
- {
- UpdateMaskProvider( Mask );
- }
-
- #endregion //PromptChar
-
- #region SelectAllOnGotFocus
-
- public static readonly DependencyProperty SelectAllOnGotFocusProperty = DependencyProperty.Register( "SelectAllOnGotFocus", typeof( bool ), typeof( MaskedTextBox ), new PropertyMetadata( false ) );
- public bool SelectAllOnGotFocus
- {
- get
- {
- return ( bool )GetValue( SelectAllOnGotFocusProperty );
- }
- set
- {
- SetValue( SelectAllOnGotFocusProperty, value );
- }
- }
-
- #endregion //SelectAllOnGotFocus
-
- #region Text
-
- private static void OnTextChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox inputBase = o as MaskedTextBox;
- if( inputBase != null )
- inputBase.OnTextChanged( ( string )e.OldValue, ( string )e.NewValue );
- }
-
- protected virtual void OnTextChanged( string oldValue, string newValue )
- {
- if( _isInitialized )
- SyncTextAndValueProperties( MaskedTextBox.TextProperty, newValue );
- }
-
- #endregion //Text
-
- #region Value
-
- public static readonly DependencyProperty ValueProperty = DependencyProperty.Register( "Value", typeof( object ), typeof( MaskedTextBox ), new FrameworkPropertyMetadata( null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValueChanged ) );
- public object Value
- {
- get
- {
- return ( object )GetValue( ValueProperty );
- }
- set
- {
- SetValue( ValueProperty, value );
- }
- }
-
- private static void OnValueChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = o as MaskedTextBox;
- if( maskedTextBox != null )
- maskedTextBox.OnValueChanged( ( object )e.OldValue, ( object )e.NewValue );
- }
-
- protected virtual void OnValueChanged( object oldValue, object newValue )
- {
- if( _isInitialized )
- SyncTextAndValueProperties( MaskedTextBox.ValueProperty, newValue );
-
- RoutedPropertyChangedEventArgs args = new RoutedPropertyChangedEventArgs( oldValue, newValue );
- args.RoutedEvent = MaskedTextBox.ValueChangedEvent;
- RaiseEvent( args );
- }
-
- #endregion //Value
-
- #region ValueType
-
- public static readonly DependencyProperty ValueTypeProperty = DependencyProperty.Register( "ValueType", typeof( Type ), typeof( MaskedTextBox ), new UIPropertyMetadata( typeof( String ), OnValueTypeChanged ) );
- public Type ValueType
- {
- get
- {
- return ( Type )GetValue( ValueTypeProperty );
- }
- set
- {
- SetValue( ValueTypeProperty, value );
- }
- }
-
- private static void OnValueTypeChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- MaskedTextBox maskedTextBox = o as MaskedTextBox;
- if( maskedTextBox != null )
- maskedTextBox.OnValueTypeChanged( ( Type )e.OldValue, ( Type )e.NewValue );
- }
-
- protected virtual void OnValueTypeChanged( Type oldValue, Type newValue )
- {
- if( _isInitialized )
- SyncTextAndValueProperties( MaskedTextBox.TextProperty, Text );
- }
-
- #endregion //ValueType
-
- #endregion //Properties
-
- #region Constructors
-
- static MaskedTextBox()
- {
- TextProperty.OverrideMetadata( typeof( MaskedTextBox ), new FrameworkPropertyMetadata( OnTextChanged ) );
- }
-
- public MaskedTextBox()
- {
- CommandBindings.Add( new CommandBinding( ApplicationCommands.Paste, Paste ) ); //handle paste
- CommandBindings.Add( new CommandBinding( ApplicationCommands.Cut, null, CanCut ) ); //surpress cut
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
-
- UpdateMaskProvider( Mask );
- UpdateText( 0 );
- }
-
- protected override void OnInitialized( EventArgs e )
- {
- base.OnInitialized( e );
-
- if( !_isInitialized )
- {
- _isInitialized = true;
- SyncTextAndValueProperties( ValueProperty, Value );
- }
- }
-
- protected override void OnGotKeyboardFocus( KeyboardFocusChangedEventArgs e )
- {
- if( SelectAllOnGotFocus )
- {
- SelectAll();
- }
-
- base.OnGotKeyboardFocus( e );
- }
-
- protected override void OnPreviewKeyDown( KeyEventArgs e )
- {
- if( !e.Handled )
- {
- HandlePreviewKeyDown( e );
- }
-
- base.OnPreviewKeyDown( e );
- }
-
- protected override void OnPreviewTextInput( TextCompositionEventArgs e )
- {
- if( !e.Handled )
- {
- HandlePreviewTextInput( e );
- }
-
- base.OnPreviewTextInput( e );
- }
-
- #endregion //Base Class Overrides
-
- #region Events
-
- public static readonly RoutedEvent ValueChangedEvent = EventManager.RegisterRoutedEvent( "ValueChanged", RoutingStrategy.Bubble, typeof( RoutedPropertyChangedEventHandler ), typeof( MaskedTextBox ) );
- public event RoutedPropertyChangedEventHandler ValueChanged
- {
- add
- {
- AddHandler( ValueChangedEvent, value );
- }
- remove
- {
- RemoveHandler( ValueChangedEvent, value );
- }
- }
-
- #endregion //Events
-
- #region Methods
-
- #region Private
-
- private void UpdateText()
- {
- UpdateText( SelectionStart );
- }
-
- private void UpdateText( int position )
- {
- MaskedTextProvider provider = MaskProvider;
- if( provider == null )
- throw new InvalidOperationException();
-
- Text = provider.ToDisplayString();
- SelectionLength = 0;
- SelectionStart = position;
- }
-
- private int GetNextCharacterPosition( int startPosition )
- {
- int position = MaskProvider.FindEditPositionFrom( startPosition, true );
- return position == -1 ? startPosition : position;
- }
-
- private void UpdateMaskProvider( string mask )
- {
- //do not create a mask provider if the Mask is empty, which can occur if the IncludePrompt and IncludeLiterals properties
- //are set prior to the Mask.
- if( String.IsNullOrEmpty( mask ) )
- return;
-
- MaskProvider = new MaskedTextProvider( mask )
- {
- IncludePrompt = this.IncludePrompt,
- IncludeLiterals = this.IncludeLiterals,
- PromptChar = this.PromptChar,
- ResetOnSpace = false //should make this a property
- };
- }
-
- private object ConvertTextToValue( string text )
- {
- object convertedValue = null;
-
- Type dataType = ValueType;
-
- string valueToConvert = MaskProvider.ToString().Trim();
-
- try
- {
- if( valueToConvert.GetType() == dataType || dataType.IsInstanceOfType( valueToConvert ) )
- {
- convertedValue = valueToConvert;
- }
-#if !VS2008
- else if( String.IsNullOrWhiteSpace( valueToConvert ) )
- {
- convertedValue = Activator.CreateInstance( dataType );
- }
-#else
- else if ( String.IsNullOrEmpty( valueToConvert ) )
- {
- convertedValue = Activator.CreateInstance( dataType );
- }
-#endif
- else if( null == convertedValue && valueToConvert is IConvertible )
- {
- convertedValue = Convert.ChangeType( valueToConvert, dataType );
- }
- }
- catch
- {
- //if an excpetion occurs revert back to original value
- _convertExceptionOccurred = true;
- return Value;
- }
-
- return convertedValue;
- }
-
- private string ConvertValueToText( object value )
- {
- if( value == null )
- value = string.Empty;
-
- if( _convertExceptionOccurred )
- {
- value = Value;
- _convertExceptionOccurred = false;
- }
-
- //I have only seen this occur while in Blend, but we need it here so the Blend designer doesn't crash.
- if( MaskProvider == null )
- return value.ToString();
-
- MaskProvider.Set( value.ToString() );
- return MaskProvider.ToDisplayString();
- }
-
- private void SyncTextAndValueProperties( DependencyProperty p, object newValue )
- {
- //prevents recursive syncing properties
- if( _isSyncingTextAndValueProperties )
- return;
-
- _isSyncingTextAndValueProperties = true;
-
- //this only occures when the user typed in the value
- if( MaskedTextBox.TextProperty == p )
- {
- if( newValue != null )
- SetValue( MaskedTextBox.ValueProperty, ConvertTextToValue( newValue.ToString() ) );
- }
-
- SetValue( MaskedTextBox.TextProperty, ConvertValueToText( newValue ) );
-
- _isSyncingTextAndValueProperties = false;
- }
-
- private void HandlePreviewTextInput( TextCompositionEventArgs e )
- {
- if( !IsReadOnly )
- {
- this.InsertText( e.Text );
- }
-
- e.Handled = true;
- }
-
- private void HandlePreviewKeyDown( KeyEventArgs e )
- {
- if( e.Key == Key.Delete )
- {
- e.Handled = IsReadOnly
- || HandleKeyDownDelete();
- }
- else if( e.Key == Key.Back )
- {
- e.Handled = IsReadOnly
- || HandleKeyDownBack();
- }
- else if( e.Key == Key.Space )
- {
- if( !IsReadOnly )
- {
- InsertText( " " );
- }
-
- e.Handled = true;
- }
- else if( e.Key == Key.Return || e.Key == Key.Enter )
- {
- if( !IsReadOnly && AcceptsReturn )
- {
- this.InsertText( "\r" );
- }
-
- // We don't want the OnPreviewTextInput to be triggered for the Return/Enter key
- // when it is not accepted.
- e.Handled = true;
- }
- else if( e.Key == Key.Escape )
- {
- // We don't want the OnPreviewTextInput to be triggered at all for the Escape key.
- e.Handled = true;
- }
- else if( e.Key == Key.Tab )
- {
- if( AcceptsTab )
- {
- if( !IsReadOnly )
- {
- this.InsertText( "\t" );
- }
-
- e.Handled = true;
- }
- }
- }
-
- private bool HandleKeyDownDelete()
- {
- ModifierKeys modifiers = Keyboard.Modifiers;
- bool handled = true;
-
- if( modifiers == ModifierKeys.None )
- {
- if( !RemoveSelectedText() )
- {
- int position = SelectionStart;
-
- if( position < Text.Length )
- {
- RemoveText( position, 1 );
- UpdateText( position );
- }
- }
- else
- {
- UpdateText();
- }
- }
- else if( modifiers == ModifierKeys.Control )
- {
- if( !RemoveSelectedText() )
- {
- int position = SelectionStart;
-
- RemoveTextToEnd( position );
- UpdateText( position );
- }
- else
- {
- UpdateText();
- }
- }
- else if( modifiers == ModifierKeys.Shift )
- {
- if( RemoveSelectedText() )
- {
- UpdateText();
- }
- else
- {
- handled = false;
- }
- }
- else
- {
- handled = false;
- }
-
- return handled;
- }
-
- private bool HandleKeyDownBack()
- {
- ModifierKeys modifiers = Keyboard.Modifiers;
- bool handled = true;
-
- if( modifiers == ModifierKeys.None || modifiers == ModifierKeys.Shift )
- {
- if( !RemoveSelectedText() )
- {
- int position = SelectionStart;
-
- if( position > 0 )
- {
- int newPosition = position - 1;
-
- RemoveText( newPosition, 1 );
- UpdateText( newPosition );
- }
- }
- else
- {
- UpdateText();
- }
- }
- else if( modifiers == ModifierKeys.Control )
- {
- if( !RemoveSelectedText() )
- {
- RemoveTextFromStart( SelectionStart );
- UpdateText( 0 );
- }
- else
- {
- UpdateText();
- }
- }
- else
- {
- handled = false;
- }
-
- return handled;
- }
-
- private void InsertText( string text )
- {
- int position = SelectionStart;
- MaskedTextProvider provider = MaskProvider;
-
- bool textRemoved = this.RemoveSelectedText();
-
- position = GetNextCharacterPosition( position );
-
- if( !textRemoved && Keyboard.IsKeyToggled( Key.Insert ) )
- {
- if( provider.Replace( text, position ) )
- {
- position += text.Length;
- }
- }
- else
- {
- if( provider.InsertAt( text, position ) )
- {
- position += text.Length;
- }
- }
-
- position = GetNextCharacterPosition( position );
-
- this.UpdateText( position );
- }
-
- private void RemoveTextFromStart( int endPosition )
- {
- RemoveText( 0, endPosition );
- }
-
- private void RemoveTextToEnd( int startPosition )
- {
- RemoveText( startPosition, Text.Length - startPosition );
- }
-
- private void RemoveText( int position, int length )
- {
- if( length == 0 )
- return;
-
- MaskProvider.RemoveAt( position, position + length - 1 );
- }
-
- private bool RemoveSelectedText()
- {
- int length = SelectionLength;
-
- if( length == 0 )
- return false;
-
- int position = SelectionStart;
-
- return MaskProvider.RemoveAt( position, position + length - 1 );
- }
-
- #endregion //Private
-
- #endregion //Methods
-
- #region Commands
-
- private void Paste( object sender, RoutedEventArgs e )
- {
- if( IsReadOnly )
- return;
-
- object data = Clipboard.GetData( DataFormats.Text );
- if( data != null )
- {
- string text = data.ToString().Trim();
- if( text.Length > 0 )
- {
- int position = SelectionStart;
-
- MaskProvider.Set( text );
-
- UpdateText( position );
- }
- }
- }
-
- private void CanCut( object sender, CanExecuteRoutedEventArgs e )
- {
- e.CanExecute = false;
- e.Handled = true;
- }
-
- #endregion //Commands
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/AnimationPanel.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/AnimationPanel.cs
deleted file mode 100644
index dcc130ef..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/AnimationPanel.cs
+++ /dev/null
@@ -1,1875 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
-using System.Reflection;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-using Xceed.Wpf.Toolkit.Media.Animation;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-using Xceed.Wpf.Toolkit.Core;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public abstract class AnimationPanel : PanelBase
- {
- #region Constructors
-
- public AnimationPanel()
- {
-#if DEBUG
- Type derivedType = GetType();
-
- FieldInfo[] fields = derivedType.GetFields( BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public );
-
- foreach( FieldInfo field in fields )
- {
- if( field.FieldType == typeof( DependencyProperty ) )
- {
- DependencyProperty prop = ( DependencyProperty )field.GetValue( null );
- PropertyMetadata metaData = prop.GetMetadata( this );
-
- if( metaData is FrameworkPropertyMetadata )
- {
- FrameworkPropertyMetadata frameworkData = ( FrameworkPropertyMetadata )metaData;
-
- if( frameworkData.AffectsArrange == true || frameworkData.AffectsMeasure == true ||
- frameworkData.AffectsParentArrange == true || frameworkData.AffectsParentMeasure == true )
- {
- System.Console.WriteLine( "AnimationPanel: " + derivedType.Name + "." + field.Name +
- " - You should not set dependency property metadata flags that " +
- "affect measure or arrange, instead call AnimationPanel's InvalidateMeasure or " +
- "InvalidateArrange directly." );
- }
- }
- }
- }
-#endif
-
- this.Loaded += new RoutedEventHandler( this.OnLoaded );
- }
-
- #endregion
-
- #region ChildState Private Property
-
- private static readonly DependencyPropertyKey ChildStatePropertyKey =
- DependencyProperty.RegisterAttachedReadOnly( "ChildState", typeof( ChildState ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( null ) );
-
- private static ChildState GetChildState( DependencyObject d )
- {
- return ( ChildState )d.GetValue( AnimationPanel.ChildStatePropertyKey.DependencyProperty );
- }
-
- private static void SetChildState( DependencyObject d, ChildState value )
- {
- d.SetValue( AnimationPanel.ChildStatePropertyKey, value );
- }
-
- #endregion
-
- #region DefaultAnimationRate Property
-
- public static readonly DependencyProperty DefaultAnimationRateProperty =
- DependencyProperty.Register( "DefaultAnimationRate", typeof( AnimationRate ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( ( AnimationRate )1d ),
- new ValidateValueCallback( AnimationPanel.ValidateDefaultAnimationRate ) );
-
- public AnimationRate DefaultAnimationRate
- {
- get
- {
- return ( AnimationRate )this.GetValue( AnimationPanel.DefaultAnimationRateProperty );
- }
- set
- {
- this.SetValue( AnimationPanel.DefaultAnimationRateProperty, value );
- }
- }
-
- private static bool ValidateDefaultAnimationRate( object value )
- {
- if( ( AnimationRate )value == AnimationRate.Default )
- throw new ArgumentException( ErrorMessages.GetMessage( ErrorMessages.DefaultAnimationRateAnimationRateDefault ) );
-
- return true;
- }
-
- #endregion
-
- #region DefaultAnimator Property
-
- public static readonly DependencyProperty DefaultAnimatorProperty =
- DependencyProperty.Register( "DefaultAnimator", typeof( IterativeAnimator ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( Animators.Linear ),
- new ValidateValueCallback( AnimationPanel.ValidateDefaultAnimator ) );
-
- public IterativeAnimator DefaultAnimator
- {
- get
- {
- return ( IterativeAnimator )this.GetValue( AnimationPanel.DefaultAnimatorProperty );
- }
- set
- {
- this.SetValue( AnimationPanel.DefaultAnimatorProperty, value );
- }
- }
-
- private static bool ValidateDefaultAnimator( object value )
- {
- if( value == IterativeAnimator.Default )
- throw new ArgumentException( ErrorMessages.GetMessage( ErrorMessages.DefaultAnimatorIterativeAnimationDefault ) );
-
- return true;
- }
-
- #endregion
-
- #region EnterAnimationRate Property
-
- public static readonly DependencyProperty EnterAnimationRateProperty =
- DependencyProperty.Register( "EnterAnimationRate", typeof( AnimationRate ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( AnimationRate.Default ) );
-
- public AnimationRate EnterAnimationRate
- {
- get
- {
- return ( AnimationRate )this.GetValue( AnimationPanel.EnterAnimationRateProperty );
- }
- set
- {
- this.SetValue( AnimationPanel.EnterAnimationRateProperty, value );
- }
- }
-
- #endregion
-
- #region EnterAnimator Property
-
- public static readonly DependencyProperty EnterAnimatorProperty =
- DependencyProperty.Register( "EnterAnimator", typeof( IterativeAnimator ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( IterativeAnimator.Default ) );
-
- public IterativeAnimator EnterAnimator
- {
- get
- {
- return ( IterativeAnimator )this.GetValue( AnimationPanel.EnterAnimatorProperty );
- }
- set
- {
- this.SetValue( AnimationPanel.EnterAnimatorProperty, value );
- }
- }
-
- #endregion
-
- #region EnterFrom Attached Property
-
- public static readonly DependencyProperty EnterFromProperty =
- DependencyProperty.RegisterAttached( "EnterFrom", typeof( Rect? ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( ( Rect? )null, FrameworkPropertyMetadataOptions.Inherits ) );
-
- public static Rect? GetEnterFrom( DependencyObject d )
- {
- return ( Rect? )d.GetValue( AnimationPanel.EnterFromProperty );
- }
-
- public static void SetEnterFrom( DependencyObject d, Rect? value )
- {
- d.SetValue( AnimationPanel.EnterFromProperty, value );
- }
-
- #endregion
-
- #region ExitAnimationRate Property
-
- public static readonly DependencyProperty ExitAnimationRateProperty =
- DependencyProperty.Register( "ExitAnimationRate", typeof( AnimationRate ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( AnimationRate.Default ) );
-
- public AnimationRate ExitAnimationRate
- {
- get
- {
- return ( AnimationRate )this.GetValue( AnimationPanel.ExitAnimationRateProperty );
- }
- set
- {
- this.SetValue( AnimationPanel.ExitAnimationRateProperty, value );
- }
- }
-
- #endregion
-
- #region ExitAnimator Property
-
- public static readonly DependencyProperty ExitAnimatorProperty =
- DependencyProperty.Register( "ExitAnimator", typeof( IterativeAnimator ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( IterativeAnimator.Default ) );
-
- public IterativeAnimator ExitAnimator
- {
- get
- {
- return ( IterativeAnimator )this.GetValue( AnimationPanel.ExitAnimatorProperty );
- }
- set
- {
- this.SetValue( AnimationPanel.ExitAnimatorProperty, value );
- }
- }
-
- #endregion
-
- #region ExitTo Attached Property
-
- public static readonly DependencyProperty ExitToProperty =
- DependencyProperty.RegisterAttached( "ExitTo", typeof( Rect? ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( ( Rect? )null, FrameworkPropertyMetadataOptions.Inherits ) );
-
- public static Rect? GetExitTo( DependencyObject d )
- {
- return ( Rect? )d.GetValue( AnimationPanel.ExitToProperty );
- }
-
- public static void SetExitTo( DependencyObject d, Rect? value )
- {
- d.SetValue( AnimationPanel.ExitToProperty, value );
- }
-
- #endregion
-
- #region LayoutAnimationRate Property
-
- public static readonly DependencyProperty LayoutAnimationRateProperty =
- DependencyProperty.Register( "LayoutAnimationRate", typeof( AnimationRate ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( AnimationRate.Default ) );
-
- public AnimationRate LayoutAnimationRate
- {
- get
- {
- return ( AnimationRate )this.GetValue( AnimationPanel.LayoutAnimationRateProperty );
- }
- set
- {
- this.SetValue( AnimationPanel.LayoutAnimationRateProperty, value );
- }
- }
-
- #endregion
-
- #region LayoutAnimator Property
-
- public static readonly DependencyProperty LayoutAnimatorProperty =
- DependencyProperty.Register( "LayoutAnimator", typeof( IterativeAnimator ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( IterativeAnimator.Default ) );
-
- public IterativeAnimator LayoutAnimator
- {
- get
- {
- return ( IterativeAnimator )this.GetValue( AnimationPanel.LayoutAnimatorProperty );
- }
- set
- {
- this.SetValue( AnimationPanel.LayoutAnimatorProperty, value );
- }
- }
-
- #endregion
-
- #region SwitchAnimationRate Property
-
- public static readonly DependencyProperty SwitchAnimationRateProperty =
- DependencyProperty.Register( "SwitchAnimationRate", typeof( AnimationRate ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( AnimationRate.Default ) );
-
- public AnimationRate SwitchAnimationRate
- {
- get
- {
- return ( AnimationRate )this.GetValue( AnimationPanel.SwitchAnimationRateProperty );
- }
- set
- {
- this.SetValue( AnimationPanel.SwitchAnimationRateProperty, value );
- }
- }
-
- #endregion
-
- #region SwitchAnimator Property
-
- public static readonly DependencyProperty SwitchAnimatorProperty =
- DependencyProperty.Register( "SwitchAnimator", typeof( IterativeAnimator ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( IterativeAnimator.Default ) );
-
- public IterativeAnimator SwitchAnimator
- {
- get
- {
- return ( IterativeAnimator )this.GetValue( AnimationPanel.SwitchAnimatorProperty );
- }
- set
- {
- this.SetValue( AnimationPanel.SwitchAnimatorProperty, value );
- }
- }
-
- #endregion
-
- #region SwitchParent Property
-
- private static readonly DependencyPropertyKey SwitchParentPropertyKey =
- DependencyProperty.RegisterReadOnly( "SwitchParent", typeof( SwitchPanel ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( null,
- new PropertyChangedCallback( AnimationPanel.OnSwitchParentChanged ) ) );
-
- public static readonly DependencyProperty SwitchParentProperty = AnimationPanel.SwitchParentPropertyKey.DependencyProperty;
-
- public SwitchPanel SwitchParent
- {
- get
- {
- return ( SwitchPanel )this.GetValue( AnimationPanel.SwitchParentProperty );
- }
- }
-
- protected internal void SetSwitchParent( SwitchPanel value )
- {
- this.SetValue( AnimationPanel.SwitchParentPropertyKey, value );
- }
-
- private static void OnSwitchParentChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ( ( AnimationPanel )d ).OnSwitchParentChanged( e );
- }
-
- protected virtual void OnSwitchParentChanged( DependencyPropertyChangedEventArgs e )
- {
- _switchParent = e.NewValue as SwitchPanel;
- }
-
- #endregion
-
- #region SwitchTemplate Property
-
- public static readonly DependencyProperty SwitchTemplateProperty =
- DependencyProperty.Register( "SwitchTemplate", typeof( DataTemplate ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( null,
- new PropertyChangedCallback( AnimationPanel.OnSwitchTemplateChanged ) ) );
-
- public DataTemplate SwitchTemplate
- {
- get
- {
- return ( DataTemplate )this.GetValue( AnimationPanel.SwitchTemplateProperty );
- }
- set
- {
- this.SetValue( AnimationPanel.SwitchTemplateProperty, value );
- }
- }
-
- private static void OnSwitchTemplateChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ( ( AnimationPanel )d ).OnSwitchTemplateChanged( e );
- }
-
- protected virtual void OnSwitchTemplateChanged( DependencyPropertyChangedEventArgs e )
- {
- if( _switchParent != null && _switchParent.ActiveLayout == this )
- {
- _switchParent.UpdateSwitchTemplate();
- }
- }
-
- #endregion
-
- #region TemplateAnimationRate Property
-
- public static readonly DependencyProperty TemplateAnimationRateProperty =
- DependencyProperty.Register( "TemplateAnimationRate", typeof( AnimationRate ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( AnimationRate.Default ) );
-
- public AnimationRate TemplateAnimationRate
- {
- get
- {
- return ( AnimationRate )this.GetValue( AnimationPanel.TemplateAnimationRateProperty );
- }
- set
- {
- this.SetValue( AnimationPanel.TemplateAnimationRateProperty, value );
- }
- }
-
- #endregion
-
- #region TemplateAnimator Property
-
- public static readonly DependencyProperty TemplateAnimatorProperty =
- DependencyProperty.Register( "TemplateAnimator", typeof( IterativeAnimator ), typeof( AnimationPanel ),
- new FrameworkPropertyMetadata( IterativeAnimator.Default ) );
-
- public IterativeAnimator TemplateAnimator
- {
- get
- {
- return ( IterativeAnimator )this.GetValue( AnimationPanel.TemplateAnimatorProperty );
- }
- set
- {
- this.SetValue( AnimationPanel.TemplateAnimatorProperty, value );
- }
- }
-
- #endregion
-
- #region DesiredSize Property
-
- public new Size DesiredSize
- {
- get
- {
- return ( _switchParent != null ) ? _switchParent.DesiredSize : base.DesiredSize;
- }
- }
-
- #endregion
-
- #region RenderSize Property
-
- public new Size RenderSize
- {
- get
- {
- return ( _switchParent != null ) ? _switchParent.RenderSize : base.RenderSize;
- }
- set
- {
- base.RenderSize = value;
- }
- }
-
- #endregion
-
- #region IsActiveLayout Property
-
- public bool IsActiveLayout
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.IsActiveLayout ];
- }
- private set
- {
- _cacheBits[ ( int )CacheBits.IsActiveLayout ] = value;
- }
- }
-
- #endregion
-
- #region InternalChildren Protected Property
-
- protected internal new UIElementCollection InternalChildren
- {
- get
- {
- return ( _switchParent == null ) ? base.InternalChildren : _switchParent.ChildrenInternal;
- }
- }
-
- #endregion
-
- #region VisualChildrenCount Protected Property
-
- protected override int VisualChildrenCount
- {
- get
- {
- return this.HasLoaded ? this.InternalChildren.Count + this.ExitingChildren.Count : base.VisualChildrenCount;
- }
- }
-
- #endregion
-
- #region ChildrensParent Protected Property
-
- protected PanelBase ChildrensParent
- {
- get
- {
- return _switchParent != null ? ( PanelBase )_switchParent : this;
- }
- }
-
- #endregion
-
- #region VisualChildrenCountInternal Internal Property
-
- internal int VisualChildrenCountInternal
- {
- get
- {
- return this.VisualChildrenCount;
- }
- }
-
- #endregion
-
- #region PhysicalScrollOffset Internal Property
-
- internal Vector PhysicalScrollOffset
- {
- get
- {
- return _physicalScrollOffset;
- }
- set
- {
- _physicalScrollOffset = value;
- }
- }
-
- private Vector _physicalScrollOffset = new Vector();
-
- #endregion
-
- #region HasLoaded Internal Property
-
- internal bool IsRemovingInternalChild
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.IsRemovingInternalChild ];
- }
- private set
- {
- _cacheBits[ ( int )CacheBits.IsRemovingInternalChild ] = value;
- }
- }
-
- #endregion
-
- #region AnimatingChildCount Private Property
-
- private int AnimatingChildCount
- {
- get
- {
- return _animatingChildCount;
- }
- set
- {
- // start the animation pump if the value goes positive
- if( _animatingChildCount == 0 && value > 0 )
- {
- CompositionTarget.Rendering += new EventHandler( OnRendering );
- RaiseAnimationBegunEvent();
- }
-
- // stop the animation pump if the value goes to 0
- if( _animatingChildCount != 0 && value == 0 )
- {
- if( EndSwitchOnAnimationCompleted && _switchParent != null )
- {
- EndSwitchOnAnimationCompleted = false;
- _switchParent.EndLayoutSwitch();
- }
-
- CompositionTarget.Rendering -= new EventHandler( OnRendering );
- RaiseAnimationCompletedEvent();
- }
-
- _animatingChildCount = value;
- }
- }
-
- private int _animatingChildCount;
-
- #endregion
-
- #region EndSwitchOnAnimationCompleted Private Property
-
- private bool EndSwitchOnAnimationCompleted
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.EndSwitchOnAnimationCompleted ];
- }
- set
- {
- _cacheBits[ ( int )CacheBits.EndSwitchOnAnimationCompleted ] = value;
- }
- }
-
- #endregion
-
- #region HasArranged Private Property
-
- private bool HasArranged
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.HasArranged ];
- }
- set
- {
- _cacheBits[ ( int )CacheBits.HasArranged ] = value;
- }
- }
-
- #endregion
-
- #region HasLoaded Private Property
-
- protected bool HasLoaded
- {
- get
- {
- return _switchParent == null ? _cacheBits[ ( int )CacheBits.HasLoaded ] : _switchParent.HasLoaded;
- }
- private set
- {
- _cacheBits[ ( int )CacheBits.HasLoaded ] = value;
- }
- }
-
- #endregion
-
- #region IsSwitchInProgress Private Property
-
- private bool IsSwitchInProgress
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.IsSwitchInProgress ];
- }
- set
- {
- _cacheBits[ ( int )CacheBits.IsSwitchInProgress ] = value;
- }
- }
-
- #endregion
-
- #region ItemsOwner Private Property
-
- private ItemsControl ItemsOwner
- {
- get
- {
- return ItemsControl.GetItemsOwner( _switchParent == null ? ( Panel )this : ( Panel )_switchParent );
- }
- }
-
- #endregion
-
- #region ExitingChildren Private Property
-
- private List ExitingChildren
- {
- get
- {
- if( _switchParent != null )
- return _switchParent.ExitingChildren;
-
- if( _exitingChildren == null )
- {
- _exitingChildren = new List();
- }
-
- return _exitingChildren;
- }
- }
-
- #endregion
-
- #region AnimationBegun Event
-
- public static readonly RoutedEvent AnimationBegunEvent =
- EventManager.RegisterRoutedEvent( "AnimationBegun", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( AnimationPanel ) );
-
- public event RoutedEventHandler AnimationBegun
- {
- add
- {
- this.AddHandler( AnimationPanel.AnimationBegunEvent, value );
- }
- remove
- {
- this.RemoveHandler( AnimationPanel.AnimationBegunEvent, value );
- }
- }
-
- protected RoutedEventArgs RaiseAnimationBegunEvent()
- {
- return AnimationPanel.RaiseAnimationBegunEvent( ( this._switchParent != null ) ? ( UIElement )this._switchParent : ( UIElement )this );
- }
-
- private static RoutedEventArgs RaiseAnimationBegunEvent( UIElement target )
- {
- if( target == null )
- return null;
-
- RoutedEventArgs args = new RoutedEventArgs();
- args.RoutedEvent = AnimationPanel.AnimationBegunEvent;
- RoutedEventHelper.RaiseEvent( target, args );
- return args;
- }
-
- #endregion
-
- #region AnimationCompleted Event
-
- public static readonly RoutedEvent AnimationCompletedEvent =
- EventManager.RegisterRoutedEvent( "AnimationCompleted", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( AnimationPanel ) );
-
- public event RoutedEventHandler AnimationCompleted
- {
- add
- {
- this.AddHandler( AnimationPanel.AnimationCompletedEvent, value );
- }
- remove
- {
- this.RemoveHandler( AnimationPanel.AnimationCompletedEvent, value );
- }
- }
-
- protected RoutedEventArgs RaiseAnimationCompletedEvent()
- {
- return AnimationPanel.RaiseAnimationCompletedEvent( ( this._switchParent != null ) ? ( UIElement )this._switchParent : ( UIElement )this );
- }
-
- private static RoutedEventArgs RaiseAnimationCompletedEvent( UIElement target )
- {
- if( target == null )
- return null;
-
- RoutedEventArgs args = new RoutedEventArgs();
- args.RoutedEvent = AnimationPanel.AnimationCompletedEvent;
- RoutedEventHelper.RaiseEvent( target, args );
- return args;
- }
-
- #endregion
-
- #region ChildEntered Event
-
- public static readonly RoutedEvent ChildEnteredEvent =
- EventManager.RegisterRoutedEvent( "ChildEntered", RoutingStrategy.Bubble, typeof( ChildEnteredEventHandler ), typeof( AnimationPanel ) );
-
- public event ChildEnteredEventHandler ChildEntered
- {
- add
- {
- this.AddHandler( AnimationPanel.ChildEnteredEvent, value );
- }
- remove
- {
- this.RemoveHandler( AnimationPanel.ChildEnteredEvent, value );
- }
- }
-
- protected ChildEnteredEventArgs RaiseChildEnteredEvent( UIElement child, Rect arrangeRect )
- {
- return AnimationPanel.RaiseChildEnteredEvent( this, child, arrangeRect );
- }
-
- internal static ChildEnteredEventArgs RaiseChildEnteredEvent( UIElement target, UIElement child, Rect arrangeRect )
- {
- if( target == null )
- return null;
-
- ChildEnteredEventArgs args = new ChildEnteredEventArgs( child, arrangeRect );
- args.RoutedEvent = AnimationPanel.ChildEnteredEvent;
- RoutedEventHelper.RaiseEvent( target, args );
- return args;
- }
-
- #endregion
-
- #region ChildEntering Event
-
- public static readonly RoutedEvent ChildEnteringEvent =
- EventManager.RegisterRoutedEvent( "ChildEntering", RoutingStrategy.Bubble, typeof( ChildEnteringEventHandler ), typeof( AnimationPanel ) );
-
- public event ChildEnteringEventHandler ChildEntering
- {
- add
- {
- this.AddHandler( AnimationPanel.ChildEnteringEvent, value );
- }
- remove
- {
- this.RemoveHandler( AnimationPanel.ChildEnteringEvent, value );
- }
- }
-
- protected ChildEnteringEventArgs RaiseChildEnteringEvent( UIElement child, Rect? EnterFrom, Rect ArrangeRect )
- {
- return AnimationPanel.RaiseChildEnteringEvent( this, child, EnterFrom, ArrangeRect );
- }
-
- private static ChildEnteringEventArgs RaiseChildEnteringEvent( UIElement target, UIElement child, Rect? EnterFrom, Rect ArrangeRect )
- {
- if( target == null )
- return null;
-
- ChildEnteringEventArgs args = new ChildEnteringEventArgs( child, EnterFrom, ArrangeRect );
- args.RoutedEvent = AnimationPanel.ChildEnteringEvent;
- RoutedEventHelper.RaiseEvent( target, args );
- return args;
- }
-
- #endregion
-
- #region ChildExited Event
-
- public static readonly RoutedEvent ChildExitedEvent =
- EventManager.RegisterRoutedEvent( "ChildExited", RoutingStrategy.Bubble, typeof( ChildExitedEventHandler ), typeof( AnimationPanel ) );
-
- public event ChildExitedEventHandler ChildExited
- {
- add
- {
- this.AddHandler( AnimationPanel.ChildExitedEvent, value );
- }
- remove
- {
- this.RemoveHandler( AnimationPanel.ChildExitedEvent, value );
- }
- }
-
- protected ChildExitedEventArgs RaiseChildExitedEvent( UIElement child )
- {
- return AnimationPanel.RaiseChildExitedEvent( this, child );
- }
-
- private static ChildExitedEventArgs RaiseChildExitedEvent( UIElement target, UIElement child )
- {
- if( target == null )
- return null;
-
- ChildExitedEventArgs args = new ChildExitedEventArgs( child );
- args.RoutedEvent = AnimationPanel.ChildExitedEvent;
- RoutedEventHelper.RaiseEvent( target, args );
- return args;
- }
-
- #endregion
-
- #region ChildExiting Event
-
- public static readonly RoutedEvent ChildExitingEvent =
- EventManager.RegisterRoutedEvent( "ChildExiting", RoutingStrategy.Bubble, typeof( ChildExitingEventHandler ), typeof( AnimationPanel ) );
-
- public event ChildExitingEventHandler ChildExiting
- {
- add
- {
- this.AddHandler( AnimationPanel.ChildExitingEvent, value );
- }
- remove
- {
- this.RemoveHandler( AnimationPanel.ChildExitingEvent, value );
- }
- }
-
- protected ChildExitingEventArgs RaiseChildExitingEvent( UIElement child, Rect? exitTo, Rect arrangeRect )
- {
- return AnimationPanel.RaiseChildExitingEvent( this, child, exitTo, arrangeRect );
- }
-
- private static ChildExitingEventArgs RaiseChildExitingEvent( UIElement target, UIElement child, Rect? exitTo, Rect arrangeRect )
- {
- if( target == null )
- return null;
-
- ChildExitingEventArgs args = new ChildExitingEventArgs( child, exitTo, arrangeRect );
- args.RoutedEvent = AnimationPanel.ChildExitingEvent;
- RoutedEventHelper.RaiseEvent( target, args );
- return args;
- }
-
- #endregion
-
- #region SwitchLayoutActivated Event
-
- public static readonly RoutedEvent SwitchLayoutActivatedEvent =
- EventManager.RegisterRoutedEvent( "SwitchLayoutActivated", RoutingStrategy.Direct, typeof( RoutedEventHandler ), typeof( AnimationPanel ) );
-
- public event RoutedEventHandler SwitchLayoutActivated
- {
- add
- {
- this.AddHandler( AnimationPanel.SwitchLayoutActivatedEvent, value );
- }
- remove
- {
- this.RemoveHandler( AnimationPanel.SwitchLayoutActivatedEvent, value );
- }
- }
-
- protected RoutedEventArgs RaiseSwitchLayoutActivatedEvent()
- {
- return AnimationPanel.RaiseSwitchLayoutActivatedEvent( this );
- }
-
- internal static RoutedEventArgs RaiseSwitchLayoutActivatedEvent( UIElement target )
- {
- if( target == null )
- return null;
-
- RoutedEventArgs args = new RoutedEventArgs();
- args.RoutedEvent = AnimationPanel.SwitchLayoutActivatedEvent;
- RoutedEventHelper.RaiseEvent( target, args );
- return args;
- }
-
- #endregion
-
- #region SwitchLayoutDeactivated Event
-
- public static readonly RoutedEvent SwitchLayoutDeactivatedEvent =
- EventManager.RegisterRoutedEvent( "SwitchLayoutDeactivated", RoutingStrategy.Direct, typeof( RoutedEventHandler ), typeof( AnimationPanel ) );
-
- public event RoutedEventHandler SwitchLayoutDeactivated
- {
- add
- {
- this.AddHandler( AnimationPanel.SwitchLayoutDeactivatedEvent, value );
- }
- remove
- {
- this.RemoveHandler( AnimationPanel.SwitchLayoutDeactivatedEvent, value );
- }
- }
-
- protected RoutedEventArgs RaiseSwitchLayoutDeactivatedEvent()
- {
- return AnimationPanel.RaiseSwitchLayoutDeactivatedEvent( this );
- }
-
- internal static RoutedEventArgs RaiseSwitchLayoutDeactivatedEvent( UIElement target )
- {
- if( target == null )
- return null;
-
- RoutedEventArgs args = new RoutedEventArgs();
- args.RoutedEvent = AnimationPanel.SwitchLayoutDeactivatedEvent;
- RoutedEventHelper.RaiseEvent( target, args );
- return args;
- }
-
- #endregion
-
- public new void InvalidateArrange()
- {
- if( _switchParent == null )
- {
- base.InvalidateArrange();
- }
- else
- {
- _switchParent.InvalidateArrange();
- }
- }
-
- public new void InvalidateMeasure()
- {
- if( _switchParent == null )
- {
- base.InvalidateMeasure();
- }
- else
- {
- _switchParent.InvalidateMeasure();
- }
- }
-
- public new void InvalidateVisual()
- {
- if( _switchParent == null )
- {
- base.InvalidateVisual();
- }
- else
- {
- _switchParent.InvalidateVisual();
- }
- }
-
- internal void ActivateLayout()
- {
- this.HasArranged = false;
- this.IsActiveLayout = true;
- this.OnSwitchLayoutActivated();
- this.RaiseSwitchLayoutActivatedEvent();
- }
-
- internal void BeginChildExit( UIElement child )
- {
- ChildState state = AnimationPanel.GetChildState( child );
- if( state != null )
- {
- state.Type = AnimationType.Exit;
- state.HasExitBegun = true;
-
- this.ExitingChildren.Add( child );
-
- if( _switchParent != null )
- {
- _switchParent.AddVisualChildInternal( child );
- }
- else
- {
- this.AddVisualChild( child );
- }
-
- // raise the ChildExiting event only after the child has been re-added to the visual tree
- ChildExitingEventArgs ceea = AnimationPanel.RaiseChildExitingEvent( child, child, AnimationPanel.GetExitTo( child ), state.CurrentPlacement );
-
- // begin the exit animation, if necessary
- state.Animator = this.GetEffectiveAnimator( AnimationType.Exit );
- if( state.Animator != null )
- {
- state.TargetPlacement = ceea.ExitTo.HasValue ? ceea.ExitTo.Value : Rect.Empty;
- state.BeginTimeStamp = DateTime.Now;
-
- // decrement the animating count if this child is already animating because the
- // ArrangeChild call will increment it again
- if( state.IsAnimating )
- {
- this.AnimatingChildCount--;
- }
- this.ArrangeChild( child, state.TargetPlacement );
- }
- else
- {
- // no animation, so immediately end the exit routine
- this.EndChildExit( child, state );
- }
- }
- }
-
- internal void BeginGrandchildAnimation( FrameworkElement grandchild, Rect currentRect, Rect placementRect )
- {
- bool isDone = true;
- object placementArgs;
- ChildState state = new ChildState( currentRect );
- AnimationPanel.SetChildState( grandchild, state );
- state.Type = AnimationType.Switch;
- state.BeginTimeStamp = DateTime.Now;
- state.TargetPlacement = placementRect;
- state.Animator = this.GetEffectiveAnimator( AnimationType.Template );
- if( state.Animator != null && !state.TargetPlacement.IsEmpty )
- {
- AnimationRate rate = this.GetEffectiveAnimationRate( AnimationType.Template );
- state.CurrentPlacement = state.Animator.GetInitialChildPlacement( grandchild, state.CurrentPlacement, state.TargetPlacement, this, ref rate, out placementArgs, out isDone );
- state.AnimationRate = rate;
- state.PlacementArgs = placementArgs;
- }
- state.IsAnimating = !isDone;
- grandchild.Arrange( state.IsAnimating ? state.CurrentPlacement : state.TargetPlacement );
- if( state.IsAnimating )
- {
- _animatingGrandchildren.Add( grandchild );
- this.AnimatingChildCount++;
- }
- else
- {
- state.CurrentPlacement = state.TargetPlacement;
- }
- }
-
- internal void DeactivateLayout()
- {
- this.IsActiveLayout = false;
- this.AnimatingChildCount = 0;
- this.OnSwitchLayoutDeactivated();
- this.RaiseSwitchLayoutDeactivatedEvent();
- }
-
- internal static UIElement FindAncestorChildOfAnimationPanel( DependencyObject element, out AnimationPanel panel )
- {
- panel = null;
- if( element == null )
- return null;
-
- DependencyObject parent = VisualTreeHelper.GetParent( element );
- if( parent == null )
- return null;
-
- if( parent is AnimationPanel || parent is SwitchPanel )
- {
- panel = ( parent is SwitchPanel )
- ? ( parent as SwitchPanel )._currentLayoutPanel
- : parent as AnimationPanel;
- return element as UIElement;
- }
-
- return AnimationPanel.FindAncestorChildOfAnimationPanel( parent, out panel );
- }
-
- internal Dictionary GetNewLocationsBasedOnTargetPlacement( SwitchPresenter presenter, UIElement parent )
- {
- ChildState state = AnimationPanel.GetChildState( parent );
-
- // if necessary, temporarily arrange the element at its final placement
- bool rearrange = ( state.CurrentPlacement != state.TargetPlacement && state.IsAnimating );
- if( rearrange )
- {
- parent.Arrange( state.TargetPlacement );
- }
-
- // now create a dictionary of locations for ID'd elements
- Dictionary result = new Dictionary();
- foreach( KeyValuePair entry in presenter._knownIDs )
- {
- Size size = entry.Value.RenderSize;
- Point[] points = { new Point(), new Point( size.Width, size.Height ) };
- ( entry.Value.TransformToAncestor( VisualTreeHelper.GetParent( entry.Value ) as Visual ) as MatrixTransform ).Matrix.Transform( points );
- result[ entry.Key ] = new Rect( points[ 0 ], points[ 1 ] );
- }
-
- // restore the current placement
- if( rearrange )
- {
- parent.Arrange( state.CurrentPlacement );
- }
- return result;
- }
-
- internal Visual GetVisualChildInternal( int index )
- {
- return this.GetVisualChild( index );
- }
-
- internal void OnNotifyVisualChildAddedInternal( UIElement child )
- {
- this.OnNotifyVisualChildAdded( child );
- }
-
- internal void OnNotifyVisualChildRemovedInternal( UIElement child )
- {
- this.OnNotifyVisualChildRemoved( child );
- }
-
- internal Size MeasureChildrenCore( UIElementCollection children, Size constraint )
- {
- _currentChildren = children;
- return MeasureChildrenOverride( _currentChildren, constraint );
- }
-
- internal Size ArrangeChildrenCore( UIElementCollection children, Size finalSize )
- {
- if( _currentChildren != children )
- {
- _currentChildren = children;
- }
-
- // always reset the animating children count at the beginning of an arrange
- this.AnimatingChildCount = 0;
- _animatingGrandchildren.Clear();
-
- Size result;
- try
- {
- // determine if this arrange represents a layout switch for a SwitchPanel
- if( !this.HasArranged && _switchParent != null )
- {
- this.IsSwitchInProgress = true;
- _switchParent.BeginLayoutSwitch();
- }
-
- // arrange active children
- result = this.ArrangeChildrenOverride( _currentChildren, finalSize );
-
- // also arrange exiting children, if necessary
- if( this.ExitingChildren.Count > 0 )
- {
- this.AnimatingChildCount += this.ExitingChildren.Count;
- this.UpdateExitingChildren();
- }
-
- // if this is a layout switch, make sure the switch is ended
- if( this.IsSwitchInProgress )
- {
- if( this.AnimatingChildCount == 0 )
- {
- _switchParent.EndLayoutSwitch();
- }
- else
- {
- this.EndSwitchOnAnimationCompleted = true;
- }
- }
- }
- finally
- {
- this.HasArranged = true;
- this.IsSwitchInProgress = false;
- }
- return result;
- }
-
- internal void OnSwitchParentVisualChildrenChanged( DependencyObject visualAdded, DependencyObject visualRemoved )
- {
- this.OnVisualChildrenChanged( visualAdded, visualRemoved );
- }
-
- protected sealed override Size MeasureOverride( Size constraint )
- {
- return this.MeasureChildrenCore( InternalChildren, constraint );
- }
-
- protected abstract Size MeasureChildrenOverride( UIElementCollection children, Size constraint );
-
- protected sealed override Size ArrangeOverride( Size finalSize )
- {
- return this.ArrangeChildrenCore( _currentChildren, finalSize );
- }
-
- protected abstract Size ArrangeChildrenOverride( UIElementCollection children, Size finalSize );
-
- protected void ArrangeChild( UIElement child, Rect placementRect )
- {
- // Offset in case SwitchPanel is handling scroll.
- if( placementRect.IsEmpty == false && this.PhysicalScrollOffset.Length > 0 )
- {
- placementRect.Offset( -this.PhysicalScrollOffset );
- }
-
- // cannot start animations unless the panel is loaded
- if( this.HasLoaded )
- {
- if( this.BeginChildAnimation( child, placementRect ) )
- {
- this.AnimatingChildCount++;
- }
- }
- else
- {
- // just arrange the child if the panel has not yet loaded
- child.Arrange( placementRect );
- }
- }
-
- protected new void AddVisualChild( Visual child )
- {
- if( _switchParent == null )
- {
- base.AddVisualChild( child );
- }
- else
- {
- _switchParent.AddVisualChildInternal( child );
- }
- }
-
- protected override Visual GetVisualChild( int index )
- {
- if( index < 0 )
- {
- throw new IndexOutOfRangeException();
- }
- if( index >= this.InternalChildren.Count )
- {
- int exitIndex = index - this.InternalChildren.Count;
- if( exitIndex < 0 || exitIndex >= this.ExitingChildren.Count )
- throw new IndexOutOfRangeException();
-
- return this.ExitingChildren[ exitIndex ];
- }
- return ( _switchParent == null ) ? base.GetVisualChild( index ) : _switchParent.GetVisualChildInternal( index );
- }
-
- protected virtual void OnNotifyVisualChildAdded( UIElement child )
- {
- }
-
- protected virtual void OnNotifyVisualChildRemoved( UIElement child )
- {
- }
-
- protected virtual void OnSwitchLayoutActivated()
- {
- }
-
- protected virtual void OnSwitchLayoutDeactivated()
- {
- }
-
- protected override void OnVisualChildrenChanged( DependencyObject visualAdded, DependencyObject visualRemoved )
- {
- if( !this.IsRemovingInternalChild )
- {
- if( visualRemoved is UIElement && visualRemoved != null )
- {
- this.IsRemovingInternalChild = true;
- try
- {
- this.BeginChildExit( visualRemoved as UIElement );
- }
- finally
- {
- this.IsRemovingInternalChild = false;
- }
- }
- }
- if( _switchParent == null )
- {
- // The OnNotifyChildAdded/Removed methods get called for all animation panels within a
- // SwitchPanel.Layouts collection, regardless of whether they are the active layout
- // for the SwitchPanel. Here, we also ensure that the methods are called for standalone panels.
- if( visualAdded is UIElement )
- {
- this.OnNotifyVisualChildAdded( visualAdded as UIElement );
- }
- else if( visualRemoved is UIElement )
- {
- this.OnNotifyVisualChildRemoved( visualRemoved as UIElement );
- }
- base.OnVisualChildrenChanged( visualAdded, visualRemoved );
- }
- else
- {
- _switchParent.OnVisualChildrenChangedInternal( visualAdded, visualRemoved );
- }
- }
-
-
- protected new void RemoveVisualChild( Visual child )
- {
- if( _switchParent == null )
- {
- base.RemoveVisualChild( child );
- }
- else
- {
- _switchParent.RemoveVisualChildInternal( child );
- }
- }
-
- protected int FindChildFromVisual( Visual vis )
- {
- int index = -1;
-
- DependencyObject parent = vis;
- DependencyObject child = null;
-
- do
- {
- child = parent;
- parent = VisualTreeHelper.GetParent( child );
- }
- while( parent != null && parent != ChildrensParent );
-
- if( parent == this.ChildrensParent )
- {
- index = this.ChildrensParent.Children.IndexOf( ( UIElement )child );
- }
-
- return index;
- }
-
- private bool BeginChildAnimation( UIElement child, Rect placementRect )
- {
- // a private attached property is used to hold the information needed
- // to calculate the location of items on subsequent frame refreshes
- bool newStateCreated;
- ChildState state = this.EnsureChildState( child, placementRect, out newStateCreated );
- if( state.HasEnterCompleted )
- {
- if( state.Type != AnimationType.Exit )
- {
- state.BeginTimeStamp = DateTime.Now;
- state.Type = IsSwitchInProgress ? AnimationType.Switch : AnimationType.Layout;
- state.TargetPlacement = placementRect;
- }
- }
- else
- {
- // if the child is in the middle of an enter animation, we
- // still need to update the placement rect
- state.BeginTimeStamp = DateTime.Now;
- state.TargetPlacement = placementRect;
- }
-
- if( !state.HasExitCompleted )
- {
- bool isDone = true;
- object placementArgs;
- if( state.Type != AnimationType.Enter )
- {
- state.Animator = this.GetEffectiveAnimator( state.Type );
- }
- if( state.Animator != null && !state.TargetPlacement.IsEmpty )
- {
- AnimationRate rate = this.GetEffectiveAnimationRate( state.Type );
- state.CurrentPlacement = state.Animator.GetInitialChildPlacement(
- child, state.CurrentPlacement, state.TargetPlacement, this,
- ref rate, out placementArgs, out isDone );
- state.AnimationRate = rate;
- state.PlacementArgs = placementArgs;
- }
- state.IsAnimating = !isDone;
- if( !state.IsAnimating )
- {
- state.CurrentPlacement = state.TargetPlacement;
- }
- }
-
- // JZ this might not be needed nice the OnRender will arrange
- if( state.IsAnimating == false )
- {
- this.UpdateTrueArrange( child, state );
- }
-
- return state.IsAnimating;
- }
-
- private void BeginChildEnter( UIElement child, ChildState state )
- {
- state.Type = AnimationType.Enter;
-
- // raise the ChildEntering event
- ChildEnteringEventArgs ceea = AnimationPanel.RaiseChildEnteringEvent( child,
- child, GetEnterFrom( child ), state.CurrentPlacement );
-
- // begin the enter animation, if necessary
- state.Animator = this.GetEffectiveAnimator( AnimationType.Enter );
- if( state.Animator != null && ceea.EnterFrom.HasValue )
- {
- state.CurrentPlacement = ceea.EnterFrom.Value;
- state.BeginTimeStamp = DateTime.Now;
- }
- }
-
- private void EndChildEnter( UIElement child, ChildState state )
- {
- // raise the ChildExited event
- state.HasEnterCompleted = true;
- AnimationPanel.RaiseChildEnteredEvent( child, child, state.TargetPlacement );
- }
-
- private void EndChildExit( UIElement child, ChildState state )
- {
- // raise the ChildExited event
- state.HasExitCompleted = true;
- AnimationPanel.RaiseChildExitedEvent( child, child );
-
- // remove the visual child relationship
- if( this.ExitingChildren.Contains( child ) )
- {
- this.IsRemovingInternalChild = true;
- try
- {
- if( _switchParent != null )
- {
- _switchParent.RemoveVisualChildInternal( child );
- }
- else
- {
- this.RemoveVisualChild( child );
- }
- }
- finally
- {
- this.IsRemovingInternalChild = false;
- }
- this.ExitingChildren.Remove( child );
- }
-
- child.ClearValue( AnimationPanel.ChildStatePropertyKey );
- }
-
- private ChildState EnsureChildState( UIElement child, Rect placementRect, out bool newStateCreated )
- {
- newStateCreated = false;
- ChildState state = AnimationPanel.GetChildState( child );
- if( state == null )
- {
- // if this is null, it's because this is the first time that
- // the object has been arranged
- state = new ChildState( placementRect );
- AnimationPanel.SetChildState( child, state );
- this.BeginChildEnter( child, state );
- newStateCreated = true;
- }
- return state;
- }
-
- internal AnimationRate GetEffectiveAnimationRate( AnimationType animationType )
- {
- AnimationRate result = ( _switchParent == null ) ? this.DefaultAnimationRate : _switchParent.DefaultAnimationRate;
- switch( animationType )
- {
- case AnimationType.Enter:
- if( this.EnterAnimationRate != AnimationRate.Default )
- {
- result = this.EnterAnimationRate;
- }
- else if( _switchParent != null && _switchParent.EnterAnimationRate != AnimationRate.Default )
- {
- result = _switchParent.EnterAnimationRate;
- }
- break;
-
- case AnimationType.Exit:
- if( this.ExitAnimationRate != AnimationRate.Default )
- {
- result = this.ExitAnimationRate;
- }
- else if( _switchParent != null && _switchParent.ExitAnimationRate != AnimationRate.Default )
- {
- result = _switchParent.ExitAnimationRate;
- }
- break;
-
- case AnimationType.Layout:
- if( this.LayoutAnimationRate != AnimationRate.Default )
- {
- result = LayoutAnimationRate;
- }
- else if( _switchParent != null && _switchParent.LayoutAnimationRate != AnimationRate.Default )
- {
- result = _switchParent.LayoutAnimationRate;
- }
- break;
-
- case AnimationType.Switch:
- if( this.SwitchAnimationRate != AnimationRate.Default )
- {
- result = SwitchAnimationRate;
- }
- else if( _switchParent != null && _switchParent.SwitchAnimationRate != AnimationRate.Default )
- {
- result = _switchParent.SwitchAnimationRate;
- }
- break;
-
- case AnimationType.Template:
- if( this.TemplateAnimationRate != AnimationRate.Default )
- {
- result = this.TemplateAnimationRate;
- }
- else if( _switchParent != null && _switchParent.TemplateAnimationRate != AnimationRate.Default )
- {
- result = _switchParent.TemplateAnimationRate;
- }
- break;
- }
- return result;
- }
-
- private IterativeAnimator GetEffectiveAnimator( AnimationType animationType )
- {
- IterativeAnimator result = ( _switchParent == null ) ? this.DefaultAnimator : _switchParent.DefaultAnimator;
- switch( animationType )
- {
- case AnimationType.Enter:
- if( this.EnterAnimator != IterativeAnimator.Default || ( _switchParent != null && _switchParent.EnterAnimator != IterativeAnimator.Default ) )
- {
- result = ( EnterAnimator == IterativeAnimator.Default ) ? _switchParent.EnterAnimator : EnterAnimator;
- }
- break;
-
- case AnimationType.Exit:
- if( this.ExitAnimator != IterativeAnimator.Default || ( _switchParent != null && _switchParent.ExitAnimator != IterativeAnimator.Default ) )
- {
- result = ( ExitAnimator == IterativeAnimator.Default ) ? _switchParent.ExitAnimator : ExitAnimator;
- }
- break;
-
- case AnimationType.Layout:
- if( this.LayoutAnimator != IterativeAnimator.Default || ( _switchParent != null && _switchParent.LayoutAnimator != IterativeAnimator.Default ) )
- {
- result = ( LayoutAnimator == IterativeAnimator.Default ) ? _switchParent.LayoutAnimator : LayoutAnimator;
- }
- break;
-
- case AnimationType.Switch:
- if( _switchParent != null && !_switchParent.AreLayoutSwitchesAnimated )
- {
- result = null;
- }
- else
- {
- if( this.SwitchAnimator != IterativeAnimator.Default || _switchParent.SwitchAnimator != IterativeAnimator.Default )
- {
- result = ( SwitchAnimator == IterativeAnimator.Default ) ? _switchParent.SwitchAnimator : SwitchAnimator;
- }
- }
- break;
-
- case AnimationType.Template:
- if( this.TemplateAnimator != IterativeAnimator.Default || ( _switchParent != null && _switchParent.TemplateAnimator != IterativeAnimator.Default ) )
- {
- result = ( TemplateAnimator == IterativeAnimator.Default ) ? _switchParent.TemplateAnimator : TemplateAnimator;
- }
- break;
- }
- return result;
- }
-
- private void OnLoaded( object sender, RoutedEventArgs e )
- {
- this.HasLoaded = true;
-
- // invalidate arrange to give enter animations a chance to run
- this.InvalidateArrange();
- }
-
- private void OnRendering( object sender, EventArgs e )
- {
- if( !this.IsActiveLayout )
- return;
-
- if( _currentChildren != null )
- {
- foreach( UIElement child in _currentChildren )
- {
- if( child == null )
- continue;
-
- ChildState state = AnimationPanel.GetChildState( child );
- if( state != null )
- {
- TimeSpan t = DateTime.Now.Subtract( state.BeginTimeStamp );
- if( state.IsAnimating )
- {
- bool isDone;
- state.CurrentPlacement = state.Animator.GetNextChildPlacement( child, t, state.CurrentPlacement,
- state.TargetPlacement, this, state.AnimationRate, ref state.PlacementArgs, out isDone );
- state.IsAnimating = !isDone;
- this.UpdateTrueArrange( child, state );
- if( !state.IsAnimating )
- {
- this.AnimatingChildCount--;
- }
- }
- }
- }
- }
-
- foreach( FrameworkElement grandchild in _animatingGrandchildren )
- {
- ChildState state = AnimationPanel.GetChildState( grandchild );
- if( state != null && state.IsAnimating )
- {
- TimeSpan t = DateTime.Now.Subtract( state.BeginTimeStamp );
- bool isDone;
- state.CurrentPlacement = state.Animator.GetNextChildPlacement( grandchild, t, state.CurrentPlacement,
- state.TargetPlacement, this, state.AnimationRate, ref state.PlacementArgs, out isDone );
- state.IsAnimating = !isDone;
- Rect rect = state.IsAnimating ? state.CurrentPlacement : state.TargetPlacement;
- grandchild.Arrange( rect );
- if( !state.IsAnimating )
- {
- this.AnimatingChildCount--;
- }
- }
- }
-
- this.UpdateExitingChildren();
-
- if( this.AnimatingChildCount == 0 )
- {
- _animatingGrandchildren.Clear();
- }
- }
-
- private void UpdateExitingChildren()
- {
- if( this.ExitingChildren.Count > 0 )
- {
- List exitingChildren = new List( ExitingChildren );
- foreach( UIElement child in exitingChildren )
- {
- if( child == null )
- continue;
-
- ChildState state = AnimationPanel.GetChildState( child );
- if( state != null )
- {
- TimeSpan t = DateTime.Now.Subtract( state.BeginTimeStamp );
- if( state.IsAnimating )
- {
- bool isDone;
- state.CurrentPlacement = state.Animator.GetNextChildPlacement( child, t, state.CurrentPlacement,
- state.TargetPlacement, this, state.AnimationRate, ref state.PlacementArgs, out isDone );
- state.IsAnimating = !isDone;
- this.UpdateTrueArrange( child, state );
- if( !state.IsAnimating )
- {
- this.AnimatingChildCount--;
- }
- }
- }
- }
- }
- }
-
- private void UpdateTrueArrange( UIElement child, ChildState state )
- {
- if( !state.TargetPlacement.IsEmpty )
- {
- child.Arrange( state.IsAnimating && state.Animator != null ? state.CurrentPlacement : state.TargetPlacement );
- }
-
- // if the child is done entering, complete the enter routine
- if( !state.IsAnimating && !state.HasEnterCompleted )
- {
- this.EndChildEnter( child, state );
- }
-
- // if the child is done exiting, complete the exit routine
- if( !state.IsAnimating && state.HasExitBegun )
- {
- this.EndChildExit( child, state );
- }
- }
-
- #region Private Fields
-
- private UIElementCollection _currentChildren;
- private readonly Collection _animatingGrandchildren = new Collection();
- private SwitchPanel _switchParent = null;
- private List _exitingChildren = null;
- private BitVector32 _cacheBits = new BitVector32( 1 );
-
- #endregion
-
- #region ChildState Nested Type
-
- private sealed class ChildState
- {
- public ChildState( Rect currentRect )
- {
- this.CurrentPlacement = currentRect;
- this.TargetPlacement = currentRect;
- this.BeginTimeStamp = DateTime.Now;
- }
-
- public bool HasEnterCompleted
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.HasEnterCompleted ];
- }
- set
- {
- _cacheBits[ ( int )CacheBits.HasEnterCompleted ] = value;
- }
- }
-
- public bool HasExitBegun
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.HasExitBegun ];
- }
- set
- {
- _cacheBits[ ( int )CacheBits.HasExitBegun ] = value;
- }
- }
-
- public bool HasExitCompleted
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.HasExitCompleted ];
- }
- set
- {
- _cacheBits[ ( int )CacheBits.HasExitCompleted ] = value;
- }
- }
-
- public bool IsAnimating
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.IsAnimating ];
- }
- set
- {
- _cacheBits[ ( int )CacheBits.IsAnimating ] = value;
- }
- }
-
- public AnimationType Type;
- public DateTime BeginTimeStamp;
- public IterativeAnimator Animator;
- public Rect CurrentPlacement;
- public Rect TargetPlacement;
- public AnimationRate AnimationRate;
- public object PlacementArgs;
-
- private BitVector32 _cacheBits = new BitVector32( 0 );
- private enum CacheBits
- {
- IsAnimating = 0x00000001,
- HasEnterCompleted = 0x00000002,
- HasExitBegun = 0x00000004,
- HasExitCompleted = 0x00000008,
- }
- }
-
- #endregion
-
- #region AnimationType Nested Type
-
- internal enum AnimationType
- {
- Enter,
- Exit,
- Layout,
- Switch,
- Template,
- }
-
- #endregion
-
- #region CacheBits Nested Type
-
- private enum CacheBits
- {
- IsActiveLayout = 0x00000001,
- IsSwitchInProgress = 0x00000002,
- EndSwitchOnAnimationCompleted = 0x00000010,
- IsRemovingInternalChild = 0x00000020,
- HasLoaded = 0x00000040,
- HasArranged = 0x00000080,
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/AnimatorConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/AnimatorConverter.cs
deleted file mode 100644
index 538628fe..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/AnimatorConverter.cs
+++ /dev/null
@@ -1,144 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.ComponentModel;
-using System.Globalization;
-using Xceed.Wpf.Toolkit.Panels;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public sealed class AnimatorConverter : TypeConverter
- {
- public override bool CanConvertFrom( ITypeDescriptorContext typeDescriptorContext, Type type )
- {
- return ( type == typeof( string ) );
- }
-
- public override bool CanConvertTo( ITypeDescriptorContext typeDescriptorContext, Type type )
- {
- return ( type == typeof( IterativeAnimator ) )
- || ( type == typeof( DoubleAnimator ) );
- }
-
- public override object ConvertFrom(
- ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object value )
- {
- IterativeAnimator result = null;
- if( value is string )
- {
- switch( value as string )
- {
- case "BackEaseIn":
- result = Animators.BackEaseIn as IterativeAnimator;
- break;
- case "BackEaseInOut":
- result = Animators.BackEaseInOut as IterativeAnimator;
- break;
- case "BackEaseOut":
- result = Animators.BackEaseOut as IterativeAnimator;
- break;
- case "BounceEaseIn":
- result = Animators.BounceEaseIn as IterativeAnimator;
- break;
- case "BounceEaseInOut":
- result = Animators.BounceEaseInOut as IterativeAnimator;
- break;
- case "BounceEaseOut":
- result = Animators.BounceEaseOut as IterativeAnimator;
- break;
- case "CircEaseIn":
- result = Animators.CircEaseIn as IterativeAnimator;
- break;
- case "CircEaseInOut":
- result = Animators.CircEaseInOut as IterativeAnimator;
- break;
- case "CircEaseOut":
- result = Animators.CircEaseOut as IterativeAnimator;
- break;
- case "CubicEaseIn":
- result = Animators.CubicEaseIn as IterativeAnimator;
- break;
- case "CubicEaseInOut":
- result = Animators.CubicEaseInOut as IterativeAnimator;
- break;
- case "CubicEaseOut":
- result = Animators.CubicEaseOut as IterativeAnimator;
- break;
- case "ElasticEaseIn":
- result = Animators.ElasticEaseIn as IterativeAnimator;
- break;
- case "ElasticEaseInOut":
- result = Animators.ElasticEaseInOut as IterativeAnimator;
- break;
- case "ElasticEaseOut":
- result = Animators.ElasticEaseOut as IterativeAnimator;
- break;
- case "ExpoEaseIn":
- result = Animators.ExpoEaseIn as IterativeAnimator;
- break;
- case "ExpoEaseInOut":
- result = Animators.ExpoEaseInOut as IterativeAnimator;
- break;
- case "ExpoEaseOut":
- result = Animators.ExpoEaseOut as IterativeAnimator;
- break;
- case "Linear":
- result = Animators.Linear as IterativeAnimator;
- break;
- case "QuadEaseIn":
- result = Animators.QuadEaseIn as IterativeAnimator;
- break;
- case "QuadEaseInOut":
- result = Animators.QuadEaseInOut as IterativeAnimator;
- break;
- case "QuadEaseOut":
- result = Animators.QuadEaseOut as IterativeAnimator;
- break;
- case "QuartEaseIn":
- result = Animators.QuartEaseIn as IterativeAnimator;
- break;
- case "QuartEaseInOut":
- result = Animators.QuartEaseInOut as IterativeAnimator;
- break;
- case "QuartEaseOut":
- result = Animators.QuartEaseOut as IterativeAnimator;
- break;
- case "QuintEaseIn":
- result = Animators.QuintEaseIn as IterativeAnimator;
- break;
- case "QuintEaseInOut":
- result = Animators.QuintEaseInOut as IterativeAnimator;
- break;
- case "QuintEaseOut":
- result = Animators.QuintEaseOut as IterativeAnimator;
- break;
- case "SineEaseIn":
- result = Animators.SineEaseIn as IterativeAnimator;
- break;
- case "SineEaseInOut":
- result = Animators.SineEaseInOut as IterativeAnimator;
- break;
- case "SineEaseOut":
- result = Animators.SineEaseOut as IterativeAnimator;
- break;
- }
- }
-
- return result;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/Animators.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/Animators.cs
deleted file mode 100644
index 3d051719..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/Animators.cs
+++ /dev/null
@@ -1,581 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using Xceed.Wpf.Toolkit.Media.Animation;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public static class Animators
- {
- #region BackEaseIn Static Property
-
- public static DoubleAnimator BackEaseIn
- {
- get
- {
- if( _backEaseIn == null )
- {
- _backEaseIn = new DoubleAnimator( PennerEquations.BackEaseIn );
- }
- return _backEaseIn;
- }
- }
-
- private static DoubleAnimator _backEaseIn;
-
- #endregion
-
- #region BackEaseInOut Static Property
-
- public static DoubleAnimator BackEaseInOut
- {
- get
- {
- if( _backEaseInOut == null )
- {
- _backEaseInOut = new DoubleAnimator( PennerEquations.BackEaseInOut );
- }
- return _backEaseInOut;
- }
- }
-
- private static DoubleAnimator _backEaseInOut;
-
- #endregion
-
- #region BackEaseOut Static Property
-
- public static DoubleAnimator BackEaseOut
- {
- get
- {
- if( _backEaseOut == null )
- {
- _backEaseOut = new DoubleAnimator( PennerEquations.BackEaseOut );
- }
- return _backEaseOut;
- }
- }
-
- private static DoubleAnimator _backEaseOut;
-
- #endregion
-
- #region BounceEaseIn Static Property
-
- public static DoubleAnimator BounceEaseIn
- {
- get
- {
- if( _bounceEaseIn == null )
- {
- _bounceEaseIn = new DoubleAnimator( PennerEquations.BounceEaseIn );
- }
- return _bounceEaseIn;
- }
- }
-
- private static DoubleAnimator _bounceEaseIn;
-
- #endregion
-
- #region BounceEaseInOut Static Property
-
- public static DoubleAnimator BounceEaseInOut
- {
- get
- {
- if( _bounceEaseInOut == null )
- {
- _bounceEaseInOut = new DoubleAnimator( PennerEquations.BounceEaseInOut );
- }
- return _bounceEaseInOut;
- }
- }
-
- private static DoubleAnimator _bounceEaseInOut;
-
- #endregion
-
- #region BounceEaseOut Static Property
-
- public static DoubleAnimator BounceEaseOut
- {
- get
- {
- if( _bounceEaseOut == null )
- {
- _bounceEaseOut = new DoubleAnimator( PennerEquations.BounceEaseOut );
- }
- return _bounceEaseOut;
- }
- }
-
- private static DoubleAnimator _bounceEaseOut;
-
- #endregion
-
- #region CircEaseIn Static Property
-
- public static DoubleAnimator CircEaseIn
- {
- get
- {
- if( _circEaseIn == null )
- {
- _circEaseIn = new DoubleAnimator( PennerEquations.CircEaseIn );
- }
- return _circEaseIn;
- }
- }
-
- private static DoubleAnimator _circEaseIn;
-
- #endregion
-
- #region CircEaseInOut Static Property
-
- public static DoubleAnimator CircEaseInOut
- {
- get
- {
- if( _circEaseInOut == null )
- {
- _circEaseInOut = new DoubleAnimator( PennerEquations.CircEaseInOut );
- }
- return _circEaseInOut;
- }
- }
-
- private static DoubleAnimator _circEaseInOut;
-
- #endregion
-
- #region CircEaseOut Static Property
-
- public static DoubleAnimator CircEaseOut
- {
- get
- {
- if( _circEaseOut == null )
- {
- _circEaseOut = new DoubleAnimator( PennerEquations.CircEaseOut );
- }
- return _circEaseOut;
- }
- }
-
- private static DoubleAnimator _circEaseOut;
-
- #endregion
-
- #region CubicEaseIn Static Property
-
- public static DoubleAnimator CubicEaseIn
- {
- get
- {
- if( _cubicEaseIn == null )
- {
- _cubicEaseIn = new DoubleAnimator( PennerEquations.CubicEaseIn );
- }
- return _cubicEaseIn;
- }
- }
-
- private static DoubleAnimator _cubicEaseIn;
-
- #endregion
-
- #region CubicEaseInOut Static Property
-
- public static DoubleAnimator CubicEaseInOut
- {
- get
- {
- if( _cubicEaseInOut == null )
- {
- _cubicEaseInOut = new DoubleAnimator( PennerEquations.CubicEaseInOut );
- }
- return _cubicEaseInOut;
- }
- }
-
- private static DoubleAnimator _cubicEaseInOut;
-
- #endregion
-
- #region CubicEaseOut Static Property
-
- public static DoubleAnimator CubicEaseOut
- {
- get
- {
- if( _cubicEaseOut == null )
- {
- _cubicEaseOut = new DoubleAnimator( PennerEquations.CubicEaseOut );
- }
- return _cubicEaseOut;
- }
- }
-
- private static DoubleAnimator _cubicEaseOut;
-
- #endregion
-
- #region ElasticEaseIn Static Property
-
- public static DoubleAnimator ElasticEaseIn
- {
- get
- {
- if( _elasticEaseIn == null )
- {
- _elasticEaseIn = new DoubleAnimator( PennerEquations.ElasticEaseIn );
- }
- return _elasticEaseIn;
- }
- }
-
- private static DoubleAnimator _elasticEaseIn;
-
- #endregion
-
- #region ElasticEaseInOut Static Property
-
- public static DoubleAnimator ElasticEaseInOut
- {
- get
- {
- if( _elasticEaseInOut == null )
- {
- _elasticEaseInOut = new DoubleAnimator( PennerEquations.ElasticEaseInOut );
- }
- return _elasticEaseInOut;
- }
- }
-
- private static DoubleAnimator _elasticEaseInOut;
-
- #endregion
-
- #region ElasticEaseOut Static Property
-
- public static DoubleAnimator ElasticEaseOut
- {
- get
- {
- if( _elasticEaseOut == null )
- {
- _elasticEaseOut = new DoubleAnimator( PennerEquations.ElasticEaseOut );
- }
- return _elasticEaseOut;
- }
- }
-
- private static DoubleAnimator _elasticEaseOut;
-
- #endregion
-
- #region ExpoEaseIn Static Property
-
- public static DoubleAnimator ExpoEaseIn
- {
- get
- {
- if( _expoEaseIn == null )
- {
- _expoEaseIn = new DoubleAnimator( PennerEquations.ExpoEaseIn );
- }
- return _expoEaseIn;
- }
- }
-
- private static DoubleAnimator _expoEaseIn;
-
- #endregion
-
- #region ExpoEaseInOut Static Property
-
- public static DoubleAnimator ExpoEaseInOut
- {
- get
- {
- if( _expoEaseInOut == null )
- {
- _expoEaseInOut = new DoubleAnimator( PennerEquations.ExpoEaseInOut );
- }
- return _expoEaseInOut;
- }
- }
-
- private static DoubleAnimator _expoEaseInOut;
-
- #endregion
-
- #region ExpoEaseOut Static Property
-
- public static DoubleAnimator ExpoEaseOut
- {
- get
- {
- if( _expoEaseOut == null )
- {
- _expoEaseOut = new DoubleAnimator( PennerEquations.ExpoEaseOut );
- }
- return _expoEaseOut;
- }
- }
-
- private static DoubleAnimator _expoEaseOut;
-
- #endregion
-
- #region Linear Static Property
-
- public static DoubleAnimator Linear
- {
- get
- {
- if( _linear == null )
- {
- _linear = new DoubleAnimator( PennerEquations.Linear );
- }
- return _linear;
- }
- }
-
- private static DoubleAnimator _linear;
-
- #endregion
-
- #region QuadEaseIn Static Property
-
- public static DoubleAnimator QuadEaseIn
- {
- get
- {
- if( _quadEaseIn == null )
- {
- _quadEaseIn = new DoubleAnimator( PennerEquations.QuadEaseIn );
- }
- return _quadEaseIn;
- }
- }
-
- private static DoubleAnimator _quadEaseIn;
-
- #endregion
-
- #region QuadEaseInOut Static Property
-
- public static DoubleAnimator QuadEaseInOut
- {
- get
- {
- if( _quadEaseInOut == null )
- {
- _quadEaseInOut = new DoubleAnimator( PennerEquations.QuadEaseInOut );
- }
- return _quadEaseInOut;
- }
- }
-
- private static DoubleAnimator _quadEaseInOut;
-
- #endregion
-
- #region QuadEaseOut Static Property
-
- public static DoubleAnimator QuadEaseOut
- {
- get
- {
- if( _quadEaseOut == null )
- {
- _quadEaseOut = new DoubleAnimator( PennerEquations.QuadEaseOut );
- }
- return _quadEaseOut;
- }
- }
-
- private static DoubleAnimator _quadEaseOut;
-
- #endregion
-
- #region QuartEaseIn Static Property
-
- public static DoubleAnimator QuartEaseIn
- {
- get
- {
- if( _quartEaseIn == null )
- {
- _quartEaseIn = new DoubleAnimator( PennerEquations.QuartEaseIn );
- }
- return _quartEaseIn;
- }
- }
-
- private static DoubleAnimator _quartEaseIn;
-
- #endregion
-
- #region QuartEaseInOut Static Property
-
- public static DoubleAnimator QuartEaseInOut
- {
- get
- {
- if( _quartEaseInOut == null )
- {
- _quartEaseInOut = new DoubleAnimator( PennerEquations.QuartEaseInOut );
- }
- return _quartEaseInOut;
- }
- }
-
- private static DoubleAnimator _quartEaseInOut;
-
- #endregion
-
- #region QuartEaseOut Static Property
-
- public static DoubleAnimator QuartEaseOut
- {
- get
- {
- if( _quartEaseOut == null )
- {
- _quartEaseOut = new DoubleAnimator( PennerEquations.QuartEaseOut );
- }
- return _quartEaseOut;
- }
- }
-
- private static DoubleAnimator _quartEaseOut;
-
- #endregion
-
- #region QuintEaseIn Static Property
-
- public static DoubleAnimator QuintEaseIn
- {
- get
- {
- if( _quintEaseIn == null )
- {
- _quintEaseIn = new DoubleAnimator( PennerEquations.QuintEaseIn );
- }
- return _quintEaseIn;
- }
- }
-
- private static DoubleAnimator _quintEaseIn;
-
- #endregion
-
- #region QuintEaseInOut Static Property
-
- public static DoubleAnimator QuintEaseInOut
- {
- get
- {
- if( _quintEaseInOut == null )
- {
- _quintEaseInOut = new DoubleAnimator( PennerEquations.QuintEaseInOut );
- }
- return _quintEaseInOut;
- }
- }
-
- private static DoubleAnimator _quintEaseInOut;
-
- #endregion
-
- #region QuintEaseOut Static Property
-
- public static DoubleAnimator QuintEaseOut
- {
- get
- {
- if( _quintEaseOut == null )
- {
- _quintEaseOut = new DoubleAnimator( PennerEquations.QuintEaseOut );
- }
- return _quintEaseOut;
- }
- }
-
- private static DoubleAnimator _quintEaseOut;
-
- #endregion
-
- #region SineEaseIn Static Property
-
- public static DoubleAnimator SineEaseIn
- {
- get
- {
- if( _sineEaseIn == null )
- {
- _sineEaseIn = new DoubleAnimator( PennerEquations.SineEaseIn );
- }
- return _sineEaseIn;
- }
- }
-
- private static DoubleAnimator _sineEaseIn;
-
- #endregion
-
- #region SineEaseInOut Static Property
-
- public static DoubleAnimator SineEaseInOut
- {
- get
- {
- if( _sineEaseInOut == null )
- {
- _sineEaseInOut = new DoubleAnimator( PennerEquations.SineEaseInOut );
- }
- return _sineEaseInOut;
- }
- }
-
- private static DoubleAnimator _sineEaseInOut;
-
- #endregion
-
- #region SineEaseOut Static Property
-
- public static DoubleAnimator SineEaseOut
- {
- get
- {
- if( _sineEaseOut == null )
- {
- _sineEaseOut = new DoubleAnimator( PennerEquations.SineEaseOut );
- }
- return _sineEaseOut;
- }
- }
-
- private static DoubleAnimator _sineEaseOut;
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildEnteredEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildEnteredEventArgs.cs
deleted file mode 100644
index a89d5edf..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildEnteredEventArgs.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public class ChildEnteredEventArgs : RoutedEventArgs
- {
- #region Constructors
-
- public ChildEnteredEventArgs( UIElement child, Rect arrangeRect )
- {
- _child = child;
- _arrangeRect = arrangeRect;
- }
-
- #endregion
-
- #region ArrangeRect Property
-
- public Rect ArrangeRect
- {
- get
- {
- return _arrangeRect;
- }
- }
-
- private readonly Rect _arrangeRect;
-
- #endregion
-
- #region Child Property
-
- public UIElement Child
- {
- get
- {
- return _child;
- }
- }
-
- private readonly UIElement _child;
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildEnteredEventHandler.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildEnteredEventHandler.cs
deleted file mode 100644
index ab5f4e85..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildEnteredEventHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public delegate void ChildEnteredEventHandler( object sender, ChildEnteredEventArgs e );
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildEnteringEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildEnteringEventArgs.cs
deleted file mode 100644
index 66d4acac..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildEnteringEventArgs.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public class ChildEnteringEventArgs : RoutedEventArgs
- {
- #region Constructors
-
- public ChildEnteringEventArgs( UIElement child, Rect? enterFrom, Rect arrangeRect )
- {
- _child = child;
- _enterFrom = enterFrom;
- _arrangeRect = arrangeRect;
- }
-
- #endregion
-
- #region ArrangeRect Property
-
- public Rect ArrangeRect
- {
- get
- {
- return _arrangeRect;
- }
- }
-
- private readonly Rect _arrangeRect;
-
- #endregion
-
- #region Child Property
-
- public UIElement Child
- {
- get
- {
- return _child;
- }
- }
-
- private readonly UIElement _child;
-
- #endregion
-
- #region EnterFrom Property
-
- public Rect? EnterFrom
- {
- get
- {
- return _enterFrom;
- }
- set
- {
- _enterFrom = value;
- }
- }
-
- private Rect? _enterFrom; //null
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildEnteringEventHandler.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildEnteringEventHandler.cs
deleted file mode 100644
index d0fb56c1..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildEnteringEventHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public delegate void ChildEnteringEventHandler( object sender, ChildEnteringEventArgs e );
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildExitedEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildExitedEventArgs.cs
deleted file mode 100644
index a1dd43b0..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildExitedEventArgs.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public class ChildExitedEventArgs : RoutedEventArgs
- {
- #region Constructors
-
- public ChildExitedEventArgs( UIElement child )
- {
- _child = child;
- }
-
- #endregion
-
- #region Child Property
-
- public UIElement Child
- {
- get
- {
- return _child;
- }
- }
-
- private readonly UIElement _child;
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildExitedEventHandler.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildExitedEventHandler.cs
deleted file mode 100644
index 64faa9e4..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildExitedEventHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public delegate void ChildExitedEventHandler( object sender, ChildExitedEventArgs e );
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildExitingEventArgs.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildExitingEventArgs.cs
deleted file mode 100644
index 7d7d53b7..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildExitingEventArgs.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Windows;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public class ChildExitingEventArgs : RoutedEventArgs
- {
- #region Constructors
-
- public ChildExitingEventArgs( UIElement child, Rect? exitTo, Rect arrangeRect )
- {
- _child = child;
- _exitTo = exitTo;
- _arrangeRect = arrangeRect;
- }
-
- #endregion
-
- #region ArrangeRect Property
-
- public Rect ArrangeRect
- {
- get
- {
- return _arrangeRect;
- }
- }
-
- private readonly Rect _arrangeRect;
-
- #endregion
-
- #region Child Property
-
- public UIElement Child
- {
- get
- {
- return _child;
- }
- }
-
- private readonly UIElement _child;
-
- #endregion
-
- #region ExitTo Property
-
- public Rect? ExitTo
- {
- get
- {
- return _exitTo;
- }
- set
- {
- _exitTo = value;
- }
- }
-
- private Rect? _exitTo; //null
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildExitingEventHandler.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildExitingEventHandler.cs
deleted file mode 100644
index e0410522..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ChildExitingEventHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public delegate void ChildExitingEventHandler( object sender, ChildExitingEventArgs e );
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/DoubleAnimator.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/DoubleAnimator.cs
deleted file mode 100644
index 4a6af9b2..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/DoubleAnimator.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using Xceed.Wpf.Toolkit.Media.Animation;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public class DoubleAnimator : IterativeAnimator
- {
- #region Constructors
-
- public DoubleAnimator( IterativeEquation equation )
- {
- _equation = equation;
- }
-
- #endregion
-
- public override Rect GetInitialChildPlacement( UIElement child, Rect currentPlacement,
- Rect targetPlacement, AnimationPanel activeLayout, ref AnimationRate animationRate,
- out object placementArgs, out bool isDone )
- {
- isDone = ( animationRate.HasSpeed && animationRate.Speed <= 0 ) || ( animationRate.HasDuration && animationRate.Duration.Ticks == 0 );
- if( !isDone )
- {
- Vector startVector = new Vector( currentPlacement.Left + ( currentPlacement.Width / 2 ), currentPlacement.Top + ( currentPlacement.Height / 2 ) );
- Vector finalVector = new Vector( targetPlacement.Left + ( targetPlacement.Width / 2 ), targetPlacement.Top + ( targetPlacement.Height / 2 ) );
- Vector distanceVector = startVector - finalVector;
- animationRate = new AnimationRate( animationRate.HasDuration ? animationRate.Duration
- : TimeSpan.FromMilliseconds( distanceVector.Length / animationRate.Speed ) );
- }
- placementArgs = currentPlacement;
- return currentPlacement;
- }
-
- public override Rect GetNextChildPlacement( UIElement child, TimeSpan currentTime,
- Rect currentPlacement, Rect targetPlacement, AnimationPanel activeLayout,
- AnimationRate animationRate, ref object placementArgs, out bool isDone )
- {
- Rect result = targetPlacement;
- isDone = true;
- if( _equation != null )
- {
- Rect from = ( Rect )placementArgs;
- TimeSpan duration = animationRate.Duration;
- isDone = currentTime >= duration;
- if( !isDone )
- {
- double x = _equation.Evaluate( currentTime, from.Left, targetPlacement.Left, duration );
- double y = _equation.Evaluate( currentTime, from.Top, targetPlacement.Top, duration );
- double width = Math.Max( 0, _equation.Evaluate( currentTime, from.Width, targetPlacement.Width, duration ) );
- double height = Math.Max( 0, _equation.Evaluate( currentTime, from.Height, targetPlacement.Height, duration ) );
- result = new Rect( x, y, width, height );
- }
- }
- return result;
- }
-
- #region Private Fields
-
- private readonly IterativeEquation _equation; //null
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/IterativeAnimator.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/IterativeAnimator.cs
deleted file mode 100644
index 1d079e2a..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/IterativeAnimator.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.ComponentModel;
-using System.Windows;
-using Xceed.Wpf.Toolkit.Media.Animation;
-using Xceed.Wpf.Toolkit.Core;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- [TypeConverter( typeof( AnimatorConverter ) )]
- public abstract class IterativeAnimator
- {
- #region Default Static Property
-
- public static IterativeAnimator Default
- {
- get
- {
- return _default;
- }
- }
-
- private static readonly IterativeAnimator _default = new DefaultAnimator();
-
- #endregion
-
- public abstract Rect GetInitialChildPlacement(
- UIElement child,
- Rect currentPlacement,
- Rect targetPlacement,
- AnimationPanel activeLayout,
- ref AnimationRate animationRate,
- out object placementArgs,
- out bool isDone );
-
- public abstract Rect GetNextChildPlacement(
- UIElement child,
- TimeSpan currentTime,
- Rect currentPlacement,
- Rect targetPlacement,
- AnimationPanel activeLayout,
- AnimationRate animationRate,
- ref object placementArgs,
- out bool isDone );
-
- #region DefaultAnimator Nested Type
-
- private sealed class DefaultAnimator : IterativeAnimator
- {
- public override Rect GetInitialChildPlacement( UIElement child, Rect currentPlacement, Rect targetPlacement, AnimationPanel activeLayout, ref AnimationRate animationRate, out object placementArgs, out bool isDone )
- {
- throw new InvalidOperationException( ErrorMessages.GetMessage( ErrorMessages.DefaultAnimatorCantAnimate ) );
- }
-
- public override Rect GetNextChildPlacement( UIElement child, TimeSpan currentTime, Rect currentPlacement, Rect targetPlacement, AnimationPanel activeLayout, AnimationRate animationRate, ref object placementArgs, out bool isDone )
- {
- throw new InvalidOperationException( ErrorMessages.GetMessage( ErrorMessages.DefaultAnimatorCantAnimate ) );
- }
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/PanelBase.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/PanelBase.cs
deleted file mode 100644
index 3217f008..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/PanelBase.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Windows.Controls;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public abstract class PanelBase : Panel
- {
- #region Constructor
-
- public PanelBase()
- {
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/RandomPanel.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/RandomPanel.cs
deleted file mode 100644
index 7a023c23..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/RandomPanel.cs
+++ /dev/null
@@ -1,303 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public class RandomPanel : AnimationPanel
- {
- #region MinimumWidth Property
-
- public static readonly DependencyProperty MinimumWidthProperty =
- DependencyProperty.Register( "MinimumWidth", typeof( double ), typeof( RandomPanel ),
- new FrameworkPropertyMetadata(
- 10d,
- new PropertyChangedCallback( RandomPanel.OnMinimumWidthChanged ),
- new CoerceValueCallback( RandomPanel.CoerceMinimumWidth ) ) );
-
- public double MinimumWidth
- {
- get
- {
- return ( double )this.GetValue( RandomPanel.MinimumWidthProperty );
- }
- set
- {
- this.SetValue( RandomPanel.MinimumWidthProperty, value );
- }
- }
-
- private static void OnMinimumWidthChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- RandomPanel panel = ( RandomPanel )d;
-
- panel.CoerceValue( RandomPanel.MaximumWidthProperty );
- panel.InvalidateMeasure();
- }
-
- private static object CoerceMinimumWidth( DependencyObject d, object baseValue )
- {
- RandomPanel panel = ( RandomPanel )d;
- double value = ( double )baseValue;
-
- if( double.IsNaN( value ) || double.IsInfinity( value ) || ( value < 0d ) )
- return DependencyProperty.UnsetValue;
-
- double maximum = panel.MaximumWidth;
- if( value > maximum )
- return maximum;
-
- return baseValue;
- }
-
- #endregion
-
- #region MinimumHeight Property
-
- public static readonly DependencyProperty MinimumHeightProperty =
- DependencyProperty.Register( "MinimumHeight", typeof( double ), typeof( RandomPanel ),
- new FrameworkPropertyMetadata(
- 10d,
- new PropertyChangedCallback( RandomPanel.OnMinimumHeightChanged ),
- new CoerceValueCallback( RandomPanel.CoerceMinimumHeight ) ) );
-
- public double MinimumHeight
- {
- get
- {
- return ( double )this.GetValue( RandomPanel.MinimumHeightProperty );
- }
- set
- {
- this.SetValue( RandomPanel.MinimumHeightProperty, value );
- }
- }
-
- private static void OnMinimumHeightChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- RandomPanel panel = ( RandomPanel )d;
-
- panel.CoerceValue( RandomPanel.MaximumHeightProperty );
- panel.InvalidateMeasure();
- }
-
- private static object CoerceMinimumHeight( DependencyObject d, object baseValue )
- {
- RandomPanel panel = ( RandomPanel )d;
- double value = ( double )baseValue;
-
- if( double.IsNaN( value ) || double.IsInfinity( value ) || ( value < 0d ) )
- return DependencyProperty.UnsetValue;
-
- double maximum = panel.MaximumHeight;
- if( value > maximum )
- return maximum;
-
- return baseValue;
- }
-
- #endregion
-
- #region MaximumWidth Property
-
- public static readonly DependencyProperty MaximumWidthProperty =
- DependencyProperty.Register( "MaximumWidth", typeof( double ), typeof( RandomPanel ),
- new FrameworkPropertyMetadata(
- 100d,
- new PropertyChangedCallback( RandomPanel.OnMaximumWidthChanged ),
- new CoerceValueCallback( RandomPanel.CoerceMaximumWidth ) ) );
-
- public double MaximumWidth
- {
- get
- {
- return ( double )this.GetValue( RandomPanel.MaximumWidthProperty );
- }
- set
- {
- this.SetValue( RandomPanel.MaximumWidthProperty, value );
- }
- }
-
- private static void OnMaximumWidthChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- RandomPanel panel = ( RandomPanel )d;
-
- panel.CoerceValue( RandomPanel.MinimumWidthProperty );
- panel.InvalidateMeasure();
- }
-
- private static object CoerceMaximumWidth( DependencyObject d, object baseValue )
- {
- RandomPanel panel = ( RandomPanel )d;
- double value = ( double )baseValue;
-
- if( double.IsNaN( value ) || double.IsInfinity( value ) || ( value < 0d ) )
- return DependencyProperty.UnsetValue;
-
- double minimum = panel.MinimumWidth;
- if( value < minimum )
- return minimum;
-
- return baseValue;
- }
-
- #endregion
-
- #region MaximumHeight Property
-
- public static readonly DependencyProperty MaximumHeightProperty =
- DependencyProperty.Register( "MaximumHeight", typeof( double ), typeof( RandomPanel ),
- new FrameworkPropertyMetadata(
- 100d,
- new PropertyChangedCallback( RandomPanel.OnMaximumHeightChanged ),
- new CoerceValueCallback( RandomPanel.CoerceMaximumHeight ) ) );
-
- public double MaximumHeight
- {
- get
- {
- return ( double )this.GetValue( RandomPanel.MaximumHeightProperty );
- }
- set
- {
- this.SetValue( RandomPanel.MaximumHeightProperty, value );
- }
- }
-
- private static void OnMaximumHeightChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- RandomPanel panel = ( RandomPanel )d;
-
- panel.CoerceValue( RandomPanel.MinimumHeightProperty );
- panel.InvalidateMeasure();
- }
-
- private static object CoerceMaximumHeight( DependencyObject d, object baseValue )
- {
- RandomPanel panel = ( RandomPanel )d;
- double value = ( double )baseValue;
-
- if( double.IsNaN( value ) || double.IsInfinity( value ) || ( value < 0d ) )
- return DependencyProperty.UnsetValue;
-
- double minimum = panel.MinimumHeight;
- if( value < minimum )
- return minimum;
-
- return baseValue;
- }
-
- #endregion
-
- #region Seed Property
-
- public static readonly DependencyProperty SeedProperty =
- DependencyProperty.Register( "Seed", typeof( int ), typeof( RandomPanel ),
- new FrameworkPropertyMetadata( 0,
- new PropertyChangedCallback( RandomPanel.SeedChanged ) ) );
-
- public int Seed
- {
- get
- {
- return ( int )this.GetValue( RandomPanel.SeedProperty );
- }
- set
- {
- this.SetValue( RandomPanel.SeedProperty, value );
- }
- }
-
- private static void SeedChanged( DependencyObject obj, DependencyPropertyChangedEventArgs args )
- {
- if( obj is RandomPanel )
- {
- RandomPanel owner = ( RandomPanel )obj;
- owner._random = new Random( ( int )args.NewValue );
- owner.InvalidateArrange();
- }
- }
-
- #endregion
-
- #region ActualSize Private Property
-
- // Using a DependencyProperty as the backing store for ActualSize. This enables animation, styling, binding, etc...
- private static readonly DependencyProperty ActualSizeProperty =
- DependencyProperty.RegisterAttached( "ActualSize", typeof( Size ), typeof( RandomPanel ),
- new UIPropertyMetadata( new Size() ) );
-
- private static Size GetActualSize( DependencyObject obj )
- {
- return ( Size )obj.GetValue( RandomPanel.ActualSizeProperty );
- }
-
- private static void SetActualSize( DependencyObject obj, Size value )
- {
- obj.SetValue( RandomPanel.ActualSizeProperty, value );
- }
-
- #endregion
-
- protected override Size MeasureChildrenOverride( UIElementCollection children, Size constraint )
- {
- Size availableSize = new Size( double.PositiveInfinity, double.PositiveInfinity );
-
- foreach( UIElement child in children )
- {
- if( child == null )
- continue;
-
- Size childSize = new Size( 1d * _random.Next( Convert.ToInt32( MinimumWidth ), Convert.ToInt32( MaximumWidth ) ),
- 1d * _random.Next( Convert.ToInt32( MinimumHeight ), Convert.ToInt32( MaximumHeight ) ) );
-
- child.Measure( childSize );
- RandomPanel.SetActualSize( child, childSize );
- }
- return new Size();
- }
-
- protected override Size ArrangeChildrenOverride( UIElementCollection children, Size finalSize )
- {
- foreach( UIElement child in children )
- {
- if( child == null )
- continue;
-
- Size childSize = RandomPanel.GetActualSize( child );
-
- double x = _random.Next( 0, ( int )( Math.Max( finalSize.Width - childSize.Width, 0 ) ) );
- double y = _random.Next( 0, ( int )( Math.Max( finalSize.Height - childSize.Height, 0 ) ) );
-
- double width = Math.Min( finalSize.Width, childSize.Width );
- double height = Math.Min( finalSize.Height, childSize.Height );
-
- this.ArrangeChild( child, new Rect( new Point( x, y ), new Size( width, height ) ) );
- }
- return finalSize;
- }
-
- #region Private Fields
-
- private Random _random = new Random();
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ScrollHelper.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ScrollHelper.cs
deleted file mode 100644
index 523041aa..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/ScrollHelper.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- internal static class ScrollHelper
- {
- public static bool ScrollLeastAmount( Rect physViewRect, Rect itemRect, out Vector newPhysOffset )
- {
- bool scrollNeeded = false;
-
- newPhysOffset = new Vector();
-
- if( physViewRect.Contains( itemRect ) == false )
- {
- // Check if child is inside the view horizontially.
- if( itemRect.Left > physViewRect.Left && itemRect.Right < physViewRect.Right ||
- DoubleHelper.AreVirtuallyEqual( itemRect.Left, physViewRect.Left ) == true )
- {
- newPhysOffset.X = itemRect.Left;
- }
- // Child is to the left of the view or is it bigger than the view
- else if( itemRect.Left < physViewRect.Left || itemRect.Width > physViewRect.Width )
- {
- newPhysOffset.X = itemRect.Left;
- }
- // Child is to the right of the view
- else
- {
- newPhysOffset.X = Math.Max( 0, physViewRect.Left + ( itemRect.Right - physViewRect.Right ) );
- }
-
- // Check if child is inside the view vertically.
- if( itemRect.Top > physViewRect.Top && itemRect.Bottom < physViewRect.Bottom ||
- DoubleHelper.AreVirtuallyEqual( itemRect.Top, physViewRect.Top ) == true )
- {
- newPhysOffset.Y = itemRect.Top;
- }
- // Child is the above the view or is it bigger than the view
- else if( itemRect.Top < physViewRect.Top || itemRect.Height > physViewRect.Height )
- {
- newPhysOffset.Y = itemRect.Top;
- }
- // Child is below the view
- else
- {
- newPhysOffset.Y = Math.Max( 0, physViewRect.Top + ( itemRect.Bottom - physViewRect.Bottom ) );
- }
-
- scrollNeeded = true;
- }
-
- return scrollNeeded;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/SwitchPanel.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/SwitchPanel.cs
deleted file mode 100644
index c5a05da1..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/SwitchPanel.cs
+++ /dev/null
@@ -1,1383 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
-using System.Threading;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Documents;
-using System.Windows.Media;
-using System.Windows.Threading;
-using Xceed.Wpf.Toolkit.Primitives;
-using Xceed.Wpf.Toolkit.Media.Animation;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public class SwitchPanel : PanelBase, IScrollInfo
- {
- #region Static Fields
-
- private static readonly Vector ZeroVector = new Vector();
-
- #endregion
-
- #region Constructors
-
- public SwitchPanel()
- {
- this.SetLayouts( new ObservableCollection() );
- this.Loaded += new RoutedEventHandler( this.OnLoaded );
- }
-
- #endregion
-
- #region AreLayoutSwitchesAnimated Property
-
- public static readonly DependencyProperty AreLayoutSwitchesAnimatedProperty =
- DependencyProperty.Register( "AreLayoutSwitchesAnimated", typeof( bool ), typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( true ) );
-
- public bool AreLayoutSwitchesAnimated
- {
- get
- {
- return ( bool )this.GetValue( SwitchPanel.AreLayoutSwitchesAnimatedProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.AreLayoutSwitchesAnimatedProperty, value );
- }
- }
-
- #endregion
-
- #region ActiveLayout Property
-
- private static readonly DependencyPropertyKey ActiveLayoutPropertyKey =
- DependencyProperty.RegisterReadOnly( "ActiveLayout", typeof( AnimationPanel ), typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( null, FrameworkPropertyMetadataOptions.AffectsMeasure,
- new PropertyChangedCallback( SwitchPanel.OnActiveLayoutChanged ) ) );
-
- public static readonly DependencyProperty ActiveLayoutProperty = SwitchPanel.ActiveLayoutPropertyKey.DependencyProperty;
-
- public AnimationPanel ActiveLayout
- {
- get
- {
- return ( AnimationPanel )this.GetValue( SwitchPanel.ActiveLayoutProperty );
- }
- }
-
- protected void SetActiveLayout( AnimationPanel value )
- {
- this.SetValue( SwitchPanel.ActiveLayoutPropertyKey, value );
- }
-
- private static void OnActiveLayoutChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ( ( SwitchPanel )d ).OnActiveLayoutChanged( e );
- }
-
- protected virtual void OnActiveLayoutChanged( DependencyPropertyChangedEventArgs e )
- {
- if( _currentLayoutPanel != null )
- {
- _currentLayoutPanel.DeactivateLayout();
- }
- _currentLayoutPanel = e.NewValue as AnimationPanel;
- if( _currentLayoutPanel != null )
- {
- IScrollInfo info = _currentLayoutPanel as IScrollInfo;
- if( info != null && info.ScrollOwner != null )
- {
- info.ScrollOwner.InvalidateScrollInfo();
- }
-
- _currentLayoutPanel.ActivateLayout();
- }
-
- this.RaiseActiveLayoutChangedEvent();
- this.Dispatcher.BeginInvoke(
- DispatcherPriority.Normal,
- ( ThreadStart )delegate()
- {
- this.UpdateSwitchTemplate();
- } );
- }
-
- #endregion
-
- #region ActiveLayoutIndex Property
-
- public static readonly DependencyProperty ActiveLayoutIndexProperty =
- DependencyProperty.Register( "ActiveLayoutIndex", typeof( int ), typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( -1,
- new PropertyChangedCallback( SwitchPanel.OnActiveLayoutIndexChanged ), new CoerceValueCallback( SwitchPanel.CoerceActiveLayoutIndexValue ) ) );
-
- public int ActiveLayoutIndex
- {
- get
- {
- return ( int )this.GetValue( SwitchPanel.ActiveLayoutIndexProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.ActiveLayoutIndexProperty, value );
- }
- }
-
- private static void OnActiveLayoutIndexChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ( ( SwitchPanel )d ).OnActiveLayoutIndexChanged( e );
- }
-
- protected virtual void OnActiveLayoutIndexChanged( DependencyPropertyChangedEventArgs e )
- {
- this.SetActiveLayout( ( this.Layouts.Count == 0 ) ? null : this.Layouts[ ActiveLayoutIndex ] );
- }
-
- private static object CoerceActiveLayoutIndexValue( DependencyObject d, object value )
- {
- int panelCount = ( d as SwitchPanel ).Layouts.Count;
- int result = ( int )value;
-
- if( result < 0 && panelCount > 0 )
- {
- result = 0;
- }
- else if( result >= panelCount )
- {
- result = panelCount - 1;
- }
-
- return result;
- }
-
- #endregion
-
- #region ActiveSwitchTemplate Property
-
- private static readonly DependencyPropertyKey ActiveSwitchTemplatePropertyKey =
- DependencyProperty.RegisterReadOnly( "ActiveSwitchTemplate", typeof( DataTemplate ), typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( null, new PropertyChangedCallback( SwitchPanel.OnActiveSwitchTemplateChanged ) ) );
-
- public static readonly DependencyProperty ActiveSwitchTemplateProperty = SwitchPanel.ActiveSwitchTemplatePropertyKey.DependencyProperty;
-
- public DataTemplate ActiveSwitchTemplate
- {
- get
- {
- return ( DataTemplate )this.GetValue( SwitchPanel.ActiveSwitchTemplateProperty );
- }
- }
-
- protected void SetActiveSwitchTemplate( DataTemplate value )
- {
- this.SetValue( SwitchPanel.ActiveSwitchTemplatePropertyKey, value );
- }
-
- private static void OnActiveSwitchTemplateChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ( ( SwitchPanel )d ).OnActiveSwitchTemplateChanged( e );
- }
-
- protected virtual void OnActiveSwitchTemplateChanged( DependencyPropertyChangedEventArgs e )
- {
- if( _presenters.Count > 0 )
- {
- DataTemplate template = e.NewValue as DataTemplate;
- List currentChildren = new List( this.InternalChildren.Count );
- foreach( UIElement child in this.InternalChildren )
- {
- if( child == null )
- continue;
-
- currentChildren.Add( child );
- }
-
- foreach( SwitchPresenter presenter in _presenters )
- {
- if( presenter._switchRoot != null && currentChildren.Contains( presenter._switchRoot ) )
- {
- presenter.SwapTheTemplate( template, this.AreLayoutSwitchesAnimated );
- }
- }
- }
- }
-
- #endregion
-
- #region DefaultAnimationRate Property
-
- public static readonly DependencyProperty DefaultAnimationRateProperty =
- AnimationPanel.DefaultAnimationRateProperty.AddOwner( typeof( SwitchPanel ) );
-
- public AnimationRate DefaultAnimationRate
- {
- get
- {
- return ( AnimationRate )this.GetValue( SwitchPanel.DefaultAnimationRateProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.DefaultAnimationRateProperty, value );
- }
- }
-
- #endregion
-
- #region DefaultAnimator Property
-
- public static readonly DependencyProperty DefaultAnimatorProperty =
- AnimationPanel.DefaultAnimatorProperty.AddOwner( typeof( SwitchPanel ) );
-
- public IterativeAnimator DefaultAnimator
- {
- get
- {
- return ( IterativeAnimator )this.GetValue( SwitchPanel.DefaultAnimatorProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.DefaultAnimatorProperty, value );
- }
- }
-
- #endregion
-
- #region EnterAnimationRate Property
-
- public static readonly DependencyProperty EnterAnimationRateProperty =
- AnimationPanel.EnterAnimationRateProperty.AddOwner( typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( AnimationRate.Default ) );
-
- public AnimationRate EnterAnimationRate
- {
- get
- {
- return ( AnimationRate )this.GetValue( SwitchPanel.EnterAnimationRateProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.EnterAnimationRateProperty, value );
- }
- }
-
- #endregion
-
- #region EnterAnimator Property
-
- public static readonly DependencyProperty EnterAnimatorProperty =
- AnimationPanel.EnterAnimatorProperty.AddOwner( typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( IterativeAnimator.Default ) );
-
- public IterativeAnimator EnterAnimator
- {
- get
- {
- return ( IterativeAnimator )this.GetValue( SwitchPanel.EnterAnimatorProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.EnterAnimatorProperty, value );
- }
- }
-
- #endregion
-
- #region ExitAnimationRate Property
-
- public static readonly DependencyProperty ExitAnimationRateProperty =
- AnimationPanel.ExitAnimationRateProperty.AddOwner( typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( AnimationRate.Default ) );
-
- public AnimationRate ExitAnimationRate
- {
- get
- {
- return ( AnimationRate )this.GetValue( SwitchPanel.ExitAnimationRateProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.ExitAnimationRateProperty, value );
- }
- }
-
- #endregion
-
- #region ExitAnimator Property
-
- public static readonly DependencyProperty ExitAnimatorProperty =
- AnimationPanel.ExitAnimatorProperty.AddOwner( typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( IterativeAnimator.Default ) );
-
- public IterativeAnimator ExitAnimator
- {
- get
- {
- return ( IterativeAnimator )this.GetValue( SwitchPanel.ExitAnimatorProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.ExitAnimatorProperty, value );
- }
- }
-
- #endregion
-
- #region LayoutAnimationRate Property
-
- public static readonly DependencyProperty LayoutAnimationRateProperty =
- AnimationPanel.LayoutAnimationRateProperty.AddOwner( typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( AnimationRate.Default ) );
-
- public AnimationRate LayoutAnimationRate
- {
- get
- {
- return ( AnimationRate )this.GetValue( SwitchPanel.LayoutAnimationRateProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.LayoutAnimationRateProperty, value );
- }
- }
-
- #endregion
-
- #region LayoutAnimator Property
-
- public static readonly DependencyProperty LayoutAnimatorProperty =
- AnimationPanel.LayoutAnimatorProperty.AddOwner( typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( IterativeAnimator.Default ) );
-
- public IterativeAnimator LayoutAnimator
- {
- get
- {
- return ( IterativeAnimator )this.GetValue( SwitchPanel.LayoutAnimatorProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.LayoutAnimatorProperty, value );
- }
- }
-
- #endregion
-
- #region Layouts Property
-
- private static readonly DependencyPropertyKey LayoutsPropertyKey =
- DependencyProperty.RegisterReadOnly( "Layouts", typeof( ObservableCollection ), typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( null, FrameworkPropertyMetadataOptions.AffectsArrange,
- new PropertyChangedCallback( SwitchPanel.OnLayoutsChanged ) ) );
-
- public static readonly DependencyProperty LayoutsProperty = SwitchPanel.LayoutsPropertyKey.DependencyProperty;
-
- public ObservableCollection Layouts
- {
- get
- {
- return ( ObservableCollection )this.GetValue( SwitchPanel.LayoutsProperty );
- }
- }
-
- protected void SetLayouts( ObservableCollection value )
- {
- this.SetValue( SwitchPanel.LayoutsPropertyKey, value );
- }
-
- private static void OnLayoutsChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ( ( SwitchPanel )d ).OnLayoutsChanged( e );
- }
-
- protected virtual void OnLayoutsChanged( DependencyPropertyChangedEventArgs e )
- {
- if( e.NewValue != null )
- {
- ( e.NewValue as ObservableCollection ).CollectionChanged
- += new NotifyCollectionChangedEventHandler( LayoutsCollectionChanged );
- }
- if( e.OldValue != null )
- {
- ( e.OldValue as ObservableCollection ).CollectionChanged
- -= new NotifyCollectionChangedEventHandler( LayoutsCollectionChanged );
- }
- }
-
- #endregion
-
- #region SwitchAnimationRate Property
-
- public static readonly DependencyProperty SwitchAnimationRateProperty =
- AnimationPanel.SwitchAnimationRateProperty.AddOwner( typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( AnimationRate.Default ) );
-
- public AnimationRate SwitchAnimationRate
- {
- get
- {
- return ( AnimationRate )this.GetValue( SwitchPanel.SwitchAnimationRateProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.SwitchAnimationRateProperty, value );
- }
- }
-
- #endregion
-
- #region SwitchAnimator Property
-
- public static readonly DependencyProperty SwitchAnimatorProperty =
- AnimationPanel.SwitchAnimatorProperty.AddOwner( typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( IterativeAnimator.Default ) );
-
- public IterativeAnimator SwitchAnimator
- {
- get
- {
- return ( IterativeAnimator )this.GetValue( SwitchPanel.SwitchAnimatorProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.SwitchAnimatorProperty, value );
- }
- }
-
- #endregion
-
- #region SwitchTemplate Property
-
- public static readonly DependencyProperty SwitchTemplateProperty =
- DependencyProperty.Register( "SwitchTemplate", typeof( DataTemplate ), typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( null,
- new PropertyChangedCallback( SwitchPanel.OnSwitchTemplateChanged ) ) );
-
- public DataTemplate SwitchTemplate
- {
- get
- {
- return ( DataTemplate )this.GetValue( SwitchPanel.SwitchTemplateProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.SwitchTemplateProperty, value );
- }
- }
-
- private static void OnSwitchTemplateChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ( ( SwitchPanel )d ).OnSwitchTemplateChanged( e );
- }
-
- protected virtual void OnSwitchTemplateChanged( DependencyPropertyChangedEventArgs e )
- {
- this.UpdateSwitchTemplate();
- }
-
- #endregion
-
- #region TemplateAnimationRate Property
-
- public static readonly DependencyProperty TemplateAnimationRateProperty =
- AnimationPanel.TemplateAnimationRateProperty.AddOwner( typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( AnimationRate.Default ) );
-
- public AnimationRate TemplateAnimationRate
- {
- get
- {
- return ( AnimationRate )this.GetValue( SwitchPanel.TemplateAnimationRateProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.TemplateAnimationRateProperty, value );
- }
- }
-
- #endregion
-
- #region TemplateAnimator Property
-
- public static readonly DependencyProperty TemplateAnimatorProperty =
- AnimationPanel.TemplateAnimatorProperty.AddOwner( typeof( SwitchPanel ),
- new FrameworkPropertyMetadata( IterativeAnimator.Default ) );
-
- public IterativeAnimator TemplateAnimator
- {
- get
- {
- return ( IterativeAnimator )this.GetValue( SwitchPanel.TemplateAnimatorProperty );
- }
- set
- {
- this.SetValue( SwitchPanel.TemplateAnimatorProperty, value );
- }
- }
-
- #endregion
-
- #region VisualChildrenCount Protected Property
-
- protected override int VisualChildrenCount
- {
- get
- {
- int result = 0;
-
- if( this.HasLoaded && _currentLayoutPanel != null )
- {
- result = _currentLayoutPanel.VisualChildrenCountInternal;
- }
- else
- {
- result = base.VisualChildrenCount;
- }
-
- return result;
- }
- }
-
- #endregion
-
- #region ExitingChildren Internal Property
-
- internal List ExitingChildren
- {
- get
- {
- return _exitingChildren;
- }
- }
-
- private readonly List _exitingChildren = new List();
-
- #endregion
-
- #region ChildrenInternal Internal Property
-
- internal UIElementCollection ChildrenInternal
- {
- get
- {
- return this.InternalChildren;
- }
- }
-
- #endregion
-
- #region HasLoaded Internal Property
-
- internal bool HasLoaded
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.HasLoaded ];
- }
- set
- {
- _cacheBits[ ( int )CacheBits.HasLoaded ] = value;
- }
- }
-
- #endregion
-
- #region IsScrollingPhysically Private Property
-
- private bool IsScrollingPhysically
- {
- get
- {
- bool isScrollingPhys = false;
-
- if( _scrollOwner != null )
- {
- isScrollingPhys = true;
-
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- isScrollingPhys = ( ( IScrollInfo )this.ActiveLayout ).ScrollOwner == null;
- }
- }
-
- return isScrollingPhys;
- }
- }
-
- #endregion
-
- #region ActiveLayoutChanged Event
-
- public static readonly RoutedEvent ActiveLayoutChangedEvent =
- EventManager.RegisterRoutedEvent( "ActiveLayoutChanged", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( SwitchPanel ) );
-
- public event RoutedEventHandler ActiveLayoutChanged
- {
- add
- {
- this.AddHandler( SwitchPanel.ActiveLayoutChangedEvent, value );
- }
- remove
- {
- this.RemoveHandler( SwitchPanel.ActiveLayoutChangedEvent, value );
- }
- }
-
- protected RoutedEventArgs RaiseActiveLayoutChangedEvent()
- {
- return SwitchPanel.RaiseActiveLayoutChangedEvent( this );
- }
-
- internal static RoutedEventArgs RaiseActiveLayoutChangedEvent( UIElement target )
- {
- if( target == null )
- return null;
-
- RoutedEventArgs args = new RoutedEventArgs();
- args.RoutedEvent = SwitchPanel.ActiveLayoutChangedEvent;
- RoutedEventHelper.RaiseEvent( target, args );
- return args;
- }
-
- #endregion
-
- #region SwitchAnimationBegun Event
-
- public static readonly RoutedEvent SwitchAnimationBegunEvent =
- EventManager.RegisterRoutedEvent( "SwitchAnimationBegun", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( SwitchPanel ) );
-
- public event RoutedEventHandler SwitchAnimationBegun
- {
- add
- {
- this.AddHandler( SwitchPanel.SwitchAnimationBegunEvent, value );
- }
- remove
- {
- this.RemoveHandler( SwitchPanel.SwitchAnimationBegunEvent, value );
- }
- }
-
- protected RoutedEventArgs RaiseSwitchAnimationBegunEvent()
- {
- return SwitchPanel.RaiseSwitchAnimationBegunEvent( this );
- }
-
- private static RoutedEventArgs RaiseSwitchAnimationBegunEvent( UIElement target )
- {
- if( target == null )
- return null;
-
- RoutedEventArgs args = new RoutedEventArgs();
- args.RoutedEvent = SwitchPanel.SwitchAnimationBegunEvent;
- RoutedEventHelper.RaiseEvent( target, args );
- return args;
- }
-
- #endregion
-
- #region SwitchAnimationCompleted Event
-
- public static readonly RoutedEvent SwitchAnimationCompletedEvent =
- EventManager.RegisterRoutedEvent( "SwitchAnimationCompleted", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( SwitchPanel ) );
-
- public event RoutedEventHandler SwitchAnimationCompleted
- {
- add
- {
- this.AddHandler( SwitchPanel.SwitchAnimationCompletedEvent, value );
- }
- remove
- {
- this.RemoveHandler( SwitchPanel.SwitchAnimationCompletedEvent, value );
- }
- }
-
- protected RoutedEventArgs RaiseSwitchAnimationCompletedEvent()
- {
- return SwitchPanel.RaiseSwitchAnimationCompletedEvent( this );
- }
-
- private static RoutedEventArgs RaiseSwitchAnimationCompletedEvent( UIElement target )
- {
- if( target == null )
- return null;
-
- RoutedEventArgs args = new RoutedEventArgs();
- args.RoutedEvent = SwitchPanel.SwitchAnimationCompletedEvent;
- RoutedEventHelper.RaiseEvent( target, args );
- return args;
- }
-
- #endregion
-
- protected override Size MeasureOverride( Size availableSize )
- {
- AnimationPanel layout = ( Layouts.Count == 0 ) ? _defaultLayoutCanvas : this.ActiveLayout;
- Size measureSize = layout.MeasureChildrenCore( this.InternalChildren, availableSize );
-
- if( this.IsScrollingPhysically )
- {
- Size viewport = availableSize;
- Size extent = measureSize;
-
- //
- // Make sure our offset works with the new size of the panel. We don't want to show
- // any whitespace if the user scrolled all the way down and then increased the size of the panel.
- //
- Vector newOffset = new Vector(
- Math.Max( 0, Math.Min( _offset.X, extent.Width - viewport.Width ) ),
- Math.Max( 0, Math.Min( _offset.Y, extent.Height - viewport.Height ) ) );
-
- this.SetScrollingData( viewport, extent, newOffset );
- }
-
- return measureSize;
- }
-
- protected override Size ArrangeOverride( Size finalSize )
- {
- AnimationPanel layout = ( Layouts.Count == 0 ) ? _defaultLayoutCanvas : this.ActiveLayout;
-
- if( this.IsScrollingPhysically )
- {
- layout.PhysicalScrollOffset = _offset;
- }
- else
- {
- layout.PhysicalScrollOffset = ZeroVector;
- }
-
- return layout.ArrangeChildrenCore( InternalChildren, finalSize );
- }
-
- protected override Visual GetVisualChild( int index )
- {
- if( this.HasLoaded && _currentLayoutPanel != null )
- return _currentLayoutPanel.GetVisualChildInternal( index );
-
- return base.GetVisualChild( index );
- }
-
- protected override void OnVisualChildrenChanged( DependencyObject visualAdded, DependencyObject visualRemoved )
- {
- // The OnNotifyVisualChildAdded/Removed methods get called for all animation panels within a
- // SwitchPanel.Layouts collection, regardless of whether they are the active layout for the SwitchPanel.
- if( visualAdded is UIElement )
- {
- // do not issue notification for a child that is exiting
- if( _currentLayoutPanel == null || !_currentLayoutPanel.IsRemovingInternalChild )
- {
- foreach( AnimationPanel panel in Layouts )
- {
- panel.OnNotifyVisualChildAddedInternal( visualAdded as UIElement );
- }
- }
- }
- else if( visualRemoved is UIElement )
- {
- foreach( AnimationPanel panel in Layouts )
- {
- panel.OnNotifyVisualChildRemovedInternal( visualRemoved as UIElement );
- }
- }
-
- if( _currentLayoutPanel != null )
- {
- _currentLayoutPanel.OnSwitchParentVisualChildrenChanged( visualAdded, visualRemoved );
- }
- else
- {
- base.OnVisualChildrenChanged( visualAdded, visualRemoved );
- }
- }
-
- internal void AddVisualChildInternal( Visual child )
- {
- this.AddVisualChild( child );
- }
-
- internal void BeginLayoutSwitch()
- {
- this.RaiseSwitchAnimationBegunEvent();
- }
-
- internal void EndLayoutSwitch()
- {
- this.RaiseSwitchAnimationCompletedEvent();
- }
-
- internal Visual GetVisualChildInternal( int index )
- {
- // called from AnimationPanel to access base class method
- return base.GetVisualChild( index );
- }
-
- internal void OnVisualChildrenChangedInternal( DependencyObject visualAdded, DependencyObject visualRemoved )
- {
- base.OnVisualChildrenChanged( visualAdded, visualRemoved );
- }
-
- internal UIElement RegisterPresenter( SwitchPresenter presenter )
- {
- UIElement result = null;
- AnimationPanel ignore;
- result = AnimationPanel.FindAncestorChildOfAnimationPanel( presenter, out ignore );
- if( result != null )
- {
- _presenters.Add( presenter );
- presenter.SwapTheTemplate( ActiveSwitchTemplate, false );
- }
- return result;
- }
-
- internal void RemoveVisualChildInternal( Visual child )
- {
- this.RemoveVisualChild( child );
- }
-
- internal void UnregisterPresenter( SwitchPresenter presenter, DependencyObject container )
- {
- if( container != null )
- {
- _presenters.Remove( presenter );
- presenter.SwapTheTemplate( null, false );
- }
- }
-
- internal void UpdateSwitchTemplate()
- {
- this.SetActiveSwitchTemplate( ( this.ActiveLayout == null ) || ( this.ActiveLayout.SwitchTemplate == null )
- ? this.SwitchTemplate : this.ActiveLayout.SwitchTemplate );
- }
-
- private void OnLoaded( object sender, RoutedEventArgs e )
- {
- this.HasLoaded = true;
-
- // invalidate arrange to give enter animations a chance to run
- this.InvalidateArrange();
- }
-
- private void LayoutsCollectionChanged( object sender, NotifyCollectionChangedEventArgs e )
- {
- if( e.Action != NotifyCollectionChangedAction.Move )
- {
- if( e.NewItems != null )
- {
- foreach( AnimationPanel panel in e.NewItems )
- {
- this.AddLogicalChild( panel );
- panel.SetSwitchParent( this );
-
- if( panel is IScrollInfo )
- {
- ( ( IScrollInfo )panel ).ScrollOwner = this.ScrollOwner;
- }
-
- if( this.IsLoaded )
- {
- foreach( UIElement child in this.InternalChildren )
- {
- if( child == null )
- continue;
-
- panel.OnNotifyVisualChildAddedInternal( child );
- }
- }
- }
- }
-
- if( e.OldItems != null )
- {
- foreach( AnimationPanel panel in e.OldItems )
- {
- if( IsLoaded )
- {
- foreach( UIElement child in this.InternalChildren )
- {
- if( child == null )
- continue;
-
- panel.OnNotifyVisualChildRemovedInternal( child );
- }
- }
-
- this.RemoveLogicalChild( panel );
- panel.SetSwitchParent( null );
-
- if( panel is IScrollInfo )
- {
- ( ( IScrollInfo )panel ).ScrollOwner = null;
- }
- }
- }
- }
-
- // ensure valid ActiveLayoutIndex value
- this.CoerceValue( SwitchPanel.ActiveLayoutIndexProperty );
- this.SetActiveLayout( ( this.Layouts.Count == 0 ) ? null : this.Layouts[ ActiveLayoutIndex ] );
- }
-
- private void ResetScrollInfo()
- {
- _offset = new Vector();
- _viewport = _extent = new Size( 0, 0 );
- }
-
- private void OnScrollChange()
- {
- if( this.ScrollOwner != null )
- {
- this.ScrollOwner.InvalidateScrollInfo();
- }
- }
-
- private void SetScrollingData( Size viewport, Size extent, Vector offset )
- {
- _offset = offset;
-
- if( DoubleHelper.AreVirtuallyEqual( viewport, _viewport ) == false || DoubleHelper.AreVirtuallyEqual( extent, _extent ) == false ||
- DoubleHelper.AreVirtuallyEqual( offset, _computedOffset ) == false )
- {
- _viewport = viewport;
- _extent = extent;
- _computedOffset = offset;
- this.OnScrollChange();
- }
- }
-
- private double ValidateInputOffset( double offset, string parameterName )
- {
- if( double.IsNaN( offset ) )
- throw new ArgumentOutOfRangeException( parameterName );
-
- return Math.Max( 0d, offset );
- }
-
- private int FindChildFromVisual( Visual vis )
- {
- int index = -1;
-
- DependencyObject parent = vis;
- DependencyObject child = null;
-
- do
- {
- child = parent;
- parent = VisualTreeHelper.GetParent( child );
- }
- while( parent != null && parent != this );
-
- if( parent == this )
- {
- index = this.Children.IndexOf( ( UIElement )child );
- }
-
- return index;
- }
-
- #region IScrollInfo Members
-
- public bool CanHorizontallyScroll
- {
- get
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- return ( ( IScrollInfo )this.ActiveLayout ).CanHorizontallyScroll;
-
- return _allowHorizontal;
- }
- set
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- ( ( IScrollInfo )this.ActiveLayout ).CanHorizontallyScroll = value;
- }
- else
- {
- _allowHorizontal = value;
- }
- }
- }
-
- public bool CanVerticallyScroll
- {
- get
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- return ( ( IScrollInfo )this.ActiveLayout ).CanVerticallyScroll;
-
- return _allowVertical;
- }
- set
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- ( ( IScrollInfo )this.ActiveLayout ).CanVerticallyScroll = value;
- }
- else
- {
- _allowVertical = value;
- }
- }
- }
-
- public double ExtentHeight
- {
- get
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- return ( ( IScrollInfo )this.ActiveLayout ).ExtentHeight;
-
- return _extent.Height;
- }
- }
-
- public double ExtentWidth
- {
- get
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- return ( ( IScrollInfo )this.ActiveLayout ).ExtentWidth;
-
- return _extent.Width;
- }
- }
-
- public double HorizontalOffset
- {
- get
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- return ( ( IScrollInfo )this.ActiveLayout ).HorizontalOffset;
-
- return _offset.X;
- }
- }
-
- public void LineDown()
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- ( ( IScrollInfo )this.ActiveLayout ).LineDown();
- }
- else
- {
- this.SetVerticalOffset( this.VerticalOffset + 1d );
- }
- }
-
- public void LineLeft()
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- ( ( IScrollInfo )this.ActiveLayout ).LineLeft();
- }
- else
- {
- this.SetHorizontalOffset( this.VerticalOffset - 1d );
- }
- }
-
- public void LineRight()
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- ( ( IScrollInfo )this.ActiveLayout ).LineRight();
- }
- else
- {
- this.SetHorizontalOffset( this.VerticalOffset + 1d );
- }
- }
-
- public void LineUp()
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- ( ( IScrollInfo )this.ActiveLayout ).LineUp();
- }
- else
- {
- this.SetVerticalOffset( this.VerticalOffset + 1d );
- }
- }
-
- public Rect MakeVisible( Visual visual, Rect rectangle )
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- return ( ( IScrollInfo )this.ActiveLayout ).MakeVisible( visual, rectangle );
-
- if( ( rectangle.IsEmpty || ( visual == null ) ) || ( ( visual == this ) || !this.IsAncestorOf( visual ) ) )
- return Rect.Empty;
-
- rectangle = visual.TransformToAncestor( ( Visual )this ).TransformBounds( rectangle );
-
- if( this.IsScrollingPhysically == false )
- return rectangle;
-
- //
- // Make sure we can find the child...
- //
- int index = this.FindChildFromVisual( visual );
-
- if( index == -1 )
- throw new ArgumentException( "visual" );
-
- //
- // Since our _Offset pushes the items down we need to correct it here to
- // give a true rectangle of the child.
- //
- Rect itemRect = rectangle;
- itemRect.Offset( _offset );
-
- Rect viewRect = new Rect( new Point( _offset.X, _offset.Y ), _viewport );
-
- Vector newPhysOffset;
- if( ScrollHelper.ScrollLeastAmount( viewRect, itemRect, out newPhysOffset ) )
- {
- this.SetHorizontalOffset( newPhysOffset.X );
- this.SetVerticalOffset( newPhysOffset.Y );
- }
-
- return rectangle;
- }
-
- public void MouseWheelDown()
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- ( ( IScrollInfo )ActiveLayout ).MouseWheelDown();
- }
- else
- {
- this.SetVerticalOffset( this.VerticalOffset + SystemParameters.WheelScrollLines );
- }
- }
-
- public void MouseWheelLeft()
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- ( ( IScrollInfo )this.ActiveLayout ).MouseWheelLeft();
- }
- else
- {
- this.SetVerticalOffset( this.VerticalOffset - 3d );
- }
- }
-
- public void MouseWheelRight()
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- ( ( IScrollInfo )this.ActiveLayout ).MouseWheelRight();
- }
- else
- {
- this.SetVerticalOffset( this.VerticalOffset + 3d );
- }
- }
-
- public void MouseWheelUp()
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- ( ( IScrollInfo )this.ActiveLayout ).MouseWheelUp();
- }
- else
- {
- this.SetVerticalOffset( this.VerticalOffset - SystemParameters.WheelScrollLines );
- }
- }
-
- public void PageDown()
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- ( ( IScrollInfo )this.ActiveLayout ).PageDown();
- }
- else
- {
- this.SetVerticalOffset( this.VerticalOffset + this.ViewportHeight );
- }
- }
-
- public void PageLeft()
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- ( ( IScrollInfo )this.ActiveLayout ).PageLeft();
- }
- else
- {
- this.SetHorizontalOffset( this.HorizontalOffset - this.ViewportWidth );
- }
- }
-
- public void PageRight()
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- ( ( IScrollInfo )this.ActiveLayout ).PageRight();
- }
- else
- {
- this.SetHorizontalOffset( this.HorizontalOffset + this.ViewportWidth );
- }
- }
-
- public void PageUp()
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- ( ( IScrollInfo )this.ActiveLayout ).PageUp();
- }
- else
- {
- this.SetVerticalOffset( this.VerticalOffset - this.ViewportHeight );
- }
- }
-
- public ScrollViewer ScrollOwner
- {
- get
- {
- return _scrollOwner;
- }
- set
- {
- foreach( AnimationPanel layout in this.Layouts )
- {
- if( layout != null && layout is IScrollInfo )
- {
- ( ( IScrollInfo )layout ).ScrollOwner = value;
- }
- }
-
- if( _scrollOwner != value )
- {
- _scrollOwner = value;
-
- this.ResetScrollInfo();
- }
- }
- }
-
- public void SetHorizontalOffset( double offset )
- {
- offset = this.ValidateInputOffset( offset, "HorizontalOffset" );
-
- offset = Math.Min( offset, this.ExtentWidth - this.ViewportWidth );
-
- if( !DoubleHelper.AreVirtuallyEqual( offset, _offset.X ) )
- {
- _offset.X = offset;
- base.InvalidateMeasure();
- }
- }
-
- public void SetVerticalOffset( double offset )
- {
- offset = this.ValidateInputOffset( offset, "VerticalOffset" );
-
- offset = Math.Min( offset, this.ExtentHeight - this.ViewportHeight );
-
- if( !DoubleHelper.AreVirtuallyEqual( offset, _offset.Y ) )
- {
- _offset.Y = offset;
- base.InvalidateMeasure();
- }
- }
-
- public double VerticalOffset
- {
- get
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- return ( ( IScrollInfo )this.ActiveLayout ).VerticalOffset;
- }
-
- return _offset.Y;
- }
- }
-
- public double ViewportHeight
- {
- get
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- return ( ( IScrollInfo )this.ActiveLayout ).ViewportHeight;
- }
-
- return _viewport.Height;
- }
- }
-
- public double ViewportWidth
- {
- get
- {
- if( this.ActiveLayout != null && this.ActiveLayout is IScrollInfo )
- {
- return ( ( IScrollInfo )this.ActiveLayout ).ViewportWidth;
- }
-
- return _viewport.Width;
- }
- }
-
- #endregion
-
- #region Private Fields
-
- internal AnimationPanel _currentLayoutPanel = null;
-
- private readonly AnimationPanel _defaultLayoutCanvas = new Xceed.Wpf.Toolkit.Panels.WrapPanel();
- private readonly Collection _presenters = new Collection();
-
- private BitVector32 _cacheBits = new BitVector32( 0 );
-
- private bool _allowHorizontal = false;
- private bool _allowVertical = false;
- private Vector _computedOffset = new Vector( 0.0, 0.0 );
- private Size _extent = new Size( 0, 0 );
- private Vector _offset = new Vector( 0, 0 );
- private ScrollViewer _scrollOwner = null;
- private Size _viewport;
-
- #endregion
-
- #region CacheBits Nested Type
-
- private enum CacheBits
- {
- HasLoaded = 0x00000001,
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/SwitchPresenter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/SwitchPresenter.cs
deleted file mode 100644
index b4585aa7..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/SwitchPresenter.cs
+++ /dev/null
@@ -1,322 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Media;
-using System.Windows.Threading;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public class SwitchPresenter : FrameworkElement
- {
- #region Constructors
-
- public SwitchPresenter()
- : base()
- {
- this.AddVisualChild( _contentPresenter );
-
- this.Loaded += new RoutedEventHandler( this.SwitchPresenter_Loaded );
- this.Unloaded += new RoutedEventHandler( this.SwitchPresenter_Unloaded );
- }
-
- #endregion
-
- #region DelaySwitch Property
-
- // Using a DependencyProperty as the backing store for DelaySwitch. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty DelaySwitchProperty =
- DependencyProperty.Register( "DelaySwitch", typeof( bool ), typeof( SwitchPresenter ),
- new UIPropertyMetadata( false ) );
-
- public bool DelaySwitch
- {
- get
- {
- return ( bool )this.GetValue( SwitchPresenter.DelaySwitchProperty );
- }
- set
- {
- this.SetValue( SwitchPresenter.DelaySwitchProperty, value );
- }
- }
-
- #endregion
-
- #region DelayPriority Property
-
- // Using a DependencyProperty as the backing store for DelayPriority. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty DelayPriorityProperty =
- DependencyProperty.Register( "DelayPriority", typeof( DispatcherPriority ), typeof( SwitchPresenter ),
- new UIPropertyMetadata( DispatcherPriority.Background ) );
-
- public DispatcherPriority DelayPriority
- {
- get
- {
- return ( DispatcherPriority )this.GetValue( SwitchPresenter.DelayPriorityProperty );
- }
- set
- {
- this.SetValue( SwitchPresenter.DelayPriorityProperty, value );
- }
- }
-
- #endregion
-
- #region SwitchParent Internal Property
-
- internal static readonly DependencyProperty SwitchParentProperty =
- DependencyProperty.Register( "SwitchParent", typeof( SwitchPanel ), typeof( SwitchPresenter ),
- new FrameworkPropertyMetadata( null,
- new PropertyChangedCallback( SwitchPresenter.OnSwitchParentChanged ) ) );
-
- internal SwitchPanel SwitchParent
- {
- get
- {
- return ( SwitchPanel )this.GetValue( SwitchPresenter.SwitchParentProperty );
- }
- set
- {
- this.SetValue( SwitchPresenter.SwitchParentProperty, value );
- }
- }
-
- private static void OnSwitchParentChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ( ( SwitchPresenter )d ).OnSwitchParentChanged( e );
- }
-
- protected virtual void OnSwitchParentChanged( DependencyPropertyChangedEventArgs e )
- {
- if( e.OldValue != null )
- {
- ( e.OldValue as SwitchPanel ).UnregisterPresenter( this, _switchRoot );
- _switchRoot = null;
- BindingOperations.ClearAllBindings( _contentPresenter );
- }
-
- if( e.NewValue != null )
- {
- _contentPresenter.SetBinding( ContentPresenter.ContentProperty, new Binding() );
- _switchRoot = ( e.NewValue as SwitchPanel ).RegisterPresenter( this );
- }
- }
-
- private static void OnLoaded( object sender, RoutedEventArgs e )
- {
- SwitchPresenter sp = sender as SwitchPresenter;
- if( sp._switchRoot == null )
- {
- sp.SwitchParent = VisualTreeHelperEx.FindAncestorByType( sp, typeof( SwitchPanel ), false ) as SwitchPanel;
- }
- }
-
- private static void OnUnloaded( object sender, RoutedEventArgs e )
- {
- ( sender as SwitchPresenter ).SwitchParent = null;
- }
-
- #endregion
-
- #region VisualChildrenCount Protected Property
-
- protected override int VisualChildrenCount
- {
- get
- {
- return 1;
- }
- }
-
- #endregion
-
- internal void RegisterID( string id, FrameworkElement element )
- {
- if( element == null )
- return;
-
- _knownIDs[ id ] = element;
- }
-
- internal void SwapTheTemplate( DataTemplate template, bool beginAnimation )
- {
- if( this.DelaySwitch )
- {
- _currentTemplate = template;
-
- this.Dispatcher.BeginInvoke( new Action( this.OnSwapTemplate ),
- this.DelayPriority,
- new DelaySwitchParams()
- {
- Template = template,
- BeginAnimation = beginAnimation
- } );
- }
- else
- {
- this.DoSwapTemplate( template, beginAnimation );
- }
- }
-
- protected override Size MeasureOverride( Size constraint )
- {
- // if first pass, resolve SwitchParent
- if( !_isMeasured && _switchRoot == null )
- {
- SwitchPresenter.OnLoaded( this, null );
- _isMeasured = true;
- }
-
- _contentPresenter.Measure( constraint );
- return _contentPresenter.DesiredSize;
- }
-
- protected override Size ArrangeOverride( Size arrangeBounds )
- {
- _contentPresenter.Arrange( new Rect( arrangeBounds ) );
- return arrangeBounds;
- }
-
- protected override Visual GetVisualChild( int index )
- {
- if( index != 0 )
- throw new ArgumentOutOfRangeException( "index", index, "" );
-
- return _contentPresenter;
- }
-
- private void OnSwapTemplate( DelaySwitchParams data )
- {
- // If we are switching the templates fast the invokes will lag. So ignore old invokes.
- if( data.Template == _currentTemplate )
- {
- this.DoSwapTemplate( data.Template, data.BeginAnimation );
- _currentTemplate = null;
- }
- }
-
- private void DoSwapTemplate( DataTemplate template, bool beginAnimation )
- {
- // cache transforms for known ID'd elements in the current template
- Dictionary knownLocations = null;
- if( beginAnimation && _knownIDs.Count > 0 )
- {
- knownLocations = new Dictionary();
- foreach( KeyValuePair entry in _knownIDs )
- {
- Size size = entry.Value.RenderSize;
- Matrix m = ( entry.Value.TransformToAncestor( SwitchParent ) as MatrixTransform ).Matrix;
- Point[] points = { new Point(), new Point( size.Width, size.Height ) };
- m.Transform( points );
- knownLocations[ entry.Key ] = new Rect( points[ 0 ], points[ 1 ] );
- }
- }
-
- // clear the known IDs because the new template will have all new IDs
- _knownIDs.Clear();
-
- // set and apply the new template
- _contentPresenter.ContentTemplate = template;
- if( template != null )
- {
- _contentPresenter.ApplyTemplate();
- }
-
- // determine locations of ID'd elements in new template
- // and begin animation to new location
- if( knownLocations != null && _knownIDs.Count > 0 )
- {
- Dictionary newLocations = null;
- RoutedEventHandler onLoaded = null;
- onLoaded = delegate( object sender, RoutedEventArgs e )
- {
- FrameworkElement element = sender as FrameworkElement;
- element.Loaded -= onLoaded;
- string id = SwitchTemplate.GetID( element );
- if( knownLocations.ContainsKey( id ) )
- {
- // ensure that the new locations have been resolved
- if( newLocations == null )
- {
- newLocations = this.SwitchParent.ActiveLayout.GetNewLocationsBasedOnTargetPlacement( this, _switchRoot );
- }
-
- UIElement parent = VisualTreeHelper.GetParent( element ) as UIElement;
- if( parent != null )
- {
- Rect previousLocation = knownLocations[ id ];
- Point[] points = { previousLocation.TopLeft, previousLocation.BottomRight };
- Matrix m = ( SwitchParent.TransformToDescendant( parent ) as MatrixTransform ).Matrix;
- m.Transform( points );
- Rect oldLocation = new Rect( points[ 0 ], points[ 1 ] );
- Rect newLocation = newLocations[ id ];
- this.SwitchParent.ActiveLayout.BeginGrandchildAnimation( element, oldLocation, newLocation );
- }
- }
- };
-
- foreach( KeyValuePair entry in _knownIDs )
- {
- entry.Value.Loaded += onLoaded;
- }
- }
- }
-
- private void SwitchPresenter_Unloaded( object sender, RoutedEventArgs e )
- {
- this.SwitchParent = null;
- }
-
- private void SwitchPresenter_Loaded( object sender, RoutedEventArgs e )
- {
- if( _switchRoot == null )
- {
- this.SwitchParent = VisualTreeHelperEx.FindAncestorByType( this, typeof( SwitchPanel ), false ) as SwitchPanel;
- }
- }
-
- #region Private Fields
-
- // track our topmost ancestor that is the direct child of the SwitchPanel
- internal UIElement _switchRoot = null;
- internal Dictionary _knownIDs = new Dictionary();
-
- private ContentPresenter _contentPresenter = new ContentPresenter();
- private bool _isMeasured = false;
-
- private DataTemplate _currentTemplate;
-
- #endregion
-
- #region DelaySwitchParams Nested Type
-
- private struct DelaySwitchParams
- {
- public DataTemplate Template;
- public bool BeginAnimation;
- }
-
- #endregion
- }
-}
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/SwitchTemplate.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/SwitchTemplate.cs
deleted file mode 100644
index 01c66fe2..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/SwitchTemplate.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System.Threading;
-using System.Windows;
-using System.Windows.Threading;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public static class SwitchTemplate
- {
- #region ID Attached Property
-
- public static readonly DependencyProperty IDProperty =
- DependencyProperty.RegisterAttached( "ID", typeof( string ), typeof( SwitchTemplate ),
- new FrameworkPropertyMetadata( null,
- new PropertyChangedCallback( SwitchTemplate.OnIDChanged ) ) );
-
- public static string GetID( DependencyObject d )
- {
- return ( string )d.GetValue( SwitchTemplate.IDProperty );
- }
-
- public static void SetID( DependencyObject d, string value )
- {
- d.SetValue( SwitchTemplate.IDProperty, value );
- }
-
- private static void OnIDChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- if( ( e.NewValue == null ) || !( d is UIElement ) )
- return;
-
- SwitchPresenter parentPresenter = VisualTreeHelperEx.FindAncestorByType( d );
- if( parentPresenter != null )
- {
- parentPresenter.RegisterID( e.NewValue as string, d as FrameworkElement );
- }
- else
- {
- d.Dispatcher.BeginInvoke( DispatcherPriority.Loaded,
- ( ThreadStart )delegate()
- {
- parentPresenter = VisualTreeHelperEx.FindAncestorByType( d );
- if( parentPresenter != null )
- {
- parentPresenter.RegisterID( e.NewValue as string, d as FrameworkElement );
- }
- } );
- }
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/WrapPanel.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/WrapPanel.cs
deleted file mode 100644
index d99909ab..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Panels/WrapPanel.cs
+++ /dev/null
@@ -1,284 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Windows;
-using System.Windows.Controls;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-
-namespace Xceed.Wpf.Toolkit.Panels
-{
- public class WrapPanel : AnimationPanel
- {
- #region Orientation Property
-
- public static readonly DependencyProperty OrientationProperty =
- StackPanel.OrientationProperty.AddOwner( typeof( WrapPanel ),
- new FrameworkPropertyMetadata( Orientation.Horizontal,
- new PropertyChangedCallback( WrapPanel.OnOrientationChanged ) ) );
-
- public Orientation Orientation
- {
- get
- {
- return _orientation;
- }
- set
- {
- base.SetValue( WrapPanel.OrientationProperty, value );
- }
- }
-
- private static void OnOrientationChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- WrapPanel panel = ( WrapPanel )d;
- panel._orientation = ( Orientation )e.NewValue;
- panel.InvalidateMeasure();
- }
-
- private Orientation _orientation;
-
- #endregion
-
- #region ItemWidth Property
-
- public static readonly DependencyProperty ItemWidthProperty =
- DependencyProperty.Register( "ItemWidth", typeof( double ), typeof( WrapPanel ),
- new FrameworkPropertyMetadata( double.NaN,
- new PropertyChangedCallback( WrapPanel.OnInvalidateMeasure ) ), new ValidateValueCallback( WrapPanel.IsWidthHeightValid ) );
-
- [TypeConverter( typeof( LengthConverter ) )]
- public double ItemWidth
- {
- get
- {
- return ( double )base.GetValue( WrapPanel.ItemWidthProperty );
- }
- set
- {
- base.SetValue( WrapPanel.ItemWidthProperty, value );
- }
- }
-
- #endregion
-
- #region ItemHeight Property
-
- public static readonly DependencyProperty ItemHeightProperty =
- DependencyProperty.Register( "ItemHeight", typeof( double ), typeof( WrapPanel ),
- new FrameworkPropertyMetadata( double.NaN,
- new PropertyChangedCallback( WrapPanel.OnInvalidateMeasure ) ), new ValidateValueCallback( WrapPanel.IsWidthHeightValid ) );
-
- [TypeConverter( typeof( LengthConverter ) )]
- public double ItemHeight
- {
- get
- {
- return ( double )base.GetValue( WrapPanel.ItemHeightProperty );
- }
- set
- {
- base.SetValue( WrapPanel.ItemHeightProperty, value );
- }
- }
-
- #endregion
-
- #region IsChildOrderReversed Property
-
- public static readonly DependencyProperty IsStackReversedProperty =
- DependencyProperty.Register( "IsChildOrderReversed", typeof( bool ), typeof( WrapPanel ),
- new FrameworkPropertyMetadata( false,
- new PropertyChangedCallback( WrapPanel.OnInvalidateMeasure ) ) );
-
- public bool IsChildOrderReversed
- {
- get
- {
- return ( bool )this.GetValue( WrapPanel.IsStackReversedProperty );
- }
- set
- {
- this.SetValue( WrapPanel.IsStackReversedProperty, value );
- }
- }
-
- #endregion
-
- protected override Size MeasureChildrenOverride( UIElementCollection children, Size constraint )
- {
- double desiredExtent = 0;
- double desiredStack = 0;
-
- bool isHorizontal = ( this.Orientation == Orientation.Horizontal );
- double constraintExtent = ( isHorizontal ? constraint.Width : constraint.Height );
-
- double itemWidth = ItemWidth;
- double itemHeight = ItemHeight;
- double itemExtent = ( isHorizontal ? itemWidth : itemHeight );
-
- bool hasExplicitItemWidth = !double.IsNaN( itemWidth );
- bool hasExplicitItemHeight = !double.IsNaN( itemHeight );
- bool useItemExtent = ( isHorizontal ? hasExplicitItemWidth : hasExplicitItemHeight );
-
- double lineExtent = 0;
- double lineStack = 0;
-
- Size childConstraint = new Size( ( hasExplicitItemWidth ? itemWidth : constraint.Width ),
- ( hasExplicitItemHeight ? itemHeight : constraint.Height ) );
-
- bool isReversed = this.IsChildOrderReversed;
- int from = isReversed ? children.Count - 1 : 0;
- int to = isReversed ? 0 : children.Count - 1;
- int step = isReversed ? -1 : 1;
-
- for( int i = from, pass = 0; pass < children.Count; i += step, pass++ )
- {
- UIElement child = children[ i ] as UIElement;
-
- child.Measure( childConstraint );
-
- double childExtent = isHorizontal
- ? ( hasExplicitItemWidth ? itemWidth : child.DesiredSize.Width )
- : ( hasExplicitItemHeight ? itemHeight : child.DesiredSize.Height );
- double childStack = isHorizontal
- ? ( hasExplicitItemHeight ? itemHeight : child.DesiredSize.Height )
- : ( hasExplicitItemWidth ? itemWidth : child.DesiredSize.Width );
-
- if( lineExtent + childExtent > constraintExtent )
- {
- desiredExtent = Math.Max( lineExtent, desiredExtent );
- desiredStack += lineStack;
- lineExtent = childExtent;
- lineStack = childStack;
-
- if( childExtent > constraintExtent )
- {
- desiredExtent = Math.Max( childExtent, desiredExtent );
- desiredStack += childStack;
- lineExtent = 0;
- lineStack = 0;
- }
- }
- else
- {
- lineExtent += childExtent;
- lineStack = Math.Max( childStack, lineStack );
- }
- }
-
- desiredExtent = Math.Max( lineExtent, desiredExtent );
- desiredStack += lineStack;
-
- return isHorizontal
- ? new Size( desiredExtent, desiredStack )
- : new Size( desiredStack, desiredExtent );
- }
-
- protected override Size ArrangeChildrenOverride( UIElementCollection children, Size finalSize )
- {
- bool isHorizontal = ( this.Orientation == Orientation.Horizontal );
- double finalExtent = ( isHorizontal ? finalSize.Width : finalSize.Height );
-
- double itemWidth = this.ItemWidth;
- double itemHeight = this.ItemHeight;
- double itemExtent = ( isHorizontal ? itemWidth : itemHeight );
-
- bool hasExplicitItemWidth = !double.IsNaN( itemWidth );
- bool hasExplicitItemHeight = !double.IsNaN( itemHeight );
- bool useItemExtent = ( isHorizontal ? hasExplicitItemWidth : hasExplicitItemHeight );
-
- double lineExtent = 0;
- double lineStack = 0;
- double lineStackSum = 0;
-
- int from = this.IsChildOrderReversed ? children.Count - 1 : 0;
- int to = this.IsChildOrderReversed ? 0 : children.Count - 1;
- int step = this.IsChildOrderReversed ? -1 : 1;
-
- Collection childrenInLine = new Collection();
-
- for( int i = from, pass = 0; pass < children.Count; i += step, pass++ )
- {
- UIElement child = children[ i ] as UIElement;
-
- double childExtent = isHorizontal
- ? ( hasExplicitItemWidth ? itemWidth : child.DesiredSize.Width )
- : ( hasExplicitItemHeight ? itemHeight : child.DesiredSize.Height );
- double childStack = isHorizontal
- ? ( hasExplicitItemHeight ? itemHeight : child.DesiredSize.Height )
- : ( hasExplicitItemWidth ? itemWidth : child.DesiredSize.Width );
-
- if( lineExtent + childExtent > finalExtent )
- {
- this.ArrangeLineOfChildren( childrenInLine, isHorizontal, lineStack, lineStackSum, itemExtent, useItemExtent );
-
- lineStackSum += lineStack;
- lineExtent = childExtent;
-
- if( childExtent > finalExtent )
- {
- childrenInLine.Add( child );
- this.ArrangeLineOfChildren( childrenInLine, isHorizontal, childStack, lineStackSum, itemExtent, useItemExtent );
- lineStackSum += childStack;
- lineExtent = 0;
- }
- childrenInLine.Add( child );
- }
- else
- {
- childrenInLine.Add( child );
- lineExtent += childExtent;
- lineStack = Math.Max( childStack, lineStack );
- }
- }
-
- if( childrenInLine.Count > 0 )
- {
- this.ArrangeLineOfChildren( childrenInLine, isHorizontal, lineStack, lineStackSum, itemExtent, useItemExtent );
- }
-
- return finalSize;
- }
-
- private void ArrangeLineOfChildren( Collection children, bool isHorizontal, double lineStack, double lineStackSum, double itemExtent, bool useItemExtent )
- {
- double extent = 0;
- foreach( UIElement child in children )
- {
- double childExtent = ( isHorizontal ? child.DesiredSize.Width : child.DesiredSize.Height );
- double elementExtent = ( useItemExtent ? itemExtent : childExtent );
- this.ArrangeChild( child, isHorizontal ? new Rect( extent, lineStackSum, elementExtent, lineStack )
- : new Rect( lineStackSum, extent, lineStack, elementExtent ) );
- extent += elementExtent;
- }
- children.Clear();
- }
-
- private static void OnInvalidateMeasure( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ( ( AnimationPanel )d ).InvalidateMeasure();
- }
-
- private static bool IsWidthHeightValid( object value )
- {
- double num = ( double )value;
- return ( DoubleHelper.IsNaN( num ) || ( ( num >= 0d ) && !double.IsPositiveInfinity( num ) ) );
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Pie/Implementation/Pie.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Pie/Implementation/Pie.cs
deleted file mode 100644
index 499ebdde..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Pie/Implementation/Pie.cs
+++ /dev/null
@@ -1,628 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Specialized;
-using System.Windows;
-using System.Windows.Media;
-using Xceed.Wpf.Toolkit.Primitives;
-using Xceed.Wpf.Toolkit.Core;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-
-namespace Xceed.Wpf.Toolkit
-{
- public sealed class Pie : ShapeBase
- {
- #region Constructors
-
- static Pie()
- {
- DefaultStyleKeyProperty.OverrideMetadata( typeof( Pie ), new FrameworkPropertyMetadata( typeof( Pie ) ) );
- // The default stretch mode of Pie is Fill
- Pie.StretchProperty.OverrideMetadata( typeof( Pie ), new FrameworkPropertyMetadata( Stretch.Fill ) );
- Pie.StrokeLineJoinProperty.OverrideMetadata( typeof( Pie ), new FrameworkPropertyMetadata( PenLineJoin.Round ) );
- }
-
- public Pie()
- : base()
- {
- }
-
- #endregion
-
- #region EndAngle Property
-
- public static readonly DependencyProperty EndAngleProperty =
- DependencyProperty.Register( "EndAngle", typeof( double ), typeof( Pie ),
- new FrameworkPropertyMetadata( 360d, FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
- new PropertyChangedCallback( Pie.OnEndAngleChanged ), new CoerceValueCallback( Pie.CoerceEndAngleValue ) ) );
-
- public double EndAngle
- {
- get
- {
- return ( double )this.GetValue( Pie.EndAngleProperty );
- }
- set
- {
- this.SetValue( Pie.EndAngleProperty, value );
- }
- }
-
- private static void OnEndAngleChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ( ( Pie )d ).OnEndAngleChanged( e );
- }
-
- private void OnEndAngleChanged( DependencyPropertyChangedEventArgs e )
- {
- // avoid re-entrancy
- if( this.IsUpdatingEndAngle )
- return;
-
- if( !( this.IsUpdatingStartAngle || this.IsUpdatingSlice || this.IsUpdatingSweepDirection ) )
- {
- switch( this.Mode )
- {
- case PieMode.Slice:
- throw new InvalidOperationException( ErrorMessages.GetMessage( "EndAngleCannotBeSetDirectlyInSlice" ) );
- }
- }
-
- // EndAngle, Slice, and SweepDirection are interrelated and must be kept in sync
- this.IsUpdatingEndAngle = true;
- try
- {
- if( this.Mode == PieMode.EndAngle )
- {
- this.CoerceValue( Pie.SweepDirectionProperty );
- }
- this.CoerceValue( Pie.SliceProperty );
- }
- finally
- {
- this.IsUpdatingEndAngle = false;
- }
- }
-
- private static object CoerceEndAngleValue( DependencyObject d, object value )
- {
- // keep EndAngle in sync with Slice and SweepDirection
- Pie pie = ( Pie )d;
- if( pie.IsUpdatingSlice || pie.IsUpdatingSweepDirection
- || ( pie.IsUpdatingStartAngle && pie.Mode == PieMode.Slice ) )
- {
- double newValue = pie.StartAngle + ( ( pie.SweepDirection == SweepDirection.Clockwise ) ? 1.0 : -1.0 ) * pie.Slice * 360;
- if( !DoubleHelper.AreVirtuallyEqual( ( double )value, newValue ) )
- {
- value = newValue;
- }
- }
- return value;
- }
-
- #endregion
-
- #region Mode Property
-
- public static readonly DependencyProperty ModeProperty =
- DependencyProperty.Register( "Mode", typeof( PieMode ), typeof( Pie ),
- new FrameworkPropertyMetadata( PieMode.Manual, new PropertyChangedCallback( Pie.OnModeChanged ) ) );
-
- public PieMode Mode
- {
- get
- {
- return ( PieMode )this.GetValue( Pie.ModeProperty );
- }
- set
- {
- this.SetValue( Pie.ModeProperty, value );
- }
- }
-
- private static void OnModeChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ( ( Pie )d ).OnModeChanged( e );
- }
-
- private void OnModeChanged( DependencyPropertyChangedEventArgs e )
- {
- // disallow reentrancy
- if( this.IsUpdatingMode )
- return;
-
- this.IsUpdatingMode = true;
- try
- {
- if( this.Mode == PieMode.EndAngle )
- {
- this.CoerceValue( Pie.SweepDirectionProperty );
- }
- }
- finally
- {
- this.IsUpdatingMode = false;
- }
- }
-
- #endregion
-
- #region Slice Property
-
- public static readonly DependencyProperty SliceProperty =
- DependencyProperty.Register( "Slice", typeof( double ), typeof( Pie ),
- new FrameworkPropertyMetadata( 1d, FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
- new PropertyChangedCallback( Pie.OnSliceChanged ), new CoerceValueCallback( Pie.CoerceSliceValue ) ), new ValidateValueCallback( Pie.ValidateSlice ) );
-
- public double Slice
- {
- get
- {
- return ( double )this.GetValue( Pie.SliceProperty );
- }
- set
- {
- this.SetValue( Pie.SliceProperty, value );
- }
- }
-
- private static void OnSliceChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ( ( Pie )d ).OnSliceChanged( e );
- }
-
- private void OnSliceChanged( DependencyPropertyChangedEventArgs e )
- {
- // avoid re-entrancy
- if( this.IsUpdatingSlice )
- return;
-
- if( !( this.IsUpdatingStartAngle || this.IsUpdatingEndAngle || this.IsUpdatingSweepDirection ) )
- {
- if( this.Mode == PieMode.EndAngle )
- throw new InvalidOperationException( ErrorMessages.GetMessage( "SliceCannotBeSetDirectlyInEndAngle" ) );
- }
-
- // EndAngle and Slice are interrelated and must be kept in sync
- this.IsUpdatingSlice = true;
- try
- {
- if( !( this.IsUpdatingStartAngle || this.IsUpdatingEndAngle || ( this.Mode == PieMode.Manual && this.IsUpdatingSweepDirection ) ) )
- {
- this.CoerceValue( Pie.EndAngleProperty );
- }
- }
- finally
- {
- this.IsUpdatingSlice = false;
- }
- }
-
- private static object CoerceSliceValue( DependencyObject d, object value )
- {
- // keep Slice in sync with EndAngle, StartAngle, and SweepDirection
- Pie pie = ( Pie )d;
- if( pie.IsUpdatingEndAngle || pie.IsUpdatingStartAngle || pie.IsUpdatingSweepDirection )
- {
-
- double slice = Math.Max( -360.0, Math.Min( 360.0, ( pie.EndAngle - pie.StartAngle ) ) ) / ( ( pie.SweepDirection == SweepDirection.Clockwise ) ? 360.0 : -360.0 );
- double newValue = DoubleHelper.AreVirtuallyEqual( slice, 0 ) ? 0 : ( slice < 0 ) ? slice + 1 : slice;
- if( !DoubleHelper.AreVirtuallyEqual( ( double )value, newValue ) )
- {
- value = newValue;
- }
- }
- return value;
- }
-
- private static bool ValidateSlice( object value )
- {
- double newValue = ( double )value;
- if( newValue < 0 || newValue > 1 || DoubleHelper.IsNaN( newValue ) )
- throw new ArgumentException( ErrorMessages.GetMessage( "SliceOOR" ) );
-
- return true;
- }
-
- #endregion
-
- #region StartAngle Property
-
- public static readonly DependencyProperty StartAngleProperty =
- DependencyProperty.Register( "StartAngle", typeof( double ), typeof( Pie ),
- new FrameworkPropertyMetadata( 360d, FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
- new PropertyChangedCallback( Pie.OnStartAngleChanged ) ) );
-
- public double StartAngle
- {
- get
- {
- return ( double )this.GetValue( Pie.StartAngleProperty );
- }
- set
- {
- this.SetValue( Pie.StartAngleProperty, value );
- }
- }
-
- private static void OnStartAngleChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ( ( Pie )d ).OnStartAngleChanged( e );
- }
-
- private void OnStartAngleChanged( DependencyPropertyChangedEventArgs e )
- {
- // avoid re-entrancy
- if( this.IsUpdatingStartAngle )
- return;
-
- // StartAngle, Slice, and SweepDirection are interrelated and must be kept in sync
- this.IsUpdatingStartAngle = true;
- try
- {
- switch( Mode )
- {
- case PieMode.Manual:
- this.CoerceValue( Pie.SliceProperty );
- break;
-
- case PieMode.EndAngle:
- this.CoerceValue( Pie.SweepDirectionProperty );
- this.CoerceValue( Pie.SliceProperty );
- break;
-
- case PieMode.Slice:
- this.CoerceValue( Pie.EndAngleProperty );
- break;
- }
- }
- finally
- {
- this.IsUpdatingStartAngle = false;
- }
- }
-
- #endregion
-
- #region SweepDirection Property
-
- public static readonly DependencyProperty SweepDirectionProperty =
- DependencyProperty.Register( "SweepDirection", typeof( SweepDirection ), typeof( Pie ),
- new FrameworkPropertyMetadata( ( SweepDirection )SweepDirection.Clockwise, FrameworkPropertyMetadataOptions.AffectsRender,
- new PropertyChangedCallback( Pie.OnSweepDirectionChanged ), new CoerceValueCallback( Pie.CoerceSweepDirectionValue ) ) );
-
- public SweepDirection SweepDirection
- {
- get
- {
- return ( SweepDirection )this.GetValue( Pie.SweepDirectionProperty );
- }
- set
- {
- this.SetValue( Pie.SweepDirectionProperty, value );
- }
- }
-
- private static void OnSweepDirectionChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- ( ( Pie )d ).OnSweepDirectionChanged( e );
- }
-
- private void OnSweepDirectionChanged( DependencyPropertyChangedEventArgs e )
- {
- // avoid re-entrancy
- if( this.IsUpdatingSweepDirection )
- return;
-
- // EndAngle, Slice, and SweepDirection are interrelated and must be kept in sync
- this.IsUpdatingSweepDirection = true;
- try
- {
- switch( Mode )
- {
- case PieMode.Slice:
- this.CoerceValue( Pie.EndAngleProperty );
- break;
-
- default:
- this.CoerceValue( Pie.SliceProperty );
- break;
- }
- }
- finally
- {
- this.IsUpdatingSweepDirection = false;
- }
- }
-
- private static object CoerceSweepDirectionValue( DependencyObject d, object value )
- {
- // keep SweepDirection in sync with EndAngle and StartAngle
- Pie pie = ( Pie )d;
- if( pie.IsUpdatingEndAngle || pie.IsUpdatingStartAngle || pie.IsUpdatingMode )
- {
- if( DoubleHelper.AreVirtuallyEqual( pie.StartAngle, pie.EndAngle ) )
- {
- // if the values are equal, use previously coerced value
- value = pie.SweepDirection;
- }
- else
- {
- value = ( pie.EndAngle < pie.StartAngle ) ? SweepDirection.Counterclockwise : SweepDirection.Clockwise;
- }
- }
- return value;
- }
-
- #endregion
-
- #region GeometryTransform Property
-
- public override Transform GeometryTransform
- {
- get
- {
- return Transform.Identity;
- }
- }
-
- #endregion
-
- #region RenderedGeometry Property
-
- public override Geometry RenderedGeometry
- {
- get
- {
- // for a Pie, the RenderedGeometry is the same as the DefiningGeometry
- return this.DefiningGeometry;
- }
- }
-
- #endregion
-
- #region DefiningGeometry Protected Property
-
- protected override Geometry DefiningGeometry
- {
- get
- {
- double slice = Slice;
- if( _rect.IsEmpty || slice <= 0 )
- return Geometry.Empty;
-
- if( slice >= 1 )
- return new EllipseGeometry( _rect );
-
- // direction of flow is determined by the SweepDirection property
- double directionalFactor = ( this.SweepDirection == SweepDirection.Clockwise ) ? 1.0 : -1.0;
- double startAngle = StartAngle;
-
- Point pointA = EllipseHelper.PointOfRadialIntersection( _rect, startAngle );
- Point pointB = EllipseHelper.PointOfRadialIntersection( _rect, startAngle + directionalFactor * slice * 360 );
- PathSegmentCollection segments = new PathSegmentCollection();
- segments.Add( new LineSegment( pointA, true ) );
- ArcSegment arc = new ArcSegment();
- arc.Point = pointB;
- arc.Size = new Size( _rect.Width / 2, _rect.Height / 2 );
- arc.IsLargeArc = slice > 0.5;
- arc.SweepDirection = SweepDirection;
- segments.Add( arc );
- PathFigureCollection figures = new PathFigureCollection();
- figures.Add( new PathFigure( RectHelper.Center( _rect ), segments, true ) );
- return new PathGeometry( figures );
- }
- }
-
- #endregion
-
- #region IsUpdatingEndAngle Private Property
-
- private bool IsUpdatingEndAngle
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.IsUpdatingEndAngle ];
- }
- set
- {
- _cacheBits[ ( int )CacheBits.IsUpdatingEndAngle ] = value;
- }
- }
-
- #endregion
-
- #region IsUpdatingMode Private Property
-
- private bool IsUpdatingMode
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.IsUpdatingMode ];
- }
- set
- {
- _cacheBits[ ( int )CacheBits.IsUpdatingMode ] = value;
- }
- }
-
- #endregion
-
- #region IsUpdatingSlice Private Property
-
- private bool IsUpdatingSlice
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.IsUpdatingSlice ];
- }
- set
- {
- _cacheBits[ ( int )CacheBits.IsUpdatingSlice ] = value;
- }
- }
-
- #endregion
-
- #region IsUpdatingStartAngle Private Property
-
- private bool IsUpdatingStartAngle
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.IsUpdatingStartAngle ];
- }
- set
- {
- _cacheBits[ ( int )CacheBits.IsUpdatingStartAngle ] = value;
- }
- }
-
- #endregion
-
- #region IsUpdatingSweepDirection Private Property
-
- private bool IsUpdatingSweepDirection
- {
- get
- {
- return _cacheBits[ ( int )CacheBits.IsUpdatingSweepDirection ];
- }
- set
- {
- _cacheBits[ ( int )CacheBits.IsUpdatingSweepDirection ] = value;
- }
- }
-
- #endregion
-
- internal override Size GetNaturalSize()
- {
- double strokeThickness = this.GetStrokeThickness();
- return new Size( strokeThickness, strokeThickness );
- }
-
- internal override Rect GetDefiningGeometryBounds()
- {
- return _rect;
- }
-
- protected override Size ArrangeOverride( Size finalSize )
- {
- double penThickness = this.GetStrokeThickness();
- double margin = penThickness / 2;
-
- _rect = new Rect( margin, margin,
- Math.Max( 0, finalSize.Width - penThickness ),
- Math.Max( 0, finalSize.Height - penThickness ) );
-
- switch( Stretch )
- {
- case Stretch.None:
- // empty rectangle
- _rect.Width = _rect.Height = 0;
- break;
-
- case Stretch.Fill:
- // already initialized for Fill
- break;
-
- case Stretch.Uniform:
- // largest square that fits in the final size
- if( _rect.Width > _rect.Height )
- {
- _rect.Width = _rect.Height;
- }
- else
- {
- _rect.Height = _rect.Width;
- }
- break;
-
- case Stretch.UniformToFill:
-
- // smallest square that fills the final size
- if( _rect.Width < _rect.Height )
- {
- _rect.Width = _rect.Height;
- }
- else
- {
- _rect.Height = _rect.Width;
- }
- break;
- }
-
- return finalSize;
- }
-
- protected override Size MeasureOverride( Size constraint )
- {
- if( this.Stretch == Stretch.UniformToFill )
- {
- double width = constraint.Width;
- double height = constraint.Height;
-
- if( Double.IsInfinity( width ) && Double.IsInfinity( height ) )
- {
- return this.GetNaturalSize();
- }
- else if( Double.IsInfinity( width ) || Double.IsInfinity( height ) )
- {
- width = Math.Min( width, height );
- }
- else
- {
- width = Math.Max( width, height );
- }
-
- return new Size( width, width );
- }
-
- return this.GetNaturalSize();
- }
-
- protected override void OnRender( DrawingContext drawingContext )
- {
- if( !_rect.IsEmpty )
- {
- Pen pen = this.GetPen();
- drawingContext.DrawGeometry( this.Fill, pen, this.RenderedGeometry );
- }
- }
-
- #region Private Fields
-
- private Rect _rect = Rect.Empty;
- private BitVector32 _cacheBits = new BitVector32( 0 );
-
- #endregion
-
- #region CacheBits Nested Type
-
- private enum CacheBits
- {
- IsUpdatingEndAngle = 0x00000001,
- IsUpdatingMode = 0x00000002,
- IsUpdatingSlice = 0x00000004,
- IsUpdatingStartAngle = 0x00000008,
- IsUpdatingSweepDirection = 0x00000010,
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Pie/Implementation/PieModeEnum.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Pie/Implementation/PieModeEnum.cs
deleted file mode 100644
index 583e4ab5..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Pie/Implementation/PieModeEnum.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-namespace Xceed.Wpf.Toolkit
-{
- public enum PieMode
- {
- Manual,
- EndAngle,
- Slice,
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Pie/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Pie/Themes/Aero2.NormalColor.xaml
deleted file mode 100644
index cd89a90b..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Pie/Themes/Aero2.NormalColor.xaml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Pie/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Pie/Themes/Generic.xaml
deleted file mode 100644
index 65b64557..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Pie/Themes/Generic.xaml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/CachedTextInfo.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/CachedTextInfo.cs
deleted file mode 100644
index d72aaa87..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/CachedTextInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows.Controls;
-
-namespace Xceed.Wpf.Toolkit.Primitives
-{
- internal class CachedTextInfo : ICloneable
- {
- private CachedTextInfo( string text, int caretIndex, int selectionStart, int selectionLength )
- {
- this.Text = text;
- this.CaretIndex = caretIndex;
- this.SelectionStart = selectionStart;
- this.SelectionLength = selectionLength;
- }
-
- public CachedTextInfo( TextBox textBox )
- : this( textBox.Text, textBox.CaretIndex, textBox.SelectionStart, textBox.SelectionLength )
- {
- }
-
- public string Text { get; private set; }
- public int CaretIndex { get; private set; }
- public int SelectionStart { get; private set; }
- public int SelectionLength { get; private set; }
-
- #region ICloneable Members
-
- public object Clone()
- {
- return new CachedTextInfo( this.Text, this.CaretIndex, this.SelectionStart, this.SelectionLength );
- }
-
- #endregion
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/DateTimePickerBase.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/DateTimePickerBase.cs
deleted file mode 100644
index 7e5a907a..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/DateTimePickerBase.cs
+++ /dev/null
@@ -1,192 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-using System.Windows.Controls.Primitives;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-#if VS2008
-using Microsoft.Windows.Controls;
-using Microsoft.Windows.Controls.Primitives;
-#endif
-
-namespace Xceed.Wpf.Toolkit.Primitives
-{
- [TemplatePart( Name = PART_Popup, Type = typeof( Popup ) )]
- public class DateTimePickerBase : DateTimeUpDown
- {
- private const string PART_Popup = "PART_Popup";
-
- #region Members
-
- private Popup _popup;
- private DateTime? _initialValue;
-
- #endregion //Members
-
- #region Properties
-
- #region IsOpen
-
- public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register( "IsOpen", typeof( bool ), typeof( DateTimePickerBase ), new UIPropertyMetadata( false, OnIsOpenChanged ) );
- public bool IsOpen
- {
- get
- {
- return ( bool )GetValue( IsOpenProperty );
- }
- set
- {
- SetValue( IsOpenProperty, value );
- }
- }
-
- private static void OnIsOpenChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
- {
- DateTimePickerBase dateTimePicker = ( DateTimePickerBase )d;
- if( dateTimePicker != null )
- dateTimePicker.OnIsOpenChanged( ( bool )e.OldValue, ( bool )e.NewValue );
- }
-
- protected virtual void OnIsOpenChanged( bool oldValue, bool newValue )
- {
- if( newValue )
- _initialValue = Value;
- }
-
- #endregion //IsOpen
-
- #region ShowDropDownButton
-
- public static readonly DependencyProperty ShowDropDownButtonProperty = DependencyProperty.Register( "ShowDropDownButton", typeof( bool ), typeof( DateTimePickerBase ), new UIPropertyMetadata( true ) );
- public bool ShowDropDownButton
- {
- get
- {
- return ( bool )GetValue( ShowDropDownButtonProperty );
- }
- set
- {
- SetValue( ShowDropDownButtonProperty, value );
- }
- }
-
- #endregion //ShowDropDownButton
-
- #endregion //Properties
-
- #region Constructors
-
- public DateTimePickerBase()
- {
- AddHandler( UIElement.KeyDownEvent, new KeyEventHandler( HandleKeyDown ), true );
- Mouse.AddPreviewMouseDownOutsideCapturedElementHandler( this, OnMouseDownOutsideCapturedElement );
- }
-
- #endregion //Constructors
-
- #region Base Class Overrides
-
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
-
- if( _popup != null )
- {
- _popup.Opened -= this.Popup_Opened;
- }
-
- _popup = this.GetTemplateChild( PART_Popup ) as Popup;
-
- if( _popup != null )
- {
- _popup.Opened += this.Popup_Opened;
- }
- }
-
- #endregion //Base Class Overrides
-
- #region Event Handlers
-
- protected virtual void HandleKeyDown( object sender, KeyEventArgs e )
- {
- if( !IsOpen )
- {
- if( KeyboardUtilities.IsKeyModifyingPopupState( e ) )
- {
- IsOpen = true;
- // Calendar will get focus in Calendar_Loaded().
- e.Handled = true;
- }
- }
- else
- {
- if( KeyboardUtilities.IsKeyModifyingPopupState( e ) )
- {
- ClosePopup( true );
- e.Handled = true;
- }
- else if( e.Key == Key.Enter )
- {
- ClosePopup( true );
- e.Handled = true;
- }
- else if( e.Key == Key.Escape )
- {
- // Avoid setting the "Value" property when no change has occurred.
- // The original value may not be a local value. Setting
- // it, even with the same value, will override a one-way binding.
- if( !object.Equals( this.Value, _initialValue ) )
- {
- this.Value = _initialValue;
- }
- ClosePopup( true );
- e.Handled = true;
- }
- }
- }
-
- private void OnMouseDownOutsideCapturedElement( object sender, MouseButtonEventArgs e )
- {
- ClosePopup( true );
- }
-
- protected virtual void Popup_Opened( object sender, EventArgs e )
- {
- }
-
- #endregion //Event Handlers
-
- #region Methods
-
- protected void ClosePopup( bool isFocusOnTextBox )
- {
- if( IsOpen )
- {
- IsOpen = false;
- }
-
- ReleaseMouseCapture();
-
- if( isFocusOnTextBox && ( TextBox != null ) )
- TextBox.Focus();
- }
-
- #endregion //Methods
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/DateTimeUpDownBase.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/DateTimeUpDownBase.cs
deleted file mode 100644
index 5c98eac3..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/DateTimeUpDownBase.cs
+++ /dev/null
@@ -1,385 +0,0 @@
-/*************************************************************************************
-
- Extended WPF Toolkit
-
- Copyright (C) 2007-2013 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
-
- For more features, controls, and fast professional support,
- pick up the Plus Edition at http://xceed.com/wpf_toolkit
-
- Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
-
- ***********************************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Windows.Data;
-using System.Windows.Input;
-using System.Windows.Threading;
-using Xceed.Wpf.Toolkit.Primitives;
-
-namespace Xceed.Wpf.Toolkit.Primitives
-{
- public abstract class DateTimeUpDownBase : UpDownBase
- {
- #region Members
-
- internal List _dateTimeInfoList = new List();
- internal DateTimeInfo _selectedDateTimeInfo;
- internal bool _fireSelectionChangedEvent = true;
- internal bool _processTextChanged = true;
-
- #endregion //Members
-
- #region Properties
-
- #region CurrentDateTimePart
-
- public static readonly DependencyProperty CurrentDateTimePartProperty = DependencyProperty.Register( "CurrentDateTimePart", typeof( DateTimePart )
- , typeof( DateTimeUpDownBase ), new UIPropertyMetadata( DateTimePart.Other, OnCurrentDateTimePartChanged ) );
- public DateTimePart CurrentDateTimePart
- {
- get
- {
- return (DateTimePart)GetValue( CurrentDateTimePartProperty );
- }
- set
- {
- SetValue( CurrentDateTimePartProperty, value );
- }
- }
-
- private static void OnCurrentDateTimePartChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- DateTimeUpDownBase dateTimeUpDownBase = o as DateTimeUpDownBase;
- if( dateTimeUpDownBase != null )
- dateTimeUpDownBase.OnCurrentDateTimePartChanged( (DateTimePart)e.OldValue, (DateTimePart)e.NewValue );
- }
-
- protected virtual void OnCurrentDateTimePartChanged( DateTimePart oldValue, DateTimePart newValue )
- {
- this.Select( this.GetDateTimeInfo( newValue ) );
- }
-
- #endregion //CurrentDateTimePart
-
- #region Step
-
- public static readonly DependencyProperty StepProperty = DependencyProperty.Register( "Step", typeof( int )
- , typeof( DateTimeUpDownBase ), new UIPropertyMetadata( 1, OnStepChanged ) );
- public int Step
- {
- get
- {
- return (int)GetValue( StepProperty );
- }
- set
- {
- SetValue( StepProperty, value );
- }
- }
-
- private static void OnStepChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
- {
- var dateTimeUpDownBase = o as DateTimeUpDownBase