Browse Source

V4.2.0 Released

pull/1677/merge 4.2.0
Simon Boucher 4 years ago
parent
commit
5a8bbe7895
  1. 15
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTabPanel.cs
  2. 1
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTarget.cs
  3. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs
  4. 157
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableTabItem.cs
  5. 60
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentTabItem.cs
  6. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs
  7. 181
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutPanelControl.cs
  8. 33
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/NativeMethods.cs
  9. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/Utilities.cs
  10. 10
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs
  11. 18
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutContent.cs
  12. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Win32Helper.cs
  13. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridDefaultEditorsView.xaml.cs.txt
  14. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/AssemblyInfo.cs
  15. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/PropertyGrid/Views/PropertyGridDefaultEditorsView.xaml.cs
  16. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs
  17. 186
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/ButtonSpinner/Implementation/ButtonSpinner.cs
  18. 25
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/ButtonSpinner/Themes/Aero2.NormalColor.xaml
  19. 25
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/ButtonSpinner/Themes/Generic.xaml
  20. 68
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CalculatorUpDown/Implementation/CalculatorUpDown.cs
  21. 48
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CalculatorUpDown/Themes/Aero2.NormalColor.xaml
  22. 48
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CalculatorUpDown/Themes/Generic.xaml
  23. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlDialog.xaml.cs
  24. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Aero2.NormalColor.xaml
  25. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml
  26. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Media/WindowColors.cs
  27. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/PackUriExtension.cs
  28. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs
  29. 48
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColor.xaml
  30. 48
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml
  31. 35
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Themes/Aero2.NormalColor.xaml
  32. 25
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Themes/Generic.xaml
  33. 83
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs
  34. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MessageBox/Implementation/MessageBox.cs
  35. 13
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/NumericUpDown/Themes/Aero2.NormalColor.xaml
  36. 13
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/NumericUpDown/Themes/Generic.xaml
  37. 68
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/DateTimePickerBase.cs
  38. 20
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/SelectAllSelector.cs
  39. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Aero2/WindowControl.xaml
  40. 102
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/UpDownBase.cs
  41. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/ValueRangeTextBox.cs
  42. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Properties/AssemblyInfo.cs
  43. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Converters/PropertyItemEditorConverter.cs
  44. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/DescriptorPropertyDefinition.cs
  45. 71
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/PasswordEditor.cs
  46. 21
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/TextBlockEditor.cs
  47. 10
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs
  48. 13
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItem.cs
  49. 7
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml
  50. 7
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml
  51. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Themes/Aero2/Common.xaml
  52. 22
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Themes/Aero2/Glyphs.xaml
  53. 22
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Themes/Generic/Glyphs.xaml
  54. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/TimePicker/Implementation/TimePicker.cs
  55. 48
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/TimePicker/Themes/Aero2.NormalColor.xaml
  56. 48
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/TimePicker/Themes/Generic.xaml
  57. 29
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/TimeSpanUpDown/Themes/Aero2.NormalColor.xaml
  58. 23
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/TimeSpanUpDown/Themes/Generic.xaml
  59. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Utils/Exceptions/ThrowException.cs
  60. 1
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj
  61. 336
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Zoombox/Zoombox.cs
  62. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Zoombox/ZoomboxCursors.cs

15
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTabPanel.cs

@ -93,21 +93,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
return finalSize;
}
protected override void OnMouseLeave( System.Windows.Input.MouseEventArgs e )
{
if( e.LeftButton == System.Windows.Input.MouseButtonState.Pressed &&
LayoutAnchorableTabItem.IsDraggingItem() )
{
var contentModel = LayoutAnchorableTabItem.GetDraggingItem().Model as LayoutAnchorable;
var manager = contentModel.Root.Manager;
LayoutAnchorableTabItem.ResetDraggingItem();
manager.StartDraggingFloatingWindowForContent( contentModel );
}
base.OnMouseLeave( e );
}
#endregion
}
}

1
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTarget.cs

@ -119,6 +119,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
currentActiveContent.IsSelected = false;
currentActiveContent.IsActive = false;
currentActiveContent.IsActive = true;
currentActiveContent.IsFloating = false;
} ), DispatcherPriority.Background );
}
}

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

@ -352,7 +352,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
if( DockCommand == null )
this.SetCurrentValue( LayoutAnchorableItem.DockCommandProperty, _defaultDockCommand );
Visibility = _anchorable.IsVisible ? Visibility.Visible : System.Windows.Visibility.Hidden;
this.SetCurrentValue( LayoutAnchorableItem.VisibilityProperty, _anchorable.IsVisible ? Visibility.Visible : System.Windows.Visibility.Hidden );
base.SetDefaultBindings();
}

157
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableTabItem.cs

@ -15,6 +15,8 @@
***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
@ -27,9 +29,17 @@ namespace Xceed.Wpf.AvalonDock.Controls
{
#region Members
private static double MinDragBuffer = 5d;
private static double MaxDragBuffer = 50d;
private bool _isMouseDown = false;
private static LayoutAnchorableTabItem _draggingItem = null;
private static bool _cancelMouseLeave = false;
private Point _mouseDownPoint;
private double _mouseLastChangePositionX;
private Rect _parentAnchorableTabPanelScreenArea;
private List<Rect> _otherTabsScreenArea = null;
private List<TabItem> _otherTabs = null;
private AnchorablePaneTabPanel _parentAnchorableTabPanel;
private double _dragBuffer = MinDragBuffer;
#endregion
@ -136,98 +146,127 @@ namespace Xceed.Wpf.AvalonDock.Controls
base.OnMouseLeftButtonDown( e );
_isMouseDown = true;
_draggingItem = this;
_mouseDownPoint = e.GetPosition( this );
}
protected override void OnMouseMove( System.Windows.Input.MouseEventArgs e )
{
base.OnMouseMove( e );
if( e.LeftButton != MouseButtonState.Pressed )
var ptMouseMove = e.GetPosition( this );
if( _isMouseDown )
{
_isMouseDown = false;
_draggingItem = null;
if( Math.Abs( ptMouseMove.X - _mouseDownPoint.X ) > SystemParameters.MinimumHorizontalDragDistance ||
Math.Abs( ptMouseMove.Y - _mouseDownPoint.Y ) > SystemParameters.MinimumVerticalDragDistance )
{
this.UpdateDragDetails();
this.CaptureMouse();
_isMouseDown = false;
}
}
else
if( this.IsMouseCaptured )
{
_cancelMouseLeave = false;
var mousePosInScreenCoord = this.PointToScreenDPI( ptMouseMove );
if( !_parentAnchorableTabPanelScreenArea.Contains( mousePosInScreenCoord ) )
{
var contentModel = this.Model as LayoutAnchorable;
var manager = contentModel.Root.Manager;
this.ReleaseMouseCapture();
manager.StartDraggingFloatingWindowForContent( contentModel );
}
else
{
int indexOfTabItemWithMouseOver = _otherTabsScreenArea.FindIndex( r => r.Contains( mousePosInScreenCoord ) );
if( indexOfTabItemWithMouseOver >= 0 )
{
var targetModel = _otherTabs[ indexOfTabItemWithMouseOver ].Content as LayoutContent;
var container = this.Model.Parent as ILayoutContainer;
var containerPane = this.Model.Parent as ILayoutPane;
var currentTabScreenArea = this.FindLogicalAncestor<TabItem>().GetScreenArea();
// Inside current TabItem, do not care about _mouseLastChangePosition for next change position.
if( targetModel == this.Model )
{
_mouseLastChangePositionX = currentTabScreenArea.Left + ( currentTabScreenArea.Width / 2 );
}
if( ( containerPane is LayoutAnchorablePane ) && !( (LayoutAnchorablePane)containerPane ).CanRepositionItems )
return;
if( ( containerPane.Parent != null ) && ( containerPane.Parent is LayoutAnchorablePaneGroup ) && !( (LayoutAnchorablePaneGroup)containerPane.Parent ).CanRepositionItems )
return;
var childrenList = container.Children.ToList();
var currentIndex = childrenList.IndexOf( this.Model );
var newIndex = childrenList.IndexOf( targetModel );
if( currentIndex != newIndex )
{
// Moving left when cursor leave tabItem or moving left past last change position.
// Or, moving right cursor leave tabItem or moving right past last change position.
if( ( ( mousePosInScreenCoord.X < currentTabScreenArea.Left ) && ( mousePosInScreenCoord.X < _mouseLastChangePositionX ) )
|| ( ( mousePosInScreenCoord.X > ( currentTabScreenArea.Left + currentTabScreenArea.Width ) ) && ( mousePosInScreenCoord.X > _mouseLastChangePositionX ) ) )
{
containerPane.MoveChild( currentIndex, newIndex );
_dragBuffer = MaxDragBuffer;
_parentAnchorableTabPanel.UpdateLayout();
this.UpdateDragDetails();
_mouseLastChangePositionX = mousePosInScreenCoord.X;
}
}
}
}
}
}
protected override void OnMouseLeftButtonUp( System.Windows.Input.MouseButtonEventArgs e )
{
if( this.IsMouseCaptured )
{
this.ReleaseMouseCapture();
}
_isMouseDown = false;
_dragBuffer = MinDragBuffer;
base.OnMouseLeftButtonUp( e );
Model.IsActive = true;
this.Model.IsActive = true;
}
protected override void OnMouseLeave( System.Windows.Input.MouseEventArgs e )
{
base.OnMouseLeave( e );
if( _isMouseDown && e.LeftButton == MouseButtonState.Pressed )
{
// drag the item if the mouse leave is not canceled.
// Mouse leave should be canceled when selecting a new tab to prevent automatic undock when Panel size is Auto.
_draggingItem = !_cancelMouseLeave ? this : null;
}
_isMouseDown = false;
_cancelMouseLeave = false;
}
protected override void OnMouseEnter( MouseEventArgs e )
{
base.OnMouseEnter( e );
if( _draggingItem != null
&& _draggingItem != this
&& e.LeftButton == MouseButtonState.Pressed )
{
var model = Model;
var container = model.Parent as ILayoutContainer;
var containerPane = model.Parent as ILayoutPane;
if( ( containerPane is LayoutAnchorablePane ) && !( ( LayoutAnchorablePane )containerPane ).CanRepositionItems )
return;
if( ( containerPane.Parent != null ) && ( containerPane.Parent is LayoutAnchorablePaneGroup ) && !( ( LayoutAnchorablePaneGroup )containerPane.Parent ).CanRepositionItems )
return;
var childrenList = container.Children.ToList();
containerPane.MoveChild( childrenList.IndexOf( _draggingItem.Model ), childrenList.IndexOf( model ) );
}
}
protected override void OnPreviewGotKeyboardFocus( KeyboardFocusChangedEventArgs e )
{
base.OnPreviewGotKeyboardFocus( e );
_isMouseDown = false;
}
#endregion
#region Internal Methods
internal static bool IsDraggingItem()
{
return _draggingItem != null;
}
#region Private Methods
internal static LayoutAnchorableTabItem GetDraggingItem()
private void UpdateDragDetails()
{
return _draggingItem;
}
internal static void ResetDraggingItem()
{
_draggingItem = null;
}
internal static void CancelMouseLeave()
{
_cancelMouseLeave = true;
_parentAnchorableTabPanel = this.FindLogicalAncestor<AnchorablePaneTabPanel>();
_parentAnchorableTabPanelScreenArea = _parentAnchorableTabPanel.GetScreenArea();
_parentAnchorableTabPanelScreenArea.Inflate( 0, _dragBuffer );
_otherTabs = _parentAnchorableTabPanel.Children.Cast<TabItem>().Where( ch => ch.Visibility != System.Windows.Visibility.Collapsed ).ToList();
var currentTabScreenArea = this.FindLogicalAncestor<TabItem>().GetScreenArea();
_otherTabsScreenArea = _otherTabs.Select( ti =>
{
var screenArea = ti.GetScreenArea();
var rect = new Rect( screenArea.Left, screenArea.Top, screenArea.Width, screenArea.Height );
rect.Inflate( 0, _dragBuffer );
return rect;
} ).ToList();
}
#endregion
}
#endregion
}
}

60
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentTabItem.cs

@ -29,12 +29,17 @@ namespace Xceed.Wpf.AvalonDock.Controls
{
#region Members
private static double MinDragBuffer = 5d;
private static double MaxDragBuffer = 50d;
private List<Rect> _otherTabsScreenArea = null;
private List<TabItem> _otherTabs = null;
private Rect _parentDocumentTabPanelScreenArea;
private DocumentPaneTabPanel _parentDocumentTabPanel;
private bool _isMouseDown = false;
private Point _mouseDownPoint;
private double _mouseLastChangePositionX;
private double _dragBuffer = MinDragBuffer;
#endregion
@ -159,10 +164,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
{
base.OnMouseMove( e );
var ptMouseMove = e.GetPosition( this );
if( _isMouseDown )
{
Point ptMouseMove = e.GetPosition( this );
if( Math.Abs( ptMouseMove.X - _mouseDownPoint.X ) > SystemParameters.MinimumHorizontalDragDistance ||
Math.Abs( ptMouseMove.Y - _mouseDownPoint.Y ) > SystemParameters.MinimumVerticalDragDistance )
{
@ -174,7 +179,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
if( this.IsMouseCaptured )
{
var mousePosInScreenCoord = this.PointToScreenDPI( e.GetPosition( this ) );
var mousePosInScreenCoord = this.PointToScreenDPI( ptMouseMove );
if( !_parentDocumentTabPanelScreenArea.Contains( mousePosInScreenCoord ) )
{
this.StartDraggingFloatingWindowForContent();
@ -187,17 +193,38 @@ namespace Xceed.Wpf.AvalonDock.Controls
var targetModel = _otherTabs[ indexOfTabItemWithMouseOver ].Content as LayoutContent;
var container = this.Model.Parent as ILayoutContainer;
var containerPane = this.Model.Parent as ILayoutPane;
var currentTabScreenArea = this.FindLogicalAncestor<TabItem>().GetScreenArea();
if( ( containerPane is LayoutDocumentPane ) && !( ( LayoutDocumentPane )containerPane ).CanRepositionItems )
// Inside current TabItem, do not care about _mouseLastChangePosition for next change position.
if( targetModel == this.Model )
{
_mouseLastChangePositionX = currentTabScreenArea.Left + ( currentTabScreenArea.Width / 2 );
}
if( ( containerPane is LayoutDocumentPane ) && !( (LayoutDocumentPane)containerPane ).CanRepositionItems )
return;
if( ( containerPane.Parent != null ) && ( containerPane.Parent is LayoutDocumentPaneGroup ) && !( ( LayoutDocumentPaneGroup )containerPane.Parent ).CanRepositionItems )
if( ( containerPane.Parent != null ) && ( containerPane.Parent is LayoutDocumentPaneGroup ) && !( (LayoutDocumentPaneGroup)containerPane.Parent ).CanRepositionItems )
return;
var childrenList = container.Children.ToList();
containerPane.MoveChild( childrenList.IndexOf( Model ), childrenList.IndexOf( targetModel ) );
this.Model.IsActive = true;
_parentDocumentTabPanel.UpdateLayout();
this.UpdateDragDetails();
var currentIndex = childrenList.IndexOf( this.Model );
var newIndex = childrenList.IndexOf( targetModel );
if( currentIndex != newIndex )
{
// Moving left when cursor leave tabItem or moving left past last change position.
// Or, moving right cursor leave tabItem or moving right past last change position.
if( ( ( mousePosInScreenCoord.X < currentTabScreenArea.Left ) && ( mousePosInScreenCoord.X < _mouseLastChangePositionX ) )
|| ( ( mousePosInScreenCoord.X > ( currentTabScreenArea.Left + currentTabScreenArea.Width ) ) && ( mousePosInScreenCoord.X > _mouseLastChangePositionX ) ) )
{
containerPane.MoveChild( currentIndex, newIndex );
_dragBuffer = MaxDragBuffer;
this.Model.IsActive = true;
_parentDocumentTabPanel.UpdateLayout();
this.UpdateDragDetails();
_mouseLastChangePositionX = mousePosInScreenCoord.X;
}
}
}
}
}
@ -206,8 +233,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected override void OnMouseLeftButtonUp( System.Windows.Input.MouseButtonEventArgs e )
{
if( IsMouseCaptured )
ReleaseMouseCapture();
{
this.ReleaseMouseCapture();
}
_isMouseDown = false;
_dragBuffer = MinDragBuffer;
base.OnMouseLeftButtonUp( e );
}
@ -243,13 +273,15 @@ namespace Xceed.Wpf.AvalonDock.Controls
{
_parentDocumentTabPanel = this.FindLogicalAncestor<DocumentPaneTabPanel>();
_parentDocumentTabPanelScreenArea = _parentDocumentTabPanel.GetScreenArea();
_otherTabs = _parentDocumentTabPanel.Children.Cast<TabItem>().Where( ch =>
ch.Visibility != System.Windows.Visibility.Collapsed ).ToList();
Rect currentTabScreenArea = this.FindLogicalAncestor<TabItem>().GetScreenArea();
_parentDocumentTabPanelScreenArea.Inflate( 0, _dragBuffer );
_otherTabs = _parentDocumentTabPanel.Children.Cast<TabItem>().Where( ch => ch.Visibility != System.Windows.Visibility.Collapsed ).ToList();
var currentTabScreenArea = this.FindLogicalAncestor<TabItem>().GetScreenArea();
_otherTabsScreenArea = _otherTabs.Select( ti =>
{
var screenArea = ti.GetScreenArea();
return new Rect( screenArea.Left, screenArea.Top, currentTabScreenArea.Width, screenArea.Height );
var rect = new Rect( screenArea.Left, screenArea.Top, screenArea.Width, screenArea.Height );
rect.Inflate( 0, _dragBuffer );
return rect;
} ).ToList();
}

6
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs

@ -1181,9 +1181,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
this.SetCurrentValue( LayoutItem.MoveToPreviousTabGroupCommandProperty, _defaultMoveToPreviousTabGroupCommand );
IsSelected = LayoutElement.IsSelected;
IsActive = LayoutElement.IsActive;
CanClose = LayoutElement.CanClose;
this.SetCurrentValue( LayoutItem.IsSelectedProperty, LayoutElement.IsSelected );
this.SetCurrentValue( LayoutItem.IsActiveProperty, LayoutElement.IsActive );
this.SetCurrentValue( LayoutItem.CanCloseProperty, LayoutElement.CanClose );
}
protected virtual void OnVisibilityChanged()

181
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutPanelControl.cs

@ -45,96 +45,97 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected override void OnFixChildrenDockLengths()
{
if( ActualWidth == 0.0 ||
ActualHeight == 0.0 )
return;
var modelAsPositionableElement = _model as ILayoutPositionableElementWithActualSize;
#region Setup DockWidth/Height for children
if( _model.Orientation == Orientation.Horizontal )
{
if( _model.ContainsChildOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() )
{
for( int i = 0; i < _model.Children.Count; i++ )
{
var childContainerModel = _model.Children[ i ] as ILayoutContainer;
var childPositionableModel = _model.Children[ i ] as ILayoutPositionableElement;
if( childContainerModel != null &&
( childContainerModel.IsOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() ||
childContainerModel.ContainsChildOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() ) )
{
// childPositionableModel.DockWidth = new GridLength( 1.0, GridUnitType.Star );
}
else if( (childPositionableModel != null) && childPositionableModel.DockWidth.IsStar )
{
var childPositionableModelWidthActualSize = childPositionableModel as ILayoutPositionableElementWithActualSize;
if( childPositionableModelWidthActualSize.ActualWidth == 0d )
continue;
var widthToSet = Math.Max( childPositionableModelWidthActualSize.ActualWidth, childPositionableModel.DockMinWidth );
widthToSet = Math.Min( widthToSet, ActualWidth / 2.0 );
widthToSet = Math.Max( widthToSet, childPositionableModel.DockMinWidth );
childPositionableModel.DockWidth = new GridLength( double.IsNaN( widthToSet ) ? ActualWidth / 2.0 : widthToSet, GridUnitType.Pixel );
}
}
}
//else
//{
// for( int i = 0; i < _model.Children.Count; i++ )
// {
// var childPositionableModel = _model.Children[ i ] as ILayoutPositionableElement;
// if( !childPositionableModel.DockWidth.IsStar )
// {
// childPositionableModel.DockWidth = new GridLength( 1.0, GridUnitType.Star );
// }
// }
//}
}
else
{
if( _model.ContainsChildOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() )
{
for( int i = 0; i < _model.Children.Count; i++ )
{
var childContainerModel = _model.Children[ i ] as ILayoutContainer;
var childPositionableModel = _model.Children[ i ] as ILayoutPositionableElement;
if( childContainerModel != null &&
( childContainerModel.IsOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() ||
childContainerModel.ContainsChildOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() ) )
{
//childPositionableModel.DockHeight = new GridLength( 1.0, GridUnitType.Star );
}
else if( (childPositionableModel != null) && childPositionableModel.DockHeight.IsStar )
{
var childPositionableModelWidthActualSize = childPositionableModel as ILayoutPositionableElementWithActualSize;
if( childPositionableModelWidthActualSize.ActualHeight == 0d )
continue;
var heightToSet = Math.Max( childPositionableModelWidthActualSize.ActualHeight, childPositionableModel.DockMinHeight );
heightToSet = Math.Min( heightToSet, ActualHeight / 2.0 );
heightToSet = Math.Max( heightToSet, childPositionableModel.DockMinHeight );
childPositionableModel.DockHeight = new GridLength( double.IsNaN( heightToSet ) ? ActualHeight / 2.0 : heightToSet, GridUnitType.Pixel );
}
}
}
//else
//{
// for( int i = 0; i < _model.Children.Count; i++ )
// {
// var childPositionableModel = _model.Children[ i ] as ILayoutPositionableElement;
// if( !childPositionableModel.DockHeight.IsStar )
// {
// childPositionableModel.DockHeight = new GridLength( 1.0, GridUnitType.Star );
// }
// }
//}
}
#endregion
// This is because the commented part is setting DockWidth of children....strange code.
return;
//if (ActualWidth == 0.0 ||
// ActualHeight == 0.0)
// return;
//var modelAsPositionableElement = _model as ILayoutPositionableElementWithActualSize;
//if (_model.Orientation == Orientation.Horizontal)
//{
// if (_model.ContainsChildOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>())
// {
// for (int i = 0; i < _model.Children.Count; i++)
// {
// var childContainerModel = _model.Children[i] as ILayoutContainer;
// var childPositionableModel = _model.Children[i] as ILayoutPositionableElement;
// if (childContainerModel != null &&
// (childContainerModel.IsOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() ||
// childContainerModel.ContainsChildOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>()))
// {
// // childPositionableModel.DockWidth = new GridLength( 1.0, GridUnitType.Star );
// }
// else if ((childPositionableModel != null) && childPositionableModel.DockWidth.IsStar)
// {
// var childPositionableModelWidthActualSize = childPositionableModel as ILayoutPositionableElementWithActualSize;
// if (childPositionableModelWidthActualSize.ActualWidth == 0d)
// continue;
// var widthToSet = Math.Max(childPositionableModelWidthActualSize.ActualWidth, childPositionableModel.DockMinWidth);
// widthToSet = Math.Min(widthToSet, ActualWidth / 2.0);
// widthToSet = Math.Max(widthToSet, childPositionableModel.DockMinWidth);
// childPositionableModel.DockWidth = new GridLength(double.IsNaN(widthToSet) ? ActualWidth / 2.0 : widthToSet, GridUnitType.Pixel);
// }
// }
// }
// //else
// //{
// // for( int i = 0; i < _model.Children.Count; i++ )
// // {
// // var childPositionableModel = _model.Children[ i ] as ILayoutPositionableElement;
// // if( !childPositionableModel.DockWidth.IsStar )
// // {
// // childPositionableModel.DockWidth = new GridLength( 1.0, GridUnitType.Star );
// // }
// // }
// //}
//}
//else
//{
// if (_model.ContainsChildOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>())
// {
// for (int i = 0; i < _model.Children.Count; i++)
// {
// var childContainerModel = _model.Children[i] as ILayoutContainer;
// var childPositionableModel = _model.Children[i] as ILayoutPositionableElement;
// if (childContainerModel != null &&
// (childContainerModel.IsOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() ||
// childContainerModel.ContainsChildOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>()))
// {
// // childPositionableModel.DockHeight = new GridLength( 1.0, GridUnitType.Star );
// }
// else if ((childPositionableModel != null) && childPositionableModel.DockHeight.IsStar)
// {
// var childPositionableModelWidthActualSize = childPositionableModel as ILayoutPositionableElementWithActualSize;
// if (childPositionableModelWidthActualSize.ActualHeight == 0d)
// continue;
// var heightToSet = Math.Max(childPositionableModelWidthActualSize.ActualHeight, childPositionableModel.DockMinHeight);
// heightToSet = Math.Min(heightToSet, ActualHeight / 2.0);
// heightToSet = Math.Max(heightToSet, childPositionableModel.DockMinHeight);
// childPositionableModel.DockHeight = new GridLength(double.IsNaN(heightToSet) ? ActualHeight / 2.0 : heightToSet, GridUnitType.Pixel);
// }
// }
// }
// //else
// //{
// // for( int i = 0; i < _model.Children.Count; i++ )
// // {
// // var childPositionableModel = _model.Children[ i ] as ILayoutPositionableElement;
// // if( !childPositionableModel.DockHeight.IsStar )
// // {
// // childPositionableModel.DockHeight = new GridLength( 1.0, GridUnitType.Star );
// // }
// // }
// //}
//}
}
#endregion

33
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/NativeMethods.cs

@ -1354,7 +1354,9 @@ namespace Standard
internal sealed class SafeFindHandle : SafeHandleZeroOrMinusOneIsInvalid
{
#if !NETCORE && !NET5
[SecurityPermission( SecurityAction.LinkDemand, UnmanagedCode = true )]
#endif
private SafeFindHandle() : base( true ) { }
protected override bool ReleaseHandle()
@ -1404,7 +1406,9 @@ namespace Standard
private SafeDC() : base( true ) { }
#if !NETCORE && !NET5
[ReliabilityContract( Consistency.WillNotCorruptState, Cer.MayFail )]
#endif
protected override bool ReleaseHandle()
{
if( _created )
@ -1527,7 +1531,9 @@ namespace Standard
{
private SafeHBITMAP() : base( true ) { }
#if !NETCORE && !NET5
[ReliabilityContract( Consistency.WillNotCorruptState, Cer.MayFail )]
#endif
protected override bool ReleaseHandle()
{
return NativeMethods.DeleteObject( handle );
@ -1538,7 +1544,9 @@ namespace Standard
{
private SafeGdiplusStartupToken() : base( true ) { }
#if !NETCORE && !NET5
[ReliabilityContract( Consistency.WillNotCorruptState, Cer.MayFail )]
#endif
protected override bool ReleaseHandle()
{
Status s = NativeMethods.GdiplusShutdown( this.handle );
@ -1607,7 +1615,9 @@ namespace Standard
}
[SuppressMessage( "Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes" )]
#if !NETCORE && !NET5
[ReliabilityContract( Consistency.WillNotCorruptState, Cer.MayFail )]
#endif
protected override bool ReleaseHandle()
{
try
@ -1636,9 +1646,9 @@ namespace Standard
}
}
#endregion
#endregion
#region Native Types
#region Native Types
[StructLayout( LayoutKind.Sequential )]
internal struct BLENDFUNCTION
@ -1872,7 +1882,7 @@ namespace Standard
Assert.IsTrue( hr.Succeeded );
}
#region IDisposable Pattern
#region IDisposable Pattern
public void Dispose()
{
@ -1891,7 +1901,7 @@ namespace Standard
Clear();
}
#endregion
#endregion
}
[SuppressMessage( "Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses" )]
@ -2454,7 +2464,7 @@ namespace Standard
public ulong cBuffersEmpty;
}
#endregion
#endregion
/// <summary>Delegate declaration that matches native WndProc signatures.</summary>
internal delegate IntPtr WndProc( IntPtr hwnd, WM uMsg, IntPtr wParam, IntPtr lParam );
@ -2830,7 +2840,9 @@ namespace Standard
[SuppressMessage( "Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode" )]
[DllImport( "kernel32.dll" )]
#if !NETCORE && !NET5
[ReliabilityContract( Consistency.WillNotCorruptState, Cer.Success )]
#endif
[return: MarshalAs( UnmanagedType.Bool )]
public static extern bool FindClose( IntPtr handle );
@ -2965,12 +2977,7 @@ namespace Standard
public static IntPtr GetStockObject( StockObject fnObject )
{
IntPtr retPtr = _GetStockObject( fnObject );
if( retPtr == null )
{
HRESULT.ThrowLastError();
}
return retPtr;
return _GetStockObject( fnObject );
}
[SuppressMessage( "Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode" )]
@ -3453,7 +3460,7 @@ namespace Standard
}
}
#region Win7 declarations
#region Win7 declarations
[DllImport( "shell32.dll", EntryPoint = "SHAddToRecentDocs" )]
private static extern void _SHAddToRecentDocs_String( SHARD uFlags, [MarshalAs( UnmanagedType.LPWStr )] string pv );
@ -3541,6 +3548,6 @@ namespace Standard
[DllImport( "shell32.dll" )]
public static extern HRESULT GetCurrentProcessExplicitAppUserModelID( [Out, MarshalAs( UnmanagedType.LPWStr )] out string AppID );
#endregion
#endregion
}
}

6
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Shell/Standard/Utilities.cs

@ -578,7 +578,9 @@ namespace Standard
if( null != t )
{
Assert.IsTrue( Marshal.IsComObject( t ) );
#if !NETCORE && !NET5
Marshal.ReleaseComObject( t );
#endif
}
}
@ -1005,7 +1007,7 @@ namespace Standard
dpd.RemoveValueChanged( component, listener );
}
#region Extension Methods
#region Extension Methods
public static bool IsThicknessNonNegative( Thickness thickness )
{
@ -1067,6 +1069,6 @@ namespace Standard
return true;
}
#endregion
#endregion
}
}

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

@ -3280,7 +3280,10 @@ namespace Xceed.Wpf.AvalonDock
Left = fwLeft
};
foreach( var layoutContent in destPane.Children )
{
layoutContent.IsFloating = true;
}
//fwc.Owner = Window.GetWindow(this);
//fwc.SetParentToMainWindowOf(this);
@ -3384,6 +3387,7 @@ namespace Xceed.Wpf.AvalonDock
};
}
contentModel.IsFloating = true;
//fwc.Owner = Window.GetWindow(this);
//fwc.SetParentToMainWindowOf(this);
@ -3433,9 +3437,9 @@ namespace Xceed.Wpf.AvalonDock
if( grandParentPaneContainer != null )
{
var children = grandParentPaneContainer.Children.Where( child => ( child.Equals( parentPane ) && ( parentPane is ILayoutContainer ) && ( ( ( ILayoutContainer )parentPane ).ChildrenCount > 1 ) )
|| !child.Equals( parentPane ) )
|| (!child.Equals( parentPane ) && (child is ILayoutContainer) && (((ILayoutContainer)child).ChildrenCount > 0)) )
.Cast<ILayoutPositionableElement>()
.Where( child => child.DockHeight.IsStar );
.Where( child => child.DockWidth.IsStar );
var childrenTotalWidth = children.Sum( child => child.DockWidth.Value );
foreach( var child in children )
{

18
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutContent.cs

@ -162,7 +162,6 @@ namespace Xceed.Wpf.AvalonDock.Layout
parentSelector.SelectedContentIndex = _isSelected ? parentSelector.IndexOf( this ) : -1;
OnIsSelectedChanged( oldValue, value );
RaisePropertyChanged( "IsSelected" );
LayoutAnchorableTabItem.CancelMouseLeave();
}
}
}
@ -568,11 +567,22 @@ namespace Xceed.Wpf.AvalonDock.Layout
#endregion
#region IsFloating
private bool _isFloating = false;
public bool IsFloating
{
get
{
return this.FindParent<LayoutFloatingWindow>() != null;
return _isFloating;
}
internal set
{
if( _isFloating != value )
{
_isFloating = value;
RaisePropertyChanged( "IsFloating" );
}
}
}
@ -750,6 +760,8 @@ namespace Xceed.Wpf.AvalonDock.Layout
FloatingWidth = double.Parse( reader.Value, CultureInfo.InvariantCulture );
if( reader.MoveToAttribute( "FloatingHeight" ) )
FloatingHeight = double.Parse( reader.Value, CultureInfo.InvariantCulture );
if( reader.MoveToAttribute( "IsFloating" ) )
IsFloating = bool.Parse( reader.Value );
if( reader.MoveToAttribute( "IsMaximized" ) )
IsMaximized = bool.Parse( reader.Value );
if( reader.MoveToAttribute( "CanClose" ) )
@ -792,6 +804,8 @@ namespace Xceed.Wpf.AvalonDock.Layout
writer.WriteAttributeString( "FloatingWidth", FloatingWidth.ToString( CultureInfo.InvariantCulture ) );
if( FloatingHeight != 0.0 )
writer.WriteAttributeString( "FloatingHeight", FloatingHeight.ToString( CultureInfo.InvariantCulture ) );
if( IsFloating )
writer.WriteAttributeString( "IsFloating", IsFloating.ToString() );
if( IsMaximized )
writer.WriteAttributeString( "IsMaximized", IsMaximized.ToString() );
// Always serialize CanClose because the default value is different for LayoutAnchorable vs LayoutDocument.

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

@ -23,6 +23,7 @@ namespace Xceed.Wpf.AvalonDock
{
internal static class Win32Helper
{
#pragma warning disable 618
[DllImport( "user32.dll", EntryPoint = "CreateWindowEx", CharSet = CharSet.Unicode )]
internal static extern IntPtr CreateWindowEx( int dwExStyle,
string lpszClassName,
@ -34,6 +35,7 @@ namespace Xceed.Wpf.AvalonDock
IntPtr hMenu,
IntPtr hInst,
[MarshalAs( UnmanagedType.AsAny )] object pvParam );
#pragma warning restore 618
internal const int
WS_CHILD = 0x40000000,
WS_VISIBLE = 0x10000000,

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridDefaultEditorsView.xaml.cs.txt

@ -49,6 +49,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
selectedObject.FontWeight = FontWeights.Bold;
selectedObject.Guid = new Guid( "F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4" );
selectedObject.Char = 'T';
selectedObject.Password = "This is my password";
selectedObject.Int16 = ( short )4;
selectedObject.Int32 = (int)5;
selectedObject.Int64 = (long)6;
@ -145,6 +146,9 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
[Description( "This property uses a Char as the default editor." )]
public Char Char { get; set; }
[Category( "Non-Numeric Editors" )]
[PasswordPropertyText(true)]
public string Password { get; set; }
[Category( "Non-Numeric Editors" )]
[Description( "This property uses a PrimitiveTypeCollectionEditor as the default editor." )]
public List<string> ListOfStrings { get; set; }
[Category( "Non-Numeric Editors" )]

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

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

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/PropertyGrid/Views/PropertyGridDefaultEditorsView.xaml.cs

@ -49,6 +49,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
selectedObject.FontWeight = FontWeights.Bold;
selectedObject.Guid = new Guid( "F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4" );
selectedObject.Char = 'T';
selectedObject.Password = "This is my password";
selectedObject.Int16 = ( short )4;
selectedObject.Int32 = (int)5;
selectedObject.Int64 = (long)6;
@ -145,6 +146,9 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
[Description( "This property uses a Char as the default editor." )]
public Char Char { get; set; }
[Category( "Non-Numeric Editors" )]
[PasswordPropertyText(true)]
public string Password { get; set; }
[Category( "Non-Numeric Editors" )]
[Description( "This property uses a PrimitiveTypeCollectionEditor as the default editor." )]
public List<string> ListOfStrings { get; set; }
[Category( "Non-Numeric Editors" )]

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

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

186
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/ButtonSpinner/Implementation/ButtonSpinner.cs

@ -19,6 +19,7 @@ using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Markup;
using System;
namespace Xceed.Wpf.Toolkit
{
@ -41,6 +42,8 @@ namespace Xceed.Wpf.Toolkit
#region Properties
#region Public Properties
#region AllowSpin
public static readonly DependencyProperty AllowSpinProperty = DependencyProperty.Register( "AllowSpin", typeof( bool ), typeof( ButtonSpinner ), new UIPropertyMetadata( true, AllowSpinPropertyChanged ) );
@ -64,9 +67,12 @@ namespace Xceed.Wpf.Toolkit
#endregion //AllowSpin
//[Obsolete( "ButtonSpinnerLocation is obsolete. Use SpinnerLocation instead." )]
#region ButtonSpinnerLocation
[Obsolete( "ButtonSpinnerLocation is obsolete. Use SpinnerLocation instead." )]
public static readonly DependencyProperty ButtonSpinnerLocationProperty = DependencyProperty.Register( "ButtonSpinnerLocation", typeof( Location ), typeof( ButtonSpinner ), new UIPropertyMetadata( Location.Right ) );
[Obsolete( "ButtonSpinnerLocation is obsolete. Use SpinnerLocation instead." )]
public Location ButtonSpinnerLocation
{
get
@ -81,6 +87,125 @@ namespace Xceed.Wpf.Toolkit
#endregion //ButtonSpinnerLocation
#region SpinnerLocation
public static readonly DependencyProperty SpinnerLocationProperty = DependencyProperty.Register( "SpinnerLocation", typeof( Location ), typeof( ButtonSpinner ), new UIPropertyMetadata( Location.Right ) );
public Location SpinnerLocation
{
get
{
return (Location)GetValue( SpinnerLocationProperty );
}
set
{
SetValue( SpinnerLocationProperty, value );
}
}
#endregion //SpinnerLocation
#region SpinnerWidth
public static readonly DependencyProperty SpinnerWidthProperty = DependencyProperty.Register( "SpinnerWidth", typeof( double ), typeof( ButtonSpinner ), new UIPropertyMetadata( SystemParameters.VerticalScrollBarWidth ) );
public double SpinnerWidth
{
get
{
return (double)GetValue( SpinnerWidthProperty );
}
set
{
SetValue( SpinnerWidthProperty, value );
}
}
#endregion //SpinnerWidth
#region SpinnerHeight
public static readonly DependencyProperty SpinnerHeightProperty = DependencyProperty.Register( "SpinnerHeight", typeof( double ), typeof( ButtonSpinner ), new UIPropertyMetadata( double.NaN ) );
public double SpinnerHeight
{
get
{
return (double)GetValue( SpinnerHeightProperty );
}
set
{
SetValue( SpinnerHeightProperty, value );
}
}
#endregion //SpinnerHeight
#region SpinnerDownContentTemplate
public static readonly DependencyProperty SpinnerDownContentTemplateProperty = DependencyProperty.Register( "SpinnerDownContentTemplate", typeof( DataTemplate ), typeof( ButtonSpinner ), new UIPropertyMetadata( null ) );
public DataTemplate SpinnerDownContentTemplate
{
get
{
return (DataTemplate)GetValue( SpinnerDownContentTemplateProperty );
}
set
{
SetValue( SpinnerDownContentTemplateProperty, value );
}
}
#endregion //SpinnerDownContentTemplate
#region SpinnerDownDisabledContentTemplate
public static readonly DependencyProperty SpinnerDownDisabledContentTemplateProperty = DependencyProperty.Register( "SpinnerDownDisabledContentTemplate", typeof( DataTemplate ), typeof( ButtonSpinner ), new UIPropertyMetadata( null ) );
public DataTemplate SpinnerDownDisabledContentTemplate
{
get
{
return (DataTemplate)GetValue( SpinnerDownDisabledContentTemplateProperty );
}
set
{
SetValue( SpinnerDownDisabledContentTemplateProperty, value );
}
}
#endregion //SpinnerDownDisabledContentTemplate
#region SpinnerUpContentTemplate
public static readonly DependencyProperty SpinnerUpContentTemplateProperty = DependencyProperty.Register( "SpinnerUpContentTemplate", typeof( DataTemplate ), typeof( ButtonSpinner ), new UIPropertyMetadata( null ) );
public DataTemplate SpinnerUpContentTemplate
{
get
{
return (DataTemplate)GetValue( SpinnerUpContentTemplateProperty );
}
set
{
SetValue( SpinnerUpContentTemplateProperty, value );
}
}
#endregion //SpinnerUpContentTemplate
#region SpinnerUpDisabledContentTemplate
public static readonly DependencyProperty SpinnerUpDisabledContentTemplateProperty = DependencyProperty.Register( "SpinnerUpDisabledContentTemplate", typeof( DataTemplate ), typeof( ButtonSpinner ), new UIPropertyMetadata( null ) );
public DataTemplate SpinnerUpDisabledContentTemplate
{
get
{
return (DataTemplate)GetValue( SpinnerUpDisabledContentTemplateProperty );
}
set
{
SetValue( SpinnerUpDisabledContentTemplateProperty, value );
}
}
#endregion //SpinnerUpDisabledContentTemplate
#region Content
/// <summary>
@ -112,6 +237,48 @@ namespace Xceed.Wpf.Toolkit
#endregion //Content
//[Obsolete( "ShowButtonSpinner is obsolete. Use ShowSpinner instead." )]
#region ShowButtonSpinner
[Obsolete( "ShowButtonSpinner is obsolete. Use ShowSpinner instead." )]
public static readonly DependencyProperty ShowButtonSpinnerProperty = DependencyProperty.Register( "ShowButtonSpinner", typeof( bool ), typeof( ButtonSpinner ), new UIPropertyMetadata( true ) );
[Obsolete( "ShowButtonSpinner is obsolete. Use ShowSpinner instead." )]
public bool ShowButtonSpinner
{
get
{
return ( bool )GetValue( ShowButtonSpinnerProperty );
}
set
{
SetValue( ShowButtonSpinnerProperty, value );
}
}
#endregion //ShowButtonSpinner
#region ShowSpinner
public static readonly DependencyProperty ShowSpinnerProperty = DependencyProperty.Register( "ShowSpinner", typeof( bool ), typeof( ButtonSpinner ), new UIPropertyMetadata( true ) );
public bool ShowSpinner
{
get
{
return (bool)GetValue( ShowSpinnerProperty );
}
set
{
SetValue( ShowSpinnerProperty, value );
}
}
#endregion //ShowSpinner
#endregion //Properties
#region Private Properties
#region DecreaseButton
private ButtonBase _decreaseButton;
@ -172,24 +339,9 @@ namespace Xceed.Wpf.Toolkit
#endregion //IncreaseButton
#region ShowButtonSpinner
#endregion
public static readonly DependencyProperty ShowButtonSpinnerProperty = DependencyProperty.Register( "ShowButtonSpinner", typeof( bool ), typeof( ButtonSpinner ), new UIPropertyMetadata( true ) );
public bool ShowButtonSpinner
{
get
{
return ( bool )GetValue( ShowButtonSpinnerProperty );
}
set
{
SetValue( ShowButtonSpinnerProperty, value );
}
}
#endregion //ShowButtonSpinner
#endregion //Properties
#endregion
#region Constructors

25
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/ButtonSpinner/Themes/Aero2.NormalColor.xaml

@ -50,6 +50,14 @@
Value="1" />
<Setter Property="VerticalContentAlignment"
Value="Center" />
<Setter Property="SpinnerUpContentTemplate"
Value="{StaticResource IncreaseGlyphNormalKey}" />
<Setter Property="SpinnerDownContentTemplate"
Value="{StaticResource DecreaseGlyphNormalKey}" />
<Setter Property="SpinnerUpDisabledContentTemplate"
Value="{StaticResource IncreaseGlyphDisabledKey}" />
<Setter Property="SpinnerDownDisabledContentTemplate"
Value="{StaticResource DecreaseGlyphDisabledKey}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:ButtonSpinner}">
@ -72,9 +80,10 @@
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
<Grid x:Name="gridContent"
<Grid x:Name="gridContent"
Grid.Column="1"
Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
Width="{TemplateBinding SpinnerWidth}"
Height="{TemplateBinding SpinnerHeight}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
@ -83,21 +92,21 @@
<RepeatButton x:Name="PART_IncreaseButton"
Style="{DynamicResource {x:Static themes:ResourceKeys.SpinnerButtonStyleKey}}"
IsTabStop="{TemplateBinding IsTabStop}"
ContentTemplate="{StaticResource IncreaseGlyphNormalKey}">
ContentTemplate="{TemplateBinding SpinnerUpContentTemplate}">
</RepeatButton>
<RepeatButton x:Name="PART_DecreaseButton"
Grid.Row="1"
Style="{DynamicResource {x:Static themes:ResourceKeys.SpinnerButtonStyleKey}}"
IsTabStop="{TemplateBinding IsTabStop}"
ContentTemplate="{StaticResource DecreaseGlyphNormalKey}">
ContentTemplate="{TemplateBinding SpinnerDownContentTemplate}">
</RepeatButton>
</Grid>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="ShowButtonSpinner"
<Trigger Property="ShowSpinner"
Value="False">
<Setter Property="Visibility"
Value="Hidden"
@ -126,16 +135,16 @@
Value="False">
<Setter TargetName="PART_IncreaseButton"
Property="ContentTemplate"
Value="{StaticResource IncreaseGlyphDisabledKey}" />
Value="{Binding SpinnerUpDisabledContentTemplate, RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
<Trigger SourceName="PART_DecreaseButton"
Property="IsEnabled"
Value="False">
<Setter TargetName="PART_DecreaseButton"
Property="ContentTemplate"
Value="{StaticResource DecreaseGlyphDisabledKey}" />
Value="{Binding SpinnerDownDisabledContentTemplate, RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
<Trigger Property="ButtonSpinnerLocation"
<Trigger Property="SpinnerLocation"
Value="Left">
<Setter TargetName="firstContentColumn"
Property="Width"

25
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/ButtonSpinner/Themes/Generic.xaml

@ -47,6 +47,14 @@
Value="1" />
<Setter Property="VerticalContentAlignment"
Value="Center" />
<Setter Property="SpinnerUpContentTemplate"
Value="{StaticResource IncreaseGlyphNormalKey}" />
<Setter Property="SpinnerDownContentTemplate"
Value="{StaticResource DecreaseGlyphNormalKey}" />
<Setter Property="SpinnerUpDisabledContentTemplate"
Value="{StaticResource IncreaseGlyphDisabledKey}" />
<Setter Property="SpinnerDownDisabledContentTemplate"
Value="{StaticResource DecreaseGlyphDisabledKey}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:ButtonSpinner}">
@ -71,7 +79,8 @@
<Grid x:Name="gridContent"
Grid.Column="1"
Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
Width="{TemplateBinding SpinnerWidth}"
Height="{TemplateBinding SpinnerHeight}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
@ -80,21 +89,21 @@
<RepeatButton x:Name="PART_IncreaseButton"
Style="{DynamicResource {x:Static themes:ResourceKeys.SpinnerButtonStyleKey}}"
IsTabStop="{TemplateBinding IsTabStop}"
ContentTemplate="{StaticResource IncreaseGlyphNormalKey}">
ContentTemplate="{TemplateBinding SpinnerUpContentTemplate}">
</RepeatButton>
<RepeatButton x:Name="PART_DecreaseButton"
Grid.Row="1"
Style="{DynamicResource {x:Static themes:ResourceKeys.SpinnerButtonStyleKey}}"
IsTabStop="{TemplateBinding IsTabStop}"
ContentTemplate="{StaticResource DecreaseGlyphNormalKey}" >
ContentTemplate="{TemplateBinding SpinnerDownContentTemplate}" >
</RepeatButton>
</Grid>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="ShowButtonSpinner"
<Trigger Property="ShowSpinner"
Value="False">
<Setter Property="Visibility"
Value="Hidden"
@ -113,16 +122,16 @@
Value="False">
<Setter TargetName="PART_IncreaseButton"
Property="ContentTemplate"
Value="{StaticResource IncreaseGlyphDisabledKey}" />
Value="{Binding SpinnerUpDisabledContentTemplate, RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
<Trigger SourceName="PART_DecreaseButton"
Property="IsEnabled"
Value="False">
<Setter TargetName="PART_DecreaseButton"
Property="ContentTemplate"
Value="{StaticResource DecreaseGlyphDisabledKey}" />
</Trigger>
<Trigger Property="ButtonSpinnerLocation"
Value="{Binding SpinnerDownDisabledContentTemplate, RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
<Trigger Property="SpinnerLocation"
Value="Left">
<Setter TargetName="firstContentColumn"
Property="Width"

68
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CalculatorUpDown/Implementation/CalculatorUpDown.cs

@ -57,6 +57,74 @@ namespace Xceed.Wpf.Toolkit
#endregion //DisplayText
#region DropDownButtonContent
public static readonly DependencyProperty DropDownButtonContentProperty = DependencyProperty.Register( "DropDownButtonContent", typeof( object ), typeof( CalculatorUpDown ), new UIPropertyMetadata( null ) );
public object DropDownButtonContent
{
get
{
return (object)GetValue( DropDownButtonContentProperty );
}
set
{
SetValue( DropDownButtonContentProperty, value );
}
}
#endregion //DropDownButtonContent
#region DropDownButtonDisabledContent
public static readonly DependencyProperty DropDownButtonDisabledContentProperty = DependencyProperty.Register( "DropDownButtonDisabledContent", typeof( object ), typeof( CalculatorUpDown ), new UIPropertyMetadata( null ) );
public object DropDownButtonDisabledContent
{
get
{
return (object)GetValue( DropDownButtonDisabledContentProperty );
}
set
{
SetValue( DropDownButtonDisabledContentProperty, value );
}
}
#endregion //DropDownButtonDisabledContent
#region DropDownButtonHeight
public static readonly DependencyProperty DropDownButtonHeightProperty = DependencyProperty.Register( "DropDownButtonHeight", typeof( double ), typeof( CalculatorUpDown ), new UIPropertyMetadata( double.NaN ) );
public double DropDownButtonHeight
{
get
{
return (double)GetValue( DropDownButtonHeightProperty );
}
set
{
SetValue( DropDownButtonHeightProperty, value );
}
}
#endregion //DropDownButtonHeight
#region DropDownButtonWidth
public static readonly DependencyProperty DropDownButtonWidthProperty = DependencyProperty.Register( "DropDownButtonWidth", typeof( double ), typeof( CalculatorUpDown ), new UIPropertyMetadata( double.NaN ) );
public double DropDownButtonWidth
{
get
{
return (double)GetValue( DropDownButtonWidthProperty );
}
set
{
SetValue( DropDownButtonWidthProperty, value );
}
}
#endregion //DropDownButtonWidth
#region EnterClosesCalculator
public static readonly DependencyProperty EnterClosesCalculatorProperty = DependencyProperty.Register( "EnterClosesCalculator", typeof( bool ), typeof( CalculatorUpDown ), new UIPropertyMetadata( false ) );

48
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CalculatorUpDown/Themes/Aero2.NormalColor.xaml

@ -59,29 +59,9 @@
<ContentPresenter HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<Grid x:Name="arrowGlyph"
IsHitTestVisible="False"
Grid.Column="1"
Margin="5">
<Path x:Name="Arrow"
Width="9"
Height="5"
Data="{StaticResource DownArrowGeometry}"
Fill="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
Margin="0,1,0,0" />
</Grid>
</Grid>
</chrome:ButtonChrome>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Fill"
TargetName="Arrow"
Value="#AFAFAF" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
@ -110,6 +90,18 @@
Value="Right" />
<Setter Property="WatermarkTemplate"
Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="ButtonSpinnerUpContentTemplate"
Value="{StaticResource IncreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerDownContentTemplate"
Value="{StaticResource DecreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerUpDisabledContentTemplate"
Value="{StaticResource IncreaseGlyphDisabledKey}" />
<Setter Property="ButtonSpinnerDownDisabledContentTemplate"
Value="{StaticResource DecreaseGlyphDisabledKey}" />
<Setter Property="DropDownButtonContent"
Value="{StaticResource DropDownArrowGlyph}" />
<Setter Property="DropDownButtonDisabledContent"
Value="{StaticResource DropDownDisabledArrowGlyph}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:CalculatorUpDown}">
@ -124,9 +116,15 @@
Background="{TemplateBinding Background}"
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}"
ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
AllowSpin="{TemplateBinding AllowSpin}"
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}"
ShowSpinner="{TemplateBinding ShowButtonSpinner}"
SpinnerWidth="{TemplateBinding ButtonSpinnerWidth}"
SpinnerHeight="{TemplateBinding ButtonSpinnerHeight}"
SpinnerUpContentTemplate="{TemplateBinding ButtonSpinnerUpContentTemplate}"
SpinnerDownContentTemplate="{TemplateBinding ButtonSpinnerDownContentTemplate}"
SpinnerUpDisabledContentTemplate="{TemplateBinding ButtonSpinnerUpDisabledContentTemplate}"
SpinnerDownDisabledContentTemplate="{TemplateBinding ButtonSpinnerDownDisabledContentTemplate}"
VerticalContentAlignment="Stretch"
HorizontalAlignment="Stretch">
<local:WatermarkTextBox x:Name="PART_TextBox"
@ -156,7 +154,10 @@
</local:ButtonSpinner>
<ToggleButton x:Name="_calculatorToggleButton"
Grid.Column="1"
Width="{Binding DropDownButtonWidth, RelativeSource={RelativeSource TemplatedParent}}"
Height="{Binding DropDownButtonHeight, RelativeSource={RelativeSource TemplatedParent}}"
Focusable="False"
Content="{Binding DropDownButtonContent, RelativeSource={RelativeSource TemplatedParent}}"
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource CalculatorToggleButtonStyle}"
IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"
@ -208,6 +209,9 @@
Value="False">
<Setter Property="Foreground"
Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
<Setter TargetName="_calculatorToggleButton"
Property="Content"
Value="{Binding DropDownButtonDisabledContent, RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
<Trigger Property="IsFocused"
Value="True">

48
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CalculatorUpDown/Themes/Generic.xaml

@ -77,29 +77,9 @@
<ContentPresenter HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<Grid x:Name="arrowGlyph"
IsHitTestVisible="False"
Grid.Column="1"
Margin="5">
<Path x:Name="Arrow"
Width="9"
Height="5"
Data="{StaticResource DownArrowGeometry}"
Fill="#FF000000"
Margin="0,1,0,0" />
</Grid>
</Grid>
</chrome:ButtonChrome>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Fill"
TargetName="Arrow"
Value="#AFAFAF" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
@ -133,8 +113,20 @@
Value="Right" />
<Setter Property="TextAlignment"
Value="Right" />
<Setter Property="ButtonSpinnerUpContentTemplate"
Value="{StaticResource IncreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerDownContentTemplate"
Value="{StaticResource DecreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerUpDisabledContentTemplate"
Value="{StaticResource IncreaseGlyphDisabledKey}" />
<Setter Property="ButtonSpinnerDownDisabledContentTemplate"
Value="{StaticResource DecreaseGlyphDisabledKey}" />
<Setter Property="WatermarkTemplate"
Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="DropDownButtonContent"
Value="{StaticResource DropDownArrowGlyph}" />
<Setter Property="DropDownButtonDisabledContent"
Value="{StaticResource DropDownDisabledArrowGlyph}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:CalculatorUpDown}">
@ -148,9 +140,15 @@
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
AllowSpin="{TemplateBinding AllowSpin}"
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}"
ShowSpinner="{TemplateBinding ShowButtonSpinner}"
SpinnerWidth="{TemplateBinding ButtonSpinnerWidth}"
SpinnerHeight="{TemplateBinding ButtonSpinnerHeight}"
SpinnerUpContentTemplate="{TemplateBinding ButtonSpinnerUpContentTemplate}"
SpinnerDownContentTemplate="{TemplateBinding ButtonSpinnerDownContentTemplate}"
SpinnerUpDisabledContentTemplate="{TemplateBinding ButtonSpinnerUpDisabledContentTemplate}"
SpinnerDownDisabledContentTemplate="{TemplateBinding ButtonSpinnerDownDisabledContentTemplate}"
VerticalContentAlignment="Stretch"
HorizontalAlignment="Stretch">
<local:WatermarkTextBox x:Name="PART_TextBox"
@ -180,7 +178,10 @@
</local:ButtonSpinner>
<ToggleButton x:Name="_calculatorToggleButton"
Grid.Column="1"
Width="{Binding DropDownButtonWidth, RelativeSource={RelativeSource TemplatedParent}}"
Height="{Binding DropDownButtonHeight, RelativeSource={RelativeSource TemplatedParent}}"
Focusable="False"
Content="{Binding DropDownButtonContent, RelativeSource={RelativeSource TemplatedParent}}"
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource CalculatorToggleButtonStyle}"
IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"
@ -221,6 +222,9 @@
Value="False">
<Setter Property="Foreground"
Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
<Setter TargetName="_calculatorToggleButton"
Property="Content"
Value="{Binding DropDownButtonDisabledContent, RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>

8
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlDialog.xaml.cs

@ -204,13 +204,7 @@ namespace Xceed.Wpf.Toolkit
if( source is Array )
{
using( var stream = new MemoryStream() )
{
var formatter = new BinaryFormatter();
formatter.Serialize( stream, source );
stream.Seek( 0, SeekOrigin.Begin );
result = ( Array )formatter.Deserialize( stream );
}
result = (source as Array).Clone();
}
// For IDictionary, we need to create EditableKeyValuePair to edit the Key-Value.
else if( ( this.ItemsSource is IDictionary )

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Aero2.NormalColor.xaml

@ -211,7 +211,7 @@
<Setter Property="BorderThickness"
Value="0" />
<Setter Property="MaxHeight"
Value="500" />
Value="275" />
<!-- ConverterParameter is margin/Padding from Popup-->
<Setter Property="Width"
Value="{Binding MaxDropDownWidth, RelativeSource={RelativeSource AncestorType={x:Type local:ColorPicker}}, Converter={StaticResource AdditionConverter}, ConverterParameter=-18}" />

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

@ -251,7 +251,7 @@
<Setter Property="BorderThickness"
Value="0" />
<Setter Property="MaxHeight"
Value="500" />
Value="275" />
<!-- ConverterParameter is margin/Padding from Popup-->
<Setter Property="Width"
Value="{Binding MaxDropDownWidth, RelativeSource={RelativeSource AncestorType={x:Type local:ColorPicker}}, Converter={StaticResource AdditionConverter}, ConverterParameter=-18}" />

6
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Media/WindowColors.cs

@ -91,6 +91,7 @@ namespace Xceed.Wpf.Toolkit.Core.Media
private static int GetDWMIntValue( string keyName )
{
#pragma warning disable CA1416
// This value is not accessible throught the standard WPF API.
// We must dig into the registry to get the value.
var curUser = Microsoft.Win32.Registry.CurrentUser;
@ -100,9 +101,10 @@ namespace Xceed.Wpf.Toolkit.Core.Media
#if VS2008
);
#else
,Microsoft.Win32.RegistryOptions.None );
, Microsoft.Win32.RegistryOptions.None );
#endif
return ( int )subKey.GetValue( keyName );
return (int)subKey.GetValue( keyName );
#pragma warning restore CA1416
}
private static Color GetDWMColorValue( string keyName )

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/PackUriExtension.cs

@ -112,6 +112,7 @@ namespace Xceed.Wpf.Toolkit.Core
// If we have version information
if( !String.IsNullOrEmpty( version ) )
{
@ -137,6 +138,7 @@ namespace Xceed.Wpf.Toolkit.Core
// If we have an assembly name and version information
if( hasAssemblyName && !String.IsNullOrEmpty( version ) )
{

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs

@ -23,6 +23,7 @@ using System.Windows.Controls.Primitives;
using Xceed.Wpf.Toolkit.Core.Utilities;
using Xceed.Wpf.Toolkit.Primitives;
using System.Windows.Shapes;
using System.Windows.Markup;
#if VS2008
using Microsoft.Windows.Controls;
using Microsoft.Windows.Controls.Primitives;
@ -258,6 +259,7 @@ namespace Xceed.Wpf.Toolkit
if( _calendar != null )
{
_calendar.Language = XmlLanguage.GetLanguage( System.Globalization.CultureInfo.CurrentCulture.IetfLanguageTag );
_calendar.SelectedDatesChanged += this.Calendar_SelectedDatesChanged;
_calendar.MouseDoubleClick += this.Calendar_MouseDoubleClick;
_calendar.SelectedDate = Value ?? null;

48
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColor.xaml

@ -62,29 +62,9 @@
<ContentPresenter HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<Grid x:Name="arrowGlyph"
IsHitTestVisible="False"
Grid.Column="1"
Margin="5">
<Path x:Name="Arrow"
Width="9"
Height="5"
Data="{StaticResource DownArrowGeometry}"
Fill="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
Margin="0,1,0,0" />
</Grid>
</Grid>
</chrome:ButtonChrome>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Fill"
TargetName="Arrow"
Value="#AFAFAF" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
@ -118,6 +98,18 @@
Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="CalendarWidth"
Value="178" />
<Setter Property="ButtonSpinnerUpContentTemplate"
Value="{StaticResource IncreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerDownContentTemplate"
Value="{StaticResource DecreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerUpDisabledContentTemplate"
Value="{StaticResource IncreaseGlyphDisabledKey}" />
<Setter Property="ButtonSpinnerDownDisabledContentTemplate"
Value="{StaticResource DecreaseGlyphDisabledKey}" />
<Setter Property="DropDownButtonContent"
Value="{StaticResource DropDownArrowGlyph}" />
<Setter Property="DropDownButtonDisabledContent"
Value="{StaticResource DropDownDisabledArrowGlyph}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:DateTimePicker}">
@ -133,11 +125,17 @@
Background="{TemplateBinding Background}"
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}"
ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerWidth="{TemplateBinding ButtonSpinnerWidth}"
SpinnerHeight="{TemplateBinding ButtonSpinnerHeight}"
SpinnerUpContentTemplate="{TemplateBinding ButtonSpinnerUpContentTemplate}"
SpinnerDownContentTemplate="{TemplateBinding ButtonSpinnerDownContentTemplate}"
SpinnerUpDisabledContentTemplate="{TemplateBinding ButtonSpinnerUpDisabledContentTemplate}"
SpinnerDownDisabledContentTemplate="{TemplateBinding ButtonSpinnerDownDisabledContentTemplate}"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
AllowSpin="{TemplateBinding AllowSpin}"
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}">
ShowSpinner="{TemplateBinding ShowButtonSpinner}">
<local:WatermarkTextBox x:Name="PART_TextBox"
BorderThickness="0"
Background="Transparent"
@ -163,8 +161,11 @@
</local:ButtonSpinner>
<ToggleButton x:Name="_calendarToggleButton"
Grid.Column="1"
Width="{Binding DropDownButtonWidth, RelativeSource={RelativeSource TemplatedParent}}"
Height="{Binding DropDownButtonHeight, RelativeSource={RelativeSource TemplatedParent}}"
Background="White"
Focusable="False"
Content="{Binding DropDownButtonContent, RelativeSource={RelativeSource TemplatedParent}}"
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource DateTimePickerToggleButtonStyle}"
IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"
@ -264,6 +265,9 @@
Value="False">
<Setter Property="Foreground"
Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
<Setter TargetName="_calendarToggleButton"
Property="Content"
Value="{Binding DropDownButtonDisabledContent, RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
<Trigger Property="IsFocused"
Value="True">

48
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml

@ -87,29 +87,9 @@
<ContentPresenter HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<Grid x:Name="arrowGlyph"
IsHitTestVisible="False"
Grid.Column="1"
Margin="5">
<Path x:Name="Arrow"
Width="9"
Height="5"
Data="{StaticResource DownArrowGeometry}"
Fill="#FF000000"
Margin="0,1,0,0" />
</Grid>
</Grid>
</chrome:ButtonChrome>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Fill"
TargetName="Arrow"
Value="#AFAFAF" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
@ -142,6 +122,18 @@
Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="CalendarWidth"
Value="178" />
<Setter Property="ButtonSpinnerUpContentTemplate"
Value="{StaticResource IncreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerDownContentTemplate"
Value="{StaticResource DecreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerUpDisabledContentTemplate"
Value="{StaticResource IncreaseGlyphDisabledKey}" />
<Setter Property="ButtonSpinnerDownDisabledContentTemplate"
Value="{StaticResource DecreaseGlyphDisabledKey}" />
<Setter Property="DropDownButtonContent"
Value="{StaticResource DropDownArrowGlyph}" />
<Setter Property="DropDownButtonDisabledContent"
Value="{StaticResource DropDownDisabledArrowGlyph}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:DateTimePicker}">
@ -157,11 +149,17 @@
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerWidth="{TemplateBinding ButtonSpinnerWidth}"
SpinnerHeight="{TemplateBinding ButtonSpinnerHeight}"
SpinnerUpContentTemplate="{TemplateBinding ButtonSpinnerUpContentTemplate}"
SpinnerDownContentTemplate="{TemplateBinding ButtonSpinnerDownContentTemplate}"
SpinnerUpDisabledContentTemplate="{TemplateBinding ButtonSpinnerUpDisabledContentTemplate}"
SpinnerDownDisabledContentTemplate="{TemplateBinding ButtonSpinnerDownDisabledContentTemplate}"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
AllowSpin="{TemplateBinding AllowSpin}"
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}">
ShowSpinner="{TemplateBinding ShowButtonSpinner}">
<local:WatermarkTextBox x:Name="PART_TextBox"
BorderThickness="0"
Background="Transparent"
@ -187,8 +185,11 @@
</local:ButtonSpinner>
<ToggleButton x:Name="_calendarToggleButton"
Grid.Column="1"
Width="{Binding DropDownButtonWidth, RelativeSource={RelativeSource TemplatedParent}}"
Height="{Binding DropDownButtonHeight, RelativeSource={RelativeSource TemplatedParent}}"
Background="White"
Focusable="False"
Content="{Binding DropDownButtonContent, RelativeSource={RelativeSource TemplatedParent}}"
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource DateTimePickerToggleButtonStyle}"
IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"
@ -278,6 +279,9 @@
Value="False">
<Setter Property="Foreground"
Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
<Setter TargetName="_calendarToggleButton"
Property="Content"
Value="{Binding DropDownButtonDisabledContent, RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>

35
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Themes/Aero2.NormalColor.xaml

@ -19,6 +19,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../Themes/Aero2/Glyphs.xaml" />
</ResourceDictionary.MergedDictionaries>
<DataTemplate x:Key="DefaultWatermarkTemplate">
<ContentControl Content="{Binding}" Foreground="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" Focusable="False" Margin="0,0,3,0" />
@ -39,19 +42,33 @@
<Setter Property="TextAlignment" Value="Right" />
<Setter Property="WatermarkTemplate" Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="ButtonSpinnerUpContentTemplate"
Value="{StaticResource IncreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerDownContentTemplate"
Value="{StaticResource DecreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerUpDisabledContentTemplate"
Value="{StaticResource IncreaseGlyphDisabledKey}" />
<Setter Property="ButtonSpinnerDownDisabledContentTemplate"
Value="{StaticResource DecreaseGlyphDisabledKey}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:DateTimeUpDown}">
<local:ButtonSpinner x:Name="PART_Spinner"
IsTabStop="False"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
AllowSpin="{TemplateBinding AllowSpin}"
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}">
IsTabStop="False"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
SpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerWidth="{TemplateBinding ButtonSpinnerWidth}"
SpinnerHeight="{TemplateBinding ButtonSpinnerHeight}"
SpinnerUpContentTemplate="{TemplateBinding ButtonSpinnerUpContentTemplate}"
SpinnerDownContentTemplate="{TemplateBinding ButtonSpinnerDownContentTemplate}"
SpinnerUpDisabledContentTemplate="{TemplateBinding ButtonSpinnerUpDisabledContentTemplate}"
SpinnerDownDisabledContentTemplate="{TemplateBinding ButtonSpinnerDownDisabledContentTemplate}"
AllowSpin="{TemplateBinding AllowSpin}"
ShowSpinner="{TemplateBinding ShowButtonSpinner}">
<local:WatermarkTextBox x:Name="PART_TextBox"
BorderThickness="0"
Background="Transparent"

25
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Themes/Generic.xaml

@ -19,8 +19,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../Themes/Generic/Glyphs.xaml" />
</ResourceDictionary.MergedDictionaries>
<DataTemplate x:Key="DefaultWatermarkTemplate">
<DataTemplate x:Key="DefaultWatermarkTemplate">
<ContentControl Content="{Binding}"
Foreground="Gray"
Focusable="False"
@ -51,6 +54,14 @@
Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="VerticalContentAlignment"
Value="Center" />
<Setter Property="ButtonSpinnerUpContentTemplate"
Value="{StaticResource IncreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerDownContentTemplate"
Value="{StaticResource DecreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerUpDisabledContentTemplate"
Value="{StaticResource IncreaseGlyphDisabledKey}" />
<Setter Property="ButtonSpinnerDownDisabledContentTemplate"
Value="{StaticResource DecreaseGlyphDisabledKey}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:DateTimeUpDown}">
@ -61,10 +72,16 @@
BorderThickness="{TemplateBinding BorderThickness}"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerWidth="{TemplateBinding ButtonSpinnerWidth}"
SpinnerHeight="{TemplateBinding ButtonSpinnerHeight}"
SpinnerUpContentTemplate="{TemplateBinding ButtonSpinnerUpContentTemplate}"
SpinnerDownContentTemplate="{TemplateBinding ButtonSpinnerDownContentTemplate}"
SpinnerUpDisabledContentTemplate="{TemplateBinding ButtonSpinnerUpDisabledContentTemplate}"
SpinnerDownDisabledContentTemplate="{TemplateBinding ButtonSpinnerDownDisabledContentTemplate}"
AllowSpin="{TemplateBinding AllowSpin}"
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}">
<local:WatermarkTextBox x:Name="PART_TextBox"
ShowSpinner="{TemplateBinding ShowButtonSpinner}">
<local:WatermarkTextBox x:Name="PART_TextBox"
BorderThickness="0"
Background="Transparent"
ContextMenu="{TemplateBinding ContextMenu}"

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

@ -1037,7 +1037,9 @@ namespace Xceed.Wpf.Toolkit
e.Handled = true;
if( ( !e.CanExecute ) && ( this.BeepOnError ) )
System.Media.SystemSounds.Beep.Play();
{
PlayBeep();
}
}
private void CanExecuteDeletePreviousWord( object sender, CanExecuteRoutedEventArgs e )
@ -1067,7 +1069,9 @@ namespace Xceed.Wpf.Toolkit
e.Handled = true;
if( ( !e.CanExecute ) && ( this.BeepOnError ) )
System.Media.SystemSounds.Beep.Play();
{
this.PlayBeep();
}
}
private void CanExecuteDeleteNextWord( object sender, CanExecuteRoutedEventArgs e )
@ -1097,7 +1101,9 @@ namespace Xceed.Wpf.Toolkit
e.Handled = true;
if( ( !e.CanExecute ) && ( this.BeepOnError ) )
System.Media.SystemSounds.Beep.Play();
{
this.PlayBeep();
}
}
private void CanExecuteBackspace( object sender, CanExecuteRoutedEventArgs e )
@ -1109,7 +1115,9 @@ namespace Xceed.Wpf.Toolkit
e.Handled = true;
if( ( !e.CanExecute ) && ( this.BeepOnError ) )
System.Media.SystemSounds.Beep.Play();
{
this.PlayBeep();
}
}
private void CanExecuteCut( object sender, CanExecuteRoutedEventArgs e )
@ -1132,7 +1140,9 @@ namespace Xceed.Wpf.Toolkit
e.Handled = true;
if( ( !canCut ) && ( this.BeepOnError ) )
System.Media.SystemSounds.Beep.Play();
{
this.PlayBeep();
}
}
private void CanExecutePaste( object sender, CanExecuteRoutedEventArgs e )
@ -1166,7 +1176,9 @@ namespace Xceed.Wpf.Toolkit
e.Handled = true;
if( ( !e.CanExecute ) && ( this.BeepOnError ) )
System.Media.SystemSounds.Beep.Play();
{
this.PlayBeep();
}
}
private void CanExecuteCopy( object sender, CanExecuteRoutedEventArgs e )
@ -1178,7 +1190,9 @@ namespace Xceed.Wpf.Toolkit
e.Handled = true;
if( ( !e.CanExecute ) && ( this.BeepOnError ) )
System.Media.SystemSounds.Beep.Play();
{
this.PlayBeep();
}
}
private void ExecuteCopy()
@ -1186,7 +1200,9 @@ namespace Xceed.Wpf.Toolkit
string selectedText = this.GetSelectedText();
try
{
#if !NETCORE && !NET5
new UIPermission( UIPermissionClipboard.AllClipboard ).Demand();
#endif
if( selectedText.Length == 0 )
{
@ -1207,9 +1223,9 @@ namespace Xceed.Wpf.Toolkit
m_insertToggled = !m_insertToggled;
}
#endregion COMMANDS
#endregion COMMANDS
#region DRAG DROP
#region DRAG DROP
private void PreviewQueryContinueDragCallback( object sender, QueryContinueDragEventArgs e )
{
@ -1242,10 +1258,10 @@ namespace Xceed.Wpf.Toolkit
base.OnDragOver( e );
}
#endregion DRAG DROP
#endregion DRAG DROP
#region VALUE FROM TEXT
#region VALUE FROM TEXT
protected override bool QueryValueFromTextCore( string text, out object value )
{
@ -1268,9 +1284,9 @@ namespace Xceed.Wpf.Toolkit
return base.QueryValueFromTextCore( text, out value );
}
#endregion VALUE FROM TEXT
#endregion VALUE FROM TEXT
#region TEXT FROM VALUE
#region TEXT FROM VALUE
protected override string QueryTextFromValueCore( object value )
{
@ -1289,10 +1305,10 @@ namespace Xceed.Wpf.Toolkit
return base.QueryTextFromValueCore( value );
}
#endregion TEXT FROM VALUE
#endregion TEXT FROM VALUE
#region PROTECTED METHODS
#region PROTECTED METHODS
protected virtual char[] GetMaskCharacters()
{
@ -1393,7 +1409,9 @@ namespace Xceed.Wpf.Toolkit
else
{
if( this.BeepOnError )
System.Media.SystemSounds.Beep.Play();
{
this.PlayBeep();
}
}
if( this.SelectionLength > 0 )
@ -1421,10 +1439,10 @@ namespace Xceed.Wpf.Toolkit
}
}
#endregion PROTECTED METHODS
#endregion PROTECTED METHODS
#region INTERNAL PROPERTIES
#region INTERNAL PROPERTIES
internal bool IsForcingMask
{
@ -1461,9 +1479,9 @@ namespace Xceed.Wpf.Toolkit
return true;
}
#endregion INTERNAL PROPERTIES
#endregion INTERNAL PROPERTIES
#region INTERNAL METHODS
#region INTERNAL METHODS
internal override string GetCurrentText()
{
@ -1577,9 +1595,9 @@ namespace Xceed.Wpf.Toolkit
}
}
#endregion INTERNAL METHODS
#endregion INTERNAL METHODS
#region PRIVATE PROPERTIES
#region PRIVATE PROPERTIES
private bool IsOverwriteMode
{
@ -1614,6 +1632,13 @@ namespace Xceed.Wpf.Toolkit
#region PRIVATE METHODS
private void PlayBeep()
{
#pragma warning disable CA1416
System.Media.SystemSounds.Beep.Play();
#pragma warning restore CA1416
}
private bool PlaceChar( char ch, int startPosition, int length, bool overwrite, out int caretIndex )
{
return this.PlaceChar( m_maskedTextProvider, ch, startPosition, length, overwrite, out caretIndex );
@ -1726,7 +1751,9 @@ namespace Xceed.Wpf.Toolkit
else
{
if( this.BeepOnError )
System.Media.SystemSounds.Beep.Play();
{
this.PlayBeep();
}
}
}
@ -1843,7 +1870,9 @@ namespace Xceed.Wpf.Toolkit
if( !success )
{
if( this.BeepOnError )
System.Media.SystemSounds.Beep.Play();
{
this.PlayBeep();
}
return;
}
@ -1937,9 +1966,9 @@ namespace Xceed.Wpf.Toolkit
return m_maskedTextProvider.ToString( true, includePrompt, includeLiterals, this.SelectionStart, selectionLength );
}
#endregion PRIVATE METHODS
#endregion PRIVATE METHODS
#region PRIVATE FIELDS
#region PRIVATE FIELDS
private MaskedTextProvider m_maskedTextProvider; // = null;
private bool m_insertToggled; // = false;
@ -1950,6 +1979,6 @@ namespace Xceed.Wpf.Toolkit
private string m_formatSpecifier;
private MethodInfo m_valueToStringMethodInfo; // = null;
#endregion PRIVATE FIELDS
#endregion PRIVATE FIELDS
}
}

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

@ -1190,7 +1190,9 @@ namespace Xceed.Wpf.Toolkit
try
{
#if !NETCORE && !NET5
new UIPermission( UIPermissionClipboard.AllClipboard ).Demand();
#endif
Clipboard.SetText( sb.ToString() );
}
catch( SecurityException )
@ -1199,6 +1201,6 @@ namespace Xceed.Wpf.Toolkit
}
}
#endregion COMMANDS
#endregion COMMANDS
}
}

13
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/NumericUpDown/Themes/Aero2.NormalColor.xaml

@ -21,6 +21,9 @@
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:prim="clr-namespace:Xceed.Wpf.Toolkit.Primitives"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../Themes/Aero2/Glyphs.xaml" />
</ResourceDictionary.MergedDictionaries>
<conv:InverseBoolConverter x:Key="InverseBoolConverter" />
@ -62,8 +65,14 @@
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
AllowSpin="{Binding AllowSpin, RelativeSource={RelativeSource TemplatedParent}}"
ShowButtonSpinner="{Binding ShowButtonSpinner, RelativeSource={RelativeSource TemplatedParent}}"
ButtonSpinnerLocation="{Binding ButtonSpinnerLocation, RelativeSource={RelativeSource TemplatedParent}}">
ShowSpinner="{Binding ShowButtonSpinner, RelativeSource={RelativeSource TemplatedParent}}"
SpinnerLocation="{Binding ButtonSpinnerLocation, RelativeSource={RelativeSource TemplatedParent}}"
SpinnerWidth="{Binding ButtonSpinnerWidth, RelativeSource={RelativeSource TemplatedParent}}"
SpinnerHeight="{Binding ButtonSpinnerHeight, RelativeSource={RelativeSource TemplatedParent}}"
SpinnerUpContentTemplate="{Binding ButtonSpinnerUpContentTemplate, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={StaticResource IncreaseGlyphNormalKey}}"
SpinnerDownContentTemplate="{Binding ButtonSpinnerDownContentTemplate, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={StaticResource DecreaseGlyphNormalKey}}"
SpinnerUpDisabledContentTemplate="{Binding ButtonSpinnerUpDisabledContentTemplate, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={StaticResource IncreaseGlyphDisabledKey}}"
SpinnerDownDisabledContentTemplate="{Binding ButtonSpinnerDownDisabledContentTemplate, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={StaticResource DecreaseGlyphDisabledKey}}">
<local:WatermarkTextBox x:Name="PART_TextBox"
BorderThickness="0"
Background="Transparent"

13
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/NumericUpDown/Themes/Generic.xaml

@ -21,6 +21,9 @@
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:prim="clr-namespace:Xceed.Wpf.Toolkit.Primitives"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../Themes/Generic/Glyphs.xaml" />
</ResourceDictionary.MergedDictionaries>
<conv:InverseBoolConverter x:Key="InverseBoolConverter" />
@ -62,8 +65,14 @@
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
AllowSpin="{Binding AllowSpin, RelativeSource={RelativeSource TemplatedParent}}"
ShowButtonSpinner="{Binding ShowButtonSpinner, RelativeSource={RelativeSource TemplatedParent}}"
ButtonSpinnerLocation="{Binding ButtonSpinnerLocation, RelativeSource={RelativeSource TemplatedParent}}">
ShowSpinner="{Binding ShowButtonSpinner, RelativeSource={RelativeSource TemplatedParent}}"
SpinnerLocation="{Binding ButtonSpinnerLocation, RelativeSource={RelativeSource TemplatedParent}}"
SpinnerWidth="{Binding ButtonSpinnerWidth, RelativeSource={RelativeSource TemplatedParent}}"
SpinnerHeight="{Binding ButtonSpinnerHeight, RelativeSource={RelativeSource TemplatedParent}}"
SpinnerUpContentTemplate="{Binding ButtonSpinnerUpContentTemplate, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={StaticResource IncreaseGlyphNormalKey}}"
SpinnerDownContentTemplate="{Binding ButtonSpinnerDownContentTemplate, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={StaticResource DecreaseGlyphNormalKey}}"
SpinnerUpDisabledContentTemplate="{Binding ButtonSpinnerUpDisabledContentTemplate, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={StaticResource IncreaseGlyphDisabledKey}}"
SpinnerDownDisabledContentTemplate="{Binding ButtonSpinnerDownDisabledContentTemplate, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={StaticResource DecreaseGlyphDisabledKey}}">
<local:WatermarkTextBox x:Name="PART_TextBox"
BorderThickness="0"
Background="Transparent"

68
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/DateTimePickerBase.cs

@ -42,6 +42,74 @@ namespace Xceed.Wpf.Toolkit.Primitives
#region Properties
#region DropDownButtonContent
public static readonly DependencyProperty DropDownButtonContentProperty = DependencyProperty.Register( "DropDownButtonContent", typeof( object ), typeof( DateTimePickerBase ), new UIPropertyMetadata( null ) );
public object DropDownButtonContent
{
get
{
return (object)GetValue( DropDownButtonContentProperty );
}
set
{
SetValue( DropDownButtonContentProperty, value );
}
}
#endregion //DropDownButtonContent
#region DropDownButtonDisabledContent
public static readonly DependencyProperty DropDownButtonDisabledContentProperty = DependencyProperty.Register( "DropDownButtonDisabledContent", typeof( object ), typeof( DateTimePickerBase ), new UIPropertyMetadata( null ) );
public object DropDownButtonDisabledContent
{
get
{
return (object)GetValue( DropDownButtonDisabledContentProperty );
}
set
{
SetValue( DropDownButtonDisabledContentProperty, value );
}
}
#endregion //DropDownButtonDisabledContent
#region DropDownButtonHeight
public static readonly DependencyProperty DropDownButtonHeightProperty = DependencyProperty.Register( "DropDownButtonHeight", typeof( double ), typeof( DateTimePickerBase ), new UIPropertyMetadata( double.NaN ) );
public double DropDownButtonHeight
{
get
{
return (double)GetValue( DropDownButtonHeightProperty );
}
set
{
SetValue( DropDownButtonHeightProperty, value );
}
}
#endregion //DropDownButtonHeight
#region DropDownButtonWidth
public static readonly DependencyProperty DropDownButtonWidthProperty = DependencyProperty.Register( "DropDownButtonWidth", typeof( double ), typeof( DateTimePickerBase ), new UIPropertyMetadata( double.NaN ) );
public double DropDownButtonWidth
{
get
{
return (double)GetValue( DropDownButtonWidthProperty );
}
set
{
SetValue( DropDownButtonWidthProperty, value );
}
}
#endregion //DropDownButtonWidth
#region IsOpen
public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register( "IsOpen", typeof( bool ), typeof( DateTimePickerBase ), new UIPropertyMetadata( false, OnIsOpenChanged ) );

20
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/SelectAllSelector.cs

@ -18,6 +18,7 @@
using System.Collections.Specialized;
using System.Windows;
using System.Linq;
using System.Collections.Generic;
namespace Xceed.Wpf.Toolkit.Primitives
{
@ -114,10 +115,15 @@ namespace Xceed.Wpf.Toolkit.Primitives
public void SelectAll()
{
var currentSelectedItems = new List<object>(this.SelectedItems as IEnumerable<object>);
var items = this.ItemsCollection.Cast<object>();
// Have a faster selection when there are more than 200 items.
this.UpdateSelectedItemsWithoutNotifications( this.ItemsCollection.Cast<object>().ToList() );
// Raise SelectionChanged for every items.
foreach( var item in this.ItemsCollection )
this.UpdateSelectedItemsWithoutNotifications( items.ToList() );
// Raise SelectionChanged for new selected items.
var newSelectedItems = items.Except( currentSelectedItems );
foreach ( var item in newSelectedItems)
{
this.OnItemSelectionChanged( new ItemSelectionChangedEventArgs( Selector.ItemSelectionChangedEvent, this, item, true ) );
}
@ -125,7 +131,15 @@ namespace Xceed.Wpf.Toolkit.Primitives
public void UnSelectAll()
{
var currentSelectedItems = new List<object>( this.SelectedItems as IEnumerable<object> );
this.SelectedItems.Clear();
// Raise SelectionChanged for selected items.
foreach (var item in currentSelectedItems)
{
this.OnItemSelectionChanged( new ItemSelectionChangedEventArgs( Selector.ItemSelectionChangedEvent, this, item, false ) );
}
}
#endregion

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Themes/Aero2/WindowControl.xaml

@ -365,7 +365,7 @@
<Setter Property="BorderBrush"
Value="#5D6C7A" />
<Setter Property="BorderThickness"
Value="1,1,1,1" />
Value="0" />
<Setter Property="Background"
Value="{StaticResource Window_Background}" />
<Setter Property="CaptionFontSize"

102
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/UpDownBase.cs

@ -85,6 +85,23 @@ new UIPropertyMetadata( true ) );
#endregion //AllowSpin
#region ButtonSpinnerHeight
public static readonly DependencyProperty ButtonSpinnerHeightProperty = DependencyProperty.Register( "ButtonSpinnerHeight", typeof( double ), typeof( UpDownBase<T> ), new UIPropertyMetadata( double.NaN ) );
public double ButtonSpinnerHeight
{
get
{
return (double)GetValue( ButtonSpinnerHeightProperty );
}
set
{
SetValue( ButtonSpinnerHeightProperty, value );
}
}
#endregion //ButtonSpinnerHeight
#region ButtonSpinnerLocation
public static readonly DependencyProperty ButtonSpinnerLocationProperty = DependencyProperty.Register( "ButtonSpinnerLocation", typeof( Location
@ -104,6 +121,91 @@ new UIPropertyMetadata( true ) );
#endregion //ButtonSpinnerLocation
#region ButtonSpinnerDownContentTemplate
public static readonly DependencyProperty ButtonSpinnerDownContentTemplateProperty = DependencyProperty.Register( "ButtonSpinnerDownContentTemplate", typeof( DataTemplate ), typeof( UpDownBase<T> ), new UIPropertyMetadata( null ) );
public DataTemplate ButtonSpinnerDownContentTemplate
{
get
{
return (DataTemplate)GetValue( ButtonSpinnerDownContentTemplateProperty );
}
set
{
SetValue( ButtonSpinnerDownContentTemplateProperty, value );
}
}
#endregion //ButtonSpinnerDownContentTemplate
#region ButtonSpinnerDownDisabledContentTemplate
public static readonly DependencyProperty ButtonSpinnerDownDisabledContentTemplateProperty = DependencyProperty.Register( "ButtonSpinnerDownDisabledContentTemplate", typeof( DataTemplate ), typeof( UpDownBase<T> ), new UIPropertyMetadata( null ) );
public DataTemplate ButtonSpinnerDownDisabledContentTemplate
{
get
{
return (DataTemplate)GetValue( ButtonSpinnerDownDisabledContentTemplateProperty );
}
set
{
SetValue( ButtonSpinnerDownDisabledContentTemplateProperty, value );
}
}
#endregion //ButtonSpinnerDownDisabledContentTemplate
#region ButtonSpinnerUpContentTemplate
public static readonly DependencyProperty ButtonSpinnerUpContentTemplateProperty = DependencyProperty.Register( "ButtonSpinnerUpContentTemplate", typeof( DataTemplate), typeof( UpDownBase<T> ), new UIPropertyMetadata( null ) );
public DataTemplate ButtonSpinnerUpContentTemplate
{
get
{
return (DataTemplate)GetValue( ButtonSpinnerUpContentTemplateProperty );
}
set
{
SetValue( ButtonSpinnerUpContentTemplateProperty, value );
}
}
#endregion //ButtonSpinnerUpContentTemplate
#region ButtonSpinnerUpDisabledContentTemplate
public static readonly DependencyProperty ButtonSpinnerUpDisabledContentTemplateProperty = DependencyProperty.Register( "ButtonSpinnerUpDisabledContentTemplate", typeof( DataTemplate ), typeof( UpDownBase<T> ), new UIPropertyMetadata( null ) );
public DataTemplate ButtonSpinnerUpDisabledContentTemplate
{
get
{
return (DataTemplate)GetValue( ButtonSpinnerUpDisabledContentTemplateProperty );
}
set
{
SetValue( ButtonSpinnerUpDisabledContentTemplateProperty, value );
}
}
#endregion //ButtonSpinnerUpDisabledContentTemplate
#region ButtonSpinnerWidth
public static readonly DependencyProperty ButtonSpinnerWidthProperty = DependencyProperty.Register( "ButtonSpinnerWidth", typeof( double ), typeof( UpDownBase<T> ), new UIPropertyMetadata( SystemParameters.VerticalScrollBarWidth ) );
public double ButtonSpinnerWidth
{
get
{
return (double)GetValue( ButtonSpinnerWidthProperty );
}
set
{
SetValue( ButtonSpinnerWidthProperty, value );
}
}
#endregion //ButtonSpinnerWidth
#region ClipValueToMinMax
public static readonly DependencyProperty ClipValueToMinMaxProperty = DependencyProperty.Register( "ClipValueToMinMax", typeof( bool ), typeof(

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/ValueRangeTextBox.cs

@ -819,7 +819,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
{
if( this.BeepOnError )
{
System.Media.SystemSounds.Beep.Play();
this.PlayBeep();
}
return false;
}
@ -1075,7 +1075,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
if( this.BeepOnError )
{
System.Media.SystemSounds.Beep.Play();
this.PlayBeep();
}
if( exception is ArgumentOutOfRangeException )
@ -1114,6 +1114,13 @@ namespace Xceed.Wpf.Toolkit.Primitives
return value;
}
private void PlayBeep()
{
#pragma warning disable CA1416
System.Media.SystemSounds.Beep.Play();
#pragma warning restore CA1416
}
private void CanEnterLineBreak( object sender, CanExecuteRoutedEventArgs e )
{
e.CanExecute = false;

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Properties/AssemblyInfo.cs

@ -56,6 +56,8 @@ using System.Windows.Markup;
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Converters/PropertyItemEditorConverter.cs

@ -80,8 +80,6 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid.Converters
return false;
var valueSource = DependencyPropertyHelper.GetValueSource( editorObject, dp );
if( valueSource == null )
return false;
return ( valueSource.BaseValueSource == BaseValueSource.Local );
}

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

@ -237,6 +237,10 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
if( itemsSourceAttribute != null )
return new ItemsSourceAttributeEditor( itemsSourceAttribute );
var passwordPropertyTextAttribute = GetAttribute<PasswordPropertyTextAttribute>();
if( passwordPropertyTextAttribute != null )
return new PasswordEditor();
return null;
}

71
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/PasswordEditor.cs

@ -0,0 +1,71 @@
/*************************************************************************************
Toolkit for WPF
Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support,
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************/
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
public class PasswordEditor : TypeEditor<WatermarkPasswordBox>
{
protected override WatermarkPasswordBox CreateEditor()
{
return new PropertyGridEditorWatermarkPasswordBox();
}
protected override void SetValueDependencyProperty()
{
ValueProperty = WatermarkPasswordBox.TextProperty;
}
protected override IValueConverter CreateValueConverter()
{
return new PasswordToStringConverter(this.Editor);
}
}
public class PasswordToStringConverter : IValueConverter
{
private WatermarkPasswordBox _editor;
public PasswordToStringConverter( WatermarkPasswordBox editor )
{
_editor = editor;
}
public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
{
_editor.Password = value as string;
return _editor.Text;
}
public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
{
return this._editor.Password;
}
}
public class PropertyGridEditorWatermarkPasswordBox : WatermarkPasswordBox
{
static PropertyGridEditorWatermarkPasswordBox()
{
DefaultStyleKeyProperty.OverrideMetadata( typeof( PropertyGridEditorWatermarkPasswordBox ), new FrameworkPropertyMetadata( typeof( PropertyGridEditorWatermarkPasswordBox ) ) );
}
}
}

21
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/TextBlockEditor.cs

@ -17,11 +17,27 @@
using System.Windows.Controls;
using System.Windows;
using System.ComponentModel;
using System.Windows.Data;
using Xceed.Wpf.Toolkit.Core;
using System;
using System.Globalization;
namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
public class TextBlockEditor : TypeEditor<TextBlock>
{
TypeConverter _typeConverter;
public TextBlockEditor()
{
}
public TextBlockEditor( TypeConverter typeConverter )
{
_typeConverter = typeConverter;
}
protected override TextBlock CreateEditor()
{
return new PropertyGridEditorTextBlock();
@ -31,8 +47,13 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
ValueProperty = TextBlock.TextProperty;
}
}
public class PropertyGridEditorTextBlock : TextBlock
{
static PropertyGridEditorTextBlock()

10
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs

@ -474,11 +474,13 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
if( editorElement == null )
{
if( propertyItem.IsReadOnly
&& !ListUtilities.IsListOfItems( propertyItem.PropertyType )
&& !ListUtilities.IsCollectionOfItems( propertyItem.PropertyType)
if( propertyItem.IsReadOnly
&& !ListUtilities.IsListOfItems( propertyItem.PropertyType )
&& !ListUtilities.IsCollectionOfItems( propertyItem.PropertyType )
&& !ListUtilities.IsDictionaryOfItems( propertyItem.PropertyType ) )
editor = new TextBlockEditor();
{
editor = new TextBlockEditor( (propertyItem.PropertyDescriptor != null) ? propertyItem.PropertyDescriptor.Converter : null );
}
// Fallback: Use a default type editor.
if( editor == null )

13
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyItem.cs

@ -227,16 +227,15 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
{
if( (be != null) && be.DataItem is DescriptorPropertyDefinitionBase )
{
DescriptorPropertyDefinitionBase descriptor = be.DataItem as DescriptorPropertyDefinitionBase;
if( Validation.GetHasError( descriptor ) )
this.Dispatcher.BeginInvoke( DispatcherPriority.Input, new Action( () =>
{
this.Dispatcher.BeginInvoke( DispatcherPriority.Input, new Action( () =>
DescriptorPropertyDefinitionBase descriptor = be.DataItem as DescriptorPropertyDefinitionBase;
if( ( descriptor != null) && Validation.GetHasError( descriptor ) )
{
var errors = Validation.GetErrors( descriptor );
Validation.MarkInvalid( be, errors[ 0 ] );
var errors = Validation.GetErrors( descriptor );
Validation.MarkInvalid( be, errors[0] );
}
) );
}
} ) );
}
}

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

@ -306,6 +306,13 @@
Value="0" />
</Style>
<!-- PropertyGrid Password Editors -->
<Style TargetType="{x:Type editor:PropertyGridEditorWatermarkPasswordBox}"
BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="BorderThickness"
Value="0" />
</Style>
<!-- PropertyGrid ColorPicker Editors -->
<Style TargetType="{x:Type editor:PropertyGridEditorColorPicker}"
BasedOn="{StaticResource ColorPicker}">

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

@ -313,6 +313,13 @@
Value="0" />
</Style>
<!-- PropertyGrid Password Editors -->
<Style TargetType="{x:Type editor:PropertyGridEditorWatermarkPasswordBox}"
BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="BorderThickness"
Value="0" />
</Style>
<!-- PropertyGrid ColorPicker Editors -->
<Style TargetType="{x:Type editor:PropertyGridEditorColorPicker}"
BasedOn="{StaticResource {x:Type local:ColorPicker}}">

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Themes/Aero2/Common.xaml

@ -83,9 +83,9 @@
<SolidColorBrush x:Key="Window_WindowBorderBrush" Color="Gray" />
<SolidColorBrush x:Key="Window_WindowBackground" Color="{x:Static media:WindowColors.ColorizationColor}" />
<SolidColorBrush x:Key="Window_WindowBackground" Color="{DynamicResource {x:Static SystemColors.WindowColorKey}}" />
<SolidColorBrush x:Key="Window_Background" Color="White"/>
<SolidColorBrush x:Key="Window_Background" Color="White"/>
<SolidColorBrush x:Key="Window_WindowInactiveBackground" Color="#FFEBEBEB" />

22
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Themes/Aero2/Glyphs.xaml

@ -65,4 +65,26 @@
Focusable="False" />
</DataTemplate>
<Grid x:Key="DropDownArrowGlyph"
IsHitTestVisible="False"
Grid.Column="1"
Margin="5">
<Path Width="9"
Height="5"
Data="{StaticResource DownArrowGeometry}"
Fill="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
Margin="0,1,0,0" />
</Grid>
<Grid x:Key="DropDownDisabledArrowGlyph"
IsHitTestVisible="False"
Grid.Column="1"
Margin="5">
<Path Width="9"
Height="5"
Data="{StaticResource DownArrowGeometry}"
Fill="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"
Margin="0,1,0,0" />
</Grid>
</ResourceDictionary>

22
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Themes/Generic/Glyphs.xaml

@ -65,4 +65,26 @@
Focusable="False" />
</DataTemplate>
<Grid x:Key="DropDownArrowGlyph"
IsHitTestVisible="False"
Grid.Column="1"
Margin="5">
<Path Width="9"
Height="5"
Data="{StaticResource DownArrowGeometry}"
Fill="#FF000000"
Margin="0,1,0,0" />
</Grid>
<Grid x:Key="DropDownDisabledArrowGlyph"
IsHitTestVisible="False"
Grid.Column="1"
Margin="5">
<Path Width="9"
Height="5"
Data="{StaticResource DownArrowGeometry}"
Fill="#AFAFAF"
Margin="0,1,0,0" />
</Grid>
</ResourceDictionary>

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

@ -462,7 +462,7 @@ namespace Xceed.Wpf.Toolkit
TimeSpan timeInterval = TimeInterval;
List<TimeItem> timeItemList = new List<TimeItem>();
if( time != null && endTime != null && timeInterval != null && timeInterval.Ticks > 0 )
if( timeInterval.Ticks > 0 )
{
while( time <= endTime )
{

48
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/TimePicker/Themes/Aero2.NormalColor.xaml

@ -61,29 +61,9 @@
<ContentPresenter HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<Grid x:Name="arrowGlyph"
IsHitTestVisible="False"
Grid.Column="1"
Margin="5">
<Path x:Name="Arrow"
Width="9"
Height="5"
Data="{StaticResource DownArrowGeometry}"
Fill="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
Margin="0,1,0,0" />
</Grid>
</Grid>
</chrome:ButtonChrome>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Fill"
TargetName="Arrow"
Value="#AFAFAF" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
@ -162,8 +142,20 @@
Value="Center" />
<Setter Property="TextAlignment"
Value="Right" />
<Setter Property="ButtonSpinnerUpContentTemplate"
Value="{StaticResource IncreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerDownContentTemplate"
Value="{StaticResource DecreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerUpDisabledContentTemplate"
Value="{StaticResource IncreaseGlyphDisabledKey}" />
<Setter Property="ButtonSpinnerDownDisabledContentTemplate"
Value="{StaticResource DecreaseGlyphDisabledKey}" />
<Setter Property="WatermarkTemplate"
Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="DropDownButtonContent"
Value="{StaticResource DropDownArrowGlyph}" />
<Setter Property="DropDownButtonDisabledContent"
Value="{StaticResource DropDownDisabledArrowGlyph}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TimePicker}">
@ -179,9 +171,15 @@
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
BorderBrush="{TemplateBinding BorderBrush}"
ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerWidth="{TemplateBinding ButtonSpinnerWidth}"
SpinnerHeight="{TemplateBinding ButtonSpinnerHeight}"
SpinnerUpContentTemplate="{TemplateBinding ButtonSpinnerUpContentTemplate}"
SpinnerDownContentTemplate="{TemplateBinding ButtonSpinnerDownContentTemplate}"
SpinnerUpDisabledContentTemplate="{TemplateBinding ButtonSpinnerUpDisabledContentTemplate}"
SpinnerDownDisabledContentTemplate="{TemplateBinding ButtonSpinnerDownDisabledContentTemplate}"
AllowSpin="{TemplateBinding AllowSpin}"
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}">
ShowSpinner="{TemplateBinding ShowButtonSpinner}">
<local:WatermarkTextBox x:Name="PART_TextBox"
BorderThickness="0"
Background="Transparent"
@ -207,8 +205,11 @@
</local:ButtonSpinner>
<ToggleButton x:Name="_timePickerToggleButton"
Grid.Column="1"
Width="{Binding DropDownButtonWidth, RelativeSource={RelativeSource TemplatedParent}}"
Height="{Binding DropDownButtonHeight, RelativeSource={RelativeSource TemplatedParent}}"
Background="White"
Focusable="False"
Content="{Binding DropDownButtonContent, RelativeSource={RelativeSource TemplatedParent}}"
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource TimePickerToggleButtonStyle}"
IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"
@ -278,6 +279,9 @@
Value="False">
<Setter Property="Foreground"
Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
<Setter TargetName="_timePickerToggleButton"
Property="Content"
Value="{Binding DropDownButtonDisabledContent, RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
<Trigger Property="IsFocused"
Value="True">

48
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/TimePicker/Themes/Generic.xaml

@ -89,29 +89,9 @@
<ContentPresenter HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<Grid x:Name="arrowGlyph"
IsHitTestVisible="False"
Grid.Column="1"
Margin="5">
<Path x:Name="Arrow"
Width="9"
Height="5"
Data="{StaticResource DownArrowGeometry}"
Fill="#FF000000"
Margin="0,1,0,0" />
</Grid>
</Grid>
</chrome:ButtonChrome>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Fill"
TargetName="Arrow"
Value="#AFAFAF" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
@ -158,6 +138,18 @@
Value="Right" />
<Setter Property="WatermarkTemplate"
Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="ButtonSpinnerUpContentTemplate"
Value="{StaticResource IncreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerDownContentTemplate"
Value="{StaticResource DecreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerUpDisabledContentTemplate"
Value="{StaticResource IncreaseGlyphDisabledKey}" />
<Setter Property="ButtonSpinnerDownDisabledContentTemplate"
Value="{StaticResource DecreaseGlyphDisabledKey}" />
<Setter Property="DropDownButtonContent"
Value="{StaticResource DropDownArrowGlyph}" />
<Setter Property="DropDownButtonDisabledContent"
Value="{StaticResource DropDownDisabledArrowGlyph}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TimePicker}">
@ -173,9 +165,15 @@
BorderThickness="{TemplateBinding BorderThickness}"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerWidth="{TemplateBinding ButtonSpinnerWidth}"
SpinnerHeight="{TemplateBinding ButtonSpinnerHeight}"
SpinnerUpContentTemplate="{TemplateBinding ButtonSpinnerUpContentTemplate}"
SpinnerDownContentTemplate="{TemplateBinding ButtonSpinnerDownContentTemplate}"
SpinnerUpDisabledContentTemplate="{TemplateBinding ButtonSpinnerUpDisabledContentTemplate}"
SpinnerDownDisabledContentTemplate="{TemplateBinding ButtonSpinnerDownDisabledContentTemplate}"
AllowSpin="{TemplateBinding AllowSpin}"
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}">
ShowSpinner="{TemplateBinding ShowButtonSpinner}">
<local:WatermarkTextBox x:Name="PART_TextBox"
BorderThickness="0"
Background="Transparent"
@ -201,8 +199,11 @@
</local:ButtonSpinner>
<ToggleButton x:Name="_timePickerToggleButton"
Grid.Column="1"
Width="{Binding DropDownButtonWidth, RelativeSource={RelativeSource TemplatedParent}}"
Height="{Binding DropDownButtonHeight, RelativeSource={RelativeSource TemplatedParent}}"
Background="White"
Focusable="False"
Content="{Binding DropDownButtonContent, RelativeSource={RelativeSource TemplatedParent}}"
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource TimePickerToggleButtonStyle}"
IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"
@ -262,6 +263,9 @@
Value="False">
<Setter Property="Foreground"
Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
<Setter TargetName="_timePickerToggleButton"
Property="Content"
Value="{Binding DropDownButtonDisabledContent, RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
<!--ToggleButton can be closed when TimePicker is included in DateTimePicker-->
<MultiDataTrigger>

29
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/TimeSpanUpDown/Themes/Aero2.NormalColor.xaml

@ -19,6 +19,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../Themes/Aero2/Glyphs.xaml" />
</ResourceDictionary.MergedDictionaries>
<DataTemplate x:Key="DefaultWatermarkTemplate">
<ContentControl Content="{Binding}"
@ -48,11 +51,19 @@
Value="Center" />
<Setter Property="TextAlignment"
Value="Right" />
<Setter Property="IsTabStop"
Value="False" />
<Setter Property="WatermarkTemplate"
<Setter Property="IsTabStop"
Value="False" />
<Setter Property="ButtonSpinnerUpContentTemplate"
Value="{StaticResource IncreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerDownContentTemplate"
Value="{StaticResource DecreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerUpDisabledContentTemplate"
Value="{StaticResource IncreaseGlyphDisabledKey}" />
<Setter Property="ButtonSpinnerDownDisabledContentTemplate"
Value="{StaticResource DecreaseGlyphDisabledKey}" />
<Setter Property="WatermarkTemplate"
Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="Template">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TimeSpanUpDown}">
<local:ButtonSpinner x:Name="PART_Spinner"
@ -62,9 +73,15 @@
BorderThickness="{TemplateBinding BorderThickness}"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerWidth="{TemplateBinding ButtonSpinnerWidth}"
SpinnerHeight="{TemplateBinding ButtonSpinnerHeight}"
SpinnerUpContentTemplate="{TemplateBinding ButtonSpinnerUpContentTemplate}"
SpinnerDownContentTemplate="{TemplateBinding ButtonSpinnerDownContentTemplate}"
SpinnerUpDisabledContentTemplate="{TemplateBinding ButtonSpinnerUpDisabledContentTemplate}"
SpinnerDownDisabledContentTemplate="{TemplateBinding ButtonSpinnerDownDisabledContentTemplate}"
AllowSpin="{TemplateBinding AllowSpin}"
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}">
ShowSpinner="{TemplateBinding ShowButtonSpinner}">
<local:WatermarkTextBox x:Name="PART_TextBox"
BorderThickness="0"
Background="Transparent"

23
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/TimeSpanUpDown/Themes/Generic.xaml

@ -19,6 +19,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../Themes/Generic/Glyphs.xaml" />
</ResourceDictionary.MergedDictionaries>
<DataTemplate x:Key="DefaultWatermarkTemplate">
<ContentControl Content="{Binding}"
@ -51,6 +54,14 @@
Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="IsTabStop"
Value="False" />
<Setter Property="ButtonSpinnerUpContentTemplate"
Value="{StaticResource IncreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerDownContentTemplate"
Value="{StaticResource DecreaseGlyphNormalKey}" />
<Setter Property="ButtonSpinnerUpDisabledContentTemplate"
Value="{StaticResource IncreaseGlyphDisabledKey}" />
<Setter Property="ButtonSpinnerDownDisabledContentTemplate"
Value="{StaticResource DecreaseGlyphDisabledKey}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TimeSpanUpDown}">
@ -61,10 +72,16 @@
BorderThickness="{TemplateBinding BorderThickness}"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
SpinnerWidth="{TemplateBinding ButtonSpinnerWidth}"
SpinnerHeight="{TemplateBinding ButtonSpinnerHeight}"
SpinnerUpContentTemplate="{TemplateBinding ButtonSpinnerUpContentTemplate}"
SpinnerDownContentTemplate="{TemplateBinding ButtonSpinnerDownContentTemplate}"
SpinnerUpDisabledContentTemplate="{TemplateBinding ButtonSpinnerUpDisabledContentTemplate}"
SpinnerDownDisabledContentTemplate="{TemplateBinding ButtonSpinnerDownDisabledContentTemplate}"
AllowSpin="{TemplateBinding AllowSpin}"
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}">
<local:WatermarkTextBox x:Name="PART_TextBox"
ShowSpinner="{TemplateBinding ShowButtonSpinner}">
<local:WatermarkTextBox x:Name="PART_TextBox"
BorderThickness="0"
Background="Transparent"
ContextMenu="{TemplateBinding ContextMenu}"

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Utils/Exceptions/ThrowException.cs

@ -50,7 +50,7 @@ namespace Xceed.Utils.Exceptions
#endif // !NO_CODE_ANALYSIS
public static void ThrowLicenseException( Type type, object instance, string message )
{
#if PORTABLE || NETCORE
#if PORTABLE || NETCORE || NET5
throw new Exception( message );
#elif ( XCEEDCF || SILVERLIGHT || XAMARIN )
throw new SystemException( message );
@ -62,7 +62,7 @@ namespace Xceed.Utils.Exceptions
#else
throw new System.ComponentModel.LicenseException( type, instance, message );
#endif // XBAP_FRIENDLY
#endif // ( XCEEDCF || NETCORE )
#endif // ( XCEEDCF || NETCORE || NET5)
}
#endregion PUBLIC STATIC METHODS

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

@ -447,6 +447,7 @@
<Compile Include="PropertyGrid\Implementation\Converters\IsStringEmptyConverter.cs" />
<Compile Include="PropertyGrid\Implementation\Converters\PropertyNameTextTrimmingConverter.cs" />
<Compile Include="PropertyGrid\Implementation\Editors\CollectionEditor.cs" />
<Compile Include="PropertyGrid\Implementation\Editors\PasswordEditor.cs" />
<Compile Include="PropertyGrid\Implementation\Editors\SourceComboBoxEditor.cs" />
<Compile Include="PropertyGrid\Implementation\TrimmedTextBlock.cs" />
<Compile Include="Core\Converters\WindowContentBorderMarginConverter.cs" />

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

@ -62,7 +62,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
{
try
{
#if !NETCORE && !NET5
new UIPermission( PermissionState.Unrestricted ).Demand();
#endif
_cacheBits[ ( int )CacheBits.HasUIPermission ] = true;
}
catch( SecurityException )
@ -80,9 +82,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.Loaded += this.Zoombox_Loaded;
}
#endregion
#endregion
#region AnimationAccelerationRatio Property
#region AnimationAccelerationRatio Property
public static readonly DependencyProperty AnimationAccelerationRatioProperty =
DependencyProperty.Register( "AnimationAccelerationRatio", typeof( double ), typeof( Zoombox ),
@ -110,9 +112,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
return true;
}
#endregion
#endregion
#region AnimationDecelerationRatio Property
#region AnimationDecelerationRatio Property
public static readonly DependencyProperty AnimationDecelerationRatioProperty =
DependencyProperty.Register( "AnimationDecelerationRatio", typeof( double ), typeof( Zoombox ),
@ -140,9 +142,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
return true;
}
#endregion
#endregion
#region AnimationDuration Property
#region AnimationDuration Property
public static readonly DependencyProperty AnimationDurationProperty =
DependencyProperty.Register( "AnimationDuration", typeof( Duration ), typeof( Zoombox ),
@ -160,9 +162,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region AreDragModifiersActive Property
#region AreDragModifiersActive Property
private static readonly DependencyPropertyKey AreDragModifiersActivePropertyKey =
DependencyProperty.RegisterReadOnly( "AreDragModifiersActive", typeof( bool ), typeof( Zoombox ),
@ -183,9 +185,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.SetValue( Zoombox.AreDragModifiersActivePropertyKey, value );
}
#endregion
#endregion
#region AreRelativeZoomModifiersActive Property
#region AreRelativeZoomModifiersActive Property
private static readonly DependencyPropertyKey AreRelativeZoomModifiersActivePropertyKey =
DependencyProperty.RegisterReadOnly( "AreRelativeZoomModifiersActive", typeof( bool ), typeof( Zoombox ),
@ -206,9 +208,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.SetValue( Zoombox.AreRelativeZoomModifiersActivePropertyKey, value );
}
#endregion
#endregion
#region AreZoomModifiersActive Property
#region AreZoomModifiersActive Property
private static readonly DependencyPropertyKey AreZoomModifiersActivePropertyKey =
DependencyProperty.RegisterReadOnly( "AreZoomModifiersActive", typeof( bool ), typeof( Zoombox ),
@ -229,9 +231,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.SetValue( Zoombox.AreZoomModifiersActivePropertyKey, value );
}
#endregion
#endregion
#region AreZoomToSelectionModifiersActive Property
#region AreZoomToSelectionModifiersActive Property
private static readonly DependencyPropertyKey AreZoomToSelectionModifiersActivePropertyKey =
DependencyProperty.RegisterReadOnly( "AreZoomToSelectionModifiersActive", typeof( bool ), typeof( Zoombox ),
@ -252,9 +254,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.SetValue( Zoombox.AreZoomToSelectionModifiersActivePropertyKey, value );
}
#endregion
#endregion
#region AutoWrapContentWithViewbox Property
#region AutoWrapContentWithViewbox Property
public static readonly DependencyProperty AutoWrapContentWithViewboxProperty =
DependencyProperty.Register( "AutoWrapContentWithViewbox", typeof( bool ), typeof( Zoombox ),
@ -371,9 +373,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
private UIElement _trueContent; //null
#endregion
#endregion
#region CurrentView Property
#region CurrentView Property
private static readonly DependencyPropertyKey CurrentViewPropertyKey =
DependencyProperty.RegisterReadOnly( "CurrentView", typeof( ZoomboxView ), typeof( Zoombox ),
@ -405,9 +407,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
zoombox.RaiseEvent( new ZoomboxViewChangedEventArgs( e.OldValue as ZoomboxView, e.NewValue as ZoomboxView, zoombox._lastViewIndex, zoombox.CurrentViewIndex ) );
}
#endregion
#endregion
#region CurrentViewIndex Property
#region CurrentViewIndex Property
private static readonly DependencyPropertyKey CurrentViewIndexPropertyKey =
DependencyProperty.RegisterReadOnly( "CurrentViewIndex", typeof( int ), typeof( Zoombox ),
@ -428,9 +430,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.SetValue( Zoombox.CurrentViewIndexPropertyKey, value );
}
#endregion
#endregion
#region DragModifiers Property
#region DragModifiers Property
public static readonly DependencyProperty DragModifiersProperty =
DependencyProperty.Register( "DragModifiers", typeof( KeyModifierCollection ), typeof( Zoombox ),
@ -457,9 +459,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
return result;
}
#endregion
#endregion
#region DragOnPreview Property
#region DragOnPreview Property
public static readonly DependencyProperty DragOnPreviewProperty =
DependencyProperty.Register( "DragOnPreview", typeof( bool ), typeof( Zoombox ),
@ -477,9 +479,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region EffectiveViewStackMode Property
#region EffectiveViewStackMode Property
private static readonly DependencyPropertyKey EffectiveViewStackModePropertyKey =
DependencyProperty.RegisterReadOnly( "EffectiveViewStackMode", typeof( ZoomboxViewStackMode ), typeof( Zoombox ),
@ -500,9 +502,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.SetValue( Zoombox.EffectiveViewStackModePropertyKey, value );
}
#endregion
#endregion
#region HasBackStack Property
#region HasBackStack Property
private static readonly DependencyPropertyKey HasBackStackPropertyKey =
DependencyProperty.RegisterReadOnly( "HasBackStack", typeof( bool ), typeof( Zoombox ),
@ -518,9 +520,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region HasForwardStack Property
#region HasForwardStack Property
private static readonly DependencyPropertyKey HasForwardStackPropertyKey =
DependencyProperty.RegisterReadOnly( "HasForwardStack", typeof( bool ), typeof( Zoombox ),
@ -536,9 +538,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region IsAnimated Property
#region IsAnimated Property
public static readonly DependencyProperty IsAnimatedProperty =
DependencyProperty.Register( "IsAnimated", typeof( bool ), typeof( Zoombox ),
@ -568,9 +570,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
return result;
}
#endregion
#endregion
#region IsDraggingContent Property
#region IsDraggingContent Property
private static readonly DependencyPropertyKey IsDraggingContentPropertyKey =
DependencyProperty.RegisterReadOnly( "IsDraggingContent", typeof( bool ), typeof( Zoombox ),
@ -591,9 +593,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.SetValue( Zoombox.IsDraggingContentPropertyKey, value );
}
#endregion
#endregion
#region IsSelectingRegion Property
#region IsSelectingRegion Property
private static readonly DependencyPropertyKey IsSelectingRegionPropertyKey =
DependencyProperty.RegisterReadOnly( "IsSelectingRegion", typeof( bool ), typeof( Zoombox ),
@ -614,9 +616,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.SetValue( Zoombox.IsSelectingRegionPropertyKey, value );
}
#endregion
#endregion
#region IsUsingScrollBars Property
#region IsUsingScrollBars Property
public static readonly DependencyProperty IsUsingScrollBarsProperty =
DependencyProperty.Register( "IsUsingScrollBars", typeof( bool ), typeof( Zoombox ),
@ -634,9 +636,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region MaxScale Property
#region MaxScale Property
public static readonly DependencyProperty MaxScaleProperty =
DependencyProperty.Register( "MaxScale", typeof( double ), typeof( Zoombox ),
@ -673,9 +675,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
return result;
}
#endregion
#endregion
#region MinScale Property
#region MinScale Property
public static readonly DependencyProperty MinScaleProperty =
DependencyProperty.Register( "MinScale", typeof( double ), typeof( Zoombox ),
@ -712,9 +714,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
return result;
}
#endregion
#endregion
#region NavigateOnPreview Property
#region NavigateOnPreview Property
public static readonly DependencyProperty NavigateOnPreviewProperty =
DependencyProperty.Register( "NavigateOnPreview", typeof( bool ), typeof( Zoombox ),
@ -732,9 +734,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region PanDistance Property
#region PanDistance Property
public static readonly DependencyProperty PanDistanceProperty =
DependencyProperty.Register( "PanDistance", typeof( double ), typeof( Zoombox ),
@ -752,9 +754,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region Position Property
#region Position Property
public static readonly DependencyProperty PositionProperty =
DependencyProperty.Register( "Position", typeof( Point ), typeof( Zoombox ),
@ -786,9 +788,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region RelativeZoomModifiers Property
#region RelativeZoomModifiers Property
public static readonly DependencyProperty RelativeZoomModifiersProperty =
DependencyProperty.Register( "RelativeZoomModifiers", typeof( KeyModifierCollection ), typeof( Zoombox ),
@ -816,9 +818,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
return result;
}
#endregion
#endregion
#region Scale Property
#region Scale Property
public static readonly DependencyProperty ScaleProperty =
DependencyProperty.Register( "Scale", typeof( double ), typeof( Zoombox ),
@ -865,9 +867,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
return result;
}
#endregion
#endregion
#region ViewFinder Property
#region ViewFinder Property
private static readonly DependencyPropertyKey ViewFinderPropertyKey =
DependencyProperty.RegisterReadOnly( "ViewFinder", typeof( FrameworkElement ), typeof( Zoombox ),
@ -898,9 +900,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
_isUsingDefaultViewFinder = false;
}
#endregion
#endregion
#region ViewFinderVisibility Attached Property
#region ViewFinderVisibility Attached Property
public static readonly DependencyProperty ViewFinderVisibilityProperty =
DependencyProperty.RegisterAttached( "ViewFinderVisibility", typeof( Visibility ), typeof( Zoombox ),
@ -916,9 +918,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
d.SetValue( Zoombox.ViewFinderVisibilityProperty, value );
}
#endregion
#endregion
#region Viewport Property
#region Viewport Property
private static readonly DependencyPropertyKey ViewportPropertyKey =
DependencyProperty.RegisterReadOnly( "Viewport", typeof( Rect ), typeof( Zoombox ),
@ -942,9 +944,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
zoombox.Position = new Point( -zoombox.Viewport.Left * zoombox.Scale / zoombox._viewboxFactor, -zoombox.Viewport.Top * zoombox.Scale / zoombox._viewboxFactor );
}
#endregion
#endregion
#region ViewStackCount Property
#region ViewStackCount Property
private static readonly DependencyPropertyKey ViewStackCountPropertyKey =
DependencyProperty.RegisterReadOnly( "ViewStackCount", typeof( int ), typeof( Zoombox ),
@ -979,9 +981,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.UpdateStackProperties();
}
#endregion
#endregion
#region ViewStackIndex Property
#region ViewStackIndex Property
public static readonly DependencyProperty ViewStackIndexProperty =
DependencyProperty.Register( "ViewStackIndex", typeof( int ), typeof( Zoombox ),
@ -1031,9 +1033,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
return ( zoombox.EffectiveViewStackMode == ZoomboxViewStackMode.Disabled ) ? -1 : value;
}
#endregion
#endregion
#region ViewStackMode Property
#region ViewStackMode Property
public static readonly DependencyProperty ViewStackModeProperty =
DependencyProperty.Register( "ViewStackMode", typeof( ZoomboxViewStackMode ), typeof( Zoombox ),
@ -1095,9 +1097,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
return value;
}
#endregion
#endregion
#region ViewStackSource Property
#region ViewStackSource Property
public static readonly DependencyProperty ViewStackSourceProperty =
DependencyProperty.Register( "ViewStackSource", typeof( IEnumerable ), typeof( Zoombox ),
@ -1148,9 +1150,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
zoombox.CoerceValue( Zoombox.ViewStackModeProperty );
}
#endregion
#endregion
#region ZoomModifiers Property
#region ZoomModifiers Property
public static readonly DependencyProperty ZoomModifiersProperty =
DependencyProperty.Register( "ZoomModifiers", typeof( KeyModifierCollection ), typeof( Zoombox ),
@ -1177,9 +1179,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
return result;
}
#endregion
#endregion
#region ZoomOnPreview Property
#region ZoomOnPreview Property
public static readonly DependencyProperty ZoomOnPreviewProperty =
DependencyProperty.Register( "ZoomOnPreview", typeof( bool ), typeof( Zoombox ),
@ -1197,9 +1199,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region ZoomOrigin Property
#region ZoomOrigin Property
public static readonly DependencyProperty ZoomOriginProperty =
DependencyProperty.Register( "ZoomOrigin", typeof( Point ), typeof( Zoombox ),
@ -1217,9 +1219,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region ZoomPercentage Property
#region ZoomPercentage Property
public static readonly DependencyProperty ZoomPercentageProperty =
DependencyProperty.Register( "ZoomPercentage", typeof( double ), typeof( Zoombox ),
@ -1237,9 +1239,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region ZoomOn Property
#region ZoomOn Property
public static readonly DependencyProperty ZoomOnProperty =
DependencyProperty.Register( "ZoomOn", typeof( ZoomboxZoomOn ), typeof( Zoombox ),
@ -1257,9 +1259,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region ZoomToSelectionModifiers Property
#region ZoomToSelectionModifiers Property
public static readonly DependencyProperty ZoomToSelectionModifiersProperty =
DependencyProperty.Register( "ZoomToSelectionModifiers", typeof( KeyModifierCollection ), typeof( Zoombox ),
@ -1286,9 +1288,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
return result;
}
#endregion
#endregion
#region KeepContentInBounds Property
#region KeepContentInBounds Property
public static readonly DependencyProperty KeepContentInBoundsProperty =
DependencyProperty.Register( "KeepContentInBounds", typeof( bool ), typeof( Zoombox ),
@ -1329,9 +1331,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region ViewStack Property
#region ViewStack Property
public ZoomboxViewStack ViewStack
{
@ -1345,9 +1347,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region HasArrangedContentPresenter Internal Property
#region HasArrangedContentPresenter Internal Property
internal bool HasArrangedContentPresenter
{
@ -1361,9 +1363,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region IsUpdatingView Internal Property
#region IsUpdatingView Internal Property
internal bool IsUpdatingView
{
@ -1377,9 +1379,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region ContentOffset Private Property
#region ContentOffset Private Property
private Vector ContentOffset
{
@ -1421,9 +1423,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region ContentRect Private Property
#region ContentRect Private Property
private Rect ContentRect
{
@ -1434,9 +1436,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region HasRenderedFirstView Private Property
#region HasRenderedFirstView Private Property
private bool HasRenderedFirstView
{
@ -1450,9 +1452,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region HasUIPermission Private Property
#region HasUIPermission Private Property
private bool HasUIPermission
{
@ -1462,9 +1464,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region IsContentWrapped Private Property
#region IsContentWrapped Private Property
private bool IsContentWrapped
{
@ -1478,9 +1480,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region IsDraggingViewport Private Property
#region IsDraggingViewport Private Property
private bool IsDraggingViewport
{
@ -1494,9 +1496,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region IsMonitoringInput Private Property
#region IsMonitoringInput Private Property
private bool IsMonitoringInput
{
@ -1510,9 +1512,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region IsResizingViewport Private Property
#region IsResizingViewport Private Property
private bool IsResizingViewport
{
@ -1526,9 +1528,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region IsUpdatingViewport Private Property
#region IsUpdatingViewport Private Property
private bool IsUpdatingViewport
{
@ -1542,9 +1544,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region RefocusViewOnFirstRender Private Property
#region RefocusViewOnFirstRender Private Property
private bool RefocusViewOnFirstRender
{
@ -1558,9 +1560,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region ViewFinderDisplayRect Private Property
#region ViewFinderDisplayRect Private Property
private Rect ViewFinderDisplayRect
{
@ -1571,9 +1573,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region AnimationBeginning Event
#region AnimationBeginning Event
public static readonly RoutedEvent AnimationBeginningEvent = EventManager.RegisterRoutedEvent( "AnimationBeginning", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( Zoombox ) );
@ -1589,9 +1591,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region AnimationCompleted Event
#region AnimationCompleted Event
public static readonly RoutedEvent AnimationCompletedEvent = EventManager.RegisterRoutedEvent( "AnimationCompleted", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( Zoombox ) );
@ -1607,9 +1609,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region CurrentViewChanged Event
#region CurrentViewChanged Event
public static readonly RoutedEvent CurrentViewChangedEvent = EventManager.RegisterRoutedEvent( "CurrentViewChanged", RoutingStrategy.Bubble, typeof( ZoomboxViewChangedEventHandler ), typeof( Zoombox ) );
@ -1625,11 +1627,11 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
public event EventHandler<ScrollEventArgs> Scroll;
#region ViewStackIndexChanged Event
#region ViewStackIndexChanged Event
public static readonly RoutedEvent ViewStackIndexChangedEvent = EventManager.RegisterRoutedEvent( "ViewStackIndexChanged", RoutingStrategy.Bubble, typeof( IndexChangedEventHandler ), typeof( Zoombox ) );
@ -1645,9 +1647,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
}
}
#endregion
#endregion
#region Back Command
#region Back Command
public static RoutedUICommand Back = new RoutedUICommand( "Go Back", "GoBack", typeof( Zoombox ) );
@ -1662,9 +1664,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.GoBack();
}
#endregion
#endregion
#region Center Command
#region Center Command
public static RoutedUICommand Center = new RoutedUICommand( "Center Content", "Center", typeof( Zoombox ) );
@ -1673,9 +1675,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.CenterContent();
}
#endregion
#endregion
#region Fill Command
#region Fill Command
public static RoutedUICommand Fill = new RoutedUICommand( "Fill Bounds with Content", "FillToBounds", typeof( Zoombox ) );
@ -1684,9 +1686,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.FillToBounds();
}
#endregion
#endregion
#region Fit Command
#region Fit Command
public static RoutedUICommand Fit = new RoutedUICommand( "Fit Content within Bounds", "FitToBounds", typeof( Zoombox ) );
@ -1695,9 +1697,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.FitToBounds();
}
#endregion
#endregion
#region Forward Command
#region Forward Command
public static RoutedUICommand Forward = new RoutedUICommand( "Go Forward", "GoForward", typeof( Zoombox ) );
@ -1712,9 +1714,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.GoForward();
}
#endregion
#endregion
#region Home Command
#region Home Command
public static RoutedUICommand Home = new RoutedUICommand( "Go Home", "GoHome", typeof( Zoombox ) );
@ -1730,9 +1732,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.GoHome();
}
#endregion
#endregion
#region PanDown Command
#region PanDown Command
public static RoutedUICommand PanDown = new RoutedUICommand( "Pan Down", "PanDown", typeof( Zoombox ) );
@ -1741,9 +1743,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.Position = new Point( _basePosition.X, _basePosition.Y + PanDistance );
}
#endregion
#endregion
#region PanLeft Command
#region PanLeft Command
public static RoutedUICommand PanLeft = new RoutedUICommand( "Pan Left", "PanLeft", typeof( Zoombox ) );
@ -1752,9 +1754,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.Position = new Point( _basePosition.X - this.PanDistance, _basePosition.Y );
}
#endregion
#endregion
#region PanRight Command
#region PanRight Command
public static RoutedUICommand PanRight = new RoutedUICommand( "Pan Right", "PanRight", typeof( Zoombox ) );
@ -1763,9 +1765,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.Position = new Point( _basePosition.X + this.PanDistance, _basePosition.Y );
}
#endregion
#endregion
#region PanUp Command
#region PanUp Command
public static RoutedUICommand PanUp = new RoutedUICommand( "Pan Up", "PanUp", typeof( Zoombox ) );
@ -1774,9 +1776,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.Position = new Point( _basePosition.X, _basePosition.Y - this.PanDistance );
}
#endregion
#endregion
#region Refocus Command
#region Refocus Command
public static RoutedUICommand Refocus = new RoutedUICommand( "Refocus View", "Refocus", typeof( Zoombox ) );
@ -1792,9 +1794,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.RefocusView();
}
#endregion
#endregion
#region ZoomIn Command
#region ZoomIn Command
public static RoutedUICommand ZoomIn = new RoutedUICommand( "Zoom In", "ZoomIn", typeof( Zoombox ) );
@ -1803,9 +1805,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.Zoom( this.ZoomPercentage / 100 );
}
#endregion
#endregion
#region ZoomOut Command
#region ZoomOut Command
public static RoutedUICommand ZoomOut = new RoutedUICommand( "Zoom Out", "ZoomOut", typeof( Zoombox ) );
@ -1814,7 +1816,7 @@ namespace Xceed.Wpf.Toolkit.Zoombox
this.Zoom( -this.ZoomPercentage / 100 );
}
#endregion
#endregion
public void CenterContent()
{
@ -3688,7 +3690,7 @@ namespace Xceed.Wpf.Toolkit.Zoombox
return zoomPoint;
}
#region OnKeyDown Methods
#region OnKeyDown Methods
protected override void OnPreviewKeyDown( KeyEventArgs e )
{
@ -3710,9 +3712,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
base.OnKeyDown( e );
}
#endregion
#endregion
#region OnMouseDown Methods
#region OnMouseDown Methods
protected override void OnPreviewMouseDown( MouseButtonEventArgs e )
{
@ -3734,9 +3736,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
base.OnMouseDown( e );
}
#endregion
#endregion
#region OnMouseEnter Methods
#region OnMouseEnter Methods
protected override void OnMouseEnter( MouseEventArgs e )
{
@ -3745,9 +3747,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
base.OnMouseEnter( e );
}
#endregion
#endregion
#region OnMouseLeave Methods
#region OnMouseLeave Methods
protected override void OnMouseLeave( MouseEventArgs e )
{
@ -3756,9 +3758,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
base.OnMouseLeave( e );
}
#endregion
#endregion
#region OnMouseLeftButton Methods
#region OnMouseLeftButton Methods
protected override void OnPreviewMouseLeftButtonDown( MouseButtonEventArgs e )
{
@ -3800,9 +3802,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
base.OnMouseLeftButtonUp( e );
}
#endregion
#endregion
#region OnMouseMove Methods
#region OnMouseMove Methods
protected override void OnPreviewMouseMove( MouseEventArgs e )
{
@ -3824,9 +3826,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
base.OnMouseMove( e );
}
#endregion
#endregion
#region OnMouseWheel Methods
#region OnMouseWheel Methods
protected override void OnPreviewMouseWheel( MouseWheelEventArgs e )
{
@ -3848,9 +3850,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
base.OnMouseWheel( e );
}
#endregion
#endregion
#region Private Fields
#region Private Fields
// the default value for a single mouse wheel delta appears to be 28
private static int MOUSE_WHEEL_DELTA = 28;
@ -3894,9 +3896,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
private BitVector32 _cacheBits = new BitVector32( 0 );
#endregion
#endregion
#region ViewFinderSelectionConverter Nested Type
#region ViewFinderSelectionConverter Nested Type
private sealed class ViewFinderSelectionConverter : IValueConverter
{
@ -3929,9 +3931,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
private readonly Zoombox _zoombox;
}
#endregion
#endregion
#region DragAdorner Nested Type
#region DragAdorner Nested Type
internal sealed class DragAdorner : Adorner
{
@ -4029,9 +4031,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
private Size _cachedSize;
}
#endregion
#endregion
#region CacheBits Nested Type
#region CacheBits Nested Type
private enum CacheBits
{
@ -4047,9 +4049,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
HasUIPermission = 0x00000200,
}
#endregion
#endregion
#region ResizeEdge Nested Type
#region ResizeEdge Nested Type
private enum ResizeEdge
{
@ -4064,6 +4066,6 @@ namespace Xceed.Wpf.Toolkit.Zoombox
Bottom,
}
#endregion
#endregion
}
}

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Zoombox/ZoomboxCursors.cs

@ -31,7 +31,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
{
try
{
#if !NETCORE && !NET5
new EnvironmentPermission( PermissionState.Unrestricted ).Demand();
#endif
_zoom = new Cursor( ResourceHelper.LoadResourceStream( Assembly.GetExecutingAssembly(), "Zoombox/Resources/Zoom.cur" ) );
_zoomRelative = new Cursor( ResourceHelper.LoadResourceStream( Assembly.GetExecutingAssembly(), "Zoombox/Resources/ZoomRelative.cur" ) );
}

Loading…
Cancel
Save