Browse Source

pull/1242/head
BoucherS_cp 10 years ago
parent
commit
e3122b7e41
  1. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs
  2. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml
  3. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs
  4. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml
  5. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs
  6. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml
  7. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/AssemblyVersionInfo.cs
  8. 5
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs
  9. 5
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs
  10. 37
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs
  11. 35
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/WindowChromeWorker.cs
  12. 17
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs
  13. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorable.cs
  14. 309
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPane.cs
  15. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutPositionableGroup.cs
  16. 5
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Themes/generic.xaml
  17. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/AssemblyVersionInfo.cs
  18. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/Utils/Wpf/TreeHelper.cs
  19. 1
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml
  20. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/AssemblyInfo.cs
  21. 10
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/Resources.resx
  22. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Service References/NorthwindDataService/Reference.datasvcmap
  23. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs
  24. 1
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/BusyIndicator/Implementation/BusyIndicator.cs
  25. 1
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml
  26. 1
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml
  27. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Utilities/CalculatorUtilities.cs
  28. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs
  29. 20
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs
  30. 17
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs
  31. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs
  32. 59
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MaterialControls/MaterialTabs/Implementation/Converters/TranslateSelectedTabItemConverter.cs
  33. 17
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/CommonNumericUpDown.cs
  34. 7
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Selector.cs
  35. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/DescriptorPropertyDefinition.cs
  36. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.cs
  37. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs
  38. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml
  39. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml
  40. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs
  41. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/TimePicker/Implementation/TimePicker.cs
  42. 1
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj
  43. 40
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Zoombox/Zoombox.cs
  44. 2
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs
  45. 1
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/BusyIndicator/Implementation/BusyIndicator.cs
  46. 18
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/BusyIndicator/Themes/Generic.xaml
  47. 1
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml
  48. 1
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml
  49. 2
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/CalculatorUtilities.cs
  50. 4
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/VersionResourceDictionary.cs
  51. 6
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs
  52. 20
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs
  53. 17
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs
  54. 4
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs
  55. 17
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/CommonNumericUpDown.cs
  56. 7
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/Selector.cs
  57. 4
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/DescriptorPropertyDefinition.cs
  58. 11
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.cs
  59. 8
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs
  60. 4
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml
  61. 2
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml
  62. 2
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs
  63. 4
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/TimePicker/Implementation/TimePicker.cs
  64. 5
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj
  65. 40
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Zoombox/Zoombox.cs

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs

@ -21,7 +21,7 @@
internal static class _XceedVersionInfo internal static class _XceedVersionInfo
{ {
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "2.7"; public const string BaseVersion = "2.8";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion + public const string Version = BaseVersion +
".0.0"; ".0.0";

3
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml

@ -55,7 +55,8 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!--Following border is required to catch mouse events--> <!--Following border is required to catch mouse events-->
<Border Background="Transparent" Grid.RowSpan="2"/> <Border Background="Transparent" Grid.RowSpan="2"/>
<Grid Panel.ZIndex="1" > <Grid Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type avalonDockControls:LayoutDocumentPaneControl}}, Path=Model.ShowHeader, Converter={StaticResource BoolToVisibilityConverter}}"
Panel.ZIndex="1" >
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs

@ -21,7 +21,7 @@
internal static class _XceedVersionInfo internal static class _XceedVersionInfo
{ {
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "2.7"; public const string BaseVersion = "2.8";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion + public const string Version = BaseVersion +
".0.0"; ".0.0";

3
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml

@ -87,7 +87,8 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!--Following border is required to catch mouse events--> <!--Following border is required to catch mouse events-->
<Border Background="Transparent" Grid.RowSpan="2"/> <Border Background="Transparent" Grid.RowSpan="2"/>
<Grid Panel.ZIndex="1"> <Grid Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type avalonDockControls:LayoutDocumentPaneControl}}, Path=Model.ShowHeader, Converter={StaticResource BoolToVisibilityConverter}}"
Panel.ZIndex="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs

@ -21,7 +21,7 @@
internal static class _XceedVersionInfo internal static class _XceedVersionInfo
{ {
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "2.7"; public const string BaseVersion = "2.8";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion + public const string Version = BaseVersion +
".0.0"; ".0.0";

3
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml

@ -109,7 +109,8 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!--Following border is required to catch mouse events--> <!--Following border is required to catch mouse events-->
<Border Background="Transparent" Grid.RowSpan="2"/> <Border Background="Transparent" Grid.RowSpan="2"/>
<Grid Panel.ZIndex="1"> <Grid Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type avalonDockControls:LayoutDocumentPaneControl}}, Path=Model.ShowHeader, Converter={StaticResource BoolToVisibilityConverter}}"
Panel.ZIndex="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/AssemblyVersionInfo.cs

@ -21,7 +21,7 @@
internal static class _XceedVersionInfo internal static class _XceedVersionInfo
{ {
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "2.7"; public const string BaseVersion = "2.8";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion + public const string Version = BaseVersion +
".0.0"; ".0.0";

5
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs

@ -51,8 +51,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected override void Close() protected override void Close()
{ {
if( (_anchorable.Root != null) && (_anchorable.Root.Manager != null) )
{
var dockingManager = _anchorable.Root.Manager; var dockingManager = _anchorable.Root.Manager;
dockingManager._ExecuteCloseCommand(_anchorable); dockingManager._ExecuteCloseCommand( _anchorable );
}
} }
ICommand _defaultHideCommand; ICommand _defaultHideCommand;

5
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs

@ -39,8 +39,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected override void Close() protected override void Close()
{ {
if( (_document.Root != null) && (_document.Root.Manager != null) )
{
var dockingManager = _document.Root.Manager; var dockingManager = _document.Root.Manager;
dockingManager._ExecuteCloseCommand(_document); dockingManager._ExecuteCloseCommand( _document );
}
} }
#region Description #region Description

37
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs

@ -241,6 +241,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
_hwndSrc = HwndSource.FromDependencyObject(this) as HwndSource; _hwndSrc = HwndSource.FromDependencyObject(this) as HwndSource;
_hwndSrcHook = new HwndSourceHook(FilterMessage); _hwndSrcHook = new HwndSourceHook(FilterMessage);
_hwndSrc.AddHook(_hwndSrcHook); _hwndSrc.AddHook(_hwndSrcHook);
// Restore maximize state
var maximized = Model.Descendents().OfType<ILayoutElementForFloatingWindow>().Any(l => l.IsMaximized);
UpdateMaximizedState(maximized);
} }
void OnUnloaded(object sender, RoutedEventArgs e) void OnUnloaded(object sender, RoutedEventArgs e)
@ -368,6 +372,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
posElement.IsMaximized = isMaximized; posElement.IsMaximized = isMaximized;
} }
IsMaximized = isMaximized;
WindowState = isMaximized ? WindowState.Maximized : WindowState.Normal;
} }
@ -423,11 +429,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
break; break;
case Win32Helper.WM_SYSCOMMAND: case Win32Helper.WM_SYSCOMMAND:
IntPtr wMaximize = new IntPtr( Win32Helper.SC_MAXIMIZE ); int command = (int)wParam & 0xFFF0;
IntPtr wRestore = new IntPtr( Win32Helper.SC_RESTORE ); if (command == Win32Helper.SC_MAXIMIZE || command == Win32Helper.SC_RESTORE)
if( wParam == wMaximize || wParam == wRestore )
{ {
UpdateMaximizedState( wParam == wMaximize ); UpdateMaximizedState( command == Win32Helper.SC_MAXIMIZE );
} }
break; break;
} }
@ -477,22 +482,24 @@ namespace Xceed.Wpf.AvalonDock.Controls
#region IsMaximized #region IsMaximized
/// <summary> /// <summary>
/// IsMaximized Read-Only Dependency Property /// IsMaximized Dependency Property
/// </summary> /// </summary>
private static readonly DependencyPropertyKey IsMaximizedPropertyKey
= DependencyProperty.RegisterReadOnly("IsMaximized", typeof(bool), typeof(LayoutFloatingWindowControl),
new FrameworkPropertyMetadata((bool)false));
public static readonly DependencyProperty IsMaximizedProperty public static readonly DependencyProperty IsMaximizedProperty
= IsMaximizedPropertyKey.DependencyProperty; = DependencyProperty.Register( "IsMaximized", typeof( bool ), typeof( LayoutFloatingWindowControl ),
new FrameworkPropertyMetadata( (bool)false ) );
/// <summary> /// <summary>
/// Gets the IsMaximized property. This dependency property /// Gets/sets the IsMaximized property. This dependency property
/// indicates if the window is maximized. /// indicates if the window is maximized.
/// </summary> /// </summary>
public bool IsMaximized public bool IsMaximized
{ {
get { return (bool)GetValue(IsMaximizedProperty); } get { return (bool)GetValue(IsMaximizedProperty); }
private set
{
SetValue(IsMaximizedProperty, value);
UpdatePositionAndSizeOfPanes();
}
} }
/// <summary> /// <summary>
@ -500,14 +507,12 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// This dependency property indicates if the window is maximized. /// This dependency property indicates if the window is maximized.
/// </summary> /// </summary>
/// <param name="value">The new value for the property.</param> /// <param name="value">The new value for the property.</param>
protected void SetIsMaximized(bool value)
{
SetValue(IsMaximizedPropertyKey, value);
}
protected override void OnStateChanged(EventArgs e) protected override void OnStateChanged(EventArgs e)
{ {
SetIsMaximized(WindowState == System.Windows.WindowState.Maximized); //Windows sometimes send unwanted state changes (when minimizing application for instance)
//We force internal state to be used
WindowState = IsMaximized ? WindowState.Maximized : WindowState.Normal;
base.OnStateChanged(e); base.OnStateChanged(e);
} }

35
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/WindowChromeWorker.cs

@ -317,11 +317,14 @@ namespace Microsoft.Windows.Shell
rcLogicalClient.Right - rcLogicalWindow.Right, rcLogicalClient.Right - rcLogicalWindow.Right,
rcLogicalClient.Bottom - rcLogicalWindow.Bottom); rcLogicalClient.Bottom - rcLogicalWindow.Bottom);
rootElement.Margin = new Thickness( if( rootElement != null )
0, {
0, rootElement.Margin = new Thickness(
-(nonClientThickness.Left + nonClientThickness.Right), 0,
-(nonClientThickness.Top + nonClientThickness.Bottom)); 0,
-(nonClientThickness.Left + nonClientThickness.Right),
-(nonClientThickness.Top + nonClientThickness.Bottom) );
}
// The negative thickness on the margin doesn't properly get applied in RTL layouts. // The negative thickness on the margin doesn't properly get applied in RTL layouts.
// The width is right, but there is a black bar on the right. // The width is right, but there is a black bar on the right.
@ -329,13 +332,16 @@ namespace Microsoft.Windows.Shell
// This works fine, but if the window is dynamically changing its FlowDirection then this can have really bizarre side effects. // This works fine, but if the window is dynamically changing its FlowDirection then this can have really bizarre side effects.
// This will mostly work if the FlowDirection is dynamically changed, but there aren't many real scenarios that would call for // This will mostly work if the FlowDirection is dynamically changed, but there aren't many real scenarios that would call for
// that so I'm not addressing the rest of the quirkiness. // that so I'm not addressing the rest of the quirkiness.
if (_window.FlowDirection == FlowDirection.RightToLeft) if( rootElement != null )
{ {
rootElement.RenderTransform = new MatrixTransform(1, 0, 0, 1, -(nonClientThickness.Left + nonClientThickness.Right), 0); if (_window.FlowDirection == FlowDirection.RightToLeft)
} {
else rootElement.RenderTransform = new MatrixTransform(1, 0, 0, 1, -(nonClientThickness.Left + nonClientThickness.Right), 0);
{ }
rootElement.RenderTransform = null; else
{
rootElement.RenderTransform = null;
}
} }
if (!_isFixedUp) if (!_isFixedUp)
@ -1177,8 +1183,11 @@ namespace Microsoft.Windows.Shell
Assert.IsTrue(_isFixedUp); Assert.IsTrue(_isFixedUp);
var rootElement = (FrameworkElement)VisualTreeHelper.GetChild(_window, 0); var rootElement = (FrameworkElement)VisualTreeHelper.GetChild(_window, 0);
// Undo anything that was done before. if( rootElement != null )
rootElement.Margin = new Thickness(); {
// Undo anything that was done before.
rootElement.Margin = new Thickness();
}
_window.StateChanged -= _FixupRestoreBounds; _window.StateChanged -= _FixupRestoreBounds;
_isFixedUp = false; _isFixedUp = false;

17
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs

@ -183,15 +183,15 @@ namespace Xceed.Wpf.AvalonDock
//set focus on active element only after a layout pass is completed //set focus on active element only after a layout pass is completed
//it's possible that it is not yet visible in the visual tree //it's possible that it is not yet visible in the visual tree
if (_setFocusAsyncOperation == null) //if (_setFocusAsyncOperation == null)
{ //{
_setFocusAsyncOperation = Dispatcher.BeginInvoke(new Action(() => // _setFocusAsyncOperation = Dispatcher.BeginInvoke(new Action(() =>
{ // {
if (Layout.ActiveContent != null) if (Layout.ActiveContent != null)
FocusElementManager.SetFocusOnLastElement(Layout.ActiveContent); FocusElementManager.SetFocusOnLastElement(Layout.ActiveContent);
_setFocusAsyncOperation = null; //_setFocusAsyncOperation = null;
} ), DispatcherPriority.Input ); // } ), DispatcherPriority.Input );
} //}
} }
if (!_insideInternalSetActiveContent) if (!_insideInternalSetActiveContent)
@ -2008,7 +2008,7 @@ namespace Xceed.Wpf.AvalonDock
CreateDocumentLayoutItem(documentToImport); CreateDocumentLayoutItem(documentToImport);
} }
_suspendLayoutItemCreation = true; _suspendLayoutItemCreation = false;
var documentsSourceAsNotifier = documentsSource as INotifyCollectionChanged; var documentsSourceAsNotifier = documentsSource as INotifyCollectionChanged;
@ -2385,6 +2385,7 @@ namespace Xceed.Wpf.AvalonDock
var anchorablesToRemove = Layout.Descendents().OfType<LayoutAnchorable>().Where(d => e.OldItems.Contains(d.Content)).ToArray(); var anchorablesToRemove = Layout.Descendents().OfType<LayoutAnchorable>().Where(d => e.OldItems.Contains(d.Content)).ToArray();
foreach (var anchorableToRemove in anchorablesToRemove) foreach (var anchorableToRemove in anchorablesToRemove)
{ {
anchorableToRemove.Content = null;
(anchorableToRemove.Parent as ILayoutContainer).RemoveChild( (anchorableToRemove.Parent as ILayoutContainer).RemoveChild(
anchorableToRemove); anchorableToRemove);
} }

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorable.cs

@ -426,6 +426,7 @@ namespace Xceed.Wpf.AvalonDock.Layout
if (parentGroup.Root.RootPanel.Orientation == Orientation.Horizontal) if (parentGroup.Root.RootPanel.Orientation == Orientation.Horizontal)
{ {
previousContainer = new LayoutAnchorablePane(); previousContainer = new LayoutAnchorablePane();
previousContainer.DockMinWidth = this.AutoHideMinWidth;
parentGroup.Root.RootPanel.Children.Add(previousContainer); parentGroup.Root.RootPanel.Children.Add(previousContainer);
} }
else else
@ -443,6 +444,7 @@ namespace Xceed.Wpf.AvalonDock.Layout
if (parentGroup.Root.RootPanel.Orientation == Orientation.Horizontal) if (parentGroup.Root.RootPanel.Orientation == Orientation.Horizontal)
{ {
previousContainer = new LayoutAnchorablePane(); previousContainer = new LayoutAnchorablePane();
previousContainer.DockMinWidth = this.AutoHideMinWidth;
parentGroup.Root.RootPanel.Children.Insert(0, previousContainer); parentGroup.Root.RootPanel.Children.Insert(0, previousContainer);
} }
else else
@ -460,6 +462,7 @@ namespace Xceed.Wpf.AvalonDock.Layout
if (parentGroup.Root.RootPanel.Orientation == Orientation.Vertical) if (parentGroup.Root.RootPanel.Orientation == Orientation.Vertical)
{ {
previousContainer = new LayoutAnchorablePane(); previousContainer = new LayoutAnchorablePane();
previousContainer.DockMinHeight = this.AutoHideMinHeight;
parentGroup.Root.RootPanel.Children.Insert(0, previousContainer); parentGroup.Root.RootPanel.Children.Insert(0, previousContainer);
} }
else else
@ -477,6 +480,7 @@ namespace Xceed.Wpf.AvalonDock.Layout
if (parentGroup.Root.RootPanel.Orientation == Orientation.Vertical) if (parentGroup.Root.RootPanel.Orientation == Orientation.Vertical)
{ {
previousContainer = new LayoutAnchorablePane(); previousContainer = new LayoutAnchorablePane();
previousContainer.DockMinHeight = this.AutoHideMinHeight;
parentGroup.Root.RootPanel.Children.Add(previousContainer); parentGroup.Root.RootPanel.Children.Add(previousContainer);
} }
else else

309
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocumentPane.cs

@ -23,170 +23,201 @@ using System.Windows.Markup;
namespace Xceed.Wpf.AvalonDock.Layout namespace Xceed.Wpf.AvalonDock.Layout
{ {
[ContentProperty("Children")] [ContentProperty( "Children" )]
[Serializable] [Serializable]
public class LayoutDocumentPane : LayoutPositionableGroup<LayoutContent>, ILayoutDocumentPane, ILayoutPositionableElement, ILayoutContentSelector, ILayoutPaneSerializable public class LayoutDocumentPane : LayoutPositionableGroup<LayoutContent>, ILayoutDocumentPane, ILayoutPositionableElement, ILayoutContentSelector, ILayoutPaneSerializable
{
public LayoutDocumentPane()
{ {
public LayoutDocumentPane() }
{ public LayoutDocumentPane( LayoutContent firstChild )
} {
public LayoutDocumentPane(LayoutContent firstChild) Children.Add( firstChild );
{ }
Children.Add(firstChild);
}
protected override bool GetVisibility() protected override bool GetVisibility()
{ {
if (Parent is LayoutDocumentPaneGroup) if( Parent is LayoutDocumentPaneGroup )
return ChildrenCount > 0; return ChildrenCount > 0;
return true; return true;
} }
#region SelectedContentIndex #region ShowHeader
private int _selectedIndex = -1; private bool _showHeader = true;
public int SelectedContentIndex public bool ShowHeader
{ {
get { return _selectedIndex; } get
set {
{ return _showHeader;
if (value < 0 || }
value >= Children.Count) set
value = -1; {
if( value != _showHeader )
if (_selectedIndex != value) {
{ _showHeader = value;
RaisePropertyChanging("SelectedContentIndex"); RaisePropertyChanged( "ShowHeader" );
RaisePropertyChanging("SelectedContent"); }
if (_selectedIndex >= 0 && }
_selectedIndex < Children.Count) }
Children[_selectedIndex].IsSelected = false;
_selectedIndex = value;
if (_selectedIndex >= 0 &&
_selectedIndex < Children.Count)
Children[_selectedIndex].IsSelected = true;
RaisePropertyChanged("SelectedContentIndex");
RaisePropertyChanged("SelectedContent");
}
}
}
protected override void ChildMoved(int oldIndex, int newIndex) #endregion
{
if (_selectedIndex == oldIndex)
{
RaisePropertyChanging("SelectedContentIndex");
_selectedIndex = newIndex;
RaisePropertyChanged("SelectedContentIndex");
}
#region SelectedContentIndex
base.ChildMoved(oldIndex, newIndex); private int _selectedIndex = -1;
} public int SelectedContentIndex
{
get
{
return _selectedIndex;
}
set
{
if( value < 0 ||
value >= Children.Count )
value = -1;
if( _selectedIndex != value )
{
RaisePropertyChanging( "SelectedContentIndex" );
RaisePropertyChanging( "SelectedContent" );
if( _selectedIndex >= 0 &&
_selectedIndex < Children.Count )
Children[ _selectedIndex ].IsSelected = false;
_selectedIndex = value;
if( _selectedIndex >= 0 &&
_selectedIndex < Children.Count )
Children[ _selectedIndex ].IsSelected = true;
RaisePropertyChanged( "SelectedContentIndex" );
RaisePropertyChanged( "SelectedContent" );
}
}
}
public LayoutContent SelectedContent protected override void ChildMoved( int oldIndex, int newIndex )
{ {
get { return _selectedIndex == -1 ? null : Children[_selectedIndex]; } if( _selectedIndex == oldIndex )
} {
#endregion RaisePropertyChanging( "SelectedContentIndex" );
_selectedIndex = newIndex;
RaisePropertyChanged( "SelectedContentIndex" );
}
protected override void OnChildrenCollectionChanged()
{
if (SelectedContentIndex >= ChildrenCount)
SelectedContentIndex = Children.Count - 1;
if (SelectedContentIndex == -1 && ChildrenCount > 0)
{
if( Root == null )
{
SetNextSelectedIndex();
}
else
{
var childrenToSelect = Children.OrderByDescending( c => c.LastActivationTimeStamp.GetValueOrDefault() ).First();
SelectedContentIndex = Children.IndexOf( childrenToSelect );
childrenToSelect.IsActive = true;
}
}
base.OnChildrenCollectionChanged();
RaisePropertyChanged("ChildrenSorted");
}
public int IndexOf(LayoutContent content) base.ChildMoved( oldIndex, newIndex );
{ }
return Children.IndexOf(content);
}
protected override void OnIsVisibleChanged() public LayoutContent SelectedContent
{ {
UpdateParentVisibility(); get
base.OnIsVisibleChanged(); {
} return _selectedIndex == -1 ? null : Children[ _selectedIndex ];
}
}
#endregion
internal void SetNextSelectedIndex() protected override void OnChildrenCollectionChanged()
{
if( SelectedContentIndex >= ChildrenCount )
SelectedContentIndex = Children.Count - 1;
if( SelectedContentIndex == -1 && ChildrenCount > 0 )
{
if( Root == null )
{ {
SelectedContentIndex = -1; SetNextSelectedIndex();
for( int i = 0; i < this.Children.Count; ++i )
{
if( Children[ i ].IsEnabled )
{
SelectedContentIndex = i;
return;
}
}
} }
else
void UpdateParentVisibility()
{ {
var parentPane = Parent as ILayoutElementWithVisibility; var childrenToSelect = Children.OrderByDescending( c => c.LastActivationTimeStamp.GetValueOrDefault() ).First();
if (parentPane != null) SelectedContentIndex = Children.IndexOf( childrenToSelect );
parentPane.ComputeVisibility(); childrenToSelect.IsActive = true;
} }
}
public IEnumerable<LayoutContent> ChildrenSorted base.OnChildrenCollectionChanged();
{
get RaisePropertyChanged( "ChildrenSorted" );
{ }
var listSorted = Children.ToList();
listSorted.Sort(); public int IndexOf( LayoutContent content )
return listSorted; {
} return Children.IndexOf( content );
} }
string _id; protected override void OnIsVisibleChanged()
string ILayoutPaneSerializable.Id {
UpdateParentVisibility();
base.OnIsVisibleChanged();
}
internal void SetNextSelectedIndex()
{
SelectedContentIndex = -1;
for( int i = 0; i < this.Children.Count; ++i )
{
if( Children[ i ].IsEnabled )
{ {
get SelectedContentIndex = i;
{ return;
return _id;
}
set
{
_id = value;
}
} }
}
}
public override void WriteXml(System.Xml.XmlWriter writer) void UpdateParentVisibility()
{ {
if (_id != null) var parentPane = Parent as ILayoutElementWithVisibility;
writer.WriteAttributeString("Id", _id); if( parentPane != null )
parentPane.ComputeVisibility();
}
base.WriteXml(writer); public IEnumerable<LayoutContent> ChildrenSorted
} {
get
{
var listSorted = Children.ToList();
listSorted.Sort();
return listSorted;
}
}
public override void ReadXml(System.Xml.XmlReader reader) string _id;
{ string ILayoutPaneSerializable.Id
if (reader.MoveToAttribute("Id")) {
_id = reader.Value; get
{
return _id;
}
set
{
_id = value;
}
}
public override void WriteXml( System.Xml.XmlWriter writer )
{
if( _id != null )
writer.WriteAttributeString( "Id", _id );
if( !_showHeader )
writer.WriteAttributeString( "ShowHeader", _showHeader.ToString() );
base.ReadXml(reader); base.WriteXml( writer );
} }
public override void ReadXml( System.Xml.XmlReader reader )
{
if( reader.MoveToAttribute( "Id" ) )
_id = reader.Value;
if( reader.MoveToAttribute( "ShowHeader" ) )
_showHeader = bool.Parse( reader.Value );
base.ReadXml( reader );
}
#if TRACE #if TRACE
@ -200,5 +231,5 @@ namespace Xceed.Wpf.AvalonDock.Layout
} }
#endif #endif
} }
} }

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutPositionableGroup.cs

@ -105,7 +105,7 @@ namespace Xceed.Wpf.AvalonDock.Layout
#region DockMinWidth #region DockMinWidth
private double _dockMinWidth = 100.0; private double _dockMinWidth = 25.0;
public double DockMinWidth public double DockMinWidth
{ {
get { return _dockMinWidth; } get { return _dockMinWidth; }
@ -125,7 +125,7 @@ namespace Xceed.Wpf.AvalonDock.Layout
#region DockMinHeight #region DockMinHeight
private double _dockMinHeight = 100.0; private double _dockMinHeight = 25.0;
public double DockMinHeight public double DockMinHeight
{ {
get { return _dockMinHeight; } get { return _dockMinHeight; }

5
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Themes/generic.xaml

@ -43,8 +43,9 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!--Following border is required to catch mouse events--> <!--Following border is required to catch mouse events-->
<Border Background="Transparent" Grid.RowSpan="2"/> <Border Background="Transparent" Grid.RowSpan="2"/>
<Grid Panel.ZIndex="1"> <Grid Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type avalonDockControls:LayoutDocumentPaneControl}}, Path=Model.ShowHeader, Converter={StaticResource BoolToVisibilityConverter}}"
<Grid.ColumnDefinitions> Panel.ZIndex="1">
<Grid.ColumnDefinitions>
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/AssemblyVersionInfo.cs

@ -19,7 +19,7 @@
internal static class _XceedVersionInfo internal static class _XceedVersionInfo
{ {
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "2.7"; public const string BaseVersion = "2.8";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion + ".0.0"; public const string Version = BaseVersion + ".0.0";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]

6
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/Utils/Wpf/TreeHelper.cs

@ -277,7 +277,11 @@ namespace Xceed.Utils.Wpf
var childrenCount = VisualTreeHelper.GetChildrenCount( parent ); var childrenCount = VisualTreeHelper.GetChildrenCount( parent );
for( int i = 0; i < childrenCount; i++ ) for( int i = 0; i < childrenCount; i++ )
{ {
yield return VisualTreeHelper.GetChild( parent, i ); var child = VisualTreeHelper.GetChild( parent, i );
if( child != null )
{
yield return child;
}
} }
} }
} }

1
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml

@ -624,7 +624,6 @@
IsPlusOnlyFeature="True"/> IsPlusOnlyFeature="True"/>
<core:LiveExplorerTreeViewItem Header="Material Controls" <core:LiveExplorerTreeViewItem Header="Material Controls"
ItemContainerStyle="{StaticResource TreeViewItemStyle}" ItemContainerStyle="{StaticResource TreeViewItemStyle}"
IsNewFeature="True"
IsPlusOnlyFeature="True" IsPlusOnlyFeature="True"
SampleType="{x:Type samples:MaterialControls.Views.MaterialControlsView}" SampleType="{x:Type samples:MaterialControls.Views.MaterialControlsView}"
IsSelected="True"> IsSelected="True">

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/AssemblyInfo.cs

@ -49,8 +49,8 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion( "2.7.*" )] [assembly: AssemblyVersion( "2.8.*" )]
[assembly: AssemblyFileVersion( "2.7.0.0" )] [assembly: AssemblyFileVersion( "2.8.0.0" )]
#pragma warning disable 1699 #pragma warning disable 1699
[assembly: AssemblyDelaySign( false )] [assembly: AssemblyDelaySign( false )]

10
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/Resources.resx

@ -3,7 +3,7 @@
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
Version 2.7 Version 2.8
The primary goals of this format is to allow a simple XML format The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the that is mostly human readable. The generation and parsing of the
@ -14,7 +14,7 @@
... ado.net/XML headers & schema ... ... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.7</resheader> <resheader name="version">2.8</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
@ -106,12 +106,12 @@
<value>text/microsoft-resx</value> <value>text/microsoft-resx</value>
</resheader> </resheader>
<resheader name="version"> <resheader name="version">
<value>2.7</value> <value>2.8</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.7.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.8.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.7.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.8.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
</root> </root>

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Service References/NorthwindDataService/Reference.datasvcmap

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="b0a68de0-12d0-4ced-9f46-c2365c0aa657" xmlns="urn:schemas-microsoft-com:xml-dataservicemap"> <ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="b0a68de0-12d0-4ced-9f46-c2365c0aa657" xmlns="urn:schemas-microsoft-com:xml-dataservicemap">
<MetadataSources> <MetadataSources>
<MetadataSource Address="http://demo.xceed.com/DataGrid_Silverlight/Demo_2.0/NorthwindDataService.svc" Protocol="http" SourceId="1" /> <MetadataSource Address="http://demo.xceed.com/DataGrid_Silverlight/Demo_2.0/Demo_2.0.1/NorthwindDataService.svc" Protocol="http" SourceId="1" />
</MetadataSources> </MetadataSources>
<Metadata> <Metadata>
<MetadataFile FileName="service.edmx" MetadataType="Edmx" ID="2a12012c-5b3b-46f5-ad05-ea33d3a138a6" SourceId="1" SourceUrl="http://demo.xceed.com/DataGrid_Silverlight/Demo_2.0/NorthwindDataService.svc" /> <MetadataFile FileName="service.edmx" MetadataType="Edmx" ID="2a12012c-5b3b-46f5-ad05-ea33d3a138a6" SourceId="1" SourceUrl="http://demo.xceed.com/DataGrid_Silverlight/Demo_2.0/Demo_2.0.1/NorthwindDataService.svc" />
</Metadata> </Metadata>
<Extensions /> <Extensions />
<Parameters> <Parameters>

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs

@ -21,7 +21,7 @@
internal static class _XceedVersionInfo internal static class _XceedVersionInfo
{ {
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "2.7"; public const string BaseVersion = "2.8";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion + public const string Version = BaseVersion +
".0.0"; ".0.0";

1
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/BusyIndicator/Implementation/BusyIndicator.cs

@ -151,7 +151,6 @@ namespace Xceed.Wpf.Toolkit
this.FocusAfterBusy.Dispatcher.BeginInvoke( DispatcherPriority.Input, new Action( () => this.FocusAfterBusy.Dispatcher.BeginInvoke( DispatcherPriority.Input, new Action( () =>
{ {
this.FocusAfterBusy.Focus(); this.FocusAfterBusy.Focus();
this.FocusAfterBusy = null;
} }
) ); ) );
} }

1
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml

@ -56,6 +56,7 @@
<TextBox x:Name="TextBox" <TextBox x:Name="TextBox"
Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
Foreground="{TemplateBinding Foreground}"
BorderThickness="0" BorderThickness="0"
Background="Transparent" Background="Transparent"
IsReadOnly="True" IsReadOnly="True"

1
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml

@ -58,6 +58,7 @@
<TextBox x:Name="TextBox" <TextBox x:Name="TextBox"
Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
Foreground="{TemplateBinding Foreground}"
IsReadOnly="True" IsReadOnly="True"
Focusable="False" Focusable="False"
Cursor="Arrow" Cursor="Arrow"

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Utilities/CalculatorUtilities.cs

@ -81,6 +81,8 @@ namespace Xceed.Wpf.Toolkit.Core.Utilities
for( int i = 0; i < VisualTreeHelper.GetChildrenCount( parent ); i++ ) for( int i = 0; i < VisualTreeHelper.GetChildrenCount( parent ); i++ )
{ {
var child = VisualTreeHelper.GetChild( parent, i ); var child = VisualTreeHelper.GetChild( parent, i );
if( child == null )
continue;
object buttonType = child.GetValue( Button.CommandParameterProperty ); object buttonType = child.GetValue( Button.CommandParameterProperty );

6
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs

@ -74,12 +74,12 @@ namespace Xceed.Wpf.Toolkit
if( !f.Contains( "ddd" ) && !f.Contains( "GMT" ) ) if( !f.Contains( "ddd" ) && !f.Contains( "GMT" ) )
{ {
if( f.Contains( "M" ) ) if( f.Contains( "M" ) )
dateParts[ "Month" ] = dateTimeParts[ i ] != "0" ? dateTimeParts[ i ] : "1"; dateParts[ "Month" ] = dateTimeParts[ i ];
else if( f.Contains( "d" ) ) else if( f.Contains( "d" ) )
dateParts[ "Day" ] = dateTimeParts[ i ] != "0" ? dateTimeParts[ i ] : "1"; dateParts[ "Day" ] = dateTimeParts[ i ];
else if( f.Contains( "y" ) ) else if( f.Contains( "y" ) )
{ {
dateParts[ "Year" ] = dateTimeParts[ i ] != "0" ? dateTimeParts[ i ] : "0001"; dateParts[ "Year" ] = dateTimeParts[ i ] != "0" ? dateTimeParts[ i ] : "0000";
if( dateParts[ "Year" ].Length == 2 ) if( dateParts[ "Year" ].Length == 2 )
dateParts[ "Year" ] = string.Format( "{0}{1}", currentDate.Year / 100, dateParts[ "Year" ] ); dateParts[ "Year" ] = string.Format( "{0}{1}", currentDate.Year / 100, dateParts[ "Year" ] );

20
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs

@ -838,21 +838,17 @@ namespace Xceed.Wpf.Toolkit
result = this.ContextNow; result = this.ContextNow;
DateTime current = this.ContextNow; DateTime current = this.ContextNow;
if( this.Value.HasValue ) try
{ {
current = this.Value.Value; 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 );
} }
else catch( FormatException )
{ {
try isValid = false;
{
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 ) if( !isValid )

17
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs

@ -176,7 +176,7 @@ namespace Xceed.Wpf.Toolkit
public override void OnApplyTemplate() public override void OnApplyTemplate()
{ {
base.OnApplyTemplate(); base.OnApplyTemplate();
Button = GetTemplateChild( PART_DropDownButton ) as ToggleButton; this.Button = this.GetTemplateChild( PART_DropDownButton ) as ToggleButton;
_contentPresenter = GetTemplateChild( PART_ContentPresenter ) as ContentPresenter; _contentPresenter = GetTemplateChild( PART_ContentPresenter ) as ContentPresenter;
@ -198,6 +198,15 @@ namespace Xceed.Wpf.Toolkit
} }
} }
protected override void OnGotFocus( RoutedEventArgs e )
{
base.OnGotFocus( e );
if( this.Button != null )
{
this.Button.Focus();
}
}
#endregion //Base Class Overrides #endregion //Base Class Overrides
#region Events #region Events
@ -320,11 +329,15 @@ namespace Xceed.Wpf.Toolkit
private void CloseDropDown( bool isFocusOnButton ) private void CloseDropDown( bool isFocusOnButton )
{ {
if( IsOpen ) if( IsOpen )
{
IsOpen = false; IsOpen = false;
}
ReleaseMouseCapture(); ReleaseMouseCapture();
if( isFocusOnButton ) if( isFocusOnButton && (this.Button != null) )
{
Button.Focus(); Button.Focus();
}
} }
protected virtual void OnClick() protected virtual void OnClick()

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs

@ -481,7 +481,7 @@ namespace Xceed.Wpf.Toolkit
{ {
MaskedTextProvider provider = maskedTextBox.CreateMaskedTextProvider( ( string )value ); MaskedTextProvider provider = maskedTextBox.CreateMaskedTextProvider( ( string )value );
string rawText = maskedTextBox.GetRawText(); string rawText = MaskedTextBox.GetRawText( maskedTextBox.m_maskedTextProvider );
valid = provider.VerifyString( rawText ); valid = provider.VerifyString( rawText );
} }
@ -1450,7 +1450,7 @@ namespace Xceed.Wpf.Toolkit
internal override string GetCurrentText() internal override string GetCurrentText()
{ {
if( m_maskIsNull ) if( m_maskIsNull )
return string.Empty; return base.GetCurrentText();
string displayText = this.GetFormattedString( m_maskedTextProvider ); string displayText = this.GetFormattedString( m_maskedTextProvider );

59
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MaterialControls/MaterialTabs/Implementation/Converters/TranslateSelectedTabItemConverter.cs

@ -1,59 +0,0 @@
/*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2013 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************/
using System;
using System.Collections.Generic;
using System.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();
}
}
}

17
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/CommonNumericUpDown.cs

@ -183,8 +183,7 @@ namespace Xceed.Wpf.Toolkit
if( object.Equals( currentValueText, text ) ) if( object.Equals( currentValueText, text ) )
return this.Value; return this.Value;
//Don't know why someone would format a T as %, but just in case they do. result = this.IsPercent( this.FormatString )
result = this.ContainsLetterForPercent( this.FormatString )
? _fromDecimal( ParsePercent( text, CultureInfo ) ) ? _fromDecimal( ParsePercent( text, CultureInfo ) )
: _fromText( text, this.ParsingNumberStyle, CultureInfo ); : _fromText( text, this.ParsingNumberStyle, CultureInfo );
@ -224,21 +223,23 @@ namespace Xceed.Wpf.Toolkit
Spinner.ValidSpinDirection = validDirections; Spinner.ValidSpinDirection = validDirections;
} }
private bool ContainsLetterForPercent( string stringToTest ) private bool IsPercent( string stringToTest )
{ {
int PIndex = stringToTest.IndexOf( "P" ); int PIndex = stringToTest.IndexOf( "P" );
if( PIndex > 0 ) if( PIndex >= 0 )
{ {
//stringToTest contains a "P" between 2 "'", it's not considered as percent //stringToTest contains a "P" between 2 "'", it's considered as text, not percent
return !( stringToTest.Substring( 0, PIndex ).Contains( "'" ) bool isText = (stringToTest.Substring( 0, PIndex ).Contains( "'" )
&& stringToTest.Substring( PIndex, FormatString.Length - PIndex ).Contains( "'" ) ); && stringToTest.Substring( PIndex, FormatString.Length - PIndex ).Contains( "'" ));
return !isText;
} }
return false; return false;
} }
private T? GetClippedMinMaxValue() private T? GetClippedMinMaxValue()
{ {
T? result = this.ContainsLetterForPercent( this.FormatString ) T? result = this.IsPercent( this.FormatString )
? _fromDecimal( ParsePercent( this.Text, CultureInfo ) ) ? _fromDecimal( ParsePercent( this.Text, CultureInfo ) )
: _fromText( this.Text, this.ParsingNumberStyle, CultureInfo ); : _fromText( this.Text, this.ParsingNumberStyle, CultureInfo );

7
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Selector.cs

@ -361,7 +361,12 @@ namespace Xceed.Wpf.Toolkit.Primitives
if( !this.IsInitialized ) if( !this.IsInitialized )
return; return;
this.RemoveUnavailableSelectedItems(); if( !VirtualizingStackPanel.GetIsVirtualizing( this )
|| (VirtualizingStackPanel.GetIsVirtualizing( this ) && (newValue != null)) )
{
this.RemoveUnavailableSelectedItems();
}
this.UpdateSelectedMemberPathValuesBindings(); this.UpdateSelectedMemberPathValuesBindings();
this.UpdateValueMemberPathValuesBindings(); this.UpdateValueMemberPathValuesBindings();
} }

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/DescriptorPropertyDefinition.cs

@ -29,6 +29,7 @@ using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
using Xceed.Wpf.Toolkit.PropertyGrid.Commands; using Xceed.Wpf.Toolkit.PropertyGrid.Commands;
using Xceed.Wpf.Toolkit.PropertyGrid.Editors; using Xceed.Wpf.Toolkit.PropertyGrid.Editors;
using System.Reflection; using System.Reflection;
using System.Globalization;
namespace Xceed.Wpf.Toolkit.PropertyGrid namespace Xceed.Wpf.Toolkit.PropertyGrid
{ {
@ -103,7 +104,8 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
Source = SelectedObject, Source = SelectedObject,
Mode = PropertyDescriptor.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay, Mode = PropertyDescriptor.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay,
ValidatesOnDataErrors = true, ValidatesOnDataErrors = true,
ValidatesOnExceptions = true ValidatesOnExceptions = true,
ConverterCulture = CultureInfo.CurrentCulture
}; };
return binding; return binding;

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.cs

@ -41,7 +41,16 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
} }
else if( type.GetGenericArguments().Count() > 0 ) else if( type.GetGenericArguments().Count() > 0 )
{ {
Editor.NewItemTypes = new List<Type>() { type.GetGenericArguments()[ 0 ] }; if( (propertyItem.DescriptorDefinition != null)
&& (propertyItem.DescriptorDefinition.NewItemTypes != null)
&& (propertyItem.DescriptorDefinition.NewItemTypes.Count > 0) )
{
Editor.NewItemTypes = propertyItem.DescriptorDefinition.NewItemTypes;
}
else
{
Editor.NewItemTypes = new List<Type>() { type.GetGenericArguments()[ 0 ] };
}
} }
base.ResolveValueBinding( propertyItem ); base.ResolveValueBinding( propertyItem );

8
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs

@ -945,11 +945,11 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
// remove it. Otherwise, it is a custom menu provided by the user. // remove it. Otherwise, it is a custom menu provided by the user.
// This "default" menu is only valid for the SelectedObject[s] case. Otherwise, // This "default" menu is only valid for the SelectedObject[s] case. Otherwise,
// it is useless and we must remove it. // it is useless and we must remove it.
var defaultAdvancedMenu = ( ContextMenu )this.FindResource( PropertyGrid.SelectedObjectAdvancedOptionsMenuKey ); //var defaultAdvancedMenu = ( ContextMenu )this.FindResource( PropertyGrid.SelectedObjectAdvancedOptionsMenuKey );
if( this.AdvancedOptionsMenu == defaultAdvancedMenu ) //if( this.AdvancedOptionsMenu == defaultAdvancedMenu )
{ //{
this.AdvancedOptionsMenu = null; this.AdvancedOptionsMenu = null;
} //}
} }
} }

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml

@ -778,7 +778,9 @@
<pgconv:SelectedObjectConverter x:Key="objectConverter" /> <pgconv:SelectedObjectConverter x:Key="objectConverter" />
</Style.Resources> </Style.Resources>
<Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalBackgroundKey}}" /> <Setter Property="AdvancedOptionsMenu"
Value="{StaticResource {ComponentResourceKey TypeInTargetAssembly={x:Type pg:PropertyGrid}, ResourceId=SelectedObjectAdvancedOptionsMenu}}" />
<Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalBackgroundKey}}" />
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ControlNormalBorderKey}}" /> <Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ControlNormalBorderKey}}" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="1" />
<Setter Property="SelectedObjectType" Value="{Binding RelativeSource={RelativeSource Self}, Path=SelectedObject, Converter={StaticResource objectConverter}, ConverterParameter=Type}" /> <Setter Property="SelectedObjectType" Value="{Binding RelativeSource={RelativeSource Self}, Path=SelectedObject, Converter={StaticResource objectConverter}, ConverterParameter=Type}" />

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml

@ -1116,6 +1116,8 @@
<Style.Resources> <Style.Resources>
<pgconv:SelectedObjectConverter x:Key="objectConverter" /> <pgconv:SelectedObjectConverter x:Key="objectConverter" />
</Style.Resources> </Style.Resources>
<Setter Property="AdvancedOptionsMenu"
Value="{StaticResource {ComponentResourceKey TypeInTargetAssembly={x:Type pg:PropertyGrid}, ResourceId=SelectedObjectAdvancedOptionsMenu}}" />
<Setter Property="Background" <Setter Property="Background"
Value="#BCC7D8" /> Value="#BCC7D8" />
<Setter Property="BorderBrush" <Setter Property="BorderBrush"

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs

@ -393,7 +393,7 @@ namespace Xceed.Wpf.Toolkit
private void ProcessMove( DragDeltaEventArgs e ) private void ProcessMove( DragDeltaEventArgs e )
{ {
AdornerLayer layer = AdornerLayer.GetAdornerLayer( Target ); AdornerLayer layer = AdornerLayer.GetAdornerLayer( Target );
UIElementAdorner<Control> adorner = layer.GetAdorners( Target )[ 0 ] as UIElementAdorner<Control>; UIElementAdorner<Control> adorner = layer.GetAdorners( Target ).OfType<UIElementAdorner<Control>>().First();
adorner.SetOffsets( adorner.OffsetLeft + e.HorizontalChange, adorner.OffsetTop + e.VerticalChange ); adorner.SetOffsets( adorner.OffsetLeft + e.HorizontalChange, adorner.OffsetTop + e.VerticalChange );
} }

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/TimePicker/Implementation/TimePicker.cs

@ -426,10 +426,10 @@ namespace Xceed.Wpf.Toolkit
return timeItemList; return timeItemList;
} }
private TimeItem CreateTimeItem( TimeSpan time ) protected virtual TimeItem CreateTimeItem( TimeSpan time )
{ {
var date = Value ?? this.ContextNow; var date = Value ?? this.ContextNow;
string formatString = this.GetFormatString( ( DateTimeFormat )this.Format ); string formatString = this.GetFormatString( (DateTimeFormat)this.Format );
return new TimeItem( date.Date.Add( time ).ToString( formatString, CultureInfo ), time ); return new TimeItem( date.Date.Add( time ).ToString( formatString, CultureInfo ), time );
} }

1
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj

@ -414,7 +414,6 @@
<Compile Include="Core\Converters\HalfConverter.cs" /> <Compile Include="Core\Converters\HalfConverter.cs" />
<Compile Include="Core\Converters\IntToThicknessConverter.cs" /> <Compile Include="Core\Converters\IntToThicknessConverter.cs" />
<Compile Include="Core\Converters\ThicknessToDoubleConverter.cs" /> <Compile Include="Core\Converters\ThicknessToDoubleConverter.cs" />
<Compile Include="MaterialControls\MaterialTabs\Implementation\Converters\TranslateSelectedTabItemConverter.cs" />
<Compile Include="Primitives\DateTimePickerBase.cs" /> <Compile Include="Primitives\DateTimePickerBase.cs" />
<Compile Include="Core\Utilities\DateTimeUtilities.cs" /> <Compile Include="Core\Utilities\DateTimeUtilities.cs" />
<Compile Include="PropertyGrid\Implementation\Converters\IsDefaultCategoryConverter.cs" /> <Compile Include="PropertyGrid\Implementation\Converters\IsDefaultCategoryConverter.cs" />

40
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Zoombox/Zoombox.cs

@ -1370,11 +1370,11 @@ namespace Xceed.Wpf.Toolkit.Zoombox
{ {
case HorizontalAlignment.Center: case HorizontalAlignment.Center:
case HorizontalAlignment.Stretch: case HorizontalAlignment.Stretch:
x = ( _content.DesiredSize.Width - contentSize.Width ) / 2; x = ( this.RenderSize.Width - contentSize.Width ) / 2;
break; break;
case HorizontalAlignment.Right: case HorizontalAlignment.Right:
x = _content.DesiredSize.Width - contentSize.Width; x = this.RenderSize.Width - contentSize.Width;
break; break;
} }
@ -1382,11 +1382,11 @@ namespace Xceed.Wpf.Toolkit.Zoombox
{ {
case VerticalAlignment.Center: case VerticalAlignment.Center:
case VerticalAlignment.Stretch: case VerticalAlignment.Stretch:
y = ( _content.DesiredSize.Height - contentSize.Height ) / 2; y = ( this.RenderSize.Height - contentSize.Height ) / 2;
break; break;
case VerticalAlignment.Bottom: case VerticalAlignment.Bottom:
y = _content.DesiredSize.Height - contentSize.Height; y = this.RenderSize.Height - contentSize.Height;
break; break;
} }
@ -2461,7 +2461,7 @@ namespace Xceed.Wpf.Toolkit.Zoombox
new Vector( e.HorizontalChange, e.VerticalChange ) ), new Vector( e.HorizontalChange, e.VerticalChange ) ),
new Rect( new Rect(
new Point( 0, 0 ), new Point( 0, 0 ),
new Point( _content.DesiredSize.Width, _content.DesiredSize.Height ) ) ); new Point( this.RenderSize.Width, this.RenderSize.Height ) ) );
} }
} }
@ -2492,18 +2492,18 @@ namespace Xceed.Wpf.Toolkit.Zoombox
if( _content == null || _verticalScrollBar == null || _horizontalScrollBar == null ) if( _content == null || _verticalScrollBar == null || _horizontalScrollBar == null )
return; return;
var contentSize = ( _content is Viewbox ) ? ( ( Viewbox )_content ).Child.DesiredSize : _content.DesiredSize; var contentSize = ( _content is Viewbox ) ? ( ( Viewbox )_content ).Child.DesiredSize : this.RenderSize;
_verticalScrollBar.SmallChange = 10d; _verticalScrollBar.SmallChange = 10d;
_verticalScrollBar.LargeChange = 10d; _verticalScrollBar.LargeChange = 10d;
_verticalScrollBar.Minimum = 0d; _verticalScrollBar.Minimum = 0d;
_verticalScrollBar.ViewportSize = _content.DesiredSize.Height; _verticalScrollBar.ViewportSize = this.RenderSize.Height;
_verticalScrollBar.Maximum = contentSize.Height - _verticalScrollBar.ViewportSize; _verticalScrollBar.Maximum = contentSize.Height - _verticalScrollBar.ViewportSize;
_horizontalScrollBar.SmallChange = 10d; _horizontalScrollBar.SmallChange = 10d;
_horizontalScrollBar.LargeChange = 10d; _horizontalScrollBar.LargeChange = 10d;
_horizontalScrollBar.Minimum = 0d; _horizontalScrollBar.Minimum = 0d;
_horizontalScrollBar.ViewportSize = _content.DesiredSize.Width; _horizontalScrollBar.ViewportSize = this.RenderSize.Width;
_horizontalScrollBar.Maximum = contentSize.Width - _horizontalScrollBar.ViewportSize; _horizontalScrollBar.Maximum = contentSize.Width - _horizontalScrollBar.ViewportSize;
} }
@ -2720,8 +2720,8 @@ namespace Xceed.Wpf.Toolkit.Zoombox
_content.TranslatePoint( region.BottomRight, _contentPresenter ) ); _content.TranslatePoint( region.BottomRight, _contentPresenter ) );
// calculate actual scale value // calculate actual scale value
double aspectX = _content.DesiredSize.Width / region.Width; double aspectX = this.RenderSize.Width / region.Width;
double aspectY = _content.DesiredSize.Height / region.Height; double aspectY = this.RenderSize.Height / region.Height;
scale = aspectX < aspectY ? aspectX : aspectY; scale = aspectX < aspectY ? aspectX : aspectY;
// scale relative to the anchor point // scale relative to the anchor point
@ -2789,8 +2789,8 @@ namespace Xceed.Wpf.Toolkit.Zoombox
// inflate (or deflate) the rect by the appropriate amounts in the x & y directions // inflate (or deflate) the rect by the appropriate amounts in the x & y directions
region = Rect.Inflate( currentContentRect, region = Rect.Inflate( currentContentRect,
( _content.DesiredSize.Width / _viewboxFactor - currentContentRect.Width ) / 2, ( this.RenderSize.Width / _viewboxFactor - currentContentRect.Width ) / 2,
( _content.DesiredSize.Height / _viewboxFactor - currentContentRect.Height ) / 2 ); ( this.RenderSize.Height / _viewboxFactor - currentContentRect.Height ) / 2 );
// now translate the centered rect back to the coordinate space of the content // now translate the centered rect back to the coordinate space of the content
region = new Rect( this.TranslatePoint( region.TopLeft, _content ), this.TranslatePoint( region.BottomRight, _content ) ); region = new Rect( this.TranslatePoint( region.TopLeft, _content ), this.TranslatePoint( region.BottomRight, _content ) );
@ -2934,7 +2934,7 @@ namespace Xceed.Wpf.Toolkit.Zoombox
_contentPresenter.RenderTransform = tg; _contentPresenter.RenderTransform = tg;
var initialContentSize = ( _content is Viewbox ) ? ( ( Viewbox )_content ).Child.DesiredSize : _content.DesiredSize; var initialContentSize = ( _content is Viewbox ) ? ( ( Viewbox )_content ).Child.DesiredSize : this.RenderSize;
var scaledContentSize = new Size( initialContentSize.Width * newRelativeScale, initialContentSize.Height * newRelativeScale ); var scaledContentSize = new Size( initialContentSize.Width * newRelativeScale, initialContentSize.Height * newRelativeScale );
if( allowAnimation && IsAnimated ) if( allowAnimation && IsAnimated )
@ -3064,7 +3064,7 @@ namespace Xceed.Wpf.Toolkit.Zoombox
private Rect CalculateFillRect() private Rect CalculateFillRect()
{ {
// determine the x-y ratio of the current Viewport // determine the x-y ratio of the current Viewport
double xyRatio = _content.DesiredSize.Width / _content.DesiredSize.Height; double xyRatio = this.RenderSize.Width / this.RenderSize.Height;
// now find the maximal rect within the ContentRect that has the same ratio // now find the maximal rect within the ContentRect that has the same ratio
double x = 0; double x = 0;
@ -3106,8 +3106,8 @@ namespace Xceed.Wpf.Toolkit.Zoombox
// calculate actual zoom, which must fit the entire selection // calculate actual zoom, which must fit the entire selection
// while maintaining a 1:1 ratio // while maintaining a 1:1 ratio
double aspectX = _content.DesiredSize.Width / region.Width; double aspectX = this.RenderSize.Width / region.Width;
double aspectY = _content.DesiredSize.Height / region.Height; double aspectY = this.RenderSize.Height / region.Height;
newRelativeScale = aspectX < aspectY ? aspectX : aspectY; newRelativeScale = aspectX < aspectY ? aspectX : aspectY;
// ensure that the scale value falls within the valid range // ensure that the scale value falls within the valid range
@ -3128,22 +3128,22 @@ namespace Xceed.Wpf.Toolkit.Zoombox
{ {
case HorizontalAlignment.Center: case HorizontalAlignment.Center:
case HorizontalAlignment.Stretch: case HorizontalAlignment.Stretch:
horizontalOffset = ( _content.DesiredSize.Width - region.Width * newRelativeScale ) / 2; horizontalOffset = ( this.RenderSize.Width - region.Width * newRelativeScale ) / 2;
break; break;
case HorizontalAlignment.Right: case HorizontalAlignment.Right:
horizontalOffset = ( _content.DesiredSize.Width - region.Width * newRelativeScale ); horizontalOffset = ( this.RenderSize.Width - region.Width * newRelativeScale );
break; break;
} }
switch( VerticalContentAlignment ) switch( VerticalContentAlignment )
{ {
case VerticalAlignment.Center: case VerticalAlignment.Center:
case VerticalAlignment.Stretch: case VerticalAlignment.Stretch:
verticalOffset = ( _content.DesiredSize.Height - region.Height * newRelativeScale ) / 2; verticalOffset = ( this.RenderSize.Height - region.Height * newRelativeScale ) / 2;
break; break;
case VerticalAlignment.Bottom: case VerticalAlignment.Bottom:
verticalOffset = ( _content.DesiredSize.Height - region.Height * newRelativeScale ); verticalOffset = ( this.RenderSize.Height - region.Height * newRelativeScale );
break; break;
} }
newRelativePosition = newRelativePosition =

2
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs

@ -21,7 +21,7 @@
internal static class _XceedVersionInfo internal static class _XceedVersionInfo
{ {
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "2.7"; public const string BaseVersion = "2.8";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion + public const string Version = BaseVersion +
".0.0"; ".0.0";

1
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/BusyIndicator/Implementation/BusyIndicator.cs

@ -151,7 +151,6 @@ namespace Xceed.Wpf.Toolkit
this.FocusAfterBusy.Dispatcher.BeginInvoke( DispatcherPriority.Input, new Action( () => this.FocusAfterBusy.Dispatcher.BeginInvoke( DispatcherPriority.Input, new Action( () =>
{ {
this.FocusAfterBusy.Focus(); this.FocusAfterBusy.Focus();
this.FocusAfterBusy = null;
} }
) ); ) );
} }

18
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/BusyIndicator/Themes/Generic.xaml

@ -17,11 +17,13 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Converters"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit"> xmlns:local="clr-namespace:Xceed.Wpf.Toolkit">
<!-- =============================================================================== --> <!-- =============================================================================== -->
<!-- BusyIndicator --> <!-- BusyIndicator -->
<!-- =============================================================================== --> <!-- =============================================================================== -->
<conv:ProgressBarWidthConverter x:Key="ProgressBarWidthConverter" />
<Style TargetType="{x:Type local:BusyIndicator}"> <Style TargetType="{x:Type local:BusyIndicator}">
<Setter Property="BusyContent" Value="Please wait..." /> <Setter Property="BusyContent" Value="Please wait..." />
@ -138,13 +140,23 @@
<GradientStop Color="#FFB8B8B8" Offset="0.996" /> <GradientStop Color="#FFB8B8B8" Offset="0.996" />
</LinearGradientBrush> </LinearGradientBrush>
</Border.Background> </Border.Background>
<Grid MinWidth="150"> <Grid x:Name="_grid"
MinWidth="150">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition /> <RowDefinition />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ContentControl Content="{TemplateBinding BusyContent}" ContentTemplate="{TemplateBinding BusyContentTemplate}" Margin="8" /> <ContentControl Content="{TemplateBinding BusyContent}" ContentTemplate="{TemplateBinding BusyContentTemplate}" Margin="8" HorizontalAlignment="Center"/>
<ProgressBar Grid.Row="1" Style="{TemplateBinding ProgressBarStyle}" /> <ProgressBar Grid.Row="1" Style="{TemplateBinding ProgressBarStyle}" >
<ProgressBar.Width>
<MultiBinding Converter="{StaticResource ProgressBarWidthConverter}">
<Binding Path="ActualWidth"
ElementName="busyContent" />
<Binding Path="MinWidth"
ElementName="_grid" />
</MultiBinding>
</ProgressBar.Width>
</ProgressBar>
</Grid> </Grid>
</Border> </Border>
</Border> </Border>

1
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml

@ -56,6 +56,7 @@
<TextBox x:Name="TextBox" <TextBox x:Name="TextBox"
Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
Foreground="{TemplateBinding Foreground}"
BorderThickness="0" BorderThickness="0"
Background="Transparent" Background="Transparent"
IsReadOnly="True" IsReadOnly="True"

1
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml

@ -58,6 +58,7 @@
<TextBox x:Name="TextBox" <TextBox x:Name="TextBox"
Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
Foreground="{TemplateBinding Foreground}"
IsReadOnly="True" IsReadOnly="True"
Focusable="False" Focusable="False"
Cursor="Arrow" Cursor="Arrow"

2
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Utilities/CalculatorUtilities.cs

@ -81,6 +81,8 @@ namespace Xceed.Wpf.Toolkit.Core.Utilities
for( int i = 0; i < VisualTreeHelper.GetChildrenCount( parent ); i++ ) for( int i = 0; i < VisualTreeHelper.GetChildrenCount( parent ); i++ )
{ {
var child = VisualTreeHelper.GetChild( parent, i ); var child = VisualTreeHelper.GetChild( parent, i );
if( child == null )
continue;
object buttonType = child.GetValue( Button.CommandParameterProperty ); object buttonType = child.GetValue( Button.CommandParameterProperty );

4
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/VersionResourceDictionary.cs

@ -87,8 +87,8 @@ namespace Xceed.Wpf.Toolkit.Core
throw new InvalidOperationException( "AssemblyName and SourcePath must be set during initialization" ); throw new InvalidOperationException( "AssemblyName and SourcePath must be set during initialization" );
//Using an absolute path is necessary in VS2015 for themes different than Windows 8. //Using an absolute path is necessary in VS2015 for themes different than Windows 8.
string uriStr = string.Format(@"pack://application:,,,/{0};v{1};component/{2}", this.AssemblyName, _XceedVersionInfo.Version, this.SourcePath); string uriStr = string.Format( @"pack://application:,,,/{0};v{1};component/{2}", this.AssemblyName, _XceedVersionInfo.Version, this.SourcePath );
this.Source = new Uri(uriStr, UriKind.Absolute); this.Source = new Uri( uriStr, UriKind.Absolute );
} }
base.EndInit(); base.EndInit();

6
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs

@ -74,12 +74,12 @@ namespace Xceed.Wpf.Toolkit
if( !f.Contains( "ddd" ) && !f.Contains( "GMT" ) ) if( !f.Contains( "ddd" ) && !f.Contains( "GMT" ) )
{ {
if( f.Contains( "M" ) ) if( f.Contains( "M" ) )
dateParts[ "Month" ] = dateTimeParts[ i ] != "0" ? dateTimeParts[ i ] : "1"; dateParts[ "Month" ] = dateTimeParts[ i ];
else if( f.Contains( "d" ) ) else if( f.Contains( "d" ) )
dateParts[ "Day" ] = dateTimeParts[ i ] != "0" ? dateTimeParts[ i ] : "1"; dateParts[ "Day" ] = dateTimeParts[ i ];
else if( f.Contains( "y" ) ) else if( f.Contains( "y" ) )
{ {
dateParts[ "Year" ] = dateTimeParts[ i ] != "0" ? dateTimeParts[ i ] : "0001"; dateParts[ "Year" ] = dateTimeParts[ i ] != "0" ? dateTimeParts[ i ] : "0000";
if( dateParts[ "Year" ].Length == 2 ) if( dateParts[ "Year" ].Length == 2 )
dateParts[ "Year" ] = string.Format( "{0}{1}", currentDate.Year / 100, dateParts[ "Year" ] ); dateParts[ "Year" ] = string.Format( "{0}{1}", currentDate.Year / 100, dateParts[ "Year" ] );

20
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs

@ -838,21 +838,17 @@ namespace Xceed.Wpf.Toolkit
result = this.ContextNow; result = this.ContextNow;
DateTime current = this.ContextNow; DateTime current = this.ContextNow;
if( this.Value.HasValue ) try
{ {
current = this.Value.Value; 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 );
} }
else catch( FormatException )
{ {
try isValid = false;
{
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 ) if( !isValid )

17
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs

@ -176,7 +176,7 @@ namespace Xceed.Wpf.Toolkit
public override void OnApplyTemplate() public override void OnApplyTemplate()
{ {
base.OnApplyTemplate(); base.OnApplyTemplate();
Button = GetTemplateChild( PART_DropDownButton ) as ToggleButton; this.Button = this.GetTemplateChild( PART_DropDownButton ) as ToggleButton;
_contentPresenter = GetTemplateChild( PART_ContentPresenter ) as ContentPresenter; _contentPresenter = GetTemplateChild( PART_ContentPresenter ) as ContentPresenter;
@ -198,6 +198,15 @@ namespace Xceed.Wpf.Toolkit
} }
} }
protected override void OnGotFocus( RoutedEventArgs e )
{
base.OnGotFocus( e );
if( this.Button != null )
{
this.Button.Focus();
}
}
#endregion //Base Class Overrides #endregion //Base Class Overrides
#region Events #region Events
@ -320,11 +329,15 @@ namespace Xceed.Wpf.Toolkit
private void CloseDropDown( bool isFocusOnButton ) private void CloseDropDown( bool isFocusOnButton )
{ {
if( IsOpen ) if( IsOpen )
{
IsOpen = false; IsOpen = false;
}
ReleaseMouseCapture(); ReleaseMouseCapture();
if( isFocusOnButton ) if( isFocusOnButton && (this.Button != null) )
{
Button.Focus(); Button.Focus();
}
} }
protected virtual void OnClick() protected virtual void OnClick()

4
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs

@ -481,7 +481,7 @@ namespace Xceed.Wpf.Toolkit
{ {
MaskedTextProvider provider = maskedTextBox.CreateMaskedTextProvider( ( string )value ); MaskedTextProvider provider = maskedTextBox.CreateMaskedTextProvider( ( string )value );
string rawText = maskedTextBox.GetRawText(); string rawText = MaskedTextBox.GetRawText( maskedTextBox.m_maskedTextProvider );
valid = provider.VerifyString( rawText ); valid = provider.VerifyString( rawText );
} }
@ -1450,7 +1450,7 @@ namespace Xceed.Wpf.Toolkit
internal override string GetCurrentText() internal override string GetCurrentText()
{ {
if( m_maskIsNull ) if( m_maskIsNull )
return string.Empty; return base.GetCurrentText();
string displayText = this.GetFormattedString( m_maskedTextProvider ); string displayText = this.GetFormattedString( m_maskedTextProvider );

17
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/NumericUpDown/Implementation/CommonNumericUpDown.cs

@ -183,8 +183,7 @@ namespace Xceed.Wpf.Toolkit
if( object.Equals( currentValueText, text ) ) if( object.Equals( currentValueText, text ) )
return this.Value; return this.Value;
//Don't know why someone would format a T as %, but just in case they do. result = this.IsPercent( this.FormatString )
result = this.ContainsLetterForPercent( this.FormatString )
? _fromDecimal( ParsePercent( text, CultureInfo ) ) ? _fromDecimal( ParsePercent( text, CultureInfo ) )
: _fromText( text, this.ParsingNumberStyle, CultureInfo ); : _fromText( text, this.ParsingNumberStyle, CultureInfo );
@ -224,21 +223,23 @@ namespace Xceed.Wpf.Toolkit
Spinner.ValidSpinDirection = validDirections; Spinner.ValidSpinDirection = validDirections;
} }
private bool ContainsLetterForPercent( string stringToTest ) private bool IsPercent( string stringToTest )
{ {
int PIndex = stringToTest.IndexOf( "P" ); int PIndex = stringToTest.IndexOf( "P" );
if( PIndex > 0 ) if( PIndex >= 0 )
{ {
//stringToTest contains a "P" between 2 "'", it's not considered as percent //stringToTest contains a "P" between 2 "'", it's considered as text, not percent
return !( stringToTest.Substring( 0, PIndex ).Contains( "'" ) bool isText = (stringToTest.Substring( 0, PIndex ).Contains( "'" )
&& stringToTest.Substring( PIndex, FormatString.Length - PIndex ).Contains( "'" ) ); && stringToTest.Substring( PIndex, FormatString.Length - PIndex ).Contains( "'" ));
return !isText;
} }
return false; return false;
} }
private T? GetClippedMinMaxValue() private T? GetClippedMinMaxValue()
{ {
T? result = this.ContainsLetterForPercent( this.FormatString ) T? result = this.IsPercent( this.FormatString )
? _fromDecimal( ParsePercent( this.Text, CultureInfo ) ) ? _fromDecimal( ParsePercent( this.Text, CultureInfo ) )
: _fromText( this.Text, this.ParsingNumberStyle, CultureInfo ); : _fromText( this.Text, this.ParsingNumberStyle, CultureInfo );

7
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Primitives/Selector.cs

@ -361,7 +361,12 @@ namespace Xceed.Wpf.Toolkit.Primitives
if( !this.IsInitialized ) if( !this.IsInitialized )
return; return;
this.RemoveUnavailableSelectedItems(); if( !VirtualizingStackPanel.GetIsVirtualizing( this )
|| (VirtualizingStackPanel.GetIsVirtualizing( this ) && (newValue != null)) )
{
this.RemoveUnavailableSelectedItems();
}
this.UpdateSelectedMemberPathValuesBindings(); this.UpdateSelectedMemberPathValuesBindings();
this.UpdateValueMemberPathValuesBindings(); this.UpdateValueMemberPathValuesBindings();
} }

4
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/DescriptorPropertyDefinition.cs

@ -29,6 +29,7 @@ using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
using Xceed.Wpf.Toolkit.PropertyGrid.Commands; using Xceed.Wpf.Toolkit.PropertyGrid.Commands;
using Xceed.Wpf.Toolkit.PropertyGrid.Editors; using Xceed.Wpf.Toolkit.PropertyGrid.Editors;
using System.Reflection; using System.Reflection;
using System.Globalization;
namespace Xceed.Wpf.Toolkit.PropertyGrid namespace Xceed.Wpf.Toolkit.PropertyGrid
{ {
@ -103,7 +104,8 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
Source = SelectedObject, Source = SelectedObject,
Mode = PropertyDescriptor.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay, Mode = PropertyDescriptor.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay,
ValidatesOnDataErrors = true, ValidatesOnDataErrors = true,
ValidatesOnExceptions = true ValidatesOnExceptions = true,
ConverterCulture = CultureInfo.CurrentCulture
}; };
return binding; return binding;

11
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.cs

@ -41,7 +41,16 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
} }
else if( type.GetGenericArguments().Count() > 0 ) else if( type.GetGenericArguments().Count() > 0 )
{ {
Editor.NewItemTypes = new List<Type>() { type.GetGenericArguments()[ 0 ] }; if( (propertyItem.DescriptorDefinition != null)
&& (propertyItem.DescriptorDefinition.NewItemTypes != null)
&& (propertyItem.DescriptorDefinition.NewItemTypes.Count > 0) )
{
Editor.NewItemTypes = propertyItem.DescriptorDefinition.NewItemTypes;
}
else
{
Editor.NewItemTypes = new List<Type>() { type.GetGenericArguments()[ 0 ] };
}
} }
base.ResolveValueBinding( propertyItem ); base.ResolveValueBinding( propertyItem );

8
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs

@ -945,11 +945,11 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
// remove it. Otherwise, it is a custom menu provided by the user. // remove it. Otherwise, it is a custom menu provided by the user.
// This "default" menu is only valid for the SelectedObject[s] case. Otherwise, // This "default" menu is only valid for the SelectedObject[s] case. Otherwise,
// it is useless and we must remove it. // it is useless and we must remove it.
var defaultAdvancedMenu = ( ContextMenu )this.FindResource( PropertyGrid.SelectedObjectAdvancedOptionsMenuKey ); //var defaultAdvancedMenu = ( ContextMenu )this.FindResource( PropertyGrid.SelectedObjectAdvancedOptionsMenuKey );
if( this.AdvancedOptionsMenu == defaultAdvancedMenu ) //if( this.AdvancedOptionsMenu == defaultAdvancedMenu )
{ //{
this.AdvancedOptionsMenu = null; this.AdvancedOptionsMenu = null;
} //}
} }
} }

4
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml

@ -778,7 +778,9 @@
<pgconv:SelectedObjectConverter x:Key="objectConverter" /> <pgconv:SelectedObjectConverter x:Key="objectConverter" />
</Style.Resources> </Style.Resources>
<Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalBackgroundKey}}" /> <Setter Property="AdvancedOptionsMenu"
Value="{StaticResource {ComponentResourceKey TypeInTargetAssembly={x:Type pg:PropertyGrid}, ResourceId=SelectedObjectAdvancedOptionsMenu}}" />
<Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalBackgroundKey}}" />
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ControlNormalBorderKey}}" /> <Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ControlNormalBorderKey}}" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="1" />
<Setter Property="SelectedObjectType" Value="{Binding RelativeSource={RelativeSource Self}, Path=SelectedObject, Converter={StaticResource objectConverter}, ConverterParameter=Type}" /> <Setter Property="SelectedObjectType" Value="{Binding RelativeSource={RelativeSource Self}, Path=SelectedObject, Converter={StaticResource objectConverter}, ConverterParameter=Type}" />

2
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml

@ -1116,6 +1116,8 @@
<Style.Resources> <Style.Resources>
<pgconv:SelectedObjectConverter x:Key="objectConverter" /> <pgconv:SelectedObjectConverter x:Key="objectConverter" />
</Style.Resources> </Style.Resources>
<Setter Property="AdvancedOptionsMenu"
Value="{StaticResource {ComponentResourceKey TypeInTargetAssembly={x:Type pg:PropertyGrid}, ResourceId=SelectedObjectAdvancedOptionsMenu}}" />
<Setter Property="Background" <Setter Property="Background"
Value="#BCC7D8" /> Value="#BCC7D8" />
<Setter Property="BorderBrush" <Setter Property="BorderBrush"

2
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs

@ -393,7 +393,7 @@ namespace Xceed.Wpf.Toolkit
private void ProcessMove( DragDeltaEventArgs e ) private void ProcessMove( DragDeltaEventArgs e )
{ {
AdornerLayer layer = AdornerLayer.GetAdornerLayer( Target ); AdornerLayer layer = AdornerLayer.GetAdornerLayer( Target );
UIElementAdorner<Control> adorner = layer.GetAdorners( Target )[ 0 ] as UIElementAdorner<Control>; UIElementAdorner<Control> adorner = layer.GetAdorners( Target ).OfType<UIElementAdorner<Control>>().First();
adorner.SetOffsets( adorner.OffsetLeft + e.HorizontalChange, adorner.OffsetTop + e.VerticalChange ); adorner.SetOffsets( adorner.OffsetLeft + e.HorizontalChange, adorner.OffsetTop + e.VerticalChange );
} }

4
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/TimePicker/Implementation/TimePicker.cs

@ -426,10 +426,10 @@ namespace Xceed.Wpf.Toolkit
return timeItemList; return timeItemList;
} }
private TimeItem CreateTimeItem( TimeSpan time ) protected virtual TimeItem CreateTimeItem( TimeSpan time )
{ {
var date = Value ?? this.ContextNow; var date = Value ?? this.ContextNow;
string formatString = this.GetFormatString( ( DateTimeFormat )this.Format ); string formatString = this.GetFormatString( (DateTimeFormat)this.Format );
return new TimeItem( date.Date.Add( time ).ToString( formatString, CultureInfo ), time ); return new TimeItem( date.Date.Add( time ).ToString( formatString, CultureInfo ), time );
} }

5
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj

@ -50,7 +50,10 @@
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
<Reference Include="WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> <Reference Include="WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\2.6.0\Bin\Release\WPFToolkit.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Page Include="BusyIndicator\Themes\Aero2.NormalColor.xaml"> <Page Include="BusyIndicator\Themes\Aero2.NormalColor.xaml">

40
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Zoombox/Zoombox.cs

@ -1370,11 +1370,11 @@ namespace Xceed.Wpf.Toolkit.Zoombox
{ {
case HorizontalAlignment.Center: case HorizontalAlignment.Center:
case HorizontalAlignment.Stretch: case HorizontalAlignment.Stretch:
x = ( _content.DesiredSize.Width - contentSize.Width ) / 2; x = ( this.RenderSize.Width - contentSize.Width ) / 2;
break; break;
case HorizontalAlignment.Right: case HorizontalAlignment.Right:
x = _content.DesiredSize.Width - contentSize.Width; x = this.RenderSize.Width - contentSize.Width;
break; break;
} }
@ -1382,11 +1382,11 @@ namespace Xceed.Wpf.Toolkit.Zoombox
{ {
case VerticalAlignment.Center: case VerticalAlignment.Center:
case VerticalAlignment.Stretch: case VerticalAlignment.Stretch:
y = ( _content.DesiredSize.Height - contentSize.Height ) / 2; y = ( this.RenderSize.Height - contentSize.Height ) / 2;
break; break;
case VerticalAlignment.Bottom: case VerticalAlignment.Bottom:
y = _content.DesiredSize.Height - contentSize.Height; y = this.RenderSize.Height - contentSize.Height;
break; break;
} }
@ -2461,7 +2461,7 @@ namespace Xceed.Wpf.Toolkit.Zoombox
new Vector( e.HorizontalChange, e.VerticalChange ) ), new Vector( e.HorizontalChange, e.VerticalChange ) ),
new Rect( new Rect(
new Point( 0, 0 ), new Point( 0, 0 ),
new Point( _content.DesiredSize.Width, _content.DesiredSize.Height ) ) ); new Point( this.RenderSize.Width, this.RenderSize.Height ) ) );
} }
} }
@ -2492,18 +2492,18 @@ namespace Xceed.Wpf.Toolkit.Zoombox
if( _content == null || _verticalScrollBar == null || _horizontalScrollBar == null ) if( _content == null || _verticalScrollBar == null || _horizontalScrollBar == null )
return; return;
var contentSize = ( _content is Viewbox ) ? ( ( Viewbox )_content ).Child.DesiredSize : _content.DesiredSize; var contentSize = ( _content is Viewbox ) ? ( ( Viewbox )_content ).Child.DesiredSize : this.RenderSize;
_verticalScrollBar.SmallChange = 10d; _verticalScrollBar.SmallChange = 10d;
_verticalScrollBar.LargeChange = 10d; _verticalScrollBar.LargeChange = 10d;
_verticalScrollBar.Minimum = 0d; _verticalScrollBar.Minimum = 0d;
_verticalScrollBar.ViewportSize = _content.DesiredSize.Height; _verticalScrollBar.ViewportSize = this.RenderSize.Height;
_verticalScrollBar.Maximum = contentSize.Height - _verticalScrollBar.ViewportSize; _verticalScrollBar.Maximum = contentSize.Height - _verticalScrollBar.ViewportSize;
_horizontalScrollBar.SmallChange = 10d; _horizontalScrollBar.SmallChange = 10d;
_horizontalScrollBar.LargeChange = 10d; _horizontalScrollBar.LargeChange = 10d;
_horizontalScrollBar.Minimum = 0d; _horizontalScrollBar.Minimum = 0d;
_horizontalScrollBar.ViewportSize = _content.DesiredSize.Width; _horizontalScrollBar.ViewportSize = this.RenderSize.Width;
_horizontalScrollBar.Maximum = contentSize.Width - _horizontalScrollBar.ViewportSize; _horizontalScrollBar.Maximum = contentSize.Width - _horizontalScrollBar.ViewportSize;
} }
@ -2720,8 +2720,8 @@ namespace Xceed.Wpf.Toolkit.Zoombox
_content.TranslatePoint( region.BottomRight, _contentPresenter ) ); _content.TranslatePoint( region.BottomRight, _contentPresenter ) );
// calculate actual scale value // calculate actual scale value
double aspectX = _content.DesiredSize.Width / region.Width; double aspectX = this.RenderSize.Width / region.Width;
double aspectY = _content.DesiredSize.Height / region.Height; double aspectY = this.RenderSize.Height / region.Height;
scale = aspectX < aspectY ? aspectX : aspectY; scale = aspectX < aspectY ? aspectX : aspectY;
// scale relative to the anchor point // scale relative to the anchor point
@ -2789,8 +2789,8 @@ namespace Xceed.Wpf.Toolkit.Zoombox
// inflate (or deflate) the rect by the appropriate amounts in the x & y directions // inflate (or deflate) the rect by the appropriate amounts in the x & y directions
region = Rect.Inflate( currentContentRect, region = Rect.Inflate( currentContentRect,
( _content.DesiredSize.Width / _viewboxFactor - currentContentRect.Width ) / 2, ( this.RenderSize.Width / _viewboxFactor - currentContentRect.Width ) / 2,
( _content.DesiredSize.Height / _viewboxFactor - currentContentRect.Height ) / 2 ); ( this.RenderSize.Height / _viewboxFactor - currentContentRect.Height ) / 2 );
// now translate the centered rect back to the coordinate space of the content // now translate the centered rect back to the coordinate space of the content
region = new Rect( this.TranslatePoint( region.TopLeft, _content ), this.TranslatePoint( region.BottomRight, _content ) ); region = new Rect( this.TranslatePoint( region.TopLeft, _content ), this.TranslatePoint( region.BottomRight, _content ) );
@ -2934,7 +2934,7 @@ namespace Xceed.Wpf.Toolkit.Zoombox
_contentPresenter.RenderTransform = tg; _contentPresenter.RenderTransform = tg;
var initialContentSize = ( _content is Viewbox ) ? ( ( Viewbox )_content ).Child.DesiredSize : _content.DesiredSize; var initialContentSize = ( _content is Viewbox ) ? ( ( Viewbox )_content ).Child.DesiredSize : this.RenderSize;
var scaledContentSize = new Size( initialContentSize.Width * newRelativeScale, initialContentSize.Height * newRelativeScale ); var scaledContentSize = new Size( initialContentSize.Width * newRelativeScale, initialContentSize.Height * newRelativeScale );
if( allowAnimation && IsAnimated ) if( allowAnimation && IsAnimated )
@ -3064,7 +3064,7 @@ namespace Xceed.Wpf.Toolkit.Zoombox
private Rect CalculateFillRect() private Rect CalculateFillRect()
{ {
// determine the x-y ratio of the current Viewport // determine the x-y ratio of the current Viewport
double xyRatio = _content.DesiredSize.Width / _content.DesiredSize.Height; double xyRatio = this.RenderSize.Width / this.RenderSize.Height;
// now find the maximal rect within the ContentRect that has the same ratio // now find the maximal rect within the ContentRect that has the same ratio
double x = 0; double x = 0;
@ -3106,8 +3106,8 @@ namespace Xceed.Wpf.Toolkit.Zoombox
// calculate actual zoom, which must fit the entire selection // calculate actual zoom, which must fit the entire selection
// while maintaining a 1:1 ratio // while maintaining a 1:1 ratio
double aspectX = _content.DesiredSize.Width / region.Width; double aspectX = this.RenderSize.Width / region.Width;
double aspectY = _content.DesiredSize.Height / region.Height; double aspectY = this.RenderSize.Height / region.Height;
newRelativeScale = aspectX < aspectY ? aspectX : aspectY; newRelativeScale = aspectX < aspectY ? aspectX : aspectY;
// ensure that the scale value falls within the valid range // ensure that the scale value falls within the valid range
@ -3128,22 +3128,22 @@ namespace Xceed.Wpf.Toolkit.Zoombox
{ {
case HorizontalAlignment.Center: case HorizontalAlignment.Center:
case HorizontalAlignment.Stretch: case HorizontalAlignment.Stretch:
horizontalOffset = ( _content.DesiredSize.Width - region.Width * newRelativeScale ) / 2; horizontalOffset = ( this.RenderSize.Width - region.Width * newRelativeScale ) / 2;
break; break;
case HorizontalAlignment.Right: case HorizontalAlignment.Right:
horizontalOffset = ( _content.DesiredSize.Width - region.Width * newRelativeScale ); horizontalOffset = ( this.RenderSize.Width - region.Width * newRelativeScale );
break; break;
} }
switch( VerticalContentAlignment ) switch( VerticalContentAlignment )
{ {
case VerticalAlignment.Center: case VerticalAlignment.Center:
case VerticalAlignment.Stretch: case VerticalAlignment.Stretch:
verticalOffset = ( _content.DesiredSize.Height - region.Height * newRelativeScale ) / 2; verticalOffset = ( this.RenderSize.Height - region.Height * newRelativeScale ) / 2;
break; break;
case VerticalAlignment.Bottom: case VerticalAlignment.Bottom:
verticalOffset = ( _content.DesiredSize.Height - region.Height * newRelativeScale ); verticalOffset = ( this.RenderSize.Height - region.Height * newRelativeScale );
break; break;
} }
newRelativePosition = newRelativePosition =

Loading…
Cancel
Save