diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs
index 94a1dcce..ce1db48a 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 = "2.2";
+ public const string BaseVersion = "2.3";
[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 7a63343e..ad4106da 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml
@@ -813,10 +813,9 @@
-
-
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs
index 94a1dcce..ce1db48a 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs
@@ -21,7 +21,7 @@
internal static class _XceedVersionInfo
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
- public const string BaseVersion = "2.2";
+ public const string BaseVersion = "2.3";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml
index eafa0cdf..2ee472f8 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml
@@ -855,8 +855,10 @@
-
-
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs
index 94a1dcce..ce1db48a 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs
@@ -21,7 +21,7 @@
internal static class _XceedVersionInfo
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
- public const string BaseVersion = "2.2";
+ public const string BaseVersion = "2.3";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml
index ba980a28..63443a48 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml
@@ -201,7 +201,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml
index 3e202171..2c85e339 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml
@@ -529,8 +529,7 @@
+ SampleType="{x:Type samples:TimeSpan.Views.TimeSpanView}"/>
+ SampleType="{x:Type samples:RangeSlider.Views.RangeSliderView}"/>
+
@@ -616,8 +617,7 @@
+ IsPlusOnlyFeature="True">
text/microsoft-resx
- 2.0
+ 2.3
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/DateTime/Views/DateTimeView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/DateTime/Views/DateTimeView.xaml
index a4220619..6af5c431 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/DateTime/Views/DateTimeView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/DateTime/Views/DateTimeView.xaml
@@ -67,6 +67,7 @@
+
@@ -87,6 +88,8 @@
+
+
@@ -116,6 +119,7 @@
AutoCloseCalendar="{Binding IsChecked, ElementName=_autoCloseCalendar}"
ClipValueToMinMax="{Binding IsChecked, ElementName=_clipValueToMinMax}"
TimePickerVisibility="{Binding Source={x:Reference _timePickerVisibility}, Path=SelectedItem}"
+ TimePickerShowButtonSpinner="{Binding IsChecked, ElementName=_timePickerShowButtonSpinner}"
Minimum="{Binding Value, ElementName=_minimum}"
Maximum="{Binding Value, ElementName=_maximum}"/>
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Numeric/Views/NumericView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Numeric/Views/NumericView.xaml
index 8a447fa8..e427b107 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Numeric/Views/NumericView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Numeric/Views/NumericView.xaml
@@ -109,6 +109,7 @@
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/RangeSlider/Views/RangeSliderView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/RangeSlider/Views/RangeSliderView.xaml
index 75aafa0f..80358c2e 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/RangeSlider/Views/RangeSliderView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/RangeSlider/Views/RangeSliderView.xaml
@@ -439,7 +439,7 @@
- The RangeSlider control let you sets a range with 2 slider thumbs. The lower limit is marked with the right side of the left thumb while the higher limit is marked with the left side of the right thumb.
+ The RangeSlider control lets you set a range with 2 slider thumbs. The lower limit is marked with the right side of the left thumb while the higher limit is marked with the left side of the right thumb.
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Theming/Views/ThemingExtendedToolkitView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Theming/Views/ThemingExtendedToolkitView.xaml
index cc62fee6..d6ac1e07 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Theming/Views/ThemingExtendedToolkitView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Theming/Views/ThemingExtendedToolkitView.xaml
@@ -59,6 +59,7 @@
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/OpenSourceImages/ToggleSwitch.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/OpenSourceImages/ToggleSwitch.png
new file mode 100644
index 00000000..502bc2e3
Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/OpenSourceImages/ToggleSwitch.png differ
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Views/ToggleSwitchView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Views/ToggleSwitchView.xaml
new file mode 100644
index 00000000..2da0f101
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Views/ToggleSwitchView.xaml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+ The ToggleSwitch control is a fully customizable on/off switch that can be used to enhance the UI experience.
+
+
+ This feature is only available in the "Plus" version.
+
+
+ Click here for more details about Xceed Extended WPF Toolkit Plus.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Views/ToggleSwitchView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Views/ToggleSwitchView.xaml.cs
new file mode 100644
index 00000000..8e383128
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Views/ToggleSwitchView.xaml.cs
@@ -0,0 +1,38 @@
+/*************************************************************************************
+
+ Extended WPF Toolkit
+
+ Copyright (C) 2007-2014 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.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Windows.Controls;
+using System;
+using System.Windows;
+using System.Windows.Media;
+using System.Windows.Documents;
+
+namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.ToggleSwitch.Views
+{
+ ///
+ /// Interaction logic for ToggleSwitchView.xaml
+ ///
+ public partial class ToggleSwitchView : DemoView
+ {
+ public ToggleSwitchView()
+ {
+ InitializeComponent();
+ }
+ }
+}
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 ad84fe54..69a3d3db 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
@@ -320,6 +320,9 @@
TimeSpanView.xaml
+
+ ToggleSwitchView.xaml
+
@@ -623,6 +626,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -1030,13 +1037,20 @@
-
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs
index 94a1dcce..ce1db48a 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs
@@ -21,7 +21,7 @@
internal static class _XceedVersionInfo
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
- public const string BaseVersion = "2.2";
+ public const string BaseVersion = "2.3";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs
index cd3ae99c..20907e41 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs
@@ -100,7 +100,12 @@ namespace Xceed.Wpf.Toolkit
if( newValue != null )
{
foreach( var item in newValue )
- Items.Add( item );
+ {
+ if( item != null )
+ {
+ Items.Add( item );
+ }
+ }
}
}
@@ -368,7 +373,10 @@ namespace Xceed.Wpf.Toolkit
if( ItemsSourceType != null )
{
ConstructorInfo constructor = ItemsSourceType.GetConstructor( Type.EmptyTypes );
- list = ( IList )constructor.Invoke( null );
+ if( constructor != null )
+ {
+ list = ( IList )constructor.Invoke( null );
+ }
}
return list;
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlButton.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlButton.cs
new file mode 100644
index 00000000..d505604a
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlButton.cs
@@ -0,0 +1,129 @@
+/*************************************************************************************
+
+ 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;
+using System.Windows.Controls;
+
+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 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( IList ), typeof( CollectionControlButton ), new UIPropertyMetadata( null ) );
+ public IList ItemsSource
+ {
+ get
+ {
+ return ( IList )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 Methods
+
+ private void CollectionControlButton_Click( object sender, RoutedEventArgs e )
+ {
+ CollectionControlDialog collectionControlDialog = new CollectionControlDialog();
+ collectionControlDialog.ItemsSource = this.ItemsSource;
+ collectionControlDialog.NewItemTypes = this.NewItemTypes;
+ collectionControlDialog.ItemsSourceType = this.ItemsSourceType;
+ collectionControlDialog.IsReadOnly = this.IsReadOnly;
+ collectionControlDialog.ShowDialog();
+ }
+
+ #endregion
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/PrimitiveTypeCollectionControl.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/PrimitiveTypeCollectionControl.cs
index 10cb60cc..42ff42e8 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/PrimitiveTypeCollectionControl.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/PrimitiveTypeCollectionControl.cs
@@ -94,7 +94,7 @@ namespace Xceed.Wpf.Toolkit
if( ItemsSourceType == null )
ItemsSourceType = newValue.GetType();
- if( ItemType == null )
+ if( ItemType == null && newValue.GetType().ContainsGenericParameters )
ItemType = newValue.GetType().GetGenericArguments()[ 0 ];
SetText( newValue );
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Aero2.NormalColor.xaml
index d3a66df0..85272fb1 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Aero2.NormalColor.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Aero2.NormalColor.xaml
@@ -20,6 +20,7 @@
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
xmlns:colconv="clr-namespace:Xceed.Wpf.Toolkit.Converters"
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
+ xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"
xmlns:pg="clr-namespace:Xceed.Wpf.Toolkit.PropertyGrid">
@@ -138,7 +139,7 @@
-
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml
index 8ec5a71e..e64b51c4 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml
@@ -19,6 +19,7 @@
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
xmlns:colconv="clr-namespace:Xceed.Wpf.Toolkit.Converters"
+ xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"
xmlns:pg="clr-namespace:Xceed.Wpf.Toolkit.PropertyGrid">
@@ -137,7 +138,7 @@
-
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/CornerRadiusToDoubleConverter.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/CornerRadiusToDoubleConverter.cs
new file mode 100644
index 00000000..1eb772bc
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/CornerRadiusToDoubleConverter.cs
@@ -0,0 +1,48 @@
+/*************************************************************************************
+
+ 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/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessToDoubleConverter.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessToDoubleConverter.cs
new file mode 100644
index 00000000..f78807d0
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessToDoubleConverter.cs
@@ -0,0 +1,48 @@
+/*************************************************************************************
+
+ 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/Src/Xceed.Wpf.Toolkit/Core/Primitives/MouseWheelActiveTriggerEnum.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/MouseWheelActiveTriggerEnum.cs
index 44dd2d6c..1e122a0c 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/MouseWheelActiveTriggerEnum.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/MouseWheelActiveTriggerEnum.cs
@@ -26,6 +26,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
///
public enum MouseWheelActiveTrigger
{
+ Focused,
FocusedMouseOver,
MouseOver,
Disabled
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/Selector.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/Selector.cs
index 6abd3c68..d4ef3b0a 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/Selector.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/Selector.cs
@@ -94,7 +94,15 @@ namespace Xceed.Wpf.Toolkit.Primitives
private static void OnDelimiterChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
{
- ( ( Selector )o ).UpdateSelectedValue();
+ ( (Selector)o ).OnSelectedItemChanged( (string)e.OldValue, (string)e.NewValue );
+ }
+
+ protected virtual void OnSelectedItemChanged( string oldValue, string newValue )
+ {
+ if( !this.IsInitialized )
+ return;
+
+ this.UpdateSelectedValue();
}
#endregion
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/UpDownBase.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/UpDownBase.cs
index 3b509670..a3a57c09 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/UpDownBase.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/UpDownBase.cs
@@ -47,6 +47,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
/// Flags if the Text and Value properties are in the process of being sync'd
///
private bool _isSyncingTextAndValueProperties;
+ private bool _isSpinnerCaptured;
#endregion //Members
@@ -375,6 +376,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
internal UpDownBase()
{
+ this.AddHandler( Mouse.PreviewMouseDownOutsideCapturedElementEvent, new RoutedEventHandler( this.HandleClickOutsideOfControl ), true );
}
#endregion //Constructors
@@ -397,6 +399,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
if( TextBox != null )
{
TextBox.Text = Text;
+ TextBox.GotFocus += new RoutedEventHandler( TextBox_GotFocus );
TextBox.LostFocus += new RoutedEventHandler( TextBox_LostFocus );
TextBox.TextChanged += new TextChangedEventHandler( TextBox_TextChanged );
}
@@ -452,14 +455,24 @@ namespace Xceed.Wpf.Toolkit.Primitives
#region Event Handlers
+ private void HandleClickOutsideOfControl( object sender, RoutedEventArgs e )
+ {
+ if( _isSpinnerCaptured )
+ {
+ this.Spinner.ReleaseMouseCapture();
+ _isSpinnerCaptured = false;
+ }
+ }
+
private void OnSpinnerSpin( object sender, SpinEventArgs e )
{
if( AllowSpin && !IsReadOnly )
{
var activeTrigger = this.MouseWheelActiveTrigger;
bool spin = !e.UsingMouseWheel;
- spin |= (activeTrigger == MouseWheelActiveTrigger.MouseOver);
+ spin |= ( activeTrigger == MouseWheelActiveTrigger.MouseOver );
spin |= ( TextBox.IsFocused && ( activeTrigger == MouseWheelActiveTrigger.FocusedMouseOver ) );
+ spin |= ( TextBox.IsFocused && ( activeTrigger == MouseWheelActiveTrigger.Focused ) && (Mouse.Captured != null) );
if( spin )
{
@@ -566,6 +579,15 @@ namespace Xceed.Wpf.Toolkit.Primitives
}
}
+ private void TextBox_GotFocus( object sender, RoutedEventArgs e )
+ {
+ if( ( this.MouseWheelActiveTrigger == Primitives.MouseWheelActiveTrigger.Focused ) && !_isSpinnerCaptured )
+ {
+ _isSpinnerCaptured = true;
+ Mouse.Capture( this.Spinner );
+ }
+ }
+
private void TextBox_LostFocus( object sender, RoutedEventArgs e )
{
CommitInput();
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/WindowContainer.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/WindowContainer.cs
index e123d970..33831475 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/WindowContainer.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/WindowContainer.cs
@@ -52,6 +52,10 @@ namespace Xceed.Wpf.Toolkit.Primitives
void WindowContainer_Loaded( object sender, RoutedEventArgs e )
{
+ foreach( WindowControl window in this.Children )
+ {
+ window.SetIsActiveInternal( false );
+ }
this.SetNextActiveWindow( null );
}
@@ -309,7 +313,9 @@ namespace Xceed.Wpf.Toolkit.Primitives
if( ( windowControl.ActualWidth != 0 ) && ( windowControl.ActualHeight != 0 ) )
{
windowControl.Left = ( this.ActualWidth - windowControl.ActualWidth ) / 2.0;
+ windowControl.Left += (windowControl.Margin.Left - windowControl.Margin.Right);
windowControl.Top = ( this.ActualHeight - windowControl.ActualHeight ) / 2.0;
+ windowControl.Top += ( windowControl.Margin.Top - windowControl.Margin.Bottom );
}
}
@@ -356,6 +362,9 @@ namespace Xceed.Wpf.Toolkit.Primitives
private void SetActiveWindow( WindowControl windowControl )
{
+ if( windowControl.IsActive )
+ return;
+
foreach( WindowControl window in this.Children )
{
window.SetIsActiveInternal( false );
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs
index a5ea2d7e..cc2a2a7a 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs
@@ -133,6 +133,40 @@ namespace Xceed.Wpf.Toolkit
#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 ) );
@@ -225,6 +259,7 @@ namespace Xceed.Wpf.Toolkit
_calendar.SelectedDatesChanged += Calendar_SelectedDatesChanged;
_calendar.SelectedDate = Value ?? null;
_calendar.DisplayDate = Value ?? DateTime.Now;
+ this.SetBlackOutDates();
}
_timePicker = GetTemplateChild( PART_TimeUpDown ) as TimePicker;
@@ -261,6 +296,20 @@ namespace Xceed.Wpf.Toolkit
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
@@ -361,6 +410,25 @@ namespace Xceed.Wpf.Toolkit
}
}
+ 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/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColor.xaml
index 532e3adc..313f66b5 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColor.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColor.xaml
@@ -40,8 +40,8 @@
CornerRadius="0"
RenderChecked="{Binding IsOpen, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DateTimePicker}}"
RenderEnabled="{Binding IsEnabled, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DateTimePicker}}"
- RenderMouseOver="{TemplateBinding IsMouseOver}"
- RenderPressed="{TemplateBinding IsPressed}">
+ RenderMouseOver="{TemplateBinding IsMouseOver}"
+ RenderPressed="{TemplateBinding IsPressed}">
@@ -134,17 +134,19 @@
+ Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
+ Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
+ Format="{TemplateBinding TimeFormat}"
+ FormatString="{TemplateBinding TimeFormatString}"
+ Value="{Binding Value, RelativeSource={RelativeSource TemplatedParent}}"
+ Minimum="{Binding Minimum, RelativeSource={RelativeSource TemplatedParent}}"
+ Maximum="{Binding Maximum, RelativeSource={RelativeSource TemplatedParent}}"
+ ClipValueToMinMax="{Binding ClipValueToMinMax, RelativeSource={RelativeSource TemplatedParent}}"
+ AllowSpin="{TemplateBinding TimePickerAllowSpin}"
+ ShowButtonSpinner="{TemplateBinding TimePickerShowButtonSpinner}"
+ Watermark="{TemplateBinding TimeWatermark}"
+ WatermarkTemplate="{TemplateBinding TimeWatermarkTemplate}"
+ Visibility="{TemplateBinding TimePickerVisibility}"/>
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml
index 0f88a77a..28c7aa69 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml
@@ -150,6 +150,8 @@
Minimum="{Binding Minimum, RelativeSource={RelativeSource TemplatedParent}}"
Maximum="{Binding Maximum, RelativeSource={RelativeSource TemplatedParent}}"
ClipValueToMinMax="{Binding ClipValueToMinMax, RelativeSource={RelativeSource TemplatedParent}}"
+ AllowSpin="{TemplateBinding TimePickerAllowSpin}"
+ ShowButtonSpinner="{TemplateBinding TimePickerShowButtonSpinner}"
Watermark="{TemplateBinding TimeWatermark}"
WatermarkTemplate="{TemplateBinding TimeWatermarkTemplate}"
Visibility="{TemplateBinding TimePickerVisibility}"/>
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs
index e16e9122..7efed265 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs
@@ -134,7 +134,10 @@ namespace Xceed.Wpf.Toolkit
key = "Year";
value = currentDate.Year.ToString("D4");
}
- dateParts.Add( key, value );
+ if( !dateParts.ContainsKey( key ) )
+ {
+ dateParts.Add( key, value );
+ }
} );
return dateParts;
}
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Aero2.NormalColor.xaml
index 9c51e99c..828fa3b5 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Aero2.NormalColor.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Aero2.NormalColor.xaml
@@ -18,6 +18,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
+ xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit">
@@ -36,6 +37,8 @@
+
+
@@ -52,6 +55,10 @@
@@ -43,6 +44,8 @@
+
+
@@ -59,6 +62,10 @@
+ {
+ protected override void SetValueDependencyProperty()
+ {
+ ValueProperty = CollectionControlButton.ItemsSourceProperty;
+ }
+
+ protected override void ResolveValueBinding( PropertyItem propertyItem )
+ {
+ var type = propertyItem.PropertyType;
+
+ Editor.ItemsSourceType = type;
+
+ if( type.BaseType == typeof( System.Array ) )
+ {
+ Editor.NewItemTypes = new List() { type.GetElementType() };
+ }
+ else if( type.GetGenericArguments().Count() > 0 )
+ {
+ Editor.NewItemTypes = new List() { type.GetGenericArguments()[ 0 ] };
+ }
+
+ base.ResolveValueBinding( propertyItem );
+ }
+ }
+
+ public class PropertyGridEditorCollectionControl : CollectionControlButton
+ {
+ static PropertyGridEditorCollectionControl()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata( typeof( PropertyGridEditorCollectionControl ), new FrameworkPropertyMetadata( typeof( PropertyGridEditorCollectionControl ) ) );
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml
deleted file mode 100644
index 70bafede..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml.cs
deleted file mode 100644
index 5e161a77..00000000
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml.cs
+++ /dev/null
@@ -1,51 +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.Data;
-
-namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
-{
- ///
- /// Interaction logic for CollectionEditor.xaml
- ///
- public partial class CollectionEditor : UserControl, ITypeEditor
- {
- PropertyItem _item;
-
- public CollectionEditor()
- {
- InitializeComponent();
- }
-
- private void Button_Click( object sender, RoutedEventArgs e )
- {
- CollectionControlDialog editor = new CollectionControlDialog( _item.PropertyType, _item.DescriptorDefinition.NewItemTypes );
- Binding binding = new Binding( "Value" );
- binding.Source = _item;
- binding.Mode = _item.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay;
- BindingOperations.SetBinding( editor, CollectionControlDialog.ItemsSourceProperty, binding );
- editor.ShowDialog();
- }
-
- public FrameworkElement ResolveEditor( PropertyItem propertyItem )
- {
- _item = propertyItem;
- return this;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/PrimitiveTypeCollectionEditor.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/PrimitiveTypeCollectionEditor.cs
index c516cc73..401feee6 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/PrimitiveTypeCollectionEditor.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/PrimitiveTypeCollectionEditor.cs
@@ -14,6 +14,7 @@
***********************************************************************************/
+using System.Windows;
namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
public class PrimitiveTypeCollectionEditor : TypeEditor
@@ -38,7 +39,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
Editor.ItemType = type.GetElementType();
}
- else
+ else if( type.ContainsGenericParameters )
{
Editor.ItemType = type.GetGenericArguments()[ 0 ];
}
@@ -46,4 +47,12 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
base.ResolveValueBinding( propertyItem );
}
}
+
+ public class PropertyGridEditorPrimitiveTypeCollectionControl : PrimitiveTypeCollectionControl
+ {
+ static PropertyGridEditorPrimitiveTypeCollectionControl()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata( typeof( PropertyGridEditorPrimitiveTypeCollectionControl ), new FrameworkPropertyMetadata( typeof( PropertyGridEditorPrimitiveTypeCollectionControl ) ) );
+ }
+ }
}
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs
index 113d2fe1..4305d293 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs
@@ -93,7 +93,6 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
Debug.Assert( SelectedObject != null );
propertyItem.Instance = SelectedObject;
propertyItem.CategoryOrder = this.GetCategoryOrder( definition.CategoryValue );
-
return propertyItem;
}
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs
index a71391fa..0991ad88 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs
@@ -28,6 +28,7 @@ using Xceed.Wpf.Toolkit.PropertyGrid.Editors;
using System.Collections;
using System.Collections.ObjectModel;
using System.Windows.Controls.Primitives;
+using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace Xceed.Wpf.Toolkit.PropertyGrid
{
@@ -256,6 +257,9 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
: null;
}
+
+
+
internal void InitializeDescriptorDefinition(
DescriptorPropertyDefinitionBase descriptorDef,
PropertyDefinition propertyDefinition )
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs
index 9526808d..5a9f1ff8 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs
@@ -359,6 +359,10 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
private void OnPropertyDefinitionsCollectionChanged( object sender, NotifyCollectionChangedEventArgs e )
{
_containerHelper.NotifyPropertyDefinitionsCollectionChanged();
+ if( this.IsLoaded )
+ {
+ this.UpdateContainerHelper();
+ }
}
#endregion //PropertyDefinitions
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml
index 921c8843..2e214c53 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml
@@ -33,7 +33,8 @@
-
+
+
@@ -223,6 +224,20 @@
+
+
+
+
+
+
@@ -501,6 +516,8 @@
Value="Center" />
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml
index f7dcafbd..8c13cee2 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml
@@ -30,8 +30,9 @@
-
-
+
+
+
@@ -220,6 +221,20 @@
+
+
+
+
+
+
@@ -554,6 +569,7 @@
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs
index 016921bb..7968fb85 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs
@@ -361,7 +361,15 @@ namespace Xceed.Wpf.Toolkit
if( ( value == null ) || ( Target == null ) || ( Target.Selection == null ) )
return;
- Target.Selection.ApplyPropertyValue( formattingProperty, value );
+ SolidColorBrush solidColorBrush = value as SolidColorBrush;
+ if( ( solidColorBrush != null ) && solidColorBrush.Color.Equals( Colors.Transparent ) )
+ {
+ Target.Selection.ApplyPropertyValue( formattingProperty, null );
+ }
+ else
+ {
+ Target.Selection.ApplyPropertyValue( formattingProperty, value );
+ }
}
private void ProcessMove( DragDeltaEventArgs e )
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Aero2.NormalColor.xaml
index dc2b5b6a..32a29b5e 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Aero2.NormalColor.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Aero2.NormalColor.xaml
@@ -38,6 +38,7 @@
+
@@ -58,19 +59,21 @@
+ RenderMouseOver="{Binding IsMouseOver, ElementName=PART_ActionButton}"
+ RenderPressed="{Binding IsPressed, ElementName=PART_ActionButton}">
+ Grid.Column="1"
+ IsTabStop="False"
+ IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
+ IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}">
@@ -79,11 +82,12 @@
+ RenderMouseOver="{Binding IsMouseOver, ElementName=PART_ToggleButton}"
+ RenderPressed="{Binding IsPressed, ElementName=PART_ToggleButton}">
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Generic.xaml
index 99642ce8..892a94a5 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Generic.xaml
@@ -49,6 +49,7 @@
+
@@ -68,7 +69,10 @@
Designer
MSBuild:Compile
-
- MSBuild:Compile
- Designer
-
Designer
MSBuild:Compile
@@ -392,6 +388,7 @@
+
CollectionControlDialog.xaml
@@ -404,7 +401,10 @@
+
+
+
@@ -565,9 +565,6 @@
-
- CollectionEditor.xaml
-
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Zoombox/Zoombox.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Zoombox/Zoombox.cs
index d521dba6..2ae3cbdb 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Zoombox/Zoombox.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Zoombox/Zoombox.cs
@@ -3315,6 +3315,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
if( _content == null )
return;
+ if( double.IsNaN( scale ) )
+ return;
+
// if necessary, verify that the relativeTo point falls within the content
if( restrictRelativePointToContent && !( new Rect( _content.RenderSize ) ).Contains( relativeTo ) )
return;
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs
index 94a1dcce..ce1db48a 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs
@@ -21,7 +21,7 @@
internal static class _XceedVersionInfo
{
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
- public const string BaseVersion = "2.2";
+ public const string BaseVersion = "2.3";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs
index cd3ae99c..20907e41 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs
@@ -100,7 +100,12 @@ namespace Xceed.Wpf.Toolkit
if( newValue != null )
{
foreach( var item in newValue )
- Items.Add( item );
+ {
+ if( item != null )
+ {
+ Items.Add( item );
+ }
+ }
}
}
@@ -368,7 +373,10 @@ namespace Xceed.Wpf.Toolkit
if( ItemsSourceType != null )
{
ConstructorInfo constructor = ItemsSourceType.GetConstructor( Type.EmptyTypes );
- list = ( IList )constructor.Invoke( null );
+ if( constructor != null )
+ {
+ list = ( IList )constructor.Invoke( null );
+ }
}
return list;
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlButton.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlButton.cs
new file mode 100644
index 00000000..d505604a
--- /dev/null
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlButton.cs
@@ -0,0 +1,129 @@
+/*************************************************************************************
+
+ 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;
+using System.Windows.Controls;
+
+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 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( IList ), typeof( CollectionControlButton ), new UIPropertyMetadata( null ) );
+ public IList ItemsSource
+ {
+ get
+ {
+ return ( IList )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 Methods
+
+ private void CollectionControlButton_Click( object sender, RoutedEventArgs e )
+ {
+ CollectionControlDialog collectionControlDialog = new CollectionControlDialog();
+ collectionControlDialog.ItemsSource = this.ItemsSource;
+ collectionControlDialog.NewItemTypes = this.NewItemTypes;
+ collectionControlDialog.ItemsSourceType = this.ItemsSourceType;
+ collectionControlDialog.IsReadOnly = this.IsReadOnly;
+ collectionControlDialog.ShowDialog();
+ }
+
+ #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
index be732359..42ff42e8 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/PrimitiveTypeCollectionControl.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/PrimitiveTypeCollectionControl.cs
@@ -94,7 +94,7 @@ namespace Xceed.Wpf.Toolkit
if( ItemsSourceType == null )
ItemsSourceType = newValue.GetType();
- if( ItemType == null )
+ if( ItemType == null && newValue.GetType().ContainsGenericParameters )
ItemType = newValue.GetType().GetGenericArguments()[ 0 ];
SetText( newValue );
@@ -234,7 +234,14 @@ namespace Xceed.Wpf.Toolkit
object value = null;
try
{
- value = Convert.ChangeType( valueString, ItemType );
+ if( ItemType.IsEnum )
+ {
+ value = Enum.Parse( ItemType, valueString );
+ }
+ else
+ {
+ value = Convert.ChangeType( valueString, ItemType );
+ }
}
catch
{
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
index d3a66df0..85272fb1 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Aero2.NormalColor.xaml
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Aero2.NormalColor.xaml
@@ -20,6 +20,7 @@
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
xmlns:colconv="clr-namespace:Xceed.Wpf.Toolkit.Converters"
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
+ xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"
xmlns:pg="clr-namespace:Xceed.Wpf.Toolkit.PropertyGrid">
@@ -138,7 +139,7 @@
-
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml
index 8ec5a71e..e64b51c4 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml
@@ -19,6 +19,7 @@
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
xmlns:colconv="clr-namespace:Xceed.Wpf.Toolkit.Converters"
+ xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"
xmlns:pg="clr-namespace:Xceed.Wpf.Toolkit.PropertyGrid">
@@ -137,7 +138,7 @@
-
+
+
+
+
+
+
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
index 5b4e080e..e51ac830 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Aero2.NormalColor.xaml
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Aero2.NormalColor.xaml
@@ -255,7 +255,10 @@
SelectedColor="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}}" />
-
+
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml
index c3ea056e..e4ef913c 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml
@@ -275,7 +275,10 @@
SelectedColor="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}}" />
-
+
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/CornerRadiusToDoubleConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/CornerRadiusToDoubleConverter.cs
new file mode 100644
index 00000000..1eb772bc
--- /dev/null
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/CornerRadiusToDoubleConverter.cs
@@ -0,0 +1,48 @@
+/*************************************************************************************
+
+ 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/ThicknessToDoubleConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessToDoubleConverter.cs
new file mode 100644
index 00000000..f78807d0
--- /dev/null
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessToDoubleConverter.cs
@@ -0,0 +1,48 @@
+/*************************************************************************************
+
+ 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/Primitives/MouseWheelActiveTriggerEnum.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/MouseWheelActiveTriggerEnum.cs
index 44dd2d6c..1e122a0c 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/MouseWheelActiveTriggerEnum.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/MouseWheelActiveTriggerEnum.cs
@@ -26,6 +26,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
///
public enum MouseWheelActiveTrigger
{
+ Focused,
FocusedMouseOver,
MouseOver,
Disabled
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/Selector.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/Selector.cs
index 6abd3c68..d4ef3b0a 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/Selector.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/Selector.cs
@@ -94,7 +94,15 @@ namespace Xceed.Wpf.Toolkit.Primitives
private static void OnDelimiterChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
{
- ( ( Selector )o ).UpdateSelectedValue();
+ ( (Selector)o ).OnSelectedItemChanged( (string)e.OldValue, (string)e.NewValue );
+ }
+
+ protected virtual void OnSelectedItemChanged( string oldValue, string newValue )
+ {
+ if( !this.IsInitialized )
+ return;
+
+ this.UpdateSelectedValue();
}
#endregion
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/UpDownBase.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/UpDownBase.cs
index 3b509670..a3a57c09 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/UpDownBase.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/UpDownBase.cs
@@ -47,6 +47,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
/// Flags if the Text and Value properties are in the process of being sync'd
///
private bool _isSyncingTextAndValueProperties;
+ private bool _isSpinnerCaptured;
#endregion //Members
@@ -375,6 +376,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
internal UpDownBase()
{
+ this.AddHandler( Mouse.PreviewMouseDownOutsideCapturedElementEvent, new RoutedEventHandler( this.HandleClickOutsideOfControl ), true );
}
#endregion //Constructors
@@ -397,6 +399,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
if( TextBox != null )
{
TextBox.Text = Text;
+ TextBox.GotFocus += new RoutedEventHandler( TextBox_GotFocus );
TextBox.LostFocus += new RoutedEventHandler( TextBox_LostFocus );
TextBox.TextChanged += new TextChangedEventHandler( TextBox_TextChanged );
}
@@ -452,14 +455,24 @@ namespace Xceed.Wpf.Toolkit.Primitives
#region Event Handlers
+ private void HandleClickOutsideOfControl( object sender, RoutedEventArgs e )
+ {
+ if( _isSpinnerCaptured )
+ {
+ this.Spinner.ReleaseMouseCapture();
+ _isSpinnerCaptured = false;
+ }
+ }
+
private void OnSpinnerSpin( object sender, SpinEventArgs e )
{
if( AllowSpin && !IsReadOnly )
{
var activeTrigger = this.MouseWheelActiveTrigger;
bool spin = !e.UsingMouseWheel;
- spin |= (activeTrigger == MouseWheelActiveTrigger.MouseOver);
+ spin |= ( activeTrigger == MouseWheelActiveTrigger.MouseOver );
spin |= ( TextBox.IsFocused && ( activeTrigger == MouseWheelActiveTrigger.FocusedMouseOver ) );
+ spin |= ( TextBox.IsFocused && ( activeTrigger == MouseWheelActiveTrigger.Focused ) && (Mouse.Captured != null) );
if( spin )
{
@@ -566,6 +579,15 @@ namespace Xceed.Wpf.Toolkit.Primitives
}
}
+ private void TextBox_GotFocus( object sender, RoutedEventArgs e )
+ {
+ if( ( this.MouseWheelActiveTrigger == Primitives.MouseWheelActiveTrigger.Focused ) && !_isSpinnerCaptured )
+ {
+ _isSpinnerCaptured = true;
+ Mouse.Capture( this.Spinner );
+ }
+ }
+
private void TextBox_LostFocus( object sender, RoutedEventArgs e )
{
CommitInput();
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/WindowContainer.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/WindowContainer.cs
index e123d970..33831475 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/WindowContainer.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/WindowContainer.cs
@@ -52,6 +52,10 @@ namespace Xceed.Wpf.Toolkit.Primitives
void WindowContainer_Loaded( object sender, RoutedEventArgs e )
{
+ foreach( WindowControl window in this.Children )
+ {
+ window.SetIsActiveInternal( false );
+ }
this.SetNextActiveWindow( null );
}
@@ -309,7 +313,9 @@ namespace Xceed.Wpf.Toolkit.Primitives
if( ( windowControl.ActualWidth != 0 ) && ( windowControl.ActualHeight != 0 ) )
{
windowControl.Left = ( this.ActualWidth - windowControl.ActualWidth ) / 2.0;
+ windowControl.Left += (windowControl.Margin.Left - windowControl.Margin.Right);
windowControl.Top = ( this.ActualHeight - windowControl.ActualHeight ) / 2.0;
+ windowControl.Top += ( windowControl.Margin.Top - windowControl.Margin.Bottom );
}
}
@@ -356,6 +362,9 @@ namespace Xceed.Wpf.Toolkit.Primitives
private void SetActiveWindow( WindowControl windowControl )
{
+ if( windowControl.IsActive )
+ return;
+
foreach( WindowControl window in this.Children )
{
window.SetIsActiveInternal( false );
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs
index a5ea2d7e..cc2a2a7a 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs
@@ -133,6 +133,40 @@ namespace Xceed.Wpf.Toolkit
#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 ) );
@@ -225,6 +259,7 @@ namespace Xceed.Wpf.Toolkit
_calendar.SelectedDatesChanged += Calendar_SelectedDatesChanged;
_calendar.SelectedDate = Value ?? null;
_calendar.DisplayDate = Value ?? DateTime.Now;
+ this.SetBlackOutDates();
}
_timePicker = GetTemplateChild( PART_TimeUpDown ) as TimePicker;
@@ -261,6 +296,20 @@ namespace Xceed.Wpf.Toolkit
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
@@ -361,6 +410,25 @@ namespace Xceed.Wpf.Toolkit
}
}
+ 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/DateTimeUpDown/Implementation/DateTimeParser.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs
index e16e9122..7efed265 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs
@@ -134,7 +134,10 @@ namespace Xceed.Wpf.Toolkit
key = "Year";
value = currentDate.Year.ToString("D4");
}
- dateParts.Add( key, value );
+ if( !dateParts.ContainsKey( key ) )
+ {
+ dateParts.Add( key, value );
+ }
} );
return dateParts;
}
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
index 9c51e99c..828fa3b5 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Aero2.NormalColor.xaml
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Aero2.NormalColor.xaml
@@ -18,6 +18,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
+ xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit">
@@ -36,6 +37,8 @@
+
+
@@ -52,6 +55,10 @@
@@ -43,6 +44,8 @@
+
+
@@ -59,6 +62,10 @@
+ {
+ protected override void SetValueDependencyProperty()
+ {
+ ValueProperty = CollectionControlButton.ItemsSourceProperty;
+ }
+
+ protected override void ResolveValueBinding( PropertyItem propertyItem )
+ {
+ var type = propertyItem.PropertyType;
+
+ Editor.ItemsSourceType = type;
+
+ if( type.BaseType == typeof( System.Array ) )
+ {
+ Editor.NewItemTypes = new List() { type.GetElementType() };
+ }
+ else if( type.GetGenericArguments().Count() > 0 )
+ {
+ Editor.NewItemTypes = new List() { type.GetGenericArguments()[ 0 ] };
+ }
+
+ base.ResolveValueBinding( propertyItem );
+ }
+ }
+
+ public class PropertyGridEditorCollectionControl : CollectionControlButton
+ {
+ static PropertyGridEditorCollectionControl()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata( typeof( PropertyGridEditorCollectionControl ), new FrameworkPropertyMetadata( typeof( PropertyGridEditorCollectionControl ) ) );
+ }
+ }
+}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml
deleted file mode 100644
index 70bafede..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml.cs
deleted file mode 100644
index 5e161a77..00000000
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml.cs
+++ /dev/null
@@ -1,51 +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.Data;
-
-namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
-{
- ///
- /// Interaction logic for CollectionEditor.xaml
- ///
- public partial class CollectionEditor : UserControl, ITypeEditor
- {
- PropertyItem _item;
-
- public CollectionEditor()
- {
- InitializeComponent();
- }
-
- private void Button_Click( object sender, RoutedEventArgs e )
- {
- CollectionControlDialog editor = new CollectionControlDialog( _item.PropertyType, _item.DescriptorDefinition.NewItemTypes );
- Binding binding = new Binding( "Value" );
- binding.Source = _item;
- binding.Mode = _item.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay;
- BindingOperations.SetBinding( editor, CollectionControlDialog.ItemsSourceProperty, binding );
- editor.ShowDialog();
- }
-
- public FrameworkElement ResolveEditor( PropertyItem propertyItem )
- {
- _item = propertyItem;
- return this;
- }
- }
-}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/PrimitiveTypeCollectionEditor.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/PrimitiveTypeCollectionEditor.cs
index c516cc73..401feee6 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/PrimitiveTypeCollectionEditor.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/PrimitiveTypeCollectionEditor.cs
@@ -14,6 +14,7 @@
***********************************************************************************/
+using System.Windows;
namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
public class PrimitiveTypeCollectionEditor : TypeEditor
@@ -38,7 +39,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
Editor.ItemType = type.GetElementType();
}
- else
+ else if( type.ContainsGenericParameters )
{
Editor.ItemType = type.GetGenericArguments()[ 0 ];
}
@@ -46,4 +47,12 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
base.ResolveValueBinding( propertyItem );
}
}
+
+ public class PropertyGridEditorPrimitiveTypeCollectionControl : PrimitiveTypeCollectionControl
+ {
+ static PropertyGridEditorPrimitiveTypeCollectionControl()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata( typeof( PropertyGridEditorPrimitiveTypeCollectionControl ), new FrameworkPropertyMetadata( typeof( PropertyGridEditorPrimitiveTypeCollectionControl ) ) );
+ }
+ }
}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs
index 113d2fe1..4305d293 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs
@@ -93,7 +93,6 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
Debug.Assert( SelectedObject != null );
propertyItem.Instance = SelectedObject;
propertyItem.CategoryOrder = this.GetCategoryOrder( definition.CategoryValue );
-
return propertyItem;
}
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs
index a71391fa..0991ad88 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs
@@ -28,6 +28,7 @@ using Xceed.Wpf.Toolkit.PropertyGrid.Editors;
using System.Collections;
using System.Collections.ObjectModel;
using System.Windows.Controls.Primitives;
+using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace Xceed.Wpf.Toolkit.PropertyGrid
{
@@ -256,6 +257,9 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
: null;
}
+
+
+
internal void InitializeDescriptorDefinition(
DescriptorPropertyDefinitionBase descriptorDef,
PropertyDefinition propertyDefinition )
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs
index 9526808d..5a9f1ff8 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs
@@ -359,6 +359,10 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
private void OnPropertyDefinitionsCollectionChanged( object sender, NotifyCollectionChangedEventArgs e )
{
_containerHelper.NotifyPropertyDefinitionsCollectionChanged();
+ if( this.IsLoaded )
+ {
+ this.UpdateContainerHelper();
+ }
}
#endregion //PropertyDefinitions
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGridUtilities.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGridUtilities.cs
index 17b32db4..58a715e3 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGridUtilities.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGridUtilities.cs
@@ -100,7 +100,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
if( listType != null )
{
- if( !listType.IsPrimitive && !listType.Equals( typeof( String ) ) )
+ if( !listType.IsPrimitive && !listType.Equals( typeof( String ) ) && !listType.IsEnum )
editor = new Xceed.Wpf.Toolkit.PropertyGrid.Editors.CollectionEditor();
else
editor = new Xceed.Wpf.Toolkit.PropertyGrid.Editors.PrimitiveTypeCollectionEditor();
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml
index d4d8fc93..ec009d6d 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml
@@ -33,7 +33,8 @@
-
+
+
@@ -223,6 +224,20 @@
+
+
+
+
+
+
@@ -501,6 +516,8 @@
Value="Center" />
+
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml
index 0cdf367a..944a4a6e 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml
@@ -30,8 +30,9 @@
-
-
+
+
+
@@ -220,6 +221,20 @@
+
+
+
+
+
+
@@ -554,6 +569,7 @@
+
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RangeSlider/Implementation/RangeSlider.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RangeSlider/Implementation/RangeSlider.cs
index 9e54d197..fff651b4 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RangeSlider/Implementation/RangeSlider.cs
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RangeSlider/Implementation/RangeSlider.cs
@@ -211,6 +211,10 @@ namespace Xceed.Wpf.Toolkit
protected virtual void OnHigherValueChanged( double oldValue, double newValue )
{
this.AdjustWidths( this.Minimum, this.Maximum, this.LowerValue, newValue );
+
+ RoutedEventArgs args = new RoutedEventArgs();
+ args.RoutedEvent = RangeSlider.HigherValueChangedEvent;
+ this.RaiseEvent(args);
}
#endregion HigherValue
@@ -355,7 +359,11 @@ namespace Xceed.Wpf.Toolkit
{
this.HigherValue = Math.Max( this.HigherValue, newValue );
- this.AdjustWidths( this.Minimum, this.Maximum, newValue, this.HigherValue );
+ this.AdjustWidths( this.Minimum, this.Maximum, newValue, this.HigherValue );
+
+ RoutedEventArgs args = new RoutedEventArgs();
+ args.RoutedEvent = RangeSlider.LowerValueChangedEvent;
+ this.RaiseEvent(args);
}
#endregion LowerValue
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RangeSlider/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RangeSlider/Themes/Aero2.NormalColor.xaml
index 9b1e6b40..499c266c 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RangeSlider/Themes/Aero2.NormalColor.xaml
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RangeSlider/Themes/Aero2.NormalColor.xaml
@@ -94,6 +94,19 @@
TargetName="MainBorder"
Value="#FFDCECFC" />
+
+
+
+
+
+
@@ -149,6 +162,19 @@
TargetName="MainBorder"
Value="#FFDCECFC" />
+
+
+
+
+
+
@@ -331,6 +357,19 @@
TargetName="MainBorder"
Value="#FFDCECFC" />
+
+
+
+
+
+
@@ -408,6 +447,19 @@
TargetName="MainBorder"
Value="#FFDCECFC" />
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RangeSlider/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RangeSlider/Themes/Generic.xaml
index 8e199203..fa49a941 100644
--- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RangeSlider/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RangeSlider/Themes/Generic.xaml
@@ -25,6 +25,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+