diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs index 5d0a8f10..a2dee8ce 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.6"; + public const string BaseVersion = "2.7"; [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 e5c053e9..2070ed88 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml @@ -957,6 +957,7 @@ + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Button/Views/DropDownSplitButtonView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Button/Views/DropDownSplitButtonView.xaml index 6cf27112..be994343 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Button/Views/DropDownSplitButtonView.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Button/Views/DropDownSplitButtonView.xaml @@ -29,46 +29,85 @@ - - - - - - - - + - - - - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/CheckLists/Views/CheckListsView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/CheckLists/Views/CheckListsView.xaml index f0efccfb..d892e26b 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/CheckLists/Views/CheckListsView.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/CheckLists/Views/CheckListsView.xaml @@ -88,27 +88,39 @@ HorizontalAlignment="Left" Text="{Binding ElementName=_checkListBox, Path=SelectedValue, Mode=TwoWay}"/> - - + + @@ -176,8 +188,9 @@ ValueMemberPath="{Binding ElementName=_valueMemberPath, Path=SelectedItem}" SelectedMemberPath="{Binding ElementName=_selectedMemberPath, Path=Text}" DisplayMemberPath="{Binding ElementName=_displayMemberPath, Path=SelectedItem}" + IsEditable="False" IsDropDownOpen="false" MaxDropDownHeight="100"/> - + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Converters/EqualsMinusOneConverter.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Converters/EqualsMinusOneConverter.cs new file mode 100644 index 00000000..f722de73 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Converters/EqualsMinusOneConverter.cs @@ -0,0 +1,29 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + ************************************************************************************/ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Windows.Data; + +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Converters +{ + + + + +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Data/RequiredRule.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Data/RequiredRule.cs new file mode 100644 index 00000000..8a733688 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Data/RequiredRule.cs @@ -0,0 +1,27 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + ************************************************************************************/ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Windows.Controls; + +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Data +{ + + +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialButton.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialButton.png new file mode 100644 index 00000000..0e7536a9 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialButton.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialCheckBox.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialCheckBox.png new file mode 100644 index 00000000..1944c990 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialCheckBox.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialComboBox.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialComboBox.png new file mode 100644 index 00000000..43296603 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialComboBox.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialControls.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialControls.png new file mode 100644 index 00000000..6480059c Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialControls.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialDropDown.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialDropDown.png new file mode 100644 index 00000000..d8cd8364 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialDropDown.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialFrame.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialFrame.png new file mode 100644 index 00000000..2ad38823 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialFrame.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialListBox.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialListBox.png new file mode 100644 index 00000000..ea0c6be6 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialListBox.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialProgressBar.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialProgressBar.png new file mode 100644 index 00000000..4bed042c Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialProgressBar.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialProgressBarCircular.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialProgressBarCircular.png new file mode 100644 index 00000000..6cf81421 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialProgressBarCircular.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialRadioButton.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialRadioButton.png new file mode 100644 index 00000000..e09b7dbb Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialRadioButton.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialSlider.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialSlider.png new file mode 100644 index 00000000..e4da4a8e Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialSlider.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialSwitch.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialSwitch.png new file mode 100644 index 00000000..9cb2f430 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialSwitch.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialTabs.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialTabs.png new file mode 100644 index 00000000..e3572c9d Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialTabs.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialTextField.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialTextField.png new file mode 100644 index 00000000..66d86724 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialTextField.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialToast.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialToast.png new file mode 100644 index 00000000..eee81ed6 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialToast.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialToolTip.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialToolTip.png new file mode 100644 index 00000000..ede18800 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/OpenSourceImages/MaterialToolTip.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/CommonResources.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/CommonResources.xaml new file mode 100644 index 00000000..56363752 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/CommonResources.xaml @@ -0,0 +1,25 @@ + + + + + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/PencilTool16.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/PencilTool16.png new file mode 100644 index 00000000..df0970c4 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/PencilTool16.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/WhitePen.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/WhitePen.png new file mode 100644 index 00000000..7f1955f5 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/WhitePen.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/building16.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/building16.png new file mode 100644 index 00000000..329feeb8 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/building16.png differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/italy.4.gif b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/italy.4.gif new file mode 100644 index 00000000..a2156759 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Resources/italy.4.gif differ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialButtonView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialButtonView.xaml new file mode 100644 index 00000000..ddd2b26c --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialButtonView.xaml @@ -0,0 +1,49 @@ + + + + + + A Button with a raised animation on mouse over and a customizable ink animation on MousePress. It uses the Material Brushes. + + + 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/MaterialControls/Views/MaterialButtonView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialButtonView.xaml.cs new file mode 100644 index 00000000..7e705c1e --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialButtonView.xaml.cs @@ -0,0 +1,35 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialButtonView.xaml + /// + public partial class MaterialButtonView : MaterialDemoView + { + public MaterialButtonView() + { + InitializeComponent(); + } + + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialCheckBoxView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialCheckBoxView.xaml new file mode 100644 index 00000000..88b84bc8 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialCheckBoxView.xaml @@ -0,0 +1,46 @@ + + + + + A CheckBox with transition animations when the checked state is changed. It uses the Material Brushes. + + + 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/MaterialControls/Views/MaterialCheckBoxView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialCheckBoxView.xaml.cs new file mode 100644 index 00000000..c94f812e --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialCheckBoxView.xaml.cs @@ -0,0 +1,34 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialCheckBoxView.xaml + /// + public partial class MaterialCheckBoxView : MaterialDemoView + { + public MaterialCheckBoxView() + { + InitializeComponent(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialComboBoxView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialComboBoxView.xaml new file mode 100644 index 00000000..d0dcedfc --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialComboBoxView.xaml @@ -0,0 +1,48 @@ + + + + + MaterialComboBox is a ComboBox that is using the Material Brushes and contains MaterialComboBoxItems. + + MaterialComboBoxItems are ComboBoxItems that are using the Material Brushes. They use an ink animation when they are selected. + + + 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/MaterialControls/Views/MaterialComboBoxView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialComboBoxView.xaml.cs new file mode 100644 index 00000000..2e1fdc6b --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialComboBoxView.xaml.cs @@ -0,0 +1,34 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialComboBoxView.xaml + /// + public partial class MaterialComboBoxView : MaterialDemoView + { + public MaterialComboBoxView() + { + InitializeComponent(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialControlsView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialControlsView.xaml new file mode 100644 index 00000000..d328ed54 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialControlsView.xaml @@ -0,0 +1,56 @@ + + + + + The Material controls redefine the base controls by adding smooth animations and special effects. They also combine the base controls together to create new controls. + + + The Material controls include a set of complimentary accent brush and foreground. + + + 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/MaterialControls/Views/MaterialControlsView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialControlsView.xaml.cs new file mode 100644 index 00000000..91b53807 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialControlsView.xaml.cs @@ -0,0 +1,59 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialControlsView.xaml + /// + public partial class MaterialControlsView : MaterialDemoView + { + + + + #region Constructors + + public MaterialControlsView() + { + InitializeComponent(); + } + + #endregion + + + + + + + + + + + + + + + + + + + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialDemoView.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialDemoView.cs new file mode 100644 index 00000000..0524b2c1 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialDemoView.cs @@ -0,0 +1,41 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Media; + +namespace Xceed.Wpf.Toolkit.LiveExplorer +{ + public class MaterialDemoView : DemoView + { + #region Constructor + + public MaterialDemoView() + { + + } + + #endregion + + + + + + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialDropDownView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialDropDownView.xaml new file mode 100644 index 00000000..d701544f --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialDropDownView.xaml @@ -0,0 +1,49 @@ + + + + + A DropDownButton from the Xceed Wpf Toolkit with animations when opening the popup. It uses the MaterialButton animations and the Material Brushes. + + + 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/MaterialControls/Views/MaterialDropDownView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialDropDownView.xaml.cs new file mode 100644 index 00000000..27ec0e31 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialDropDownView.xaml.cs @@ -0,0 +1,34 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialDropDownView.xaml + /// + public partial class MaterialDropDownView : MaterialDemoView + { + public MaterialDropDownView() + { + InitializeComponent(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialFrameView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialFrameView.xaml new file mode 100644 index 00000000..c63c93b6 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialFrameView.xaml @@ -0,0 +1,48 @@ + + + + + + A ContentControl with a fully customizable shadow that can be modified through Shadow properties or with a Z property that enables predefined shadows. + + + 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/MaterialControls/Views/MaterialFrameView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialFrameView.xaml.cs new file mode 100644 index 00000000..7e538ef9 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialFrameView.xaml.cs @@ -0,0 +1,34 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialFrameView.xaml + /// + public partial class MaterialFrameView : DemoView + { + public MaterialFrameView() + { + InitializeComponent(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialListBoxView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialListBoxView.xaml new file mode 100644 index 00000000..8944253c --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialListBoxView.xaml @@ -0,0 +1,50 @@ + + + + + + MaterialListBox is a ListBox that is using the Material Brushes and contains MaterialListBoxItems. + + MaterialListBoxItems are ListBoxItems that are using the Material Brushes. They use an ink animation when they are selected. + + + 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/MaterialControls/Views/MaterialListBoxView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialListBoxView.xaml.cs new file mode 100644 index 00000000..32607eee --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialListBoxView.xaml.cs @@ -0,0 +1,34 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialListBoxView.xaml + /// + public partial class MaterialListBoxView : MaterialDemoView + { + public MaterialListBoxView() + { + InitializeComponent(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialProgressBarCircularView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialProgressBarCircularView.xaml new file mode 100644 index 00000000..69dc85e6 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialProgressBarCircularView.xaml @@ -0,0 +1,60 @@ + + + + + + A circular ProgressBar that uses the Material Brushes. It contains properties to animate the indeterminate state. + + + 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/MaterialControls/Views/MaterialProgressBarCircularView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialProgressBarCircularView.xaml.cs new file mode 100644 index 00000000..a075d65d --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialProgressBarCircularView.xaml.cs @@ -0,0 +1,50 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media.Animation; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialProgressBarCircularView.xaml + /// + public partial class MaterialProgressBarCircularView : MaterialDemoView + { + #region Constructors + + public MaterialProgressBarCircularView() + { + InitializeComponent(); + + } + + #endregion + + + + + + + + + + + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialProgressBarView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialProgressBarView.xaml new file mode 100644 index 00000000..58c75e26 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialProgressBarView.xaml @@ -0,0 +1,57 @@ + + + + + + A linear ProgressBar that uses the Material Brushes. It contains properties to animate the indeterminate state. + + + 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/MaterialControls/Views/MaterialProgressBarView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialProgressBarView.xaml.cs new file mode 100644 index 00000000..2a6742b0 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialProgressBarView.xaml.cs @@ -0,0 +1,50 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media.Animation; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialProgressBarView.xaml + /// + public partial class MaterialProgressBarView : MaterialDemoView + { + #region Constructors + + public MaterialProgressBarView() + { + InitializeComponent(); + } + + #endregion + + + + + + + + + + + + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialRadioButtonView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialRadioButtonView.xaml new file mode 100644 index 00000000..f0e5bf54 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialRadioButtonView.xaml @@ -0,0 +1,46 @@ + + + + + + A RadioButton with transition animations when the checked state is changed. It uses the Material Brushes. + + + 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/MaterialControls/Views/MaterialRadioButtonView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialRadioButtonView.xaml.cs new file mode 100644 index 00000000..66da1b65 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialRadioButtonView.xaml.cs @@ -0,0 +1,34 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialRadioButtonView.xaml + /// + public partial class MaterialRadioButtonView : MaterialDemoView + { + public MaterialRadioButtonView() + { + InitializeComponent(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialSliderView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialSliderView.xaml new file mode 100644 index 00000000..4085cdfe --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialSliderView.xaml @@ -0,0 +1,63 @@ + + + + + + A Slider with customizable and animated thumb and bubble that is using the Material Brushes. + + + 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/MaterialControls/Views/MaterialSliderView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialSliderView.xaml.cs new file mode 100644 index 00000000..f2761853 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialSliderView.xaml.cs @@ -0,0 +1,37 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using Xceed.Wpf.Toolkit.Panels; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialSliderView.xaml + /// + public partial class MaterialSliderView : MaterialDemoView + { + public MaterialSliderView() + { + InitializeComponent(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialSwitchView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialSwitchView.xaml new file mode 100644 index 00000000..ff0ec175 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialSwitchView.xaml @@ -0,0 +1,48 @@ + + + + + + A ToggleSwitch from the Xceed WPF Toolkit with thumb animations when Checked state is changed and that is using the Material Brushes. + + + 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/MaterialControls/Views/MaterialSwitchView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialSwitchView.xaml.cs new file mode 100644 index 00000000..c67fd0c9 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialSwitchView.xaml.cs @@ -0,0 +1,34 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialSwitchView.xaml + /// + public partial class MaterialSwitchView : MaterialDemoView + { + public MaterialSwitchView() + { + InitializeComponent(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialTabsView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialTabsView.xaml new file mode 100644 index 00000000..4f412065 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialTabsView.xaml @@ -0,0 +1,57 @@ + + + + + + MaterialTabControl is a a TabControl with animated transitions when the current selection is changed. Is is using the Material Brushes and contains MaterialTabItems. + + MaterialTabItems are TabItems that are using the Material Brushes and who contains customizable ink animations on mouse press. + + + 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/MaterialControls/Views/MaterialTabsView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialTabsView.xaml.cs new file mode 100644 index 00000000..99d9e76c --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialTabsView.xaml.cs @@ -0,0 +1,34 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialTabsView.xaml + /// + public partial class MaterialTabsView : MaterialDemoView + { + public MaterialTabsView() + { + InitializeComponent(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialTextFieldView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialTextFieldView.xaml new file mode 100644 index 00000000..bcd180f6 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialTextFieldView.xaml @@ -0,0 +1,56 @@ + + + + + + A TextBox containing a customizable animated watermark that remains active when text is entered. It uses the Material Brushes. + + + 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/MaterialControls/Views/MaterialTextFieldView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialTextFieldView.xaml.cs new file mode 100644 index 00000000..53cba58a --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialTextFieldView.xaml.cs @@ -0,0 +1,34 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialTextFieldView.xaml + /// + public partial class MaterialTextFieldView : MaterialDemoView + { + public MaterialTextFieldView() + { + InitializeComponent(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialToastView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialToastView.xaml new file mode 100644 index 00000000..e27f271f --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialToastView.xaml @@ -0,0 +1,55 @@ + + + + + + A ContentControl that can be customized to display a content in any corner of any window or FrameworkElement. It is using the Material Brushes. + + + 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/MaterialControls/Views/MaterialToastView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialToastView.xaml.cs new file mode 100644 index 00000000..f1427296 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialToastView.xaml.cs @@ -0,0 +1,38 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using Xceed.Wpf.Toolkit.Panels; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialToastView.xaml + /// + public partial class MaterialToastView : MaterialDemoView + { + public MaterialToastView() + { + InitializeComponent(); + } + + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialToolTipView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialToolTipView.xaml new file mode 100644 index 00000000..81e48d72 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialToolTipView.xaml @@ -0,0 +1,52 @@ + + + + + + A ToolTip with animations when opening. It is using the Material Brushes. + + + 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/MaterialControls/Views/MaterialToolTipView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialToolTipView.xaml.cs new file mode 100644 index 00000000..fe3e0ef6 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/MaterialControls/Views/MaterialToolTipView.xaml.cs @@ -0,0 +1,34 @@ +/************************************************************************************** + + Extended WPF Toolkit + + Copyright (C) 2007-2015 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + **************************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views +{ + /// + /// Interaction logic for MaterialToolTipView.xaml + /// + public partial class MaterialToolTipView : MaterialDemoView + { + public MaterialToolTipView() + { + InitializeComponent(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/PropertyGrid/Views/PropertyGridAttributesView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/PropertyGrid/Views/PropertyGridAttributesView.xaml.cs index e60091a8..a55a1d20 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/PropertyGrid/Views/PropertyGridAttributesView.xaml.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/PropertyGrid/Views/PropertyGridAttributesView.xaml.cs @@ -52,7 +52,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views [CategoryOrder("Information", 0)] [CategoryOrder( "Conections", 1 )] [CategoryOrder( "Other", 2 )] - public abstract class Person + public abstract class Person : INotifyPropertyChanged { // All properties have their own "[Category(...)]" attribute to specify which category they // belong to when the "Categorized" layout is used by the PropertyGrid. @@ -65,12 +65,22 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views [Category( "Information" )] [Description( "This property uses the [Editor(..)] attribute to provide a custom editor using the 'FirstNameEditor' class. In the Plus version, it also depends on the IsMale property to change its foreground and source." )] [Editor( typeof( FirstNameEditor ), typeof( FirstNameEditor ) )] - public string FirstName { get; set; } + public string FirstName + { + get{ return _firstName; } + set{ _firstName = value; OnPropertyChanged( "FirstName" );} + } + private string _firstName; [Category( "Information" )] [Description( "This property uses the [Editor(..)] attribute to provide a custom editor using the 'LastNameUserControlEditor' user control." )] [Editor( typeof( LastNameUserControlEditor ), typeof( LastNameUserControlEditor ) )] - public string LastName { get; set; } + public string LastName + { + get{ return _lastName; } + set{ _lastName = value; OnPropertyChanged( "LastName" );} + } + private string _lastName; [Category( "Conections" )] [Description( "This property uses the [NewItemTypes(...)] attribute to provide the underlying CollectionEditor with class types (eg. Man, Woman) that can be inserted in the collection." )] @@ -81,6 +91,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views [DisplayName( "Writing Font Size" )] [Description( "This property defines the [ItemsSource(..)] attribute that allows you to specify a ComboBox editor and control its items." )] [ItemsSource( typeof( FontSizeItemsSource ) )] + [RefreshProperties( RefreshProperties.All )] //This will reload the PropertyGrid public double WritingFontSize { get; set; } [Category( "Conections" )] @@ -116,6 +127,15 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views { return FirstName + " " + LastName; } + + public event PropertyChangedEventHandler PropertyChanged; + protected void OnPropertyChanged( string propertyName ) + { + if( PropertyChanged != null ) + { + PropertyChanged( this, new PropertyChangedEventArgs( propertyName ) ); + } + } } // The "Man" and "Woman" classes are referenced by the "NewItemTypesAttribute" diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/PropertyGrid/Views/PropertyGridView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/PropertyGrid/Views/PropertyGridView.xaml index e17dbcc3..bc7a4288 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/PropertyGrid/Views/PropertyGridView.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/PropertyGrid/Views/PropertyGridView.xaml @@ -47,6 +47,7 @@ + @@ -138,7 +139,17 @@ VerticalAlignment="Center" Margin="5" ToolTip="Update the source of a TextBox when True and Enter key is pressed." /> - + + @@ -175,6 +186,7 @@ UpdateTextBoxSourceOnEnterKey="True" IsMiscCategoryLabelHidden="False" ShowPreview="True" + HideInheritedProperties="False" SelectedObject="{Binding ElementName=_button}"> diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Text/Views/WatermarkTextboxView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Text/Views/WatermarkTextboxView.xaml index b185c20e..db4921a5 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Text/Views/WatermarkTextboxView.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Text/Views/WatermarkTextboxView.xaml @@ -14,42 +14,81 @@ ***********************************************************************************--> - - - The WatermarkTextBox is simply a TextBox that allows you to sepcify an object, usually a String, to represent null or missing text. - - - - - - - - - - - - - - - - - - - - - - - - - - - - + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" + xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" + Title="WatermarkTextBox"> + + + The WatermarkTextBox is simply a TextBox that allows you to sepcify an object, usually a String, to represent null or missing text. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Converters/ZeroToBoolConverter.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Converters/ZeroToBoolConverter.cs new file mode 100644 index 00000000..0c9d80a5 --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Converters/ZeroToBoolConverter.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Windows.Data; + +namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.ToggleSwitch.Converters +{ + public class ZeroToBoolConverter : IValueConverter + { + public object Convert( object value, Type targetType, object parameter, CultureInfo culture ) + { + if( value == null ) + return false; + + double number = 0d; + + try + { + number = System.Convert.ToDouble( value ); + } + catch + { + return false; + } + + return number == 0d; + } + + public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture ) + { + throw new NotImplementedException(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Resources/PencilTool16.png b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Resources/PencilTool16.png new file mode 100644 index 00000000..df0970c4 Binary files /dev/null and b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Resources/PencilTool16.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 index 25e211aa..2c97d364 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Views/ToggleSwitchView.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Views/ToggleSwitchView.xaml @@ -20,6 +20,7 @@ xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters;assembly=Xceed.Wpf.Toolkit" + xmlns:localConv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.ToggleSwitch.Converters" Title="ToggleSwitch"> @@ -55,6 +56,9 @@ + + + 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 2f2abdac..da382d84 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 @@ -201,6 +201,57 @@ MagnifierView.xaml + + + + MaterialComboBoxView.xaml + + + + MaterialListBoxView.xaml + + + MaterialToolTipView.xaml + + + MaterialDropDownView.xaml + + + MaterialSwitchView.xaml + + + MaterialFrameView.xaml + + + MaterialTabsView.xaml + + + MaterialProgressBarCircularView.xaml + + + MaterialProgressBarView.xaml + + + MaterialRadioButtonView.xaml + + + MaterialCheckBoxView.xaml + + + MaterialToastView.xaml + + + MaterialSliderView.xaml + + + MaterialTextFieldView.xaml + + + MaterialButtonView.xaml + + + MaterialControlsView.xaml + NumericView.xaml @@ -325,6 +376,7 @@ TimeSpanView.xaml + ToggleSwitchView.xaml @@ -493,6 +545,74 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile Designer @@ -1118,6 +1238,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs index 5d0a8f10..a2dee8ce 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.6"; + public const string BaseVersion = "2.7"; [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] public const string Version = BaseVersion + ".0.0"; diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Calculator/Implementation/Calculator.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Calculator/Implementation/Calculator.cs index 6100f6bf..29b52fcf 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Calculator/Implementation/Calculator.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Calculator/Implementation/Calculator.cs @@ -93,6 +93,24 @@ namespace Xceed.Wpf.Toolkit #region Properties + #region CalculatorButtonPanelTemplate + + public static readonly DependencyProperty CalculatorButtonPanelTemplateProperty = DependencyProperty.Register( "CalculatorButtonPanelTemplate" + , typeof( ControlTemplate ), typeof( Calculator ), new UIPropertyMetadata( null ) ); + public ControlTemplate CalculatorButtonPanelTemplate + { + get + { + return (ControlTemplate)GetValue( CalculatorButtonPanelTemplateProperty ); + } + set + { + SetValue( CalculatorButtonPanelTemplateProperty, value ); + } + } + + #endregion //CalculatorButtonPanelTemplate + #region CalculatorButtonType public static readonly DependencyProperty CalculatorButtonTypeProperty = DependencyProperty.RegisterAttached( "CalculatorButtonType", typeof( CalculatorButtonType ), typeof( Calculator ), new UIPropertyMetadata( CalculatorButtonType.None, OnCalculatorButtonTypeChanged ) ); @@ -112,7 +130,10 @@ namespace Xceed.Wpf.Toolkit { Button button = o as Button; button.CommandParameter = newValue; - button.Content = CalculatorUtilities.GetCalculatorButtonContent( newValue ); + if( button.Content == null ) + { + button.Content = CalculatorUtilities.GetCalculatorButtonContent( newValue ); + } } #endregion //CalculatorButtonType diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Aero2.NormalColor.xaml index 74f11f0e..9edea9e0 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Aero2.NormalColor.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Aero2.NormalColor.xaml @@ -243,7 +243,9 @@ Text="{Binding DisplayText, RelativeSource={RelativeSource TemplatedParent}}" /> - + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Generic.xaml index ad77bac2..278d13ac 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Generic.xaml @@ -776,7 +776,7 @@ diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs index 520e9f39..edb55d9f 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs @@ -35,6 +35,7 @@ namespace Xceed.Wpf.Toolkit #region Members private ValueChangeHelper _displayMemberPathValuesChangeHelper; + private bool _ignoreTextValueChanged; private Popup _popup; private List _initialValue = new List(); @@ -58,9 +59,28 @@ namespace Xceed.Wpf.Toolkit #region Properties + #region IsEditable + + public static readonly DependencyProperty IsEditableProperty = DependencyProperty.Register( "IsEditable", typeof( bool ), typeof( CheckComboBox ) + , new UIPropertyMetadata( false ) ); + public bool IsEditable + { + get + { + return (bool)GetValue( IsEditableProperty ); + } + set + { + SetValue( IsEditableProperty, value ); + } + } + + #endregion + #region Text - public static readonly DependencyProperty TextProperty = DependencyProperty.Register( "Text", typeof( string ), typeof( CheckComboBox ), new UIPropertyMetadata( null ) ); + public static readonly DependencyProperty TextProperty = DependencyProperty.Register( "Text", typeof( string ), typeof( CheckComboBox ) + , new UIPropertyMetadata( null, OnTextChanged ) ); public string Text { get @@ -73,6 +93,21 @@ namespace Xceed.Wpf.Toolkit } } + private static void OnTextChanged( DependencyObject o, DependencyPropertyChangedEventArgs e ) + { + var checkComboBox = o as CheckComboBox; + if( checkComboBox != null ) + checkComboBox.OnTextChanged( (string)e.OldValue, (string)e.NewValue ); + } + + protected virtual void OnTextChanged( string oldValue, string newValue ) + { + if( !this.IsInitialized || _ignoreTextValueChanged ) + return; + + this.UpdateFromText(); + } + #endregion #region IsDropDownOpen @@ -254,7 +289,26 @@ namespace Xceed.Wpf.Toolkit #endif if( String.IsNullOrEmpty( Text ) || !Text.Equals( newValue ) ) + { + _ignoreTextValueChanged = true; Text = newValue; + _ignoreTextValueChanged = false; + } + } + + /// + /// Updates the SelectedItems collection based on the content of + /// the Text property. + /// + private void UpdateFromText() + { + List selectedValues = null; + if( !String.IsNullOrEmpty( this.Text ) ) + { + selectedValues = this.Text.Replace( " ", string.Empty ).Split( new string[] { Delimiter }, StringSplitOptions.RemoveEmptyEntries ).ToList(); + } + + this.UpdateFromList( selectedValues, this.GetItemDisplayValue ); } protected object GetItemDisplayValue( object item ) diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml index 80082939..aa9fd8da 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml @@ -21,20 +21,25 @@ xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes" xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"> - + - M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z + M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z - + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml index c7d73f0c..970309b1 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml @@ -22,20 +22,26 @@ - + M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z - + + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml index ae2f89a6..2930e304 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml @@ -60,7 +60,19 @@ - + + + + @@ -75,6 +87,12 @@ + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/HalfConverter.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/HalfConverter.cs index 97fa8a50..390da4cd 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/HalfConverter.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/HalfConverter.cs @@ -28,7 +28,7 @@ namespace Xceed.Wpf.Toolkit.Core.Converters public object Convert( object value, Type targetType, object parameter, CultureInfo culture ) { double size = ( double )value; - double modifier = double.Parse( ( string )parameter); + double modifier = (parameter != null) ? double.Parse( ( string )parameter ) : 0d; if( modifier != 0 ) return Math.Max(0, size - modifier) / 2; diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs index 8cdbe198..99e05328 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs @@ -835,9 +835,25 @@ namespace Xceed.Wpf.Toolkit private bool TryParseDateTime( string text, out DateTime result ) { bool isValid = false; + result = this.ContextNow; - DateTime current = this.Value.HasValue ? this.Value.Value : DateTime.Parse( this.ContextNow.ToString(), this.CultureInfo.DateTimeFormat ); - isValid = DateTimeParser.TryParse( text, this.GetFormatString( Format ), current, this.CultureInfo, out result ); + DateTime current = this.ContextNow; + if( this.Value.HasValue ) + { + current = this.Value.Value; + } + else + { + try + { + current = DateTime.Parse( this.ContextNow.ToString(), this.CultureInfo.DateTimeFormat ); + isValid = DateTimeParser.TryParse( text, this.GetFormatString( Format ), current, this.CultureInfo, out result ); + } + catch( FormatException ) + { + isValid = false; + } + } if( !isValid ) { diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs index 96f6d106..9c0798ba 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs @@ -139,6 +139,36 @@ namespace Xceed.Wpf.Toolkit #endregion //IsOpen + #region MaxDropDownHeight + + public static readonly DependencyProperty MaxDropDownHeightProperty = DependencyProperty.Register( "MaxDropDownHeight", typeof( double ) + , typeof( DropDownButton ), new UIPropertyMetadata( SystemParameters.PrimaryScreenHeight / 2.0, OnMaxDropDownHeightChanged ) ); + public double MaxDropDownHeight + { + get + { + return (double)GetValue( MaxDropDownHeightProperty ); + } + set + { + SetValue( MaxDropDownHeightProperty, value ); + } + } + + private static void OnMaxDropDownHeightChanged( DependencyObject o, DependencyPropertyChangedEventArgs e ) + { + var dropDownButton = o as DropDownButton; + if( dropDownButton != null ) + dropDownButton.OnMaxDropDownHeightChanged( (double)e.OldValue, (double)e.NewValue ); + } + + protected virtual void OnMaxDropDownHeightChanged( double oldValue, double newValue ) + { + // TODO: Add your property changed side-effects. Descendants can override as well. + } + + #endregion + #endregion //Properties #region Base Class Overrides @@ -159,6 +189,15 @@ namespace Xceed.Wpf.Toolkit _popup.Opened += Popup_Opened; } + protected override void OnIsKeyboardFocusWithinChanged( DependencyPropertyChangedEventArgs e ) + { + base.OnIsKeyboardFocusWithinChanged( e ); + if( !( bool )e.NewValue ) + { + this.CloseDropDown( false ); + } + } + #endregion //Base Class Overrides #region Events 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 828fa3b5..9f84846c 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Aero2.NormalColor.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Aero2.NormalColor.xaml @@ -21,63 +21,83 @@ xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes" xmlns:local="clr-namespace:Xceed.Wpf.Toolkit"> - - - + + + - + - - - + + + - + + + + + + + + + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml index e90fdcc9..b7f755cc 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml @@ -125,9 +125,13 @@ IsOpen="{Binding IsChecked, ElementName=PART_DropDownButton}"> - + BorderBrush="{StaticResource PopupDarkBorderBrush}" + MaxHeight="{TemplateBinding MaxDropDownHeight}"> + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs index add955cc..25cad5ed 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs @@ -1344,7 +1344,18 @@ namespace Xceed.Wpf.Toolkit e.Handled = true; - this.ProcessTextInput( e.Text ); + if( this.CharacterCasing == CharacterCasing.Upper ) + { + this.ProcessTextInput( e.Text.ToUpper() ); + } + else if( this.CharacterCasing == CharacterCasing.Lower ) + { + this.ProcessTextInput( e.Text.ToLower() ); + } + else + { + this.ProcessTextInput( e.Text ); + } base.OnTextInput( e ); } diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MaterialControls/MaterialTabs/Implementation/Converters/TranslateSelectedTabItemConverter.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MaterialControls/MaterialTabs/Implementation/Converters/TranslateSelectedTabItemConverter.cs new file mode 100644 index 00000000..b92ddcdf --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MaterialControls/MaterialTabs/Implementation/Converters/TranslateSelectedTabItemConverter.cs @@ -0,0 +1,59 @@ +/************************************************************************************* + + Extended WPF Toolkit + + Copyright (C) 2007-2013 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + ***********************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Media; + +namespace Xceed.Wpf.Toolkit.Converters +{ + public class TranslateSelectedTabItemConverter : IMultiValueConverter + { + public object Convert( object[] values, Type targetType, object parameter, CultureInfo culture ) + { + double width = (double)values[0]; + double height = (double)values[1]; + Dock position = (Dock)values[2]; + + if( parameter.ToString().Equals( "Previous" ) ) + { + if( (position == Dock.Top) || (position == Dock.Bottom) ) + return new TranslateTransform( -width, 0 ); + else + return new TranslateTransform( 0, -height ); + } + else if( parameter.ToString().Equals( "Next" ) ) + { + if( (position == Dock.Top) || (position == Dock.Bottom) ) + return new TranslateTransform( width, 0 ); + else + return new TranslateTransform( 0, height ); + } + + return null; + } + + public object[] ConvertBack( object value, Type[] targetTypes, object parameter, CultureInfo culture ) + { + throw new NotImplementedException(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/MessageBox.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/MessageBox.cs index c7205d91..8c25d69c 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/MessageBox.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/MessageBox.cs @@ -26,6 +26,7 @@ using System.Security; using Xceed.Wpf.Toolkit.Primitives; using System.Diagnostics; using System.Windows.Media.Imaging; +using System.Windows.Threading; namespace Xceed.Wpf.Toolkit { @@ -767,6 +768,51 @@ namespace Xceed.Wpf.Toolkit return msgBox.MessageBoxResult; } + private delegate Window ComputeOwnerWindowCoreDelegate(); + + /// + /// Resolves the owner Window of the MessageBox. + /// + /// the owner Window + private static Window ComputeOwnerWindow() + { + Window result = null; + + if( Application.Current.Dispatcher.CheckAccess() ) + { + result = ComputeOwnerWindowCore(); + } + else + { + Application.Current.Dispatcher.BeginInvoke( new Action( () => + { + result = ComputeOwnerWindowCore(); + } + ) ); + } + + return result; + } + + private static Window ComputeOwnerWindowCore() + { + Window owner = null; + + if( Application.Current != null ) + { + foreach( Window w in Application.Current.Windows ) + { + if( w.IsActive ) + { + owner = w; + break; + } + } + } + + return owner; + } + /// /// Sets the message image source. /// @@ -818,6 +864,7 @@ namespace Xceed.Wpf.Toolkit newWindow.AllowsTransparency = true; newWindow.Background = Brushes.Transparent; newWindow.Content = this; + newWindow.Owner = _owner ?? ComputeOwnerWindow(); if( newWindow.Owner != null ) newWindow.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner; diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Selector.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Selector.cs index 11f25f99..a6fd9058 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Selector.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Selector.cs @@ -462,6 +462,35 @@ namespace Xceed.Wpf.Toolkit.Primitives return value; } + internal void UpdateFromList( List selectedValues, Func GetItemfunction ) + { + _ignoreSelectedItemsCollectionChanged++; + // Just update the SelectedItems collection content + // and let the synchronization be made from UpdateFromSelectedItems(); + SelectedItems.Clear(); + + if( (selectedValues != null) && (selectedValues.Count > 0) ) + { + ValueEqualityComparer comparer = new ValueEqualityComparer(); + + foreach( object item in ItemsCollection ) + { + object itemValue = GetItemfunction( item ); + + bool isSelected = (itemValue != null) + && selectedValues.Contains( itemValue.ToString(), comparer ); + + if( isSelected ) + { + SelectedItems.Add( item ); + } + } + } + _ignoreSelectedItemsCollectionChanged--; + + this.UpdateFromSelectedItems(); + } + private bool? GetSelectedMemberPathValue( object item ) { PropertyInfo prop = this.GetSelectedMemberPathProperty(item); @@ -734,32 +763,13 @@ namespace Xceed.Wpf.Toolkit.Primitives /// private void UpdateFromSelectedValue() { - _ignoreSelectedItemsCollectionChanged++; - // Just update the SelectedItems collection content - // and let the synchronization be made from UpdateFromSelectedItems(); - SelectedItems.Clear(); - + List selectedValues = null; if( !String.IsNullOrEmpty( SelectedValue ) ) { - List selectedValues = SelectedValue.Split( new string[] { Delimiter }, StringSplitOptions.RemoveEmptyEntries ).ToList(); - ValueEqualityComparer comparer = new ValueEqualityComparer(); - - foreach( object item in ItemsCollection ) - { - object itemValue = this.GetItemValue( item ); - - bool isSelected = ( itemValue != null ) - && selectedValues.Contains( itemValue.ToString(), comparer ); - - if( isSelected ) - { - SelectedItems.Add( item ); - } - } + selectedValues = SelectedValue.Split( new string[] { Delimiter }, StringSplitOptions.RemoveEmptyEntries ).ToList(); } - _ignoreSelectedItemsCollectionChanged--; - this.UpdateFromSelectedItems(); + this.UpdateFromList( selectedValues, this.GetItemValue ); } #endregion //Methods diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Aero2/SelectorItem.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Aero2/SelectorItem.xaml index ac210dbb..ecfdaddf 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Aero2/SelectorItem.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Aero2/SelectorItem.xaml @@ -39,14 +39,18 @@ Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> - + + VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> + + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Generic/SelectorItem.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Generic/SelectorItem.xaml index 1c643794..970e66e3 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Generic/SelectorItem.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Generic/SelectorItem.xaml @@ -40,14 +40,18 @@ Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> - + + VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> + + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/ValueRangeTextBox.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/ValueRangeTextBox.cs index dee26a93..7bc15cc9 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/ValueRangeTextBox.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/ValueRangeTextBox.cs @@ -1100,7 +1100,7 @@ namespace Xceed.Wpf.Toolkit.Primitives if( ( ( value != null ) && ( value != DBNull.Value ) ) && ( value.GetType() != type ) ) { - return System.Convert.ChangeType( value, type, CultureInfo.InvariantCulture ); + return ChangeTypeHelper.ChangeType( value, type, CultureInfo.InvariantCulture ); } return value; diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ContainerHelperBase.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ContainerHelperBase.cs index a3c66bc5..d73a925f 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ContainerHelperBase.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ContainerHelperBase.cs @@ -149,6 +149,10 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid { this.OnAutoGeneratePropertiesChanged(); } + else if( propertyName == ReflectionHelper.GetPropertyOrFieldName( () => ps.HideInheritedProperties ) ) + { + this.OnHideInheritedPropertiesChanged(); + } else if(propertyName == ReflectionHelper.GetPropertyOrFieldName( () => ps.EditorDefinitions )) { this.OnEditorDefinitionsChanged(); @@ -165,6 +169,8 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid protected virtual void OnAutoGeneratePropertiesChanged() { } + protected virtual void OnHideInheritedPropertiesChanged() { } + protected virtual void OnEditorDefinitionsChanged() { } protected virtual void OnPropertyDefinitionsChanged() { } diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Converters/IsDefaultCategoryConverter.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Converters/IsDefaultCategoryConverter.cs new file mode 100644 index 00000000..548c706f --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Converters/IsDefaultCategoryConverter.cs @@ -0,0 +1,45 @@ +/************************************************************************************* + + Extended WPF Toolkit + + Copyright (C) 2007-2013 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + ***********************************************************************************/ + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Windows.Data; + +namespace Xceed.Wpf.Toolkit.PropertyGrid.Converters +{ + public class IsDefaultCategoryConverter : IValueConverter + { + public object Convert( object value, Type targetType, object parameter, CultureInfo culture ) + { + string categoryName = value as string; + if( categoryName != null ) + { + return ( categoryName == CategoryAttribute.Default.Category ); + } + + return false; + } + + public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture ) + { + throw new NotImplementedException(); + } + } +} diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/CustomPropertyItem.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/CustomPropertyItem.cs index 302c4880..b49c9bc9 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/CustomPropertyItem.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/CustomPropertyItem.cs @@ -32,13 +32,20 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid /// public class CustomPropertyItem : PropertyItemBase { + #region Constructors + internal CustomPropertyItem() { } - internal CustomPropertyItem( bool isPropertyGridCategorized ) + internal CustomPropertyItem( bool isPropertyGridCategorized, bool isSortedAlphabetically ) { _isPropertyGridCategorized = isPropertyGridCategorized; + _isSortedAlphabetically = isSortedAlphabetically; } + #endregion + + #region Properties + #region Category public static readonly DependencyProperty CategoryProperty = @@ -145,5 +152,20 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid } #endregion //Value + + #endregion + + #region Overrides + + protected override void OnEditorChanged( FrameworkElement oldValue, FrameworkElement newValue ) + { + if( oldValue != null ) + oldValue.DataContext = null; + + if( newValue != null ) + newValue.DataContext = this; + } + + #endregion } } 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 da8ff71a..07540dc6 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/PrimitiveTypeCollectionEditor.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/PrimitiveTypeCollectionEditor.cs @@ -15,6 +15,7 @@ ***********************************************************************************/ using System.Windows; +using Xceed.Wpf.Toolkit.Core.Utilities; namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors { public class PrimitiveTypeCollectionEditor : TypeEditor @@ -39,13 +40,9 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors { Editor.ItemType = type.GetElementType(); } - else if( type.IsGenericType ) + else { - var typeArguments = type.GetGenericArguments(); - if( typeArguments.Length > 0 ) - { - Editor.ItemType = typeArguments[ 0 ]; - } + Editor.ItemType = ListUtilities.GetListItemType( type ); } base.ResolveValueBinding( propertyItem ); diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/IPropertyContainer.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/IPropertyContainer.cs index 358f35f8..465ff068 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/IPropertyContainer.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/IPropertyContainer.cs @@ -42,8 +42,12 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid bool IsCategorized { get; } + bool IsSortedAlphabetically { get; } + bool AutoGenerateProperties { get; } + bool HideInheritedProperties { get; } + FilterInfo FilterInfo { get; } } } diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs index 89ae7149..15e83471 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs @@ -55,7 +55,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid { try { - List descriptors = ObjectContainerHelperBase.GetPropertyDescriptors( SelectedObject ); + List descriptors = ObjectContainerHelperBase.GetPropertyDescriptors( SelectedObject, this.PropertyContainer.HideInheritedProperties ); foreach( var descriptor in descriptors ) { var propertyDef = this.GetPropertyDefinition( descriptor ); @@ -96,6 +96,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid Debug.Assert( SelectedObject != null ); propertyItem.Instance = SelectedObject; propertyItem.CategoryOrder = this.GetCategoryOrder( definition.CategoryValue ); + propertyItem.WillRefreshPropertyGrid = this.GetWillRefreshPropertyGrid( property ); 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 49b66b8a..16106b33 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs @@ -145,6 +145,11 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid this.RegenerateProperties(); } + protected override void OnHideInheritedPropertiesChanged() + { + this.RegenerateProperties(); + } + protected override void OnEditorDefinitionsChanged() { this.RegenerateProperties(); @@ -167,7 +172,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid private void UpdateCategorization( bool updateSubPropertiesCategorization ) { - _propertyItemCollection.UpdateCategorization( this.ComputeCategoryGroupDescription(), this.PropertyContainer.IsCategorized ); + _propertyItemCollection.UpdateCategorization( this.ComputeCategoryGroupDescription(), this.PropertyContainer.IsCategorized, this.PropertyContainer.IsSortedAlphabetically ); if( updateSubPropertiesCategorization && (_propertyItemCollection.Count > 0) ) { foreach( PropertyItem propertyItem in _propertyItemCollection ) @@ -175,7 +180,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid PropertyItemCollection subPropertyItemsCollection = propertyItem.Properties as PropertyItemCollection; if( subPropertyItemsCollection != null ) { - subPropertyItemsCollection.UpdateCategorization( this.ComputeCategoryGroupDescription(), this.PropertyContainer.IsCategorized ); + subPropertyItemsCollection.UpdateCategorization( this.ComputeCategoryGroupDescription(), this.PropertyContainer.IsCategorized, this.PropertyContainer.IsSortedAlphabetically ); } } } @@ -245,7 +250,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid } } - protected static List GetPropertyDescriptors( object instance ) + protected static List GetPropertyDescriptors( object instance, bool hideInheritedProperties ) { PropertyDescriptorCollection descriptors; @@ -262,14 +267,40 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid descriptors = tc.GetProperties( instance ); } - return ( descriptors != null ) - ? descriptors.Cast().ToList() - : null; + if( ( descriptors != null ) ) + { + var descriptorsProperties = descriptors.Cast(); + if( hideInheritedProperties ) + { + var properties = from p in descriptorsProperties + where p.ComponentType == instance.GetType() + select p; + return properties.ToList(); + } + else + { + return descriptorsProperties.ToList(); + } + } + + return null; } + protected bool GetWillRefreshPropertyGrid( PropertyDescriptor propertyDescriptor ) + { + if( propertyDescriptor == null ) + return false; + + var attribute = PropertyGridUtilities.GetAttribute( propertyDescriptor ); + if( attribute != null ) + return attribute.RefreshProperties != RefreshProperties.None; + + return false; + } + 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 d2a1c6cf..cf937524 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs @@ -213,6 +213,23 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid #endregion //FilterWatermark + #region HideInheritedProperties + + public static readonly DependencyProperty HideInheritedPropertiesProperty = DependencyProperty.Register( "HideInheritedProperties", typeof( bool ), typeof( PropertyGrid ), new UIPropertyMetadata( false ) ); + public bool HideInheritedProperties + { + get + { + return ( bool )GetValue( HideInheritedPropertiesProperty ); + } + set + { + SetValue( HideInheritedPropertiesProperty, value ); + } + } + + #endregion //HideInheritedProperties + #region IsCategorized public static readonly DependencyProperty IsCategorizedProperty = DependencyProperty.Register( "IsCategorized", typeof( bool ), typeof( PropertyGrid ), new UIPropertyMetadata( true, OnIsCategorizedChanged ) ); @@ -748,6 +765,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid UpdateContainerHelper(); EditorDefinitions = new EditorDefinitionCollection(); PropertyDefinitions = new PropertyDefinitionCollection(); + this.PropertyValueChanged += this.PropertyGrid_PropertyValueChanged; AddHandler( PropertyItemBase.ItemSelectionChangedEvent, new RoutedEventHandler( OnItemSelectionChanged ) ); AddHandler( PropertyItemsControl.PreparePropertyItemEvent, new PropertyItemEventHandler( OnPreparePropertyItemInternal ) ); @@ -852,6 +870,24 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid } + private void PropertyGrid_PropertyValueChanged( object sender, PropertyValueChangedEventArgs e ) + { + var modifiedPropertyItem = e.OriginalSource as PropertyItem; + if( modifiedPropertyItem != null ) + { + if( modifiedPropertyItem.WillRefreshPropertyGrid ) + this.UpdateContainerHelper(); + + var parentPropertyItem = modifiedPropertyItem.ParentNode as PropertyItem; + if( ( parentPropertyItem != null ) && parentPropertyItem.IsExpandable ) + { + //Rebuild Editor for parent propertyItem if one of its sub-propertyItem have changed. + this.RebuildEditor( parentPropertyItem ); + } + } + } + + #endregion //Event Handlers #region Commands @@ -870,6 +906,30 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid #region Methods + + + + + + + + + + + + private void RebuildEditor( PropertyItem propertyItem ) + { + ObjectContainerHelperBase objectContainerHelperBase = propertyItem.ContainerHelper as ObjectContainerHelperBase; + //Re-build the editor to update this propertyItem + FrameworkElement editor = objectContainerHelperBase.GenerateChildrenEditorElement( propertyItem ); + if( editor != null ) + { + // Tag the editor as generated to know if we should clear it. + ContainerHelperBase.SetIsGenerated( editor, true ); + propertyItem.Editor = editor; + } + } + private void UpdateContainerHelper() { // Keep a backup of the template element and initialize the @@ -952,6 +1012,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid + #endregion //Methods #region Events @@ -1164,6 +1225,14 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid } } + bool IPropertyContainer.IsSortedAlphabetically + { + get + { + return true; + } + } + #endregion diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItem.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItem.cs index 63263553..8e400e45 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItem.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItem.cs @@ -126,21 +126,23 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid } } - protected override void OnEditorChanged( FrameworkElement oldValue, FrameworkElement newValue ) + protected override object OnCoerceValueChanged( object baseValue ) { - if( oldValue != null ) - oldValue.DataContext = null; + // Propagate error from DescriptorPropertyDefinitionBase to PropertyItem.Value + // to see the red error rectangle in the propertyGrid. + BindingExpression be = this.GetBindingExpression( PropertyItem.ValueProperty ); + this.SetRedInvalidBorder( be ); + return baseValue; + } - if( newValue != null ) - newValue.DataContext = this; + protected override void OnValueChanged( object oldValue, object newValue ) + { + base.OnValueChanged( oldValue, newValue ); } - protected override object OnCoerceValueChanged( object baseValue ) + internal void SetRedInvalidBorder( BindingExpression be ) { - // Propagate error from DescriptorPropertyDefinitionBase to PropertyItem.Value - // to see the red error rectangle in the propertyGrid. - BindingExpression be = GetBindingExpression( PropertyItem.ValueProperty ); - if( ( be != null ) && be.DataItem is DescriptorPropertyDefinitionBase ) + if( (be != null) && be.DataItem is DescriptorPropertyDefinitionBase ) { DescriptorPropertyDefinitionBase descriptor = be.DataItem as DescriptorPropertyDefinitionBase; if( Validation.GetHasError( descriptor ) ) @@ -149,12 +151,6 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid Validation.MarkInvalid( be, errors[ 0 ] ); } } - return baseValue; - } - - protected override void OnValueChanged( object oldValue, object newValue ) - { - base.OnValueChanged( oldValue, newValue ); } private void OnDefinitionContainerHelperInvalidated( object sender, EventArgs e ) @@ -172,7 +168,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid #region Constructors internal PropertyItem( DescriptorPropertyDefinitionBase definition ) - : base( definition.IsPropertyGridCategorized ) + : base( definition.IsPropertyGridCategorized, !definition.PropertyType.IsArray ) { if( definition == null ) throw new ArgumentNullException( "definition" ); diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemBase.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemBase.cs index 049b5c9f..10e6d317 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemBase.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemBase.cs @@ -41,6 +41,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid private ContainerHelperBase _containerHelper; private IPropertyContainer _parentNode; internal bool _isPropertyGridCategorized; + internal bool _isSortedAlphabetically = true; #region Properties @@ -118,7 +119,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid private static void OnEditorChanged( DependencyObject o, DependencyPropertyChangedEventArgs e ) { - PropertyItem propertyItem = o as PropertyItem; + PropertyItemBase propertyItem = o as PropertyItemBase; if( propertyItem != null ) propertyItem.OnEditorChanged( ( FrameworkElement )e.OldValue, ( FrameworkElement )e.NewValue ); } @@ -298,6 +299,25 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid #endregion + #region WillRefreshPropertyGrid + + public static readonly DependencyProperty WillRefreshPropertyGridProperty = + DependencyProperty.Register( "WillRefreshPropertyGrid", typeof( bool ), typeof( PropertyItemBase ), new UIPropertyMetadata( false ) ); + + public bool WillRefreshPropertyGrid + { + get + { + return ( bool )GetValue( WillRefreshPropertyGridProperty ); + } + set + { + SetValue( WillRefreshPropertyGridProperty, value ); + } + } + + #endregion //WillRefreshPropertyGrid + #endregion //Properties #region Events @@ -425,7 +445,10 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid EditorDefinitionCollection IPropertyContainer.EditorDefinitions { - get { return ParentNode.EditorDefinitions; } + get + { + return (this.ParentNode != null) ? this.ParentNode.EditorDefinitions : null; + } } PropertyDefinitionCollection IPropertyContainer.PropertyDefinitions @@ -449,11 +472,27 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid } } + bool IPropertyContainer.IsSortedAlphabetically + { + get + { + return _isSortedAlphabetically; + } + } + bool IPropertyContainer.AutoGenerateProperties { get { return true; } } + bool IPropertyContainer.HideInheritedProperties + { + get + { + return false; + } + } + FilterInfo IPropertyContainer.FilterInfo { get { return new FilterInfo(); } diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemCollection.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemCollection.cs index 955b7cd4..30f87609 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemCollection.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemCollection.cs @@ -107,7 +107,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid OnCollectionChanged( new NotifyCollectionChangedEventArgs( NotifyCollectionChangedAction.Reset ) ); } - internal void UpdateCategorization( GroupDescription groupDescription, bool isPropertyGridCategorized ) + internal void UpdateCategorization( GroupDescription groupDescription, bool isPropertyGridCategorized, bool sortAlphabetically ) { // Compute Display Order relative to PropertyOrderAttributes on PropertyItem // which could be different in Alphabetical or Categorized mode. @@ -133,7 +133,10 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid } SortBy( PropertyOrderPropertyName, ListSortDirection.Ascending ); - SortBy( DisplayNamePropertyName, ListSortDirection.Ascending ); + if( sortAlphabetically ) + { + SortBy( DisplayNamePropertyName, ListSortDirection.Ascending ); + } } } @@ -153,7 +156,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid var property = item as PropertyItem; if( property.DisplayName != null ) { - return property.DisplayName.ToLower().StartsWith( text.ToLower() ); + return property.DisplayName.ToLower().Contains( text.ToLower() ); } return false; 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 40922420..bc485ad2 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml @@ -46,6 +46,7 @@ + @@ -523,11 +524,10 @@ - - - True - + @@ -538,8 +538,8 @@ - + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml index 1a2f8599..9378a0fa 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml @@ -44,6 +44,7 @@ + @@ -858,11 +859,10 @@ - - - True - + @@ -872,8 +872,8 @@ - + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs index 8edd7501..669a4e43 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs @@ -261,7 +261,11 @@ namespace Xceed.Wpf.Toolkit { currentValue = Target.Selection.GetPropertyValue( formattingProperty ); } - button.IsChecked = ( ( currentValue == null ) || ( currentValue == DependencyProperty.UnsetValue ) ) + + if( currentValue == DependencyProperty.UnsetValue ) + return; + + button.IsChecked = ( currentValue == null ) ? false : currentValue != null && currentValue.Equals( expectedValue ); } @@ -273,7 +277,11 @@ namespace Xceed.Wpf.Toolkit { value = Target.Selection.GetPropertyValue( TextElement.FontFamilyProperty ); } - FontFamily currentFontFamily = ( FontFamily )( ( ( value == null ) || ( value == DependencyProperty.UnsetValue ) ) ? null : value ); + + if( value == DependencyProperty.UnsetValue ) + return; + + FontFamily currentFontFamily = ( FontFamily )value; if( currentFontFamily != null ) { _cmbFontFamilies.SelectedItem = currentFontFamily; @@ -288,7 +296,10 @@ namespace Xceed.Wpf.Toolkit value = Target.Selection.GetPropertyValue( TextElement.FontSizeProperty ); } - _cmbFontSizes.SelectedValue = ( ( value == null ) || ( value == DependencyProperty.UnsetValue ) ) ? null : value; + if( value == DependencyProperty.UnsetValue ) + return; + + _cmbFontSizes.SelectedValue = value; } private void UpdateFontColor() @@ -299,7 +310,10 @@ namespace Xceed.Wpf.Toolkit value = Target.Selection.GetPropertyValue( TextElement.ForegroundProperty ); } - Color? currentColor = ( ( value == null ) || ( value == DependencyProperty.UnsetValue ) + if( value == DependencyProperty.UnsetValue ) + return; + + Color? currentColor = ( ( value == null ) ? null : ( Color? )( ( SolidColorBrush )value ).Color ); _cmbFontColor.SelectedColor = currentColor; @@ -312,7 +326,11 @@ namespace Xceed.Wpf.Toolkit { value = Target.Selection.GetPropertyValue( TextElement.BackgroundProperty ); } - Color? currentColor = ( ( value == null ) || ( value == DependencyProperty.UnsetValue ) + + if( value == DependencyProperty.UnsetValue ) + return; + + Color? currentColor = ( ( value == null ) ? null : ( Color? )( ( SolidColorBrush )value ).Color ); _cmbFontBackgroundColor.SelectedColor = currentColor; 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 5dd13f4a..bed8d150 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Aero2.NormalColor.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Aero2.NormalColor.xaml @@ -21,83 +21,109 @@ xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes" xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"> - - - + + + - + - - - + + + - + + + + + + + + + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Generic.xaml index 0acaafd7..ebec726c 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Generic.xaml @@ -158,9 +158,13 @@ - + BorderBrush="{StaticResource ColorPickerDarkBorderBrush}" + MaxHeight="{TemplateBinding MaxDropDownHeight}"> + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Themes/Aero/Brushes_NormalColor.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Themes/Aero/Brushes_NormalColor.xaml index a3e85993..61e2a4a9 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Themes/Aero/Brushes_NormalColor.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Themes/Aero/Brushes_NormalColor.xaml @@ -66,8 +66,8 @@ - - + + @@ -78,8 +78,8 @@ - - + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Themes/Aero2.NormalColor.xaml index 5d23bd44..d97f65d1 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Themes/Aero2.NormalColor.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Themes/Aero2.NormalColor.xaml @@ -17,47 +17,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Implementation/WatermarkTextBox.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Implementation/WatermarkTextBox.cs index 5308bec5..1b15b161 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Implementation/WatermarkTextBox.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Implementation/WatermarkTextBox.cs @@ -46,6 +46,23 @@ namespace Xceed.Wpf.Toolkit #endregion //SelectAllOnGotFocus + #region KeepWatermarkOnGotFocus + + public static readonly DependencyProperty KeepWatermarkOnGotFocusProperty = DependencyProperty.Register( "KeepWatermarkOnGotFocus", typeof( bool ), typeof( WatermarkTextBox ), new UIPropertyMetadata( false ) ); + public bool KeepWatermarkOnGotFocus + { + get + { + return ( bool )GetValue( KeepWatermarkOnGotFocusProperty ); + } + set + { + SetValue( KeepWatermarkOnGotFocusProperty, value ); + } + } + + #endregion //KeepWatermarkOnGotFocus + #region Watermark public static readonly DependencyProperty WatermarkProperty = DependencyProperty.Register( "Watermark", typeof( object ), typeof( WatermarkTextBox ), new UIPropertyMetadata( null ) ); diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Aero2.NormalColor.xaml index 99eb1b73..e28549b6 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Aero2.NormalColor.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Aero2.NormalColor.xaml @@ -77,6 +77,7 @@ + @@ -84,7 +85,16 @@ - + + + + + + + + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Generic.xaml index 189bb50c..4f32a964 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Generic.xaml @@ -84,6 +84,7 @@ + @@ -91,6 +92,19 @@ + + + + + + + + + diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Wizard/Implementation/Wizard.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Wizard/Implementation/Wizard.cs index 31735a9d..39e0ac4a 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Wizard/Implementation/Wizard.cs +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Wizard/Implementation/Wizard.cs @@ -341,6 +341,9 @@ namespace Xceed.Wpf.Toolkit if( !( o is WizardPage ) ) throw new NotSupportedException( "Wizard should only contains WizardPages." ); } + + if( Items.Count > 0 && CurrentPage == null ) + CurrentPage = Items[ 0 ] as WizardPage; } protected override void OnPropertyChanged( DependencyPropertyChangedEventArgs e ) diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj index 274a30fd..8681c2a5 100644 --- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj +++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj @@ -414,8 +414,10 @@ + + diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs index 5d0a8f10..a2dee8ce 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.6"; + public const string BaseVersion = "2.7"; [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] public const string Version = BaseVersion + ".0.0"; diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Calculator/Implementation/Calculator.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Calculator/Implementation/Calculator.cs index 6100f6bf..29b52fcf 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Calculator/Implementation/Calculator.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Calculator/Implementation/Calculator.cs @@ -93,6 +93,24 @@ namespace Xceed.Wpf.Toolkit #region Properties + #region CalculatorButtonPanelTemplate + + public static readonly DependencyProperty CalculatorButtonPanelTemplateProperty = DependencyProperty.Register( "CalculatorButtonPanelTemplate" + , typeof( ControlTemplate ), typeof( Calculator ), new UIPropertyMetadata( null ) ); + public ControlTemplate CalculatorButtonPanelTemplate + { + get + { + return (ControlTemplate)GetValue( CalculatorButtonPanelTemplateProperty ); + } + set + { + SetValue( CalculatorButtonPanelTemplateProperty, value ); + } + } + + #endregion //CalculatorButtonPanelTemplate + #region CalculatorButtonType public static readonly DependencyProperty CalculatorButtonTypeProperty = DependencyProperty.RegisterAttached( "CalculatorButtonType", typeof( CalculatorButtonType ), typeof( Calculator ), new UIPropertyMetadata( CalculatorButtonType.None, OnCalculatorButtonTypeChanged ) ); @@ -112,7 +130,10 @@ namespace Xceed.Wpf.Toolkit { Button button = o as Button; button.CommandParameter = newValue; - button.Content = CalculatorUtilities.GetCalculatorButtonContent( newValue ); + if( button.Content == null ) + { + button.Content = CalculatorUtilities.GetCalculatorButtonContent( newValue ); + } } #endregion //CalculatorButtonType diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Aero2.NormalColor.xaml index 74f11f0e..9edea9e0 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Aero2.NormalColor.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Aero2.NormalColor.xaml @@ -243,7 +243,9 @@ Text="{Binding DisplayText, RelativeSource={RelativeSource TemplatedParent}}" /> - + diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Generic.xaml index ad77bac2..278d13ac 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Calculator/Themes/Generic.xaml @@ -776,7 +776,7 @@ diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs index 520e9f39..edb55d9f 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs @@ -35,6 +35,7 @@ namespace Xceed.Wpf.Toolkit #region Members private ValueChangeHelper _displayMemberPathValuesChangeHelper; + private bool _ignoreTextValueChanged; private Popup _popup; private List _initialValue = new List(); @@ -58,9 +59,28 @@ namespace Xceed.Wpf.Toolkit #region Properties + #region IsEditable + + public static readonly DependencyProperty IsEditableProperty = DependencyProperty.Register( "IsEditable", typeof( bool ), typeof( CheckComboBox ) + , new UIPropertyMetadata( false ) ); + public bool IsEditable + { + get + { + return (bool)GetValue( IsEditableProperty ); + } + set + { + SetValue( IsEditableProperty, value ); + } + } + + #endregion + #region Text - public static readonly DependencyProperty TextProperty = DependencyProperty.Register( "Text", typeof( string ), typeof( CheckComboBox ), new UIPropertyMetadata( null ) ); + public static readonly DependencyProperty TextProperty = DependencyProperty.Register( "Text", typeof( string ), typeof( CheckComboBox ) + , new UIPropertyMetadata( null, OnTextChanged ) ); public string Text { get @@ -73,6 +93,21 @@ namespace Xceed.Wpf.Toolkit } } + private static void OnTextChanged( DependencyObject o, DependencyPropertyChangedEventArgs e ) + { + var checkComboBox = o as CheckComboBox; + if( checkComboBox != null ) + checkComboBox.OnTextChanged( (string)e.OldValue, (string)e.NewValue ); + } + + protected virtual void OnTextChanged( string oldValue, string newValue ) + { + if( !this.IsInitialized || _ignoreTextValueChanged ) + return; + + this.UpdateFromText(); + } + #endregion #region IsDropDownOpen @@ -254,7 +289,26 @@ namespace Xceed.Wpf.Toolkit #endif if( String.IsNullOrEmpty( Text ) || !Text.Equals( newValue ) ) + { + _ignoreTextValueChanged = true; Text = newValue; + _ignoreTextValueChanged = false; + } + } + + /// + /// Updates the SelectedItems collection based on the content of + /// the Text property. + /// + private void UpdateFromText() + { + List selectedValues = null; + if( !String.IsNullOrEmpty( this.Text ) ) + { + selectedValues = this.Text.Replace( " ", string.Empty ).Split( new string[] { Delimiter }, StringSplitOptions.RemoveEmptyEntries ).ToList(); + } + + this.UpdateFromList( selectedValues, this.GetItemDisplayValue ); } protected object GetItemDisplayValue( object item ) diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml index 61baea1d..f78f8901 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml @@ -25,17 +25,21 @@ M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z - diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml index b83f4aef..b7e6c279 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml @@ -20,23 +20,28 @@ xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters" xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"> - + - + - M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z + M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z - + + + + + + + + + + + + + + + + + + + + + + + - + + + + + diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Implementation/ColorCanvas.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Implementation/ColorCanvas.cs index 64edf49d..d3a010b2 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Implementation/ColorCanvas.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Implementation/ColorCanvas.cs @@ -46,6 +46,7 @@ namespace Xceed.Wpf.Toolkit private TextBox _hexadecimalTextBox; private Point? _currentColorPosition; private bool _surpressPropertyChanged; + private bool _updateSpectrumSliderValue = true; #endregion //Private Members @@ -525,8 +526,10 @@ namespace Xceed.Wpf.Toolkit HsvColor hsv = ColorUtilities.ConvertRgbToHsv( color.Value.R, color.Value.G, color.Value.B ); - if( !( color.Value.R == color.Value.G && color.Value.R == color.Value.B ) ) + if( _updateSpectrumSliderValue ) + { _spectrumSlider.Value = hsv.H; + } Point p = new Point( hsv.S, 1 - hsv.V ); @@ -545,7 +548,9 @@ namespace Xceed.Wpf.Toolkit }; var currentColor = ColorUtilities.ConvertHsvToRgb( hsv.H, hsv.S, hsv.V ); currentColor.A = A; + _updateSpectrumSliderValue = false; SelectedColor = currentColor; + _updateSpectrumSliderValue = true; SetHexadecimalStringProperty( GetFormatedColorString( SelectedColor ), false ); } diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Themes/Generic.xaml index ac04ae9e..e4e38144 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorCanvas/Themes/Generic.xaml @@ -19,252 +19,409 @@ xmlns:local="clr-namespace:Xceed.Wpf.Toolkit" xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + 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 4c99e501..30072651 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 @@ -37,7 +37,19 @@ - + + + + + + + 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 ae2f89a6..2930e304 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml @@ -60,7 +60,19 @@ - + + + + @@ -75,6 +87,12 @@ + + + diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/HalfConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/HalfConverter.cs index 97fa8a50..390da4cd 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/HalfConverter.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/HalfConverter.cs @@ -28,7 +28,7 @@ namespace Xceed.Wpf.Toolkit.Core.Converters public object Convert( object value, Type targetType, object parameter, CultureInfo culture ) { double size = ( double )value; - double modifier = double.Parse( ( string )parameter); + double modifier = (parameter != null) ? double.Parse( ( string )parameter ) : 0d; if( modifier != 0 ) return Math.Max(0, size - modifier) / 2; diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColor.xaml index 2e9a3adb..e4325807 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColor.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColor.xaml @@ -27,6 +27,7 @@ + @@ -130,7 +131,8 @@ IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource DateTimePickerToggleButtonStyle}" IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}" - IsEnabled="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}" /> + IsEnabled="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}" + Visibility="{TemplateBinding ShowDropDownButton, Converter={StaticResource BooleanToVisibilityConverter}}" /> diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml index 862db0af..6d58602a 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml @@ -23,6 +23,7 @@ xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"> + @@ -140,7 +141,8 @@ IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource DateTimePickerToggleButtonStyle}" IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}" - IsEnabled="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}" /> + IsEnabled="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}" + Visibility="{TemplateBinding ShowDropDownButton, Converter={StaticResource BooleanToVisibilityConverter}}"/> diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs index 8cdbe198..99e05328 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs @@ -835,9 +835,25 @@ namespace Xceed.Wpf.Toolkit private bool TryParseDateTime( string text, out DateTime result ) { bool isValid = false; + result = this.ContextNow; - DateTime current = this.Value.HasValue ? this.Value.Value : DateTime.Parse( this.ContextNow.ToString(), this.CultureInfo.DateTimeFormat ); - isValid = DateTimeParser.TryParse( text, this.GetFormatString( Format ), current, this.CultureInfo, out result ); + DateTime current = this.ContextNow; + if( this.Value.HasValue ) + { + current = this.Value.Value; + } + else + { + try + { + current = DateTime.Parse( this.ContextNow.ToString(), this.CultureInfo.DateTimeFormat ); + isValid = DateTimeParser.TryParse( text, this.GetFormatString( Format ), current, this.CultureInfo, out result ); + } + catch( FormatException ) + { + isValid = false; + } + } if( !isValid ) { diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs index 96f6d106..9c0798ba 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs @@ -139,6 +139,36 @@ namespace Xceed.Wpf.Toolkit #endregion //IsOpen + #region MaxDropDownHeight + + public static readonly DependencyProperty MaxDropDownHeightProperty = DependencyProperty.Register( "MaxDropDownHeight", typeof( double ) + , typeof( DropDownButton ), new UIPropertyMetadata( SystemParameters.PrimaryScreenHeight / 2.0, OnMaxDropDownHeightChanged ) ); + public double MaxDropDownHeight + { + get + { + return (double)GetValue( MaxDropDownHeightProperty ); + } + set + { + SetValue( MaxDropDownHeightProperty, value ); + } + } + + private static void OnMaxDropDownHeightChanged( DependencyObject o, DependencyPropertyChangedEventArgs e ) + { + var dropDownButton = o as DropDownButton; + if( dropDownButton != null ) + dropDownButton.OnMaxDropDownHeightChanged( (double)e.OldValue, (double)e.NewValue ); + } + + protected virtual void OnMaxDropDownHeightChanged( double oldValue, double newValue ) + { + // TODO: Add your property changed side-effects. Descendants can override as well. + } + + #endregion + #endregion //Properties #region Base Class Overrides @@ -159,6 +189,15 @@ namespace Xceed.Wpf.Toolkit _popup.Opened += Popup_Opened; } + protected override void OnIsKeyboardFocusWithinChanged( DependencyPropertyChangedEventArgs e ) + { + base.OnIsKeyboardFocusWithinChanged( e ); + if( !( bool )e.NewValue ) + { + this.CloseDropDown( false ); + } + } + #endregion //Base Class Overrides #region Events 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 828fa3b5..9f84846c 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 @@ -21,63 +21,83 @@ xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes" xmlns:local="clr-namespace:Xceed.Wpf.Toolkit"> - - - + + + - + - - - + + + - + + + + + + + + + + + diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml index e90fdcc9..b7f755cc 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml @@ -125,9 +125,13 @@ IsOpen="{Binding IsChecked, ElementName=PART_DropDownButton}"> - + BorderBrush="{StaticResource PopupDarkBorderBrush}" + MaxHeight="{TemplateBinding MaxDropDownHeight}"> + + + diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs index add955cc..25cad5ed 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs @@ -1344,7 +1344,18 @@ namespace Xceed.Wpf.Toolkit e.Handled = true; - this.ProcessTextInput( e.Text ); + if( this.CharacterCasing == CharacterCasing.Upper ) + { + this.ProcessTextInput( e.Text.ToUpper() ); + } + else if( this.CharacterCasing == CharacterCasing.Lower ) + { + this.ProcessTextInput( e.Text.ToLower() ); + } + else + { + this.ProcessTextInput( e.Text ); + } base.OnTextInput( e ); } diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/MessageBox.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/MessageBox.cs index c7205d91..8c25d69c 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/MessageBox.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/MessageBox.cs @@ -26,6 +26,7 @@ using System.Security; using Xceed.Wpf.Toolkit.Primitives; using System.Diagnostics; using System.Windows.Media.Imaging; +using System.Windows.Threading; namespace Xceed.Wpf.Toolkit { @@ -767,6 +768,51 @@ namespace Xceed.Wpf.Toolkit return msgBox.MessageBoxResult; } + private delegate Window ComputeOwnerWindowCoreDelegate(); + + /// + /// Resolves the owner Window of the MessageBox. + /// + /// the owner Window + private static Window ComputeOwnerWindow() + { + Window result = null; + + if( Application.Current.Dispatcher.CheckAccess() ) + { + result = ComputeOwnerWindowCore(); + } + else + { + Application.Current.Dispatcher.BeginInvoke( new Action( () => + { + result = ComputeOwnerWindowCore(); + } + ) ); + } + + return result; + } + + private static Window ComputeOwnerWindowCore() + { + Window owner = null; + + if( Application.Current != null ) + { + foreach( Window w in Application.Current.Windows ) + { + if( w.IsActive ) + { + owner = w; + break; + } + } + } + + return owner; + } + /// /// Sets the message image source. /// @@ -818,6 +864,7 @@ namespace Xceed.Wpf.Toolkit newWindow.AllowsTransparency = true; newWindow.Background = Brushes.Transparent; newWindow.Content = this; + newWindow.Owner = _owner ?? ComputeOwnerWindow(); if( newWindow.Owner != null ) newWindow.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner; diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/Selector.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/Selector.cs index 11f25f99..a6fd9058 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/Selector.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/Selector.cs @@ -462,6 +462,35 @@ namespace Xceed.Wpf.Toolkit.Primitives return value; } + internal void UpdateFromList( List selectedValues, Func GetItemfunction ) + { + _ignoreSelectedItemsCollectionChanged++; + // Just update the SelectedItems collection content + // and let the synchronization be made from UpdateFromSelectedItems(); + SelectedItems.Clear(); + + if( (selectedValues != null) && (selectedValues.Count > 0) ) + { + ValueEqualityComparer comparer = new ValueEqualityComparer(); + + foreach( object item in ItemsCollection ) + { + object itemValue = GetItemfunction( item ); + + bool isSelected = (itemValue != null) + && selectedValues.Contains( itemValue.ToString(), comparer ); + + if( isSelected ) + { + SelectedItems.Add( item ); + } + } + } + _ignoreSelectedItemsCollectionChanged--; + + this.UpdateFromSelectedItems(); + } + private bool? GetSelectedMemberPathValue( object item ) { PropertyInfo prop = this.GetSelectedMemberPathProperty(item); @@ -734,32 +763,13 @@ namespace Xceed.Wpf.Toolkit.Primitives /// private void UpdateFromSelectedValue() { - _ignoreSelectedItemsCollectionChanged++; - // Just update the SelectedItems collection content - // and let the synchronization be made from UpdateFromSelectedItems(); - SelectedItems.Clear(); - + List selectedValues = null; if( !String.IsNullOrEmpty( SelectedValue ) ) { - List selectedValues = SelectedValue.Split( new string[] { Delimiter }, StringSplitOptions.RemoveEmptyEntries ).ToList(); - ValueEqualityComparer comparer = new ValueEqualityComparer(); - - foreach( object item in ItemsCollection ) - { - object itemValue = this.GetItemValue( item ); - - bool isSelected = ( itemValue != null ) - && selectedValues.Contains( itemValue.ToString(), comparer ); - - if( isSelected ) - { - SelectedItems.Add( item ); - } - } + selectedValues = SelectedValue.Split( new string[] { Delimiter }, StringSplitOptions.RemoveEmptyEntries ).ToList(); } - _ignoreSelectedItemsCollectionChanged--; - this.UpdateFromSelectedItems(); + this.UpdateFromList( selectedValues, this.GetItemValue ); } #endregion //Methods diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Aero2/SelectorItem.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Aero2/SelectorItem.xaml index ac210dbb..ecfdaddf 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Aero2/SelectorItem.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Aero2/SelectorItem.xaml @@ -39,14 +39,18 @@ Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> - + + VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> + + + + diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Generic/SelectorItem.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Generic/SelectorItem.xaml index 1c643794..970e66e3 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Generic/SelectorItem.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Generic/SelectorItem.xaml @@ -40,14 +40,18 @@ Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> - + + VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> + + + + diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/ValueRangeTextBox.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/ValueRangeTextBox.cs index dee26a93..7bc15cc9 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/ValueRangeTextBox.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/ValueRangeTextBox.cs @@ -1100,7 +1100,7 @@ namespace Xceed.Wpf.Toolkit.Primitives if( ( ( value != null ) && ( value != DBNull.Value ) ) && ( value.GetType() != type ) ) { - return System.Convert.ChangeType( value, type, CultureInfo.InvariantCulture ); + return ChangeTypeHelper.ChangeType( value, type, CultureInfo.InvariantCulture ); } return value; diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ContainerHelperBase.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ContainerHelperBase.cs index a3c66bc5..d73a925f 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ContainerHelperBase.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ContainerHelperBase.cs @@ -149,6 +149,10 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid { this.OnAutoGeneratePropertiesChanged(); } + else if( propertyName == ReflectionHelper.GetPropertyOrFieldName( () => ps.HideInheritedProperties ) ) + { + this.OnHideInheritedPropertiesChanged(); + } else if(propertyName == ReflectionHelper.GetPropertyOrFieldName( () => ps.EditorDefinitions )) { this.OnEditorDefinitionsChanged(); @@ -165,6 +169,8 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid protected virtual void OnAutoGeneratePropertiesChanged() { } + protected virtual void OnHideInheritedPropertiesChanged() { } + protected virtual void OnEditorDefinitionsChanged() { } protected virtual void OnPropertyDefinitionsChanged() { } diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Converters/IsDefaultCategoryConverter.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Converters/IsDefaultCategoryConverter.cs new file mode 100644 index 00000000..548c706f --- /dev/null +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Converters/IsDefaultCategoryConverter.cs @@ -0,0 +1,45 @@ +/************************************************************************************* + + Extended WPF Toolkit + + Copyright (C) 2007-2013 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + ***********************************************************************************/ + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Windows.Data; + +namespace Xceed.Wpf.Toolkit.PropertyGrid.Converters +{ + public class IsDefaultCategoryConverter : IValueConverter + { + public object Convert( object value, Type targetType, object parameter, CultureInfo culture ) + { + string categoryName = value as string; + if( categoryName != null ) + { + return ( categoryName == CategoryAttribute.Default.Category ); + } + + return false; + } + + public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture ) + { + throw new NotImplementedException(); + } + } +} diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/CustomPropertyItem.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/CustomPropertyItem.cs index 302c4880..b49c9bc9 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/CustomPropertyItem.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/CustomPropertyItem.cs @@ -32,13 +32,20 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid /// public class CustomPropertyItem : PropertyItemBase { + #region Constructors + internal CustomPropertyItem() { } - internal CustomPropertyItem( bool isPropertyGridCategorized ) + internal CustomPropertyItem( bool isPropertyGridCategorized, bool isSortedAlphabetically ) { _isPropertyGridCategorized = isPropertyGridCategorized; + _isSortedAlphabetically = isSortedAlphabetically; } + #endregion + + #region Properties + #region Category public static readonly DependencyProperty CategoryProperty = @@ -145,5 +152,20 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid } #endregion //Value + + #endregion + + #region Overrides + + protected override void OnEditorChanged( FrameworkElement oldValue, FrameworkElement newValue ) + { + if( oldValue != null ) + oldValue.DataContext = null; + + if( newValue != null ) + newValue.DataContext = this; + } + + #endregion } } 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 da8ff71a..07540dc6 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 @@ -15,6 +15,7 @@ ***********************************************************************************/ using System.Windows; +using Xceed.Wpf.Toolkit.Core.Utilities; namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors { public class PrimitiveTypeCollectionEditor : TypeEditor @@ -39,13 +40,9 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors { Editor.ItemType = type.GetElementType(); } - else if( type.IsGenericType ) + else { - var typeArguments = type.GetGenericArguments(); - if( typeArguments.Length > 0 ) - { - Editor.ItemType = typeArguments[ 0 ]; - } + Editor.ItemType = ListUtilities.GetListItemType( type ); } base.ResolveValueBinding( propertyItem ); diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/IPropertyContainer.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/IPropertyContainer.cs index 358f35f8..465ff068 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/IPropertyContainer.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/IPropertyContainer.cs @@ -42,8 +42,12 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid bool IsCategorized { get; } + bool IsSortedAlphabetically { get; } + bool AutoGenerateProperties { get; } + bool HideInheritedProperties { get; } + FilterInfo FilterInfo { get; } } } 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 89ae7149..15e83471 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs @@ -55,7 +55,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid { try { - List descriptors = ObjectContainerHelperBase.GetPropertyDescriptors( SelectedObject ); + List descriptors = ObjectContainerHelperBase.GetPropertyDescriptors( SelectedObject, this.PropertyContainer.HideInheritedProperties ); foreach( var descriptor in descriptors ) { var propertyDef = this.GetPropertyDefinition( descriptor ); @@ -96,6 +96,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid Debug.Assert( SelectedObject != null ); propertyItem.Instance = SelectedObject; propertyItem.CategoryOrder = this.GetCategoryOrder( definition.CategoryValue ); + propertyItem.WillRefreshPropertyGrid = this.GetWillRefreshPropertyGrid( property ); 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 49b66b8a..16106b33 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs @@ -145,6 +145,11 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid this.RegenerateProperties(); } + protected override void OnHideInheritedPropertiesChanged() + { + this.RegenerateProperties(); + } + protected override void OnEditorDefinitionsChanged() { this.RegenerateProperties(); @@ -167,7 +172,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid private void UpdateCategorization( bool updateSubPropertiesCategorization ) { - _propertyItemCollection.UpdateCategorization( this.ComputeCategoryGroupDescription(), this.PropertyContainer.IsCategorized ); + _propertyItemCollection.UpdateCategorization( this.ComputeCategoryGroupDescription(), this.PropertyContainer.IsCategorized, this.PropertyContainer.IsSortedAlphabetically ); if( updateSubPropertiesCategorization && (_propertyItemCollection.Count > 0) ) { foreach( PropertyItem propertyItem in _propertyItemCollection ) @@ -175,7 +180,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid PropertyItemCollection subPropertyItemsCollection = propertyItem.Properties as PropertyItemCollection; if( subPropertyItemsCollection != null ) { - subPropertyItemsCollection.UpdateCategorization( this.ComputeCategoryGroupDescription(), this.PropertyContainer.IsCategorized ); + subPropertyItemsCollection.UpdateCategorization( this.ComputeCategoryGroupDescription(), this.PropertyContainer.IsCategorized, this.PropertyContainer.IsSortedAlphabetically ); } } } @@ -245,7 +250,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid } } - protected static List GetPropertyDescriptors( object instance ) + protected static List GetPropertyDescriptors( object instance, bool hideInheritedProperties ) { PropertyDescriptorCollection descriptors; @@ -262,14 +267,40 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid descriptors = tc.GetProperties( instance ); } - return ( descriptors != null ) - ? descriptors.Cast().ToList() - : null; + if( ( descriptors != null ) ) + { + var descriptorsProperties = descriptors.Cast(); + if( hideInheritedProperties ) + { + var properties = from p in descriptorsProperties + where p.ComponentType == instance.GetType() + select p; + return properties.ToList(); + } + else + { + return descriptorsProperties.ToList(); + } + } + + return null; } + protected bool GetWillRefreshPropertyGrid( PropertyDescriptor propertyDescriptor ) + { + if( propertyDescriptor == null ) + return false; + + var attribute = PropertyGridUtilities.GetAttribute( propertyDescriptor ); + if( attribute != null ) + return attribute.RefreshProperties != RefreshProperties.None; + + return false; + } + 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 d2a1c6cf..cf937524 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs @@ -213,6 +213,23 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid #endregion //FilterWatermark + #region HideInheritedProperties + + public static readonly DependencyProperty HideInheritedPropertiesProperty = DependencyProperty.Register( "HideInheritedProperties", typeof( bool ), typeof( PropertyGrid ), new UIPropertyMetadata( false ) ); + public bool HideInheritedProperties + { + get + { + return ( bool )GetValue( HideInheritedPropertiesProperty ); + } + set + { + SetValue( HideInheritedPropertiesProperty, value ); + } + } + + #endregion //HideInheritedProperties + #region IsCategorized public static readonly DependencyProperty IsCategorizedProperty = DependencyProperty.Register( "IsCategorized", typeof( bool ), typeof( PropertyGrid ), new UIPropertyMetadata( true, OnIsCategorizedChanged ) ); @@ -748,6 +765,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid UpdateContainerHelper(); EditorDefinitions = new EditorDefinitionCollection(); PropertyDefinitions = new PropertyDefinitionCollection(); + this.PropertyValueChanged += this.PropertyGrid_PropertyValueChanged; AddHandler( PropertyItemBase.ItemSelectionChangedEvent, new RoutedEventHandler( OnItemSelectionChanged ) ); AddHandler( PropertyItemsControl.PreparePropertyItemEvent, new PropertyItemEventHandler( OnPreparePropertyItemInternal ) ); @@ -852,6 +870,24 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid } + private void PropertyGrid_PropertyValueChanged( object sender, PropertyValueChangedEventArgs e ) + { + var modifiedPropertyItem = e.OriginalSource as PropertyItem; + if( modifiedPropertyItem != null ) + { + if( modifiedPropertyItem.WillRefreshPropertyGrid ) + this.UpdateContainerHelper(); + + var parentPropertyItem = modifiedPropertyItem.ParentNode as PropertyItem; + if( ( parentPropertyItem != null ) && parentPropertyItem.IsExpandable ) + { + //Rebuild Editor for parent propertyItem if one of its sub-propertyItem have changed. + this.RebuildEditor( parentPropertyItem ); + } + } + } + + #endregion //Event Handlers #region Commands @@ -870,6 +906,30 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid #region Methods + + + + + + + + + + + + private void RebuildEditor( PropertyItem propertyItem ) + { + ObjectContainerHelperBase objectContainerHelperBase = propertyItem.ContainerHelper as ObjectContainerHelperBase; + //Re-build the editor to update this propertyItem + FrameworkElement editor = objectContainerHelperBase.GenerateChildrenEditorElement( propertyItem ); + if( editor != null ) + { + // Tag the editor as generated to know if we should clear it. + ContainerHelperBase.SetIsGenerated( editor, true ); + propertyItem.Editor = editor; + } + } + private void UpdateContainerHelper() { // Keep a backup of the template element and initialize the @@ -952,6 +1012,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid + #endregion //Methods #region Events @@ -1164,6 +1225,14 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid } } + bool IPropertyContainer.IsSortedAlphabetically + { + get + { + return true; + } + } + #endregion diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItem.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItem.cs index 63263553..8e400e45 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItem.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItem.cs @@ -126,21 +126,23 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid } } - protected override void OnEditorChanged( FrameworkElement oldValue, FrameworkElement newValue ) + protected override object OnCoerceValueChanged( object baseValue ) { - if( oldValue != null ) - oldValue.DataContext = null; + // Propagate error from DescriptorPropertyDefinitionBase to PropertyItem.Value + // to see the red error rectangle in the propertyGrid. + BindingExpression be = this.GetBindingExpression( PropertyItem.ValueProperty ); + this.SetRedInvalidBorder( be ); + return baseValue; + } - if( newValue != null ) - newValue.DataContext = this; + protected override void OnValueChanged( object oldValue, object newValue ) + { + base.OnValueChanged( oldValue, newValue ); } - protected override object OnCoerceValueChanged( object baseValue ) + internal void SetRedInvalidBorder( BindingExpression be ) { - // Propagate error from DescriptorPropertyDefinitionBase to PropertyItem.Value - // to see the red error rectangle in the propertyGrid. - BindingExpression be = GetBindingExpression( PropertyItem.ValueProperty ); - if( ( be != null ) && be.DataItem is DescriptorPropertyDefinitionBase ) + if( (be != null) && be.DataItem is DescriptorPropertyDefinitionBase ) { DescriptorPropertyDefinitionBase descriptor = be.DataItem as DescriptorPropertyDefinitionBase; if( Validation.GetHasError( descriptor ) ) @@ -149,12 +151,6 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid Validation.MarkInvalid( be, errors[ 0 ] ); } } - return baseValue; - } - - protected override void OnValueChanged( object oldValue, object newValue ) - { - base.OnValueChanged( oldValue, newValue ); } private void OnDefinitionContainerHelperInvalidated( object sender, EventArgs e ) @@ -172,7 +168,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid #region Constructors internal PropertyItem( DescriptorPropertyDefinitionBase definition ) - : base( definition.IsPropertyGridCategorized ) + : base( definition.IsPropertyGridCategorized, !definition.PropertyType.IsArray ) { if( definition == null ) throw new ArgumentNullException( "definition" ); diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemBase.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemBase.cs index 049b5c9f..10e6d317 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemBase.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemBase.cs @@ -41,6 +41,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid private ContainerHelperBase _containerHelper; private IPropertyContainer _parentNode; internal bool _isPropertyGridCategorized; + internal bool _isSortedAlphabetically = true; #region Properties @@ -118,7 +119,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid private static void OnEditorChanged( DependencyObject o, DependencyPropertyChangedEventArgs e ) { - PropertyItem propertyItem = o as PropertyItem; + PropertyItemBase propertyItem = o as PropertyItemBase; if( propertyItem != null ) propertyItem.OnEditorChanged( ( FrameworkElement )e.OldValue, ( FrameworkElement )e.NewValue ); } @@ -298,6 +299,25 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid #endregion + #region WillRefreshPropertyGrid + + public static readonly DependencyProperty WillRefreshPropertyGridProperty = + DependencyProperty.Register( "WillRefreshPropertyGrid", typeof( bool ), typeof( PropertyItemBase ), new UIPropertyMetadata( false ) ); + + public bool WillRefreshPropertyGrid + { + get + { + return ( bool )GetValue( WillRefreshPropertyGridProperty ); + } + set + { + SetValue( WillRefreshPropertyGridProperty, value ); + } + } + + #endregion //WillRefreshPropertyGrid + #endregion //Properties #region Events @@ -425,7 +445,10 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid EditorDefinitionCollection IPropertyContainer.EditorDefinitions { - get { return ParentNode.EditorDefinitions; } + get + { + return (this.ParentNode != null) ? this.ParentNode.EditorDefinitions : null; + } } PropertyDefinitionCollection IPropertyContainer.PropertyDefinitions @@ -449,11 +472,27 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid } } + bool IPropertyContainer.IsSortedAlphabetically + { + get + { + return _isSortedAlphabetically; + } + } + bool IPropertyContainer.AutoGenerateProperties { get { return true; } } + bool IPropertyContainer.HideInheritedProperties + { + get + { + return false; + } + } + FilterInfo IPropertyContainer.FilterInfo { get { return new FilterInfo(); } diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemCollection.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemCollection.cs index 955b7cd4..30f87609 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemCollection.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItemCollection.cs @@ -107,7 +107,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid OnCollectionChanged( new NotifyCollectionChangedEventArgs( NotifyCollectionChangedAction.Reset ) ); } - internal void UpdateCategorization( GroupDescription groupDescription, bool isPropertyGridCategorized ) + internal void UpdateCategorization( GroupDescription groupDescription, bool isPropertyGridCategorized, bool sortAlphabetically ) { // Compute Display Order relative to PropertyOrderAttributes on PropertyItem // which could be different in Alphabetical or Categorized mode. @@ -133,7 +133,10 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid } SortBy( PropertyOrderPropertyName, ListSortDirection.Ascending ); - SortBy( DisplayNamePropertyName, ListSortDirection.Ascending ); + if( sortAlphabetically ) + { + SortBy( DisplayNamePropertyName, ListSortDirection.Ascending ); + } } } @@ -153,7 +156,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid var property = item as PropertyItem; if( property.DisplayName != null ) { - return property.DisplayName.ToLower().StartsWith( text.ToLower() ); + return property.DisplayName.ToLower().Contains( text.ToLower() ); } return false; 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 f581426e..bc485ad2 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 @@ -46,6 +46,7 @@ + @@ -523,8 +524,10 @@ - + @@ -535,8 +538,8 @@ - + 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 1807aee4..9378a0fa 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml @@ -44,6 +44,7 @@ + @@ -858,8 +859,10 @@ - + @@ -869,8 +872,8 @@ - + diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs index 8edd7501..669a4e43 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs @@ -261,7 +261,11 @@ namespace Xceed.Wpf.Toolkit { currentValue = Target.Selection.GetPropertyValue( formattingProperty ); } - button.IsChecked = ( ( currentValue == null ) || ( currentValue == DependencyProperty.UnsetValue ) ) + + if( currentValue == DependencyProperty.UnsetValue ) + return; + + button.IsChecked = ( currentValue == null ) ? false : currentValue != null && currentValue.Equals( expectedValue ); } @@ -273,7 +277,11 @@ namespace Xceed.Wpf.Toolkit { value = Target.Selection.GetPropertyValue( TextElement.FontFamilyProperty ); } - FontFamily currentFontFamily = ( FontFamily )( ( ( value == null ) || ( value == DependencyProperty.UnsetValue ) ) ? null : value ); + + if( value == DependencyProperty.UnsetValue ) + return; + + FontFamily currentFontFamily = ( FontFamily )value; if( currentFontFamily != null ) { _cmbFontFamilies.SelectedItem = currentFontFamily; @@ -288,7 +296,10 @@ namespace Xceed.Wpf.Toolkit value = Target.Selection.GetPropertyValue( TextElement.FontSizeProperty ); } - _cmbFontSizes.SelectedValue = ( ( value == null ) || ( value == DependencyProperty.UnsetValue ) ) ? null : value; + if( value == DependencyProperty.UnsetValue ) + return; + + _cmbFontSizes.SelectedValue = value; } private void UpdateFontColor() @@ -299,7 +310,10 @@ namespace Xceed.Wpf.Toolkit value = Target.Selection.GetPropertyValue( TextElement.ForegroundProperty ); } - Color? currentColor = ( ( value == null ) || ( value == DependencyProperty.UnsetValue ) + if( value == DependencyProperty.UnsetValue ) + return; + + Color? currentColor = ( ( value == null ) ? null : ( Color? )( ( SolidColorBrush )value ).Color ); _cmbFontColor.SelectedColor = currentColor; @@ -312,7 +326,11 @@ namespace Xceed.Wpf.Toolkit { value = Target.Selection.GetPropertyValue( TextElement.BackgroundProperty ); } - Color? currentColor = ( ( value == null ) || ( value == DependencyProperty.UnsetValue ) + + if( value == DependencyProperty.UnsetValue ) + return; + + Color? currentColor = ( ( value == null ) ? null : ( Color? )( ( SolidColorBrush )value ).Color ); _cmbFontBackgroundColor.SelectedColor = currentColor; diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Aero2.NormalColor.xaml index 5dd13f4a..bed8d150 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Aero2.NormalColor.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Aero2.NormalColor.xaml @@ -21,83 +21,109 @@ xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes" xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"> - - - + + + - + - - - + + + - + + + + + + + + + + + diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Generic.xaml index 0acaafd7..ebec726c 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Generic.xaml @@ -158,9 +158,13 @@ - + BorderBrush="{StaticResource ColorPickerDarkBorderBrush}" + MaxHeight="{TemplateBinding MaxDropDownHeight}"> + + + diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Themes/Aero/Brushes_NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Themes/Aero/Brushes_NormalColor.xaml index a3e85993..61e2a4a9 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Themes/Aero/Brushes_NormalColor.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Themes/Aero/Brushes_NormalColor.xaml @@ -66,8 +66,8 @@ - - + + @@ -78,8 +78,8 @@ - - + + diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Themes/Aero2.NormalColor.xaml index 5d23bd44..d97f65d1 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Themes/Aero2.NormalColor.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Themes/Aero2.NormalColor.xaml @@ -17,47 +17,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Implementation/WatermarkTextBox.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Implementation/WatermarkTextBox.cs index 5308bec5..1b15b161 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Implementation/WatermarkTextBox.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Implementation/WatermarkTextBox.cs @@ -46,6 +46,23 @@ namespace Xceed.Wpf.Toolkit #endregion //SelectAllOnGotFocus + #region KeepWatermarkOnGotFocus + + public static readonly DependencyProperty KeepWatermarkOnGotFocusProperty = DependencyProperty.Register( "KeepWatermarkOnGotFocus", typeof( bool ), typeof( WatermarkTextBox ), new UIPropertyMetadata( false ) ); + public bool KeepWatermarkOnGotFocus + { + get + { + return ( bool )GetValue( KeepWatermarkOnGotFocusProperty ); + } + set + { + SetValue( KeepWatermarkOnGotFocusProperty, value ); + } + } + + #endregion //KeepWatermarkOnGotFocus + #region Watermark public static readonly DependencyProperty WatermarkProperty = DependencyProperty.Register( "Watermark", typeof( object ), typeof( WatermarkTextBox ), new UIPropertyMetadata( null ) ); diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Aero2.NormalColor.xaml index aba2b3cd..64fb0e0d 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Aero2.NormalColor.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Aero2.NormalColor.xaml @@ -76,6 +76,7 @@ + @@ -83,6 +84,19 @@ + + + + + + + + + diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Generic.xaml b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Generic.xaml index 0207bdfb..c476a40c 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/WatermarkTextBox/Themes/Generic.xaml @@ -83,6 +83,7 @@ + @@ -90,15 +91,26 @@ - + + + + + + + + + + - - diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Wizard/Implementation/Wizard.cs b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Wizard/Implementation/Wizard.cs index 31735a9d..39e0ac4a 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Wizard/Implementation/Wizard.cs +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Wizard/Implementation/Wizard.cs @@ -341,6 +341,9 @@ namespace Xceed.Wpf.Toolkit if( !( o is WizardPage ) ) throw new NotSupportedException( "Wizard should only contains WizardPages." ); } + + if( Items.Count > 0 && CurrentPage == null ) + CurrentPage = Items[ 0 ] as WizardPage; } protected override void OnPropertyChanged( DependencyPropertyChangedEventArgs e ) diff --git a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj index 0ca2abd9..c1996aab 100644 --- a/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj +++ b/ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj @@ -50,10 +50,7 @@ - - False - ..\..\..\..\Bin\Release\WPFToolkit.dll - + @@ -419,6 +416,7 @@ +