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 @@ - + + + - + + + - - - + 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 @@ - + + + - + + + - - -