Browse Source

V4.5.0 Released

pull/1788/head 4.5.0
Simon Boucher 3 years ago
parent
commit
c110ea745f
  1. BIN
      ExtendedWPFToolkitSolution/Libs/NET35/WPFToolkit.dll
  2. BIN
      ExtendedWPFToolkitSolution/Libs/NET35/Xceed.Wpf.Toolkit.dll
  3. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml
  4. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml
  5. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml
  6. 16
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTarget.cs
  7. 9
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Extentions.cs
  8. 34
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentTabItem.cs
  9. 71
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs
  10. 230
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs
  11. 35
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorable.cs
  12. 54
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutContent.cs
  13. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Themes/Default.xaml
  14. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ExtTabControlView.xaml.txt
  15. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/AssemblyInfo.cs
  16. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ExtTabControl/Views/ExtTabControlView.xaml
  17. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs
  18. 13
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Aero2.NormalColor.xaml
  19. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml
  20. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlDialog.xaml.cs
  21. 46
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/TabItemSizeConverter.cs
  22. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs
  23. 47
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs
  24. 9
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/Selector.cs
  25. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/DescriptorPropertyDefinition.cs
  26. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/DescriptorPropertyDefinitionBase.cs
  27. 142
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/EnumCheckComboBoxEditor.cs
  28. 14
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs
  29. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGridUtilities.cs
  30. 34
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml
  31. 10
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml
  32. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.NET5.csproj
  33. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj

BIN
ExtendedWPFToolkitSolution/Libs/NET35/WPFToolkit.dll

Binary file not shown.

BIN
ExtendedWPFToolkitSolution/Libs/NET35/Xceed.Wpf.Toolkit.dll

Binary file not shown.

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

@ -1314,10 +1314,10 @@
<Setter Property="BorderBrush" <Setter Property="BorderBrush"
Value="{DynamicResource {x:Static avalonDockAero:AeroColors.BaseColor14Key}}" /> Value="{DynamicResource {x:Static avalonDockAero:AeroColors.BaseColor14Key}}" />
<Setter Property="BorderThickness" <Setter Property="BorderThickness"
Value="1" /> Value="3" />
<Setter Property="shell:WindowChrome.WindowChrome"> <Setter Property="shell:WindowChrome.WindowChrome">
<Setter.Value> <Setter.Value>
<shell:WindowChrome ResizeBorderThickness="10" <shell:WindowChrome ResizeBorderThickness="{Binding ResizeBorderThickness, RelativeSource={RelativeSource AncestorType={x:Type avalonDockControls:LayoutDocumentFloatingWindowControl}}}"
CaptionHeight="18" CaptionHeight="18"
CornerRadius="3" CornerRadius="3"
GlassFrameThickness="0" GlassFrameThickness="0"
@ -1491,10 +1491,10 @@
<Setter Property="BorderBrush" <Setter Property="BorderBrush"
Value="{DynamicResource {x:Static avalonDockAero:AeroColors.BaseColor16Key}}" /> Value="{DynamicResource {x:Static avalonDockAero:AeroColors.BaseColor16Key}}" />
<Setter Property="BorderThickness" <Setter Property="BorderThickness"
Value="4" /> Value="3" />
<Setter Property="shell:WindowChrome.WindowChrome"> <Setter Property="shell:WindowChrome.WindowChrome">
<Setter.Value> <Setter.Value>
<shell:WindowChrome ResizeBorderThickness="10" <shell:WindowChrome ResizeBorderThickness="{Binding ResizeBorderThickness, RelativeSource={RelativeSource AncestorType={x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}}}"
CaptionHeight="18" CaptionHeight="18"
CornerRadius="7" CornerRadius="7"
GlassFrameThickness="0" /> GlassFrameThickness="0" />

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

@ -1357,11 +1357,11 @@
<Setter Property="BorderBrush" <Setter Property="BorderBrush"
Value="{DynamicResource AvalonDock_ThemeMetro_BaseColor6}" /> Value="{DynamicResource AvalonDock_ThemeMetro_BaseColor6}" />
<Setter Property="BorderThickness" <Setter Property="BorderThickness"
Value="1" /> Value="3" />
<Setter Property="shell:WindowChrome.WindowChrome"> <Setter Property="shell:WindowChrome.WindowChrome">
<Setter.Value> <Setter.Value>
<shell:WindowChrome CornerRadius="0" <shell:WindowChrome CornerRadius="0"
ResizeBorderThickness="10" ResizeBorderThickness="{Binding ResizeBorderThickness, RelativeSource={RelativeSource AncestorType={x:Type avalonDockControls:LayoutDocumentFloatingWindowControl}}}"
CaptionHeight="24" CaptionHeight="24"
GlassFrameThickness="0" GlassFrameThickness="0"
ShowSystemMenu="False" /> ShowSystemMenu="False" />
@ -1548,11 +1548,11 @@
<Setter Property="BorderBrush" <Setter Property="BorderBrush"
Value="{DynamicResource AvalonDock_ThemeMetro_BaseColor6}" /> Value="{DynamicResource AvalonDock_ThemeMetro_BaseColor6}" />
<Setter Property="BorderThickness" <Setter Property="BorderThickness"
Value="1" /> Value="3" />
<Setter Property="shell:WindowChrome.WindowChrome"> <Setter Property="shell:WindowChrome.WindowChrome">
<Setter.Value> <Setter.Value>
<shell:WindowChrome CornerRadius="0" <shell:WindowChrome CornerRadius="0"
ResizeBorderThickness="10" ResizeBorderThickness="{Binding ResizeBorderThickness, RelativeSource={RelativeSource AncestorType={x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}}}"
CaptionHeight="24" CaptionHeight="24"
GlassFrameThickness="0" /> GlassFrameThickness="0" />
</Setter.Value> </Setter.Value>

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

@ -1456,10 +1456,10 @@
<Setter Property="BorderBrush" <Setter Property="BorderBrush"
Value="{DynamicResource AvalonDock_ThemeVS2010_BaseColor33}" /> Value="{DynamicResource AvalonDock_ThemeVS2010_BaseColor33}" />
<Setter Property="BorderThickness" <Setter Property="BorderThickness"
Value="1" /> Value="3" />
<Setter Property="shell:WindowChrome.WindowChrome"> <Setter Property="shell:WindowChrome.WindowChrome">
<Setter.Value> <Setter.Value>
<shell:WindowChrome ResizeBorderThickness="10" <shell:WindowChrome ResizeBorderThickness="{Binding ResizeBorderThickness, RelativeSource={RelativeSource AncestorType={x:Type avalonDockControls:LayoutDocumentFloatingWindowControl}}}"
CaptionHeight="18" CaptionHeight="18"
CornerRadius="3" CornerRadius="3"
GlassFrameThickness="0" GlassFrameThickness="0"
@ -1683,10 +1683,10 @@
<Setter Property="BorderBrush" <Setter Property="BorderBrush"
Value="{DynamicResource AvalonDock_ThemeVS2010_BaseColor16}" /> Value="{DynamicResource AvalonDock_ThemeVS2010_BaseColor16}" />
<Setter Property="BorderThickness" <Setter Property="BorderThickness"
Value="4" /> Value="3" />
<Setter Property="shell:WindowChrome.WindowChrome"> <Setter Property="shell:WindowChrome.WindowChrome">
<Setter.Value> <Setter.Value>
<shell:WindowChrome ResizeBorderThickness="10" <shell:WindowChrome ResizeBorderThickness="{Binding ResizeBorderThickness, RelativeSource={RelativeSource AncestorType={x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}}}"
CaptionHeight="18" CaptionHeight="18"
CornerRadius="7" CornerRadius="7"
GlassFrameThickness="0" /> GlassFrameThickness="0" />

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

@ -99,16 +99,32 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
var root = floatingWindow.Root; var root = floatingWindow.Root;
var currentActiveContent = floatingWindow.Root.ActiveContent; var currentActiveContent = floatingWindow.Root.ActiveContent;
var manager = root.Manager;
var fwAsAnchorable = floatingWindow as LayoutAnchorableFloatingWindow; var fwAsAnchorable = floatingWindow as LayoutAnchorableFloatingWindow;
if( fwAsAnchorable != null ) if( fwAsAnchorable != null )
{ {
// Raise PreviewDock Event
var draggedLayoutAnchorable = floatingWindow.Descendents().OfType<LayoutAnchorable>().FirstOrDefault( l => l != null );
manager.RaisePreviewDockEvent( draggedLayoutAnchorable );
this.Drop( fwAsAnchorable ); this.Drop( fwAsAnchorable );
// Raise Dock Event
manager.RaiseDockedEvent( draggedLayoutAnchorable );
} }
else else
{ {
var fwAsDocument = floatingWindow as LayoutDocumentFloatingWindow; var fwAsDocument = floatingWindow as LayoutDocumentFloatingWindow;
// Raise PreviewDock Event
var draggedLayoutDocument = floatingWindow.Descendents().OfType<LayoutDocument>().FirstOrDefault( l => l != null );
manager.RaisePreviewDockEvent( draggedLayoutDocument );
this.Drop( fwAsDocument ); this.Drop( fwAsDocument );
// Raise Dock Event
manager.RaiseDockedEvent( draggedLayoutDocument );
} }
if( currentActiveContent != null ) if( currentActiveContent != null )

9
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Extentions.cs

@ -113,5 +113,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
while( target != null && !( target is T ) ); while( target != null && !( target is T ) );
return target as T; return target as T;
} }
public static IEnumerable<DependencyObject> FindLogicalAncestorsAndSelf( this DependencyObject self )
{
while( self != null )
{
yield return self;
self = LogicalTreeHelper.GetParent( self ) ?? VisualTreeHelper.GetParent( self );
}
}
} }
} }

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

@ -35,7 +35,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
private List<Rect> _otherTabsScreenArea = null; private List<Rect> _otherTabsScreenArea = null;
private List<TabItem> _otherTabs = null; private List<TabItem> _otherTabs = null;
private Rect _parentDocumentTabPanelScreenArea; private Rect _parentDocumentTabPanelScreenArea;
private DocumentPaneTabPanel _parentDocumentTabPanel; private Panel _parentTabPanel;
private bool _isMouseDown = false; private bool _isMouseDown = false;
private Point _mouseDownPoint; private Point _mouseDownPoint;
private double _mouseLastChangePositionX; private double _mouseLastChangePositionX;
@ -220,7 +220,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
containerPane.MoveChild( currentIndex, newIndex ); containerPane.MoveChild( currentIndex, newIndex );
_dragBuffer = MaxDragBuffer; _dragBuffer = MaxDragBuffer;
this.Model.IsActive = true; this.Model.IsActive = true;
_parentDocumentTabPanel.UpdateLayout(); _parentTabPanel.UpdateLayout();
this.UpdateDragDetails(); this.UpdateDragDetails();
_mouseLastChangePositionX = mousePosInScreenCoord.X; _mouseLastChangePositionX = mousePosInScreenCoord.X;
} }
@ -271,10 +271,19 @@ namespace Xceed.Wpf.AvalonDock.Controls
private void UpdateDragDetails() private void UpdateDragDetails()
{ {
_parentDocumentTabPanel = this.FindLogicalAncestor<DocumentPaneTabPanel>(); _parentTabPanel = this.FindLogicalAncestor<DocumentPaneTabPanel>();
_parentDocumentTabPanelScreenArea = _parentDocumentTabPanel.GetScreenArea();
if( _parentTabPanel == null )
{
_parentTabPanel = this.GetParentPanel();
}
if( _parentTabPanel == null )
return;
_parentDocumentTabPanelScreenArea = _parentTabPanel.GetScreenArea();
_parentDocumentTabPanelScreenArea.Inflate( 0, _dragBuffer ); _parentDocumentTabPanelScreenArea.Inflate( 0, _dragBuffer );
_otherTabs = _parentDocumentTabPanel.Children.Cast<TabItem>().Where( ch => ch.Visibility != System.Windows.Visibility.Collapsed ).ToList(); _otherTabs = _parentTabPanel.Children.Cast<TabItem>().Where( ch => ch.Visibility != System.Windows.Visibility.Collapsed ).ToList();
var currentTabScreenArea = this.FindLogicalAncestor<TabItem>().GetScreenArea(); var currentTabScreenArea = this.FindLogicalAncestor<TabItem>().GetScreenArea();
_otherTabsScreenArea = _otherTabs.Select( ti => _otherTabsScreenArea = _otherTabs.Select( ti =>
{ {
@ -285,6 +294,21 @@ namespace Xceed.Wpf.AvalonDock.Controls
} ).ToList(); } ).ToList();
} }
private Panel GetParentPanel()
{
var parents = this.FindLogicalAncestorsAndSelf();
foreach( var parent in parents )
{
var panel = parent as Panel;
if( panel != null && ( panel.Children[ 0 ] as TabItem ) != null )
{
return panel;
}
}
return null;
}
private void StartDraggingFloatingWindowForContent() private void StartDraggingFloatingWindowForContent()
{ {
this.ReleaseMouseCapture(); this.ReleaseMouseCapture();

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

@ -233,11 +233,45 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
if( this.WindowState == WindowState.Normal )
{
this.UpdatePositionAndSizeOfPanes();
}
base.OnStateChanged( e ); base.OnStateChanged( e );
} }
#endregion #endregion
#region ResizeBorderThickness
/// <summary>
/// ResizeBorderThickness Dependency Property
/// </summary>
public static readonly DependencyProperty ResizeBorderThicknessProperty = DependencyProperty.Register(
"ResizeBorderThickness",
typeof( Thickness ),
typeof( LayoutFloatingWindowControl ),
new FrameworkPropertyMetadata( new Thickness( 10 ) ) );
/// <summary>
/// Gets or sets the LayoutDocumentFloatingWindowControl/LayoutAnchorableFloatingWindowControl resize icon Border Thickness property.
/// This dependency property makes it possible to increase the resize icon border of floating windows.
/// </summary>
public Thickness ResizeBorderThickness
{
get
{
return ( Thickness )GetValue( ResizeBorderThicknessProperty );
}
set
{
SetValue( ResizeBorderThicknessProperty, value );
}
}
#endregion
#endregion #endregion
#region Overrides #region Overrides
@ -264,10 +298,13 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected override void OnClosed( EventArgs e ) protected override void OnClosed( EventArgs e )
{ {
var root = this.Model.Root; var root = ( this.Model != null ) ? this.Model.Root : null;
if( root != null ) if( root != null )
{ {
root.Manager.RemoveFloatingWindow( this ); if( root.Manager != null )
{
root.Manager.RemoveFloatingWindow( this );
}
root.CollectGarbage(); root.CollectGarbage();
} }
@ -305,6 +342,34 @@ namespace Xceed.Wpf.AvalonDock.Controls
base.OnInitialized( e ); base.OnInitialized( e );
} }
protected override void OnKeyDown( KeyEventArgs e )
{
var root = this.Model.Root;
if( root != null )
{
if( root.Manager.AllowMovingFloatingWindowWithKeyboard )
{
switch( e.Key )
{
case Key.Left:
this.Left -= 25;
break;
case Key.Right:
this.Left += 25;
break;
case Key.Up:
this.Top -= 25;
break;
case Key.Down:
this.Top += 25;
break;
}
}
}
base.OnKeyDown( e );
}
protected override void OnPreviewKeyDown( KeyEventArgs e ) protected override void OnPreviewKeyDown( KeyEventArgs e )
{ {
if( Keyboard.IsKeyDown( Key.LeftCtrl ) || Keyboard.IsKeyDown( Key.RightCtrl ) ) if( Keyboard.IsKeyDown( Key.LeftCtrl ) || Keyboard.IsKeyDown( Key.RightCtrl ) )
@ -499,7 +564,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
_isClosing = true; _isClosing = true;
// Added Dispatcher to prevent InvalidOperationException issue in reference to bug case // Added Dispatcher to prevent InvalidOperationException issue in reference to bug case
// DevOps #2106 // Azure case #2106
Dispatcher.BeginInvoke( new Action( () => Dispatcher.BeginInvoke( new Action( () =>
{ {
this.Close(); this.Close();

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

@ -34,6 +34,8 @@ using Xceed.Wpf.AvalonDock.Themes;
using System.Diagnostics; using System.Diagnostics;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Controls.Primitives; using System.Windows.Controls.Primitives;
using System.IO;
using System.Reflection;
namespace Xceed.Wpf.AvalonDock namespace Xceed.Wpf.AvalonDock
{ {
@ -100,6 +102,32 @@ namespace Xceed.Wpf.AvalonDock
#region AllowMovingFloatingWindowWithKeyboard
/// <summary>
/// AllowMovingFloatingWindowWithKeyboard Dependency Property
/// </summary>
public static readonly DependencyProperty AllowMovingFloatingWindowWithKeyboardProperty = DependencyProperty.Register( "AllowMovingFloatingWindowWithKeyboard", typeof( bool ), typeof( DockingManager ),
new FrameworkPropertyMetadata( ( bool )false ) );
/// <summary>
/// Gets/sets the AllowMovingFloatingWindowWithKeyboard property. This dependency property
/// indicates if the window can be moved with arrows keys.
/// </summary>
public bool AllowMovingFloatingWindowWithKeyboard
{
get
{
return ( bool )GetValue( AllowMovingFloatingWindowWithKeyboardProperty );
}
private set
{
SetValue( AllowMovingFloatingWindowWithKeyboardProperty, value );
}
}
#endregion
#region Layout #region Layout
/// <summary> /// <summary>
@ -2098,8 +2126,12 @@ namespace Xceed.Wpf.AvalonDock
}; };
newFW.SetParentToMainWindowOf( this ); newFW.SetParentToMainWindowOf( this );
var mainWindow = Window.GetWindow( this ); var parent = this.Parent as FrameworkElement;
newFW.InputBindings.AddRange( mainWindow.InputBindings ); while( parent != null )
{
newFW.InputBindings.AddRange( parent.InputBindings );
parent = parent.Parent as FrameworkElement;
}
var paneForExtensions = modelFW.RootPanel.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(); var paneForExtensions = modelFW.RootPanel.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault();
if( paneForExtensions != null ) if( paneForExtensions != null )
@ -2143,6 +2175,13 @@ namespace Xceed.Wpf.AvalonDock
}; };
newFW.SetParentToMainWindowOf( this ); newFW.SetParentToMainWindowOf( this );
var parent = this.Parent as FrameworkElement;
while( parent != null )
{
newFW.InputBindings.AddRange( parent.InputBindings );
parent = parent.Parent as FrameworkElement;
}
var paneForExtensions = modelFW.RootDocument; var paneForExtensions = modelFW.RootDocument;
if( paneForExtensions != null ) if( paneForExtensions != null )
{ {
@ -2438,7 +2477,7 @@ namespace Xceed.Wpf.AvalonDock
#if VS2008 #if VS2008
this.ActiveContent = ( Layout.ActiveContent != null ) ? Layout.ActiveContent.Content : null; this.ActiveContent = ( Layout.ActiveContent != null ) ? Layout.ActiveContent.Content : null;
#else #else
this.SetCurrentValue( DockingManager.ActiveContentProperty, ( Layout.ActiveContent != null ) ? Layout.ActiveContent.Content : null ); this.SetCurrentValue( DockingManager.ActiveContentProperty, ( Layout.ActiveContent != null ) ? Layout.ActiveContent : null );
#endif #endif
} }
} }
@ -2866,7 +2905,6 @@ namespace Xceed.Wpf.AvalonDock
CreateAnchorableLayoutItem( anchorableToImport ); CreateAnchorableLayoutItem( anchorableToImport );
} }
_suspendLayoutItemCreation = false; _suspendLayoutItemCreation = false;
@ -3043,11 +3081,26 @@ namespace Xceed.Wpf.AvalonDock
} }
} }
private void InternalSetActiveContent( object contentObject ) private void InternalSetActiveContent( object activeContent )
{ {
var layoutContent = Layout.Descendents().OfType<LayoutContent>().FirstOrDefault( lc => lc == contentObject || lc.Content == contentObject ); var activeLayoutContent = activeContent as LayoutContent;
var layoutContent = this.Layout.Descendents().OfType<LayoutContent>().FirstOrDefault( lc =>
{
if( activeLayoutContent != null )
{
if( activeLayoutContent.Content != null )
return ( ( lc == activeLayoutContent.Content ) || ( lc.Content == activeLayoutContent.Content ) );
if( activeLayoutContent.ContentId != null )
return ( lc.ContentId == activeLayoutContent.ContentId );
}
else
return ( ( lc == activeContent ) || ( lc.Content == activeContent ) );
return ( ( lc == null ) || ( lc.Content == null ) );
} );
_insideInternalSetActiveContent = true; _insideInternalSetActiveContent = true;
Layout.ActiveContent = layoutContent; this.Layout.ActiveContent = layoutContent;
_insideInternalSetActiveContent = false; _insideInternalSetActiveContent = false;
} }
@ -3207,6 +3260,9 @@ namespace Xceed.Wpf.AvalonDock
private LayoutFloatingWindowControl CreateFloatingWindowForLayoutAnchorableWithoutParent( LayoutAnchorablePane paneModel, bool isContentImmutable ) private LayoutFloatingWindowControl CreateFloatingWindowForLayoutAnchorableWithoutParent( LayoutAnchorablePane paneModel, bool isContentImmutable )
{ {
var selectedlayoutContent = paneModel.SelectedContent;
this.RaisePreviewFloatEvent( selectedlayoutContent );
if( paneModel.Children.Any( c => !c.CanFloat ) ) if( paneModel.Children.Any( c => !c.CanFloat ) )
return null; return null;
var paneAsPositionableElement = paneModel as ILayoutPositionableElement; var paneAsPositionableElement = paneModel as ILayoutPositionableElement;
@ -3282,20 +3338,24 @@ namespace Xceed.Wpf.AvalonDock
Left = fwLeft Left = fwLeft
}; };
var mainWindow = Window.GetWindow( this ); this.ShowInTaskbar( fwc );
fwc.InputBindings.AddRange( mainWindow.InputBindings );
var parent = this.Parent as FrameworkElement;
while( parent != null )
{
fwc.InputBindings.AddRange( parent.InputBindings );
parent = parent.Parent as FrameworkElement;
}
foreach( var layoutContent in destPane.Children ) foreach( var layoutContent in destPane.Children )
{ {
layoutContent.IsFloating = true; layoutContent.IsFloating = true;
} }
//fwc.Owner = Window.GetWindow(this);
//fwc.SetParentToMainWindowOf(this);
_fwList.Add( fwc ); _fwList.Add( fwc );
this.RaiseFloatedEvent( selectedlayoutContent );
Layout.CollectGarbage(); Layout.CollectGarbage();
InvalidateArrange(); InvalidateArrange();
@ -3305,11 +3365,13 @@ namespace Xceed.Wpf.AvalonDock
private LayoutFloatingWindowControl CreateFloatingWindowCore( LayoutContent contentModel, bool isContentImmutable ) private LayoutFloatingWindowControl CreateFloatingWindowCore( LayoutContent contentModel, bool isContentImmutable )
{ {
this.RaisePreviewFloatEvent( contentModel );
if( !contentModel.CanFloat ) if( !contentModel.CanFloat )
return null; return null;
var contentModelAsAnchorable = contentModel as LayoutAnchorable; var contentModelAsAnchorable = contentModel as LayoutAnchorable;
if( contentModelAsAnchorable != null && if( contentModelAsAnchorable != null && contentModelAsAnchorable.IsAutoHidden )
contentModelAsAnchorable.IsAutoHidden )
contentModelAsAnchorable.ToggleAutoHide(); contentModelAsAnchorable.ToggleAutoHide();
this.UpdateStarSize( contentModel ); this.UpdateStarSize( contentModel );
@ -3319,6 +3381,7 @@ namespace Xceed.Wpf.AvalonDock
var parentPaneAsWithActualSize = contentModel.Parent as ILayoutPositionableElementWithActualSize; var parentPaneAsWithActualSize = contentModel.Parent as ILayoutPositionableElementWithActualSize;
var contentModelParentChildrenIndex = parentPane.Children.ToList().IndexOf( contentModel ); var contentModelParentChildrenIndex = parentPane.Children.ToList().IndexOf( contentModel );
if( contentModel.FindParent<LayoutFloatingWindow>() == null ) if( contentModel.FindParent<LayoutFloatingWindow>() == null )
{ {
( ( ILayoutPreviousContainer )contentModel ).PreviousContainer = parentPane; ( ( ILayoutPreviousContainer )contentModel ).PreviousContainer = parentPane;
@ -3407,18 +3470,23 @@ namespace Xceed.Wpf.AvalonDock
Left = contentModel.FloatingLeft, Left = contentModel.FloatingLeft,
Top = contentModel.FloatingTop Top = contentModel.FloatingTop
}; };
} }
this.ShowInTaskbar( fwc );
contentModel.IsFloating = true; contentModel.IsFloating = true;
//fwc.Owner = Window.GetWindow(this); var parent = this.Parent as FrameworkElement;
//fwc.SetParentToMainWindowOf(this); while( parent != null )
{
var mainWindow = Window.GetWindow( this ); fwc.InputBindings.AddRange( parent.InputBindings );
fwc.InputBindings.AddRange( mainWindow.InputBindings ); parent = parent.Parent as FrameworkElement;
}
_fwList.Add( fwc ); _fwList.Add( fwc );
this.RaiseFloatedEvent( contentModel );
Layout.CollectGarbage(); Layout.CollectGarbage();
UpdateLayout(); UpdateLayout();
@ -3426,6 +3494,42 @@ namespace Xceed.Wpf.AvalonDock
return fwc; return fwc;
} }
private void ShowInTaskbar( LayoutFloatingWindowControl fwc )
{
var layouts = fwc.Model.Descendents().OfType<LayoutContent>().Where( l => l != null );
if( layouts != null )
{
fwc.ShowInTaskbar = true;
if( layouts.Count() > 1 )
{
var selectedLayout = layouts.FirstOrDefault( l => l.IsSelected );
fwc.Title = ( selectedLayout != null ) ? selectedLayout.Title : "";
}
else
{
fwc.Title = layouts.ElementAt( 0 ).Title ?? "";
}
}
RenameWindowTitleForMultipleDockingManagerRunningInstances( fwc );
}
private void RenameWindowTitleForMultipleDockingManagerRunningInstances( LayoutFloatingWindowControl fwc )
{
// Check if others applications run DockingManager
var exists = Process.GetProcessesByName( Path.GetFileNameWithoutExtension( Assembly.GetEntryAssembly().Location ) ).Count() > 1;
if( exists )
{
var mainWindowTitle = Window.GetWindow( this ).Title;
if( !string.IsNullOrEmpty( mainWindowTitle ) )
{
fwc.Title = mainWindowTitle + " - " + fwc.Title;
}
}
}
private Size UpdateFloatingDimensions( ILayoutElementForFloatingWindow contentModel, Size currentSize ) private Size UpdateFloatingDimensions( ILayoutElementForFloatingWindow contentModel, Size currentSize )
{ {
if( contentModel.FloatingWidth != 0d ) if( contentModel.FloatingWidth != 0d )
@ -3644,6 +3748,87 @@ namespace Xceed.Wpf.AvalonDock
return _areas; return _areas;
} }
public static readonly RoutedEvent PreviewFloatEvent = EventManager.RegisterRoutedEvent( "PreviewFloat", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( DockingManager ) );
public event RoutedEventHandler PreviewFloat
{
add
{
AddHandler( PreviewFloatEvent, value );
}
remove
{
RemoveHandler( PreviewFloatEvent, value );
}
}
protected virtual void RaisePreviewFloatEvent( LayoutContent layoutContent )
{
var args = new RoutedEventArgs( DockingManager.PreviewFloatEvent, layoutContent );
RaiseEvent( args );
}
public static readonly RoutedEvent FloatedEvent = EventManager.RegisterRoutedEvent( "Floated", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( DockingManager ) );
public event RoutedEventHandler Floated
{
add
{
AddHandler( FloatedEvent, value );
}
remove
{
RemoveHandler( FloatedEvent, value );
}
}
protected virtual void RaiseFloatedEvent( LayoutContent layoutContent )
{
var args = new RoutedEventArgs( DockingManager.FloatedEvent, layoutContent );
RaiseEvent( args );
}
public static readonly RoutedEvent PreviewDockEvent = EventManager.RegisterRoutedEvent( "PreviewDock", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( DockingManager ) );
public event RoutedEventHandler PreviewDock
{
add
{
AddHandler( PreviewDockEvent, value );
}
remove
{
RemoveHandler( PreviewDockEvent, value );
}
}
protected internal virtual void RaisePreviewDockEvent( LayoutContent layoutContent )
{
var args = new RoutedEventArgs( DockingManager.PreviewDockEvent, layoutContent );
RaiseEvent( args );
}
public static readonly RoutedEvent DockedEvent = EventManager.RegisterRoutedEvent( "Docked", RoutingStrategy.Bubble, typeof( RoutedEventHandler ), typeof( DockingManager ) );
public event RoutedEventHandler Docked
{
add
{
AddHandler( DockedEvent, value );
}
remove
{
RemoveHandler( DockedEvent, value );
}
}
protected internal virtual void RaiseDockedEvent( LayoutContent layoutContent )
{
var args = new RoutedEventArgs( DockingManager.DockedEvent, layoutContent );
RaiseEvent( args );
}
#endregion #endregion
#region IWeakEventListener #region IWeakEventListener
@ -3676,5 +3861,10 @@ namespace Xceed.Wpf.AvalonDock
} }
#endregion #endregion
} }
} }

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

@ -280,37 +280,42 @@ namespace Xceed.Wpf.AvalonDock.Layout
protected override void InternalDock() protected override void InternalDock()
{ {
var root = Root as LayoutRoot; var root = Root as LayoutRoot;
LayoutAnchorablePane anchorablePane = null; ILayoutPane layoutPane = null;
if( root.ActiveContent != null && if( root.ActiveContent != null &&
root.ActiveContent != this ) root.ActiveContent != this )
{ {
//look for active content parent pane //look for active content parent pane
anchorablePane = root.ActiveContent.Parent as LayoutAnchorablePane; layoutPane = root.ActiveContent.Parent as LayoutAnchorablePane;
} }
if( anchorablePane == null ) if( layoutPane == null )
{ {
//look for a pane on the right side //look for a pane on the right side
anchorablePane = root.Descendents().OfType<LayoutAnchorablePane>().Where( pane => !pane.IsHostedInFloatingWindow && pane.GetSide() == AnchorSide.Right ).FirstOrDefault(); layoutPane = root.Descendents().OfType<LayoutAnchorablePane>().Where( pane => !pane.IsHostedInFloatingWindow && pane.GetSide() == AnchorSide.Right ).FirstOrDefault();
} }
if( anchorablePane == null ) if( layoutPane == null )
{ {
//look for an available pane //look for an available pane
anchorablePane = root.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(); layoutPane = root.Descendents().OfType<LayoutAnchorablePane>().Where( pane => !pane.IsHostedInFloatingWindow ).FirstOrDefault();
} }
if( layoutPane == null )
{
//look for an available pane
layoutPane = root.Descendents().OfType<LayoutDocumentPane>().FirstOrDefault();
}
bool added = false; bool added = false;
if( root.Manager.LayoutUpdateStrategy != null ) if( root.Manager.LayoutUpdateStrategy != null )
{ {
added = root.Manager.LayoutUpdateStrategy.BeforeInsertAnchorable( root, this, anchorablePane ); added = root.Manager.LayoutUpdateStrategy.BeforeInsertAnchorable( root, this, layoutPane );
} }
if( !added ) if( !added )
{ {
if( anchorablePane == null ) if( layoutPane == null )
{ {
var mainLayoutPanel = new LayoutPanel() { Orientation = Orientation.Horizontal }; var mainLayoutPanel = new LayoutPanel() { Orientation = Orientation.Horizontal };
if( root.RootPanel != null ) if( root.RootPanel != null )
@ -319,11 +324,19 @@ namespace Xceed.Wpf.AvalonDock.Layout
} }
root.RootPanel = mainLayoutPanel; root.RootPanel = mainLayoutPanel;
anchorablePane = new LayoutAnchorablePane() { DockWidth = new GridLength( 200.0, GridUnitType.Pixel ) }; layoutPane = new LayoutAnchorablePane() { DockWidth = new GridLength( 200.0, GridUnitType.Pixel ) };
mainLayoutPanel.Children.Add( anchorablePane ); mainLayoutPanel.Children.Add( ( ILayoutPanelElement )layoutPane );
}
if( layoutPane is LayoutAnchorablePane )
{
( layoutPane as LayoutAnchorablePane ).Children.Add( this );
}
else
{
( layoutPane as LayoutDocumentPane ).Children.Add( this );
} }
anchorablePane.Children.Add( this );
added = true; added = true;
} }

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

@ -20,6 +20,7 @@ using System.ComponentModel;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using System.Windows; using System.Windows;
using System.Windows.Controls;
using System.Windows.Markup; using System.Windows.Markup;
using System.Windows.Media; using System.Windows.Media;
using System.Xml.Serialization; using System.Xml.Serialization;
@ -170,6 +171,8 @@ namespace Xceed.Wpf.AvalonDock.Layout
/// </summary> /// </summary>
protected virtual void OnIsSelectedChanged( bool oldValue, bool newValue ) protected virtual void OnIsSelectedChanged( bool oldValue, bool newValue )
{ {
this.UpdateContainedFloatingWindowTaskbarTitle( newValue );
if( IsSelectedChanged != null ) if( IsSelectedChanged != null )
IsSelectedChanged( this, EventArgs.Empty ); IsSelectedChanged( this, EventArgs.Empty );
} }
@ -921,9 +924,25 @@ namespace Xceed.Wpf.AvalonDock.Layout
if( newParentPane != null ) if( newParentPane != null )
{ {
newParentPane.Children.Add( this ); newParentPane.Children.Add( this );
root.CollectGarbage();
} }
else
{
var mainLayoutPanel = new LayoutPanel() { Orientation = Orientation.Horizontal };
if( root.RootPanel != null )
{
mainLayoutPanel.Children.Add( root.RootPanel );
}
root.RootPanel = mainLayoutPanel;
newParentPane = new LayoutDocumentPane() { };
mainLayoutPanel.Children.Add( ( ILayoutPanelElement )newParentPane );
newParentPane.Children.Add( this );
}
root.CollectGarbage();
IsFloating = false;
IsSelected = true; IsSelected = true;
IsActive = true; IsActive = true;
} }
@ -1026,6 +1045,39 @@ namespace Xceed.Wpf.AvalonDock.Layout
#endregion #endregion
#region Private Methods
private void UpdateContainedFloatingWindowTaskbarTitle( bool newValue )
{
if( !newValue ) // LayoutContent is being deselected
{
// Check if LayoutContent is inside a FloatingWindowControl
// And set the correct title for Taskbar Title
var root = Root;
if( root != null )
{
var lfwc = root.Manager.FloatingWindows;
var containedFloatingWindowControl = lfwc.FirstOrDefault( f => f.Model.Descendents().OfType<LayoutContent>().Where( l => l.ContentId == this.ContentId ).FirstOrDefault() != null );
if( containedFloatingWindowControl != null )
{
var selectedLayoutContent = containedFloatingWindowControl.Model.Descendents().OfType<LayoutContent>().Where( l => l.IsSelected ).FirstOrDefault();
if( selectedLayoutContent != null )
{
if( containedFloatingWindowControl.Title != selectedLayoutContent.Title )
{
containedFloatingWindowControl.Title = selectedLayoutContent.Title;
}
}
}
}
}
}
#endregion // Private Methods
#region Events #region Events
/// <summary> /// <summary>

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Themes/Default.xaml

@ -1006,7 +1006,7 @@
Value="3" /> Value="3" />
<Setter Property="shell:WindowChrome.WindowChrome"> <Setter Property="shell:WindowChrome.WindowChrome">
<Setter.Value> <Setter.Value>
<shell:WindowChrome ResizeBorderThickness="10" <shell:WindowChrome ResizeBorderThickness="{Binding ResizeBorderThickness, RelativeSource={RelativeSource AncestorType={x:Type avalonDockControls:LayoutDocumentFloatingWindowControl}}}"
CaptionHeight="16" CaptionHeight="16"
CornerRadius="3,3,3,3" CornerRadius="3,3,3,3"
GlassFrameThickness="0" GlassFrameThickness="0"
@ -1110,7 +1110,7 @@
Value="3" /> Value="3" />
<Setter Property="shell:WindowChrome.WindowChrome"> <Setter Property="shell:WindowChrome.WindowChrome">
<Setter.Value> <Setter.Value>
<shell:WindowChrome ResizeBorderThickness="10" <shell:WindowChrome ResizeBorderThickness="{Binding ResizeBorderThickness, RelativeSource={RelativeSource AncestorType={x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}}}"
CaptionHeight="16" CaptionHeight="16"
CornerRadius="3,3,3,3" CornerRadius="3,3,3,3"
GlassFrameThickness="0" GlassFrameThickness="0"

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

@ -51,6 +51,10 @@
<Image Source="..\OpenSourceImages\ExtTabControl.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\ExtTabControl.png" Width="600" Height="400"/>

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 // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion( "4.4" )] [assembly: AssemblyVersion( "4.5" )]
#pragma warning disable 1699 #pragma warning disable 1699
[assembly: AssemblyDelaySign( false )] [assembly: AssemblyDelaySign( false )]

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ExtTabControl/Views/ExtTabControlView.xaml

@ -51,6 +51,10 @@
<Image Source="..\OpenSourceImages\ExtTabControl.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\ExtTabControl.png" Width="600" Height="400"/>

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

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

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

@ -26,6 +26,7 @@
<conv:InverseBoolConverter x:Key="InverseBoolConverter" /> <conv:InverseBoolConverter x:Key="InverseBoolConverter" />
<BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter" /> <BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter" />
<Geometry x:Key="DownArrowGeometry">M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z</Geometry> <Geometry x:Key="DownArrowGeometry">M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z</Geometry>
<Style x:Key="ComboBoxToggleButton" <Style x:Key="ComboBoxToggleButton"
@ -71,7 +72,7 @@
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden" > VerticalScrollBarVisibility="Hidden">
</TextBox> </TextBox>
<Grid Grid.Column="1" <Grid Grid.Column="1"
HorizontalAlignment="Right" HorizontalAlignment="Right"
@ -129,7 +130,8 @@
</Setter> </Setter>
</Style> </Style>
<Style TargetType="{x:Type local:CheckComboBox}"> <Style x:Key="CheckComboBox"
TargetType="{x:Type local:CheckComboBox}">
<Setter Property="Foreground" <Setter Property="Foreground"
Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" /> Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
<Setter Property="Background" <Setter Property="Background"
@ -186,7 +188,7 @@
<StackPanel> <StackPanel>
<prim:SelectAllSelectorItem x:Name="PART_SelectAllSelectorItem" <prim:SelectAllSelectorItem x:Name="PART_SelectAllSelectorItem"
Content="{TemplateBinding SelectAllContent}" Content="{TemplateBinding SelectAllContent}"
Visibility="{Binding IsSelectAllActive, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityConverter}}"/> Visibility="{Binding IsSelectAllActive, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityConverter}}" />
<ItemsPresenter x:Name="PART_ItemsPresenter" <ItemsPresenter x:Name="PART_ItemsPresenter"
KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.DirectionalNavigation="Contained"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
@ -230,9 +232,12 @@
<Trigger Property="IsEditable" <Trigger Property="IsEditable"
Value="True"> Value="True">
<Setter Property="IsTabStop" <Setter Property="IsTabStop"
Value="False"/> Value="False" />
</Trigger> </Trigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
<Style TargetType="{x:Type local:CheckComboBox}"
BasedOn="{StaticResource CheckComboBox}" />
</ResourceDictionary> </ResourceDictionary>

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

@ -131,7 +131,8 @@
</Setter> </Setter>
</Style> </Style>
<Style TargetType="{x:Type local:CheckComboBox}"> <Style x:Key="CheckComboBox"
TargetType="{x:Type local:CheckComboBox}">
<Setter Property="Foreground" <Setter Property="Foreground"
Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" /> Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
<Setter Property="Background" <Setter Property="Background"
@ -227,4 +228,7 @@
</Style.Triggers> </Style.Triggers>
</Style> </Style>
<Style TargetType="{x:Type local:CheckComboBox}"
BasedOn="{StaticResource CheckComboBox}" />
</ResourceDictionary> </ResourceDictionary>

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

@ -235,9 +235,11 @@ namespace Xceed.Wpf.Toolkit
Debug.Assert( result != null ); Debug.Assert( result != null );
if( result != null ) if( result != null )
{ {
var properties = sourceType.GetProperties( BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly ); PropertyInfo[] propertyInfos = typeof( ICollection ).IsAssignableFrom( sourceType )
? sourceType.GetProperties( BindingFlags.Instance | BindingFlags.Public )
: sourceType.GetProperties( BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly );
foreach( var propertyInfo in properties ) foreach( var propertyInfo in propertyInfos )
{ {
try try
{ {

46
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/TabItemSizeConverter.cs

@ -0,0 +1,46 @@
/*************************************************************************************
Toolkit for WPF
Copyright (C) 2007-2022 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.Data;
namespace Xceed.Wpf.Toolkit.Core.Converters
{
public class TabItemSizeConverter : IValueConverter
{
public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
{
if( value != null )
{
var maxWidthOrHeight = System.Convert.ToDouble( value );
if( maxWidthOrHeight > 0d )
{
return maxWidthOrHeight;
}
}
return double.PositiveInfinity;
}
public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
{
throw new NotImplementedException();
}
}
}

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

@ -452,7 +452,7 @@ namespace Xceed.Wpf.Toolkit
} }
} }
#endregion //Cancel Event #endregion //Today Event
#endregion // Events #endregion // Events

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

@ -16,12 +16,15 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System;
using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Linq;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Controls.Primitives; using System.Windows.Controls.Primitives;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Threading;
using Xceed.Wpf.Toolkit.Core.Utilities; using Xceed.Wpf.Toolkit.Core.Utilities;
namespace Xceed.Wpf.Toolkit namespace Xceed.Wpf.Toolkit
@ -262,12 +265,28 @@ namespace Xceed.Wpf.Toolkit
_popup.Opened += Popup_Opened; _popup.Opened += Popup_Opened;
} }
protected override void OnIsKeyboardFocusWithinChanged( DependencyPropertyChangedEventArgs e ) protected override void OnIsKeyboardFocusWithinChanged( DependencyPropertyChangedEventArgs e )
{ {
base.OnIsKeyboardFocusWithinChanged( e ); base.OnIsKeyboardFocusWithinChanged( e );
if( !( bool )e.NewValue ) if( !( bool )e.NewValue )
{ {
this.CloseDropDown( false ); var contextMenu = this.GetContextMenu( _popup.Child );
if( contextMenu == null )
this.CloseDropDown( false );
else
{
RoutedEventHandler handler = null;
handler = new RoutedEventHandler( ( s, a ) =>
{
contextMenu.Closed -= handler;
if( !this.IsKeyboardFocusWithin )
this.CloseDropDown( false );
} );
contextMenu.Closed += handler;
}
} }
} }
@ -339,6 +358,32 @@ namespace Xceed.Wpf.Toolkit
#region Event Handlers #region Event Handlers
private ContextMenu GetContextMenu( DependencyObject parent )
{
if( parent == null )
return null;
for( int i = 0; i < VisualTreeHelper.GetChildrenCount( parent ); i++ )
{
var child = VisualTreeHelper.GetChild( parent, i );
if( child == null )
continue;
if( child is FrameworkElement children && children.ContextMenu != null && children.ContextMenu.IsOpen )
{
return children.ContextMenu;
}
else
{
var result = GetContextMenu( child );
if( result != null )
return result;
}
}
return null;
}
private static void OnAccessKeyPressed( object sender, AccessKeyPressedEventArgs e ) private static void OnAccessKeyPressed( object sender, AccessKeyPressedEventArgs e )
{ {
if( !e.Handled && ( e.Scope == null ) && ( e.Target == null ) ) if( !e.Handled && ( e.Scope == null ) && ( e.Target == null ) )

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

@ -26,6 +26,8 @@ using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using Xceed.Wpf.Toolkit.Core.Utilities; using Xceed.Wpf.Toolkit.Core.Utilities;
using Xceed.Wpf.Toolkit.PropertyGrid;
using Xceed.Wpf.Toolkit.PropertyGrid.Editors;
namespace Xceed.Wpf.Toolkit.Primitives namespace Xceed.Wpf.Toolkit.Primitives
{ {
@ -299,8 +301,11 @@ namespace Xceed.Wpf.Toolkit.Primitives
protected virtual void OnSelectedValueChanged( string oldValue, string newValue ) protected virtual void OnSelectedValueChanged( string oldValue, string newValue )
{ {
if( !this.IsInitialized || _ignoreSelectedValueChanged ) if( !( this is PropertyGridEditorEnumCheckComboBox ) )
return; {
if( !this.IsInitialized || _ignoreSelectedValueChanged )
return;
}
UpdateFromSelectedValue(); UpdateFromSelectedValue();
} }

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

@ -86,7 +86,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
this.RaiseContainerHelperInvalidated(); this.RaiseContainerHelperInvalidated();
} }
protected override BindingBase CreateValueBinding() protected override void CreateValueBinding()
{ {
var selectedObject = this.SelectedObject; var selectedObject = this.SelectedObject;
var propertyName = this.PropertyDescriptor.Name; var propertyName = this.PropertyDescriptor.Name;
@ -101,7 +101,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
ConverterCulture = CultureInfo.CurrentCulture ConverterCulture = CultureInfo.CurrentCulture
}; };
return binding; BindingOperations.SetBinding( this, DescriptorPropertyDefinitionBase.ValueProperty, binding );
} }
protected override bool ComputeIsReadOnly() protected override bool ComputeIsReadOnly()

6
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/DescriptorPropertyDefinitionBase.cs

@ -28,6 +28,7 @@ using System.ComponentModel;
using System.Windows.Data; using System.Windows.Data;
#if !VS2008 #if !VS2008
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Windows.Threading;
#endif #endif
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
@ -131,7 +132,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
} }
} }
protected abstract BindingBase CreateValueBinding(); protected abstract void CreateValueBinding();
#endregion #endregion
@ -682,8 +683,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
_commandBindings = new CommandBinding[] { new CommandBinding( PropertyItemCommands.ResetValue, ExecuteResetValueCommand, CanExecuteResetValueCommand ) }; _commandBindings = new CommandBinding[] { new CommandBinding( PropertyItemCommands.ResetValue, ExecuteResetValueCommand, CanExecuteResetValueCommand ) };
BindingBase valueBinding = this.CreateValueBinding(); this.CreateValueBinding();
BindingOperations.SetBinding( this, DescriptorPropertyDefinitionBase.ValueProperty, valueBinding );
} }

142
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/EnumCheckComboBoxEditor.cs

@ -0,0 +1,142 @@
/*************************************************************************************
Toolkit for WPF
Copyright (C) 2007-2022 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.Collections.Generic;
using System.Linq;
using System.Collections;
using System.ComponentModel;
using System.Reflection;
using System.Windows.Data;
using System.Globalization;
using System.Windows;
namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
public class EnumCheckComboBoxEditor : TypeEditor<CheckComboBox>
{
protected override void SetValueDependencyProperty()
{
ValueProperty = CheckComboBox.SelectedValueProperty;
}
protected override CheckComboBox CreateEditor()
{
return new PropertyGridEditorEnumCheckComboBox();
}
protected override void ResolveValueBinding( PropertyItem propertyItem )
{
SetItemsSource( propertyItem );
base.ResolveValueBinding( propertyItem );
}
private void SetItemsSource( PropertyItem propertyItem )
{
Editor.ItemsSource = CreateItemsSource( propertyItem );
}
protected IEnumerable CreateItemsSource( PropertyItem propertyItem )
{
return GetValues( propertyItem.PropertyType );
}
protected override IValueConverter CreateValueConverter()
{
return new SourceComboBoxEditorMultiStringConverter();
}
private static object[] GetValues( Type enumType )
{
List<object> values = new List<object>();
if( enumType != null )
{
var fields = enumType.GetFields().Where( x => x.IsLiteral );
foreach( FieldInfo field in fields )
{
// Get array of BrowsableAttribute attributes
object[] attrs = field.GetCustomAttributes( typeof( BrowsableAttribute ), false );
if( attrs.Length == 1 )
{
// If attribute exists and its value is false continue to the next field...
BrowsableAttribute brAttr = ( BrowsableAttribute )attrs[ 0 ];
if( brAttr.Browsable == false )
{
continue;
}
}
values.Add( field.GetValue( enumType ) );
}
}
return values.ToArray();
}
}
public class PropertyGridEditorEnumCheckComboBox : CheckComboBox
{
static PropertyGridEditorEnumCheckComboBox()
{
DefaultStyleKeyProperty.OverrideMetadata( typeof( PropertyGridEditorEnumCheckComboBox ), new FrameworkPropertyMetadata( typeof( PropertyGridEditorEnumCheckComboBox ) ) );
}
}
internal class SourceComboBoxEditorMultiStringConverter : IValueConverter
{
Type enumType;
// Enum flags(A | B | C) to string ("A,B,C")
public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
{
enumType = value.GetType();
var flags = SourceComboBoxEditorMultiStringConverter.GetFlags( value as Enum );
return string.Join( ",", flags );
}
// string("A,B") to Enum flags (A|B)
public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
{
var stringList = ( value as string ).Split( new[] { ',' } ).ToList();
// Convert the List containing "A" and "B" to Total Flag Value 3.
if( !stringList.Any( x => !string.IsNullOrEmpty( x ) ) )
{
return Enum.ToObject( enumType, 0 );
}
var mkc = stringList.Select( x => Enum.Parse( enumType, x ) )
.Aggregate( ( prev, next ) => ( int )prev | ( int )next );
// Convert Total flag Value(3) to Enum flags(A | B)
return Enum.ToObject( enumType, mkc );
}
private static IEnumerable<Enum> GetFlags( Enum input )
{
foreach( Enum value in Enum.GetValues( input.GetType() ) )
{
if( input.HasFlag( value ) )
yield return value;
}
}
}
}

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

@ -952,10 +952,16 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
base.OnApplyTemplate(); base.OnApplyTemplate();
if( _dragThumb != null ) if( _dragThumb != null )
_dragThumb.DragDelta -= DragThumb_DragDelta; {
_dragThumb.DragDelta -= this.DragThumb_DragDelta;
_dragThumb.MouseWheel -= this.DragThumb_MouseWheel;
}
_dragThumb = GetTemplateChild( PART_DragThumb ) as Thumb; _dragThumb = GetTemplateChild( PART_DragThumb ) as Thumb;
if( _dragThumb != null ) if( _dragThumb != null )
_dragThumb.DragDelta += DragThumb_DragDelta; {
_dragThumb.DragDelta += this.DragThumb_DragDelta;
_dragThumb.MouseWheel += this.DragThumb_MouseWheel;
}
if( _containerHelper != null ) if( _containerHelper != null )
{ {
@ -1052,6 +1058,10 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
NameColumnWidth = Math.Min( Math.Max( this.ActualWidth * 0.1, NameColumnWidth + e.HorizontalChange ), this.ActualWidth * 0.9 ); NameColumnWidth = Math.Min( Math.Max( this.ActualWidth * 0.1, NameColumnWidth + e.HorizontalChange ), this.ActualWidth * 0.9 );
} }
private void DragThumb_MouseWheel( object sender, MouseWheelEventArgs e )
{
this.ScrollToPosition( this.GetScrollPosition() - ( e.Delta * 0.4 ) );
}
private void PropertyGrid_PropertyValueChanged( object sender, PropertyValueChangedEventArgs e ) private void PropertyGrid_PropertyValueChanged( object sender, PropertyValueChangedEventArgs e )
{ {

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGridUtilities.cs

@ -85,7 +85,16 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
else if( ( propertyType == typeof( Color ) ) || ( propertyType == typeof( Color? ) ) ) else if( ( propertyType == typeof( Color ) ) || ( propertyType == typeof( Color? ) ) )
editor = new ColorEditor(); editor = new ColorEditor();
else if( propertyType.IsEnum ) else if( propertyType.IsEnum )
editor = new EnumComboBoxEditor(); {
if( propertyType.GetCustomAttributes( typeof( FlagsAttribute ), false ).Length > 0 )
{
editor = new EnumCheckComboBoxEditor();
}
else
{
editor = new EnumComboBoxEditor();
}
}
else if( propertyType == typeof( TimeSpan ) || propertyType == typeof( TimeSpan? ) ) else if( propertyType == typeof( TimeSpan ) || propertyType == typeof( TimeSpan? ) )
editor = new TimeSpanUpDownEditor(); editor = new TimeSpanUpDownEditor();
else if( propertyType == typeof( FontFamily ) || propertyType == typeof( FontWeight ) || propertyType == typeof( FontStyle ) || propertyType == typeof( FontStretch ) ) else if( propertyType == typeof( FontFamily ) || propertyType == typeof( FontWeight ) || propertyType == typeof( FontStyle ) || propertyType == typeof( FontStretch ) )

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

@ -33,6 +33,7 @@
<ResourceDictionary Source="../../NumericUpDown/Themes/Aero2.NormalColor.xaml" /> <ResourceDictionary Source="../../NumericUpDown/Themes/Aero2.NormalColor.xaml" />
<ResourceDictionary Source="../../DateTimeUpDown/Themes/Aero2.NormalColor.xaml" /> <ResourceDictionary Source="../../DateTimeUpDown/Themes/Aero2.NormalColor.xaml" />
<ResourceDictionary Source="../../TimeSpanUpDown/Themes/Aero2.NormalColor.xaml" /> <ResourceDictionary Source="../../TimeSpanUpDown/Themes/Aero2.NormalColor.xaml" />
<ResourceDictionary Source="../../CheckComboBox/Themes/Aero2.NormalColor.xaml" />
<ResourceDictionary Source="../../WatermarkTextBox/Themes/Aero2.NormalColor.xaml" /> <ResourceDictionary Source="../../WatermarkTextBox/Themes/Aero2.NormalColor.xaml" />
<ResourceDictionary Source="../../ColorPicker/Themes/Aero2.NormalColor.xaml" /> <ResourceDictionary Source="../../ColorPicker/Themes/Aero2.NormalColor.xaml" />
<ResourceDictionary Source="../../CollectionControl/Themes/Aero2.NormalColor.xaml" /> <ResourceDictionary Source="../../CollectionControl/Themes/Aero2.NormalColor.xaml" />
@ -271,6 +272,15 @@
Value="5,0,0,0" /> Value="5,0,0,0" />
</Style> </Style>
<!-- PropertyGrid Enum CheckBox Editors -->
<Style TargetType="{x:Type editor:PropertyGridEditorEnumCheckComboBox}"
BasedOn="{StaticResource CheckComboBox}">
<Setter Property="Margin"
Value="5,0,0,0" />
<Setter Property="Margin"
Value="5,0,0,0" />
</Style>
<!-- PropertyGrid TextBox Editors --> <!-- PropertyGrid TextBox Editors -->
<Style TargetType="{x:Type editor:PropertyGridEditorTextBox}" <Style TargetType="{x:Type editor:PropertyGridEditorTextBox}"
BasedOn="{StaticResource WatermarkTextBox}"> BasedOn="{StaticResource WatermarkTextBox}">
@ -846,7 +856,7 @@
<MenuItem Header="Reset Value" <MenuItem Header="Reset Value"
Command="commands:PropertyItemCommands.ResetValue" Command="commands:PropertyItemCommands.ResetValue"
CommandParameter="{Binding}" CommandParameter="{Binding}"
CommandTarget="{Binding Path=PlacementTarget, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContextMenu}}}"/> CommandTarget="{Binding Path=PlacementTarget, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContextMenu}}}" />
</pg:PropertyGridContextMenu> </pg:PropertyGridContextMenu>
<pg:CategoryGroupStyleSelector x:Key="categoryGroupStyleSelector" <pg:CategoryGroupStyleSelector x:Key="categoryGroupStyleSelector"
@ -919,8 +929,8 @@
VerticalAlignment="Center" VerticalAlignment="Center"
TextTrimming="{Binding PropertyNameTextWrapping, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=pg:PropertyGrid}, Converter={StaticResource PropertyNameTextTrimmingConverter}}" TextTrimming="{Binding PropertyNameTextWrapping, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=pg:PropertyGrid}, Converter={StaticResource PropertyNameTextTrimmingConverter}}"
TextWrapping="{Binding PropertyNameTextWrapping, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=pg:PropertyGrid}}" TextWrapping="{Binding PropertyNameTextWrapping, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=pg:PropertyGrid}}"
IsEnabled="{Binding IsReadOnly, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=pg:PropertyGrid}, Converter={StaticResource InverseBoolConverter}}" > IsEnabled="{Binding IsReadOnly, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=pg:PropertyGrid}, Converter={StaticResource InverseBoolConverter}}">
</pg:TrimmedTextBlock> </pg:TrimmedTextBlock>
</Grid> </Grid>
<Grid Grid.Column="1" <Grid Grid.Column="1"
@ -934,7 +944,7 @@
<Image x:Name="_optionsImage" <Image x:Name="_optionsImage"
Width="11" Width="11"
Height="11" Height="11"
ToolTip="{Binding AdvancedOptionsTooltip, RelativeSource={RelativeSource TemplatedParent}}" > ToolTip="{Binding AdvancedOptionsTooltip, RelativeSource={RelativeSource TemplatedParent}}">
</Image> </Image>
</Grid> </Grid>
</Grid> </Grid>
@ -957,7 +967,7 @@
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<ContentControl.Content> <ContentControl.Content>
<MultiBinding Converter="{StaticResource PropertyItemEditorConverter}"> <MultiBinding Converter="{StaticResource PropertyItemEditorConverter}">
<Binding Path="Editor" <Binding Path="Editor"
RelativeSource="{RelativeSource TemplatedParent}" /> RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="IsReadOnly" <Binding Path="IsReadOnly"
RelativeSource="{RelativeSource AncestorType={x:Type pg:PropertyGrid}}" /> RelativeSource="{RelativeSource AncestorType={x:Type pg:PropertyGrid}}" />
@ -999,7 +1009,7 @@
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
SnapsToDevicePixels="True"> SnapsToDevicePixels="True">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border> </Border>
</ControlTemplate> </ControlTemplate>
</ItemsControl.Template> </ItemsControl.Template>
@ -1052,7 +1062,7 @@
Value="False" /> Value="False" />
<Setter Property="MinWidth" <Setter Property="MinWidth"
Value="15" Value="15"
TargetName="_expandableButtonColumn"/> TargetName="_expandableButtonColumn" />
</Trigger> </Trigger>
<DataTrigger Binding="{Binding ElementName=_optionsImage, Path=ToolTip}" <DataTrigger Binding="{Binding ElementName=_optionsImage, Path=ToolTip}"
@ -1116,7 +1126,7 @@
<Setter Property="SelectedObjectName" <Setter Property="SelectedObjectName"
Value="{Binding RelativeSource={RelativeSource Self}, Path=SelectedObject, Converter={StaticResource objectConverter}, ConverterParameter=SelectedObjectName}" /> Value="{Binding RelativeSource={RelativeSource Self}, Path=SelectedObject, Converter={StaticResource objectConverter}, ConverterParameter=SelectedObjectName}" />
<Setter Property="CategoryGroupHeaderTemplate" <Setter Property="CategoryGroupHeaderTemplate"
Value="{StaticResource DefaultCategoryGroupHeaderTemplate}"/> Value="{StaticResource DefaultCategoryGroupHeaderTemplate}" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type pg:PropertyGrid}"> <ControlTemplate TargetType="{x:Type pg:PropertyGrid}">
@ -1156,7 +1166,7 @@
<Grid MaxWidth="{Binding ActualWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource HalfConverter}, ConverterParameter=17}"> <Grid MaxWidth="{Binding ActualWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource HalfConverter}, ConverterParameter=17}">
<pg:TrimmedTextBlock Text="{TemplateBinding SelectedObjectTypeName}" <pg:TrimmedTextBlock Text="{TemplateBinding SelectedObjectTypeName}"
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis"
FontWeight="Bold" > FontWeight="Bold">
</pg:TrimmedTextBlock> </pg:TrimmedTextBlock>
</Grid> </Grid>
<Grid MaxWidth="{Binding ActualWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource HalfConverter}, ConverterParameter=17}" <Grid MaxWidth="{Binding ActualWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource HalfConverter}, ConverterParameter=17}"
@ -1187,7 +1197,7 @@
ToolTip="Categorized"> ToolTip="Categorized">
<Image Source="./../Images/Categorize16.png" <Image Source="./../Images/Categorize16.png"
Width="16" Width="16"
Height="16" > Height="16">
</Image> </Image>
</RadioButton> </RadioButton>
<RadioButton IsChecked="{Binding IsCategorized, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}, Mode=OneWay}" <RadioButton IsChecked="{Binding IsCategorized, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}, Mode=OneWay}"
@ -1196,7 +1206,7 @@
ToolTip="Alphabetical"> ToolTip="Alphabetical">
<Image Source="./../Images/SortAscending16.png" <Image Source="./../Images/SortAscending16.png"
Width="16" Width="16"
Height="16" > Height="16">
</Image> </Image>
</RadioButton> </RadioButton>
</StackPanel> </StackPanel>
@ -1241,7 +1251,7 @@
HorizontalAlignment="Left"> HorizontalAlignment="Left">
<Image Source="./../Images/ClearFilter16.png" <Image Source="./../Images/ClearFilter16.png"
Width="16" Width="16"
Height="16" > Height="16">
</Image> </Image>
</Button> </Button>
</Grid> </Grid>

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

@ -31,6 +31,7 @@
<ResourceDictionary Source="../../NumericUpDown/Themes/Generic.xaml" /> <ResourceDictionary Source="../../NumericUpDown/Themes/Generic.xaml" />
<ResourceDictionary Source="../../DateTimeUpDown/Themes/Generic.xaml" /> <ResourceDictionary Source="../../DateTimeUpDown/Themes/Generic.xaml" />
<ResourceDictionary Source="../../TimeSpanUpDown/Themes/Generic.xaml" /> <ResourceDictionary Source="../../TimeSpanUpDown/Themes/Generic.xaml" />
<ResourceDictionary Source="../../CheckComboBox/Themes/Generic.xaml" />
<ResourceDictionary Source="../../WatermarkTextBox/Themes/Generic.xaml" /> <ResourceDictionary Source="../../WatermarkTextBox/Themes/Generic.xaml" />
<ResourceDictionary Source="../../ColorPicker/Themes/Generic.xaml" /> <ResourceDictionary Source="../../ColorPicker/Themes/Generic.xaml" />
<ResourceDictionary Source="../../CollectionControl/Themes/Generic.xaml" /> <ResourceDictionary Source="../../CollectionControl/Themes/Generic.xaml" />
@ -270,6 +271,15 @@
Value="5,0,0,0" /> Value="5,0,0,0" />
</Style> </Style>
<!-- PropertyGrid Enum CheckBox Editors -->
<Style TargetType="{x:Type editor:PropertyGridEditorEnumCheckComboBox}"
BasedOn="{StaticResource CheckComboBox}">
<Setter Property="Margin"
Value="5,0,0,0" />
<Setter Property="Margin"
Value="5,0,0,0" />
</Style>
<!-- PropertyGrid TextBox Editors --> <!-- PropertyGrid TextBox Editors -->
<Style TargetType="{x:Type editor:PropertyGridEditorTextBox}" <Style TargetType="{x:Type editor:PropertyGridEditorTextBox}"
BasedOn="{StaticResource WatermarkTextBox}"> BasedOn="{StaticResource WatermarkTextBox}">

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.NET5.csproj

@ -364,6 +364,7 @@
<Compile Include="ColorPicker\Implementation\ColorPickerTabItem.cs" /> <Compile Include="ColorPicker\Implementation\ColorPickerTabItem.cs" />
<Compile Include="Core\Converters\ColorModeToTabItemSelectedConverter.cs" /> <Compile Include="Core\Converters\ColorModeToTabItemSelectedConverter.cs" />
<Compile Include="Core\Converters\PrintableFontFamilyConverter.cs" /> <Compile Include="Core\Converters\PrintableFontFamilyConverter.cs" />
<Compile Include="Core\Converters\TabItemSizeConverter.cs" />
<Compile Include="Core\GenericTextBlock.cs" /> <Compile Include="Core\GenericTextBlock.cs" />
<Compile Include="Core\ImageUriExtension.cs" /> <Compile Include="Core\ImageUriExtension.cs" />
<Compile Include="Core\PackUriExtension.cs" /> <Compile Include="Core\PackUriExtension.cs" />
@ -418,6 +419,7 @@
<Compile Include="PropertyGrid\Implementation\Converters\IsStringEmptyConverter.cs" /> <Compile Include="PropertyGrid\Implementation\Converters\IsStringEmptyConverter.cs" />
<Compile Include="PropertyGrid\Implementation\Converters\PropertyNameTextTrimmingConverter.cs" /> <Compile Include="PropertyGrid\Implementation\Converters\PropertyNameTextTrimmingConverter.cs" />
<Compile Include="PropertyGrid\Implementation\Editors\CollectionEditor.cs" /> <Compile Include="PropertyGrid\Implementation\Editors\CollectionEditor.cs" />
<Compile Include="PropertyGrid\Implementation\Editors\EnumCheckComboboxEditor.cs" />
<Compile Include="PropertyGrid\Implementation\Editors\PasswordEditor.cs" /> <Compile Include="PropertyGrid\Implementation\Editors\PasswordEditor.cs" />
<Compile Include="PropertyGrid\Implementation\Editors\SourceComboBoxEditor.cs" /> <Compile Include="PropertyGrid\Implementation\Editors\SourceComboBoxEditor.cs" />
<Compile Include="PropertyGrid\Implementation\PropertyGridContextMenu.cs" /> <Compile Include="PropertyGrid\Implementation\PropertyGridContextMenu.cs" />

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

@ -395,6 +395,7 @@
<Compile Include="ColorPicker\Implementation\ColorPickerTabItem.cs" /> <Compile Include="ColorPicker\Implementation\ColorPickerTabItem.cs" />
<Compile Include="Core\Converters\ColorModeToTabItemSelectedConverter.cs" /> <Compile Include="Core\Converters\ColorModeToTabItemSelectedConverter.cs" />
<Compile Include="Core\Converters\PrintableFontFamilyConverter.cs" /> <Compile Include="Core\Converters\PrintableFontFamilyConverter.cs" />
<Compile Include="Core\Converters\TabItemSizeConverter.cs" />
<Compile Include="Core\GenericTextBlock.cs" /> <Compile Include="Core\GenericTextBlock.cs" />
<Compile Include="Core\ImageUriExtension.cs" /> <Compile Include="Core\ImageUriExtension.cs" />
<Compile Include="Core\PackUriExtension.cs" /> <Compile Include="Core\PackUriExtension.cs" />
@ -448,6 +449,7 @@
<Compile Include="PropertyGrid\Implementation\Converters\IsDefaultCategoryConverter.cs" /> <Compile Include="PropertyGrid\Implementation\Converters\IsDefaultCategoryConverter.cs" />
<Compile Include="PropertyGrid\Implementation\Converters\IsStringEmptyConverter.cs" /> <Compile Include="PropertyGrid\Implementation\Converters\IsStringEmptyConverter.cs" />
<Compile Include="PropertyGrid\Implementation\Converters\PropertyNameTextTrimmingConverter.cs" /> <Compile Include="PropertyGrid\Implementation\Converters\PropertyNameTextTrimmingConverter.cs" />
<Compile Include="PropertyGrid\Implementation\Editors\EnumCheckComboBoxEditor.cs" />
<Compile Include="PropertyGrid\Implementation\PropertyGridContextMenu.cs" /> <Compile Include="PropertyGrid\Implementation\PropertyGridContextMenu.cs" />
<Compile Include="PropertyGrid\Implementation\Editors\CollectionEditor.cs" /> <Compile Include="PropertyGrid\Implementation\Editors\CollectionEditor.cs" />
<Compile Include="PropertyGrid\Implementation\Editors\PasswordEditor.cs" /> <Compile Include="PropertyGrid\Implementation\Editors\PasswordEditor.cs" />

Loading…
Cancel
Save