Browse Source

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -838,21 +838,17 @@ namespace Xceed.Wpf.Toolkit
result = this.ContextNow;
DateTime current = this.ContextNow;
if( this.Value.HasValue )
try
{
current = this.Value.Value;
current = (this.Value.HasValue)
? this.Value.Value
: DateTime.Parse( this.ContextNow.ToString(), this.CultureInfo.DateTimeFormat );
isValid = DateTimeParser.TryParse( text, this.GetFormatString( Format ), current, this.CultureInfo, out result );
}
else
catch( FormatException )
{
try
{
current = DateTime.Parse( this.ContextNow.ToString(), this.CultureInfo.DateTimeFormat );
isValid = DateTimeParser.TryParse( text, this.GetFormatString( Format ), current, this.CultureInfo, out result );
}
catch( FormatException )
{
isValid = false;
}
isValid = false;
}
if( !isValid )

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

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

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

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

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

@ -1,59 +0,0 @@
/*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2013 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
namespace Xceed.Wpf.Toolkit.Converters
{
public class TranslateSelectedTabItemConverter : IMultiValueConverter
{
public object Convert( object[] values, Type targetType, object parameter, CultureInfo culture )
{
double width = (double)values[0];
double height = (double)values[1];
Dock position = (Dock)values[2];
if( parameter.ToString().Equals( "Previous" ) )
{
if( (position == Dock.Top) || (position == Dock.Bottom) )
return new TranslateTransform( -width, 0 );
else
return new TranslateTransform( 0, -height );
}
else if( parameter.ToString().Equals( "Next" ) )
{
if( (position == Dock.Top) || (position == Dock.Bottom) )
return new TranslateTransform( width, 0 );
else
return new TranslateTransform( 0, height );
}
return null;
}
public object[] ConvertBack( object value, Type[] targetTypes, object parameter, CultureInfo culture )
{
throw new NotImplementedException();
}
}
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -838,21 +838,17 @@ namespace Xceed.Wpf.Toolkit
result = this.ContextNow;
DateTime current = this.ContextNow;
if( this.Value.HasValue )
try
{
current = this.Value.Value;
current = (this.Value.HasValue)
? this.Value.Value
: DateTime.Parse( this.ContextNow.ToString(), this.CultureInfo.DateTimeFormat );
isValid = DateTimeParser.TryParse( text, this.GetFormatString( Format ), current, this.CultureInfo, out result );
}
else
catch( FormatException )
{
try
{
current = DateTime.Parse( this.ContextNow.ToString(), this.CultureInfo.DateTimeFormat );
isValid = DateTimeParser.TryParse( text, this.GetFormatString( Format ), current, this.CultureInfo, out result );
}
catch( FormatException )
{
isValid = false;
}
isValid = false;
}
if( !isValid )

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save