Browse Source

pull/1242/head
BoucherS_cp 12 years ago
parent
commit
964cdfeb69
  1. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs
  2. 7
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml
  3. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs
  4. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml
  5. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs
  6. 36
      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/FocusElementManager.cs
  9. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableTabItem.cs
  10. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAutoHideWindowControl.cs
  11. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentPaneControl.cs
  12. 19
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs
  13. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridControl.cs
  14. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs
  15. 1
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/NavigatorWindow.cs
  16. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindow.cs
  17. 67
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs
  18. 15
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutAnchorable.cs
  19. 18
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutDocument.cs
  20. 32
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutRoot.cs
  21. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Properties/AssemblyInfo.cs
  22. 7
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Themes/generic.xaml
  23. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Win32Helper.cs
  24. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/AssemblyVersionInfo.cs
  25. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/Markup/ThemeKey.cs
  26. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/DateTimeView.xaml.txt
  27. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ListBoxView.xaml.txt
  28. 1
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/NumericView.xaml.txt
  29. 1
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridPropertiesSourceView.xaml.cs.txt
  30. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/RadialGaugeView.xaml.txt
  31. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/RangeSliderView.xaml.txt
  32. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/RatingView.xaml.txt
  33. 5
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ThemingExtendedToolkitView.xaml.txt
  34. 38
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ToggleSwitchView.xaml.cs.txt
  35. 392
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ToggleSwitchView.xaml.txt
  36. 14
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/MainWindow.xaml
  37. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/AssemblyInfo.cs
  38. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Properties/Resources.resx
  39. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/DateTime/Views/DateTimeView.xaml
  40. 1
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Numeric/Views/NumericView.xaml
  41. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/RangeSlider/Views/RangeSliderView.xaml
  42. 1
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Theming/Views/ThemingExtendedToolkitView.xaml
  43. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/OpenSourceImages/ToggleSwitch.png
  44. 64
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Views/ToggleSwitchView.xaml
  45. 38
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Views/ToggleSwitchView.xaml.cs
  46. 16
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Xceed.Wpf.Toolkit.LiveExplorer.csproj
  47. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs
  48. 12
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs
  49. 129
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlButton.cs
  50. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/PrimitiveTypeCollectionControl.cs
  51. 67
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Aero2.NormalColor.xaml
  52. 84
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml
  53. 48
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/CornerRadiusToDoubleConverter.cs
  54. 48
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessToDoubleConverter.cs
  55. 1
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/MouseWheelActiveTriggerEnum.cs
  56. 10
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/Selector.cs
  57. 24
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/UpDownBase.cs
  58. 9
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/WindowContainer.cs
  59. 68
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs
  60. 28
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColor.xaml
  61. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml
  62. 5
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs
  63. 7
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Aero2.NormalColor.xaml
  64. 7
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml
  65. 12
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Attributes/ExpandableObjectAttribute.cs
  66. 58
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.cs
  67. 79
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml
  68. 51
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml.cs
  69. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/PrimitiveTypeCollectionEditor.cs
  70. 1
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs
  71. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelperBase.cs
  72. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/PropertyGrid.cs
  73. 19
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Aero2.NormalColor.xaml
  74. 20
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Themes/Generic.xaml
  75. 10
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/RichTextBoxFormatBar/RichTextBoxFormatBar.cs
  76. 20
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Aero2.NormalColor.xaml
  77. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Generic.xaml
  78. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj
  79. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Zoombox/Zoombox.cs
  80. 2
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/AssemblyVersionInfo.cs
  81. 12
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs
  82. 129
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlButton.cs
  83. 11
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/PrimitiveTypeCollectionControl.cs
  84. 67
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Aero2.NormalColor.xaml
  85. 84
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml
  86. 5
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Aero2.NormalColor.xaml
  87. 5
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml
  88. 48
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/CornerRadiusToDoubleConverter.cs
  89. 48
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessToDoubleConverter.cs
  90. 1
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/MouseWheelActiveTriggerEnum.cs
  91. 10
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/Selector.cs
  92. 24
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/UpDownBase.cs
  93. 9
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/WindowContainer.cs
  94. 68
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs
  95. 5
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeParser.cs
  96. 7
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Aero2.NormalColor.xaml
  97. 7
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml
  98. 12
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Attributes/ExpandableObjectAttribute.cs
  99. 58
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.cs
  100. 79
      ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml

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.2";
public const string BaseVersion = "2.3";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";

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

@ -813,10 +813,9 @@
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter Content="{Binding LayoutItem.View, RelativeSource={RelativeSource TemplatedParent}}"/>
<!--<ContentPresenter Content="{Binding Model.Content, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding LayoutItemTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"
ContentTemplateSelector="{Binding LayoutItemTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"/>-->
<ContentPresenter Content="{Binding LayoutItem.View.Content, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding LayoutItem.View.ContentTemplate, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplateSelector="{Binding LayoutItem.View.ContentTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}" />
</Border>
</ControlTemplate>
</Setter.Value>

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.2";
public const string BaseVersion = "2.3";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";

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

@ -855,8 +855,10 @@
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter Content="{Binding LayoutItem.View, RelativeSource={RelativeSource TemplatedParent}}"/>
</Border>
<ContentPresenter Content="{Binding LayoutItem.View.Content, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding LayoutItem.View.ContentTemplate, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplateSelector="{Binding LayoutItem.View.ContentTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>

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.2";
public const string BaseVersion = "2.3";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";

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

@ -201,7 +201,7 @@
<Setter Property="ItemContainerStyle">
<Setter.Value>
<Style TargetType="{x:Type TabItem}">
<Setter Property="Foreground" Value="{DynamicResource AvalonDock_ThemeVS2010_BaseColor10}"/>
<Setter Property="Foreground" Value="{DynamicResource AvalonDock_ThemeVS2010_BaseColor10}"/>
<Setter Property="Background" Value="{DynamicResource AvalonDock_ThemeVS2010_BaseColor4}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AvalonDock_ThemeVS2010_BaseColor4}"/>
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
@ -241,20 +241,17 @@
<Setter Property="Margin" Value="-1,0,-1,-4"/>
<Setter Property="Margin" TargetName="Content" Value="0,0,0,3"/>
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsActive}" Value="True"/>
<Condition Binding="{Binding IsLastFocusedDocument}" Value="True"/>
</MultiDataTrigger.Conditions>
<Setter Property="BorderBrush"
Value="{DynamicResource AvalonDock_ThemeVS2010_BaseColor31}" />
<Setter Property="Background"
Value="{DynamicResource AvalonDock_ThemeVS2010_BaseColor25}" />
<Setter Property="Foreground"
Value="{DynamicResource AvalonDock_ThemeVS2010_BaseColor3}"/>
<Setter Property="Panel.ZIndex"
Value="1" />
</MultiDataTrigger>
<DataTrigger Binding="{Binding IsActive}"
Value="True">
<Setter Property="BorderBrush"
Value="{DynamicResource AvalonDock_ThemeVS2010_BaseColor31}" />
<Setter Property="Background"
Value="{DynamicResource AvalonDock_ThemeVS2010_BaseColor25}" />
<Setter Property="Foreground"
Value="{DynamicResource AvalonDock_ThemeVS2010_BaseColor3}" />
<Setter Property="Panel.ZIndex"
Value="1" />
</DataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
@ -886,11 +883,10 @@
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter Content="{Binding LayoutItem.View, RelativeSource={RelativeSource TemplatedParent}}"/>
<!--<ContentPresenter Content="{Binding Model.Content, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding LayoutItemTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"
ContentTemplateSelector="{Binding LayoutItemTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"/>-->
</Border>
<ContentPresenter Content="{Binding LayoutItem.View.Content, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding LayoutItem.View.ContentTemplate, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplateSelector="{Binding LayoutItem.View.ContentTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>

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.2";
public const string BaseVersion = "2.3";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";

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

@ -156,7 +156,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
if (_modelFocusedWindowHandle.GetValue(model, out handleToFocus))
focused = IntPtr.Zero != Win32Helper.SetFocus(handleToFocus);
Trace.WriteLine( string.Format( "SetFocusOnLastElement(focused={0}, model={1}, element={2})", focused, model, handleToFocus == IntPtr.Zero ? ( objectToFocus == null ? "" : objectToFocus.ToString() ) : handleToFocus.ToString() ) );
if (focused)
{
@ -193,8 +192,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
}
}
}
}
}
@ -202,8 +199,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
static void WindowActivating(object sender, WindowActivateEventArgs e)
{
Trace.WriteLine("WindowActivating");
if (Keyboard.FocusedElement == null &&
_lastFocusedElement != null &&
_lastFocusedElement.IsAlive)

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

@ -181,8 +181,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
_draggingItem != this &&
e.LeftButton == MouseButtonState.Pressed)
{
//Trace.WriteLine("Dragging item from {0} to {1}", _draggingItem, this);
var model = Model;
var container = model.Parent as ILayoutContainer;
var containerPane = model.Parent as ILayoutPane;

3
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAutoHideWindowControl.cs

@ -61,7 +61,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
Visibility = System.Windows.Visibility.Visible;
InvalidateMeasure();
UpdateWindowPos();
Trace.WriteLine("LayoutAutoHideWindowControl.Show()");
}
internal void Hide()
@ -76,8 +75,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
_model = null;
_manager = null;
Visibility = System.Windows.Visibility.Hidden;
Trace.WriteLine("LayoutAutoHideWindowControl.Hide()");
}
LayoutAnchorControl _anchor;

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentPaneControl.cs

@ -53,17 +53,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
modelWithAtcualSize.ActualHeight = ActualHeight;
}
protected override void OnGotKeyboardFocus(System.Windows.Input.KeyboardFocusChangedEventArgs e)
{
base.OnGotKeyboardFocus(e);
System.Diagnostics.Trace.WriteLine( string.Format( "OnGotKeyboardFocus({0}, {1})", e.Source, e.NewFocus ) );
//if (_model.SelectedContent != null)
// _model.SelectedContent.IsActive = true;
}
protected override void OnSelectionChanged(SelectionChangedEventArgs e)
{
base.OnSelectionChanged(e);

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

@ -83,11 +83,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
}
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
{
Trace.WriteLine("FloatingWindowContentHost.GotKeyboardFocus");
base.OnGotKeyboardFocus(e);
}
protected override void DestroyWindowCore(HandleRef hwnd)
{
_manager.InternalRemoveLogicalChild(_rootPresenter);
@ -97,19 +92,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
_wpfContentHost = null;
}
}
protected override IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{
switch (msg)
{
case Win32Helper.WM_SETFOCUS:
Trace.WriteLine("FloatingWindowContentHost.WM_SETFOCUS");
break;
case Win32Helper.WM_KILLFOCUS:
Trace.WriteLine("FloatingWindowContentHost.WM_KILLFOCUS");
break;
}
return base.WndProc(hwnd, msg, wParam, lParam, ref handled);
}
public Visual RootVisual
{
@ -356,7 +338,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary>
protected virtual void OnIsDraggingChanged(DependencyPropertyChangedEventArgs e)
{
//Trace.WriteLine("IsDragging={0}", e.NewValue);
}
#endregion

8
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridControl.cs

@ -382,7 +382,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
if (Orientation == System.Windows.Controls.Orientation.Horizontal)
{
//Trace.WriteLine(string.Format("PrevChild From {0}", prevChildModel.DockWidth));
if (prevChildModel.DockWidth.IsStar)
{
prevChildModel.DockWidth = new GridLength(prevChildModel.DockWidth.Value * (prevChildActualSize.Width + delta) / prevChildActualSize.Width, GridUnitType.Star);
@ -391,9 +390,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
{
prevChildModel.DockWidth = new GridLength(prevChildModel.DockWidth.Value + delta, GridUnitType.Pixel);
}
//Trace.WriteLine(string.Format("PrevChild To {0}", prevChildModel.DockWidth));
//Trace.WriteLine(string.Format("NextChild From {0}", nextChildModel.DockWidth));
if (nextChildModel.DockWidth.IsStar)
{
nextChildModel.DockWidth = new GridLength(nextChildModel.DockWidth.Value * (nextChildActualSize.Width - delta) / nextChildActualSize.Width, GridUnitType.Star);
@ -402,11 +399,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
{
nextChildModel.DockWidth = new GridLength(nextChildModel.DockWidth.Value - delta, GridUnitType.Pixel);
}
//Trace.WriteLine(string.Format("NextChild To {0}", nextChildModel.DockWidth));
}
else
{
//Trace.WriteLine(string.Format("PrevChild From {0}", prevChildModel.DockHeight));
if (prevChildModel.DockHeight.IsStar)
{
prevChildModel.DockHeight = new GridLength(prevChildModel.DockHeight.Value * (prevChildActualSize.Height + delta) / prevChildActualSize.Height, GridUnitType.Star);
@ -415,9 +410,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
{
prevChildModel.DockHeight = new GridLength(prevChildModel.DockHeight.Value + delta, GridUnitType.Pixel);
}
//Trace.WriteLine(string.Format("PrevChild To {0}", prevChildModel.DockHeight));
//Trace.WriteLine(string.Format("NextChild From {0}", nextChildModel.DockHeight));
if (nextChildModel.DockHeight.IsStar)
{
nextChildModel.DockHeight = new GridLength(nextChildModel.DockHeight.Value * (nextChildActualSize.Height - delta) / nextChildActualSize.Height, GridUnitType.Star);
@ -426,7 +419,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
{
nextChildModel.DockHeight = new GridLength(nextChildModel.DockHeight.Value - delta, GridUnitType.Pixel);
}
//Trace.WriteLine(string.Format("NextChild To {0}", nextChildModel.DockHeight));
}
HideResizerOverlayWindow();

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

@ -54,7 +54,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
LayoutElement.IsActiveChanged+=new EventHandler(LayoutElement_IsActiveChanged);
DataContext = this;
System.Diagnostics.Trace.WriteLine( string.Format( "Attach({0})", LayoutElement.Title ) );
}
@ -85,7 +84,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
internal virtual void Detach()
{
System.Diagnostics.Trace.WriteLine( string.Format( "Detach({0})", LayoutElement.Title ) );
LayoutElement.IsSelectedChanged -= new EventHandler(LayoutElement_IsSelectedChanged);
LayoutElement.IsActiveChanged -= new EventHandler(LayoutElement_IsActiveChanged);
LayoutElement = null;
@ -569,10 +567,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
private bool CanExecuteCloseCommand(object parameter)
{
#if DEBUG
if( LayoutElement != null )
System.Diagnostics.Trace.WriteLine( string.Format( "CanExecuteCloseCommand({0}) = {1}", LayoutElement.Title, LayoutElement.CanClose ) );
#endif
return LayoutElement != null && LayoutElement.CanClose;
}

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

@ -249,7 +249,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
if (SelectedDocument != null &&
SelectedDocument.ActivateCommand.CanExecute(null))
{
System.Diagnostics.Trace.WriteLine( "OnSelectedDocumentChanged()" );
SelectedDocument.ActivateCommand.Execute(null);
Hide();
}

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

@ -174,14 +174,12 @@ namespace Xceed.Wpf.AvalonDock.Controls
internal void EnableDropTargets()
{
//Trace.WriteLine("EnableDropTargets()");
if (_mainCanvasPanel != null)
_mainCanvasPanel.Visibility = System.Windows.Visibility.Visible;
}
internal void HideDropTargets()
{
//Trace.WriteLine("HideDropTargets()");
if (_mainCanvasPanel != null)
_mainCanvasPanel.Visibility = System.Windows.Visibility.Hidden;

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

@ -1021,40 +1021,6 @@ namespace Xceed.Wpf.AvalonDock
#endregion
protected override void OnGotKeyboardFocus(System.Windows.Input.KeyboardFocusChangedEventArgs e)
{
//if (e.NewFocus is Grid)
// Trace.WriteLine(string.Format("DockingManager.OnGotKeyboardFocus({0})", e.NewFocus));
base.OnGotKeyboardFocus(e);
}
protected override void OnPreviewGotKeyboardFocus(System.Windows.Input.KeyboardFocusChangedEventArgs e)
{
Trace.WriteLine( string.Format( "DockingManager.OnPreviewGotKeyboardFocus({0})", e.NewFocus ) );
base.OnPreviewGotKeyboardFocus(e);
}
protected override void OnPreviewLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
{
Trace.WriteLine( string.Format( "DockingManager.OnPreviewLostKeyboardFocus({0})", e.OldFocus ) );
base.OnPreviewLostKeyboardFocus(e);
}
protected override void OnMouseLeftButtonDown(System.Windows.Input.MouseButtonEventArgs e)
{
Trace.WriteLine( string.Format( "DockingManager.OnMouseLeftButtonDown([{0}])", e.GetPosition( this ) ) );
base.OnMouseLeftButtonDown(e);
}
protected override void OnMouseMove(System.Windows.Input.MouseEventArgs e)
{
//Trace.WriteLine(string.Format("DockingManager.OnMouseMove([{0}])", e.GetPosition(this)));
base.OnMouseMove(e);
}
#region LayoutRootPanel
/// <summary>
@ -1260,7 +1226,6 @@ namespace Xceed.Wpf.AvalonDock
#endregion
#region LogicalChildren
List<WeakReference> _logicalChildren = new List<WeakReference>();
@ -1276,7 +1241,6 @@ namespace Xceed.Wpf.AvalonDock
internal void InternalAddLogicalChild(object element)
{
//System.Diagnostics.Trace.WriteLine("[{0}]InternalAddLogicalChild({1})", this, element);
#if DEBUG
if (_logicalChildren.Select(ch => ch.GetValueOrDefault<object>()).Contains(element))
new InvalidOperationException();
@ -1290,8 +1254,6 @@ namespace Xceed.Wpf.AvalonDock
internal void InternalRemoveLogicalChild(object element)
{
//System.Diagnostics.Trace.WriteLine("[{0}]InternalRemoveLogicalChild({1})", this, element);
var wrToRemove = _logicalChildren.FirstOrDefault(ch => ch.GetValueOrDefault<object>() == element);
if (wrToRemove != null)
_logicalChildren.Remove(wrToRemove);
@ -1785,7 +1747,6 @@ namespace Xceed.Wpf.AvalonDock
IOverlayWindow IOverlayWindowHost.ShowOverlayWindow(LayoutFloatingWindowControl draggingWindow)
{
//Trace.WriteLine("ShowOverlayWindow");
CreateOverlayWindow();
_overlayWindow.Owner = draggingWindow;
_overlayWindow.EnableDropTargets();
@ -1795,7 +1756,6 @@ namespace Xceed.Wpf.AvalonDock
void IOverlayWindowHost.HideOverlayWindow()
{
//Trace.WriteLine("HideOverlayWindow");
_areas = null;
_overlayWindow.Owner = null;
_overlayWindow.HideDropTargets();
@ -2194,15 +2154,13 @@ namespace Xceed.Wpf.AvalonDock
return;
}
if (!document.TestCanClose())
return;
document.CloseInternal();
if (DocumentClosed != null)
{
var evargs = new DocumentClosedEventArgs(document);
DocumentClosed(this, evargs);
if( document.CloseDocument() )
{
if( DocumentClosed != null )
{
var evargs = new DocumentClosedEventArgs( document );
DocumentClosed( this, evargs );
}
}
}
@ -2535,13 +2493,9 @@ namespace Xceed.Wpf.AvalonDock
internal void _ExecuteCloseCommand(LayoutAnchorable anchorable)
{
var model = anchorable as LayoutAnchorable;
if (model != null && model.TestCanClose())
if (model != null )
{
if (model.IsAutoHidden)
model.ToggleAutoHide();
model.Close();
return;
model.CloseAnchorable();
}
}
@ -3165,8 +3119,6 @@ namespace Xceed.Wpf.AvalonDock
_navigatorWindow.ShowDialog();
_navigatorWindow = null;
Trace.WriteLine( "ShowNavigatorWindow()" );
}
bool IsNavigatorWindowActive
@ -3177,7 +3129,6 @@ namespace Xceed.Wpf.AvalonDock
protected override void OnPreviewKeyDown(KeyEventArgs e)
{
Trace.WriteLine( string.Format( "OnPreviewKeyDown({0})", e.Key ) );
if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
{
if (e.IsDown && e.Key == Key.Tab)

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

@ -625,9 +625,18 @@ namespace Xceed.Wpf.AvalonDock.Layout
public override void Close()
{
var dockingManager = this.Root.Manager;
if( ( this.Root != null ) && ( this.Root.Manager != null ) )
dockingManager._ExecuteCloseCommand( this );
this.CloseAnchorable();
}
internal void CloseAnchorable()
{
if( this.TestCanClose() )
{
if( this.IsAutoHidden )
this.ToggleAutoHide();
this.CloseInternal();
}
}

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

@ -67,11 +67,27 @@ namespace Xceed.Wpf.AvalonDock.Layout
public override void Close()
{
var dockingManager = this.Root.Manager;
if( ( this.Root != null ) && ( this.Root.Manager != null ) )
{
var dockingManager = this.Root.Manager;
dockingManager._ExecuteCloseCommand( this );
}
else
{
this.CloseDocument();
}
}
internal bool CloseDocument()
{
if( this.TestCanClose() )
{
this.CloseInternal();
return true;
}
return false;
}
#if TRACE
public override void ConsoleDump(int tab)

32
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Layout/LayoutRoot.cs

@ -595,25 +595,27 @@ namespace Xceed.Wpf.AvalonDock.Layout
#region collapse single child layout panels
do
{
exitFlag = true;
//for each panel that has only one child
foreach (var panelToCollapse in this.Descendents().OfType<LayoutPanel>().Where(p => p.ChildrenCount == 1 && p.Children[0] is LayoutPanel).ToArray())
exitFlag = true;
//for each panel that has only one child
foreach( var panelToCollapse in this.Descendents().OfType<LayoutPanel>().Where( p => p.ChildrenCount == 1 && p.Children[ 0 ] is LayoutPanel ).ToArray() )
{
var singleChild = panelToCollapse.Children[ 0 ] as LayoutPanel;
panelToCollapse.Orientation = singleChild.Orientation;
panelToCollapse.RemoveChild( singleChild );
ILayoutPanelElement[] singleChildChildren = new ILayoutPanelElement[ singleChild.ChildrenCount ];
singleChild.Children.CopyTo( singleChildChildren, 0 );
while( singleChild.ChildrenCount > 0 )
{
var singleChild = panelToCollapse.Children[0] as LayoutPanel;
panelToCollapse.Orientation = singleChild.Orientation;
panelToCollapse.RemoveChild(singleChild);
while (singleChild.ChildrenCount > 0)
{
panelToCollapse.InsertChildAt(
panelToCollapse.ChildrenCount, singleChild.Children[0]);
}
exitFlag = false;
break;
panelToCollapse.InsertChildAt(
panelToCollapse.ChildrenCount, singleChildChildren[ panelToCollapse.ChildrenCount ] );
}
exitFlag = false;
break;
}
}
while (!exitFlag);
while( !exitFlag );
#endregion
#region Update ActiveContent and LastFocusedDocument properties

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

@ -52,7 +52,7 @@ using System;
[assembly: ThemeInfo(
ResourceDictionaryLocation.SourceAssembly, //where theme specific resource dictionaries are located
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located

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

@ -609,10 +609,9 @@
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter Content="{Binding LayoutItem.View, RelativeSource={RelativeSource TemplatedParent}}"/>
<!--<ContentPresenter Content="{Binding Model.Content, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding LayoutItemTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"
ContentTemplateSelector="{Binding LayoutItemTemplateSelector, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"/>-->
<ContentPresenter Content="{Binding LayoutItem.View.Content, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding LayoutItem.View.ContentTemplate, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplateSelector="{Binding LayoutItem.View.ContentTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}"/>
</Border>
</ControlTemplate>
</Setter.Value>

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

@ -301,11 +301,7 @@ namespace Xceed.Wpf.AvalonDock
}
internal static int MakeLParam(int LoWord, int HiWord)
{
//System.Diagnostics.Trace.WriteLine("LoWord: " + LoWord2(((HiWord << 16) |
//(LoWord & 0xffff))));
{
return (int) ((HiWord << 16) | (LoWord & 0xffff));
}

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.2";
public const string BaseVersion = "2.3";
[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/Markup/ThemeKey.cs

@ -22,12 +22,14 @@ using System.Windows;
using System.Windows.Markup;
using Xceed.Wpf.DataGrid.Views;
using System.Windows.Media;
using System.ComponentModel;
namespace Xceed.Wpf.DataGrid.Markup
{
[MarkupExtensionReturnType( typeof( ThemeKey ) )]
public class ThemeKey : ResourceKey
{
public ThemeKey()
{
}
@ -97,8 +99,8 @@ namespace Xceed.Wpf.DataGrid.Markup
if( value == null )
throw new ArgumentNullException( "TargetViewType" );
if( !typeof( ViewBase ).IsAssignableFrom( value ) )
throw new ArgumentException( "The specified view type must derive from ViewBase.", "TargetViewType" );
if( !typeof( ViewBase ).IsAssignableFrom( value ) )
throw new ArgumentException( "The specified view type must derive from ViewBase.", "TargetViewType" );
if( m_targetViewTypeInitialized )
throw new InvalidOperationException( "An attempt was made to set the TargetViewType property when it has already been initialized." );

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

@ -67,6 +67,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
@ -87,6 +88,8 @@
<CheckBox x:Name="_clipValueToMinMax" Grid.Row="4" Grid.Column="1" IsChecked="False" VerticalAlignment="Center" Margin="5,5,25,5"/>
<TextBlock Text="TimePickerVisibility:" Grid.Row="5" Grid.Column="0" VerticalAlignment="Center"/>
<ComboBox x:Name="_timePickerVisibility" Grid.Row="5" Grid.Column="1" SelectedIndex="0" ItemsSource="{Binding Source={StaticResource enumVisibility}}" Width="190" Margin="5,5,25,5"/>
<TextBlock Text="TimePickerShowButtonSpinner:" Grid.Row="6" Grid.Column="0" VerticalAlignment="Center"/>
<CheckBox x:Name="_timePickerShowButtonSpinner" Grid.Row="6" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5,5,25,5"/>
<TextBlock Text="TimeFormat:" Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" />
<ComboBox x:Name="_timeFormat" Grid.Row="0" Grid.Column="3" SelectedIndex="1" ItemsSource="{Binding Source={StaticResource enumTimeFormatData}}" Width="190" Margin="5"/>
@ -116,6 +119,7 @@
AutoCloseCalendar="{Binding IsChecked, ElementName=_autoCloseCalendar}"
ClipValueToMinMax="{Binding IsChecked, ElementName=_clipValueToMinMax}"
TimePickerVisibility="{Binding Source={x:Reference _timePickerVisibility}, Path=SelectedItem}"
TimePickerShowButtonSpinner="{Binding IsChecked, ElementName=_timePickerShowButtonSpinner}"
Minimum="{Binding Value, ElementName=_minimum}"
Maximum="{Binding Value, ElementName=_maximum}"/>
</StackPanel>

6
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ListBoxView.xaml.txt

@ -536,7 +536,8 @@
Width="225"
DataSourceFilterExpression="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FilterExpression, Mode=TwoWay}"
xclb:SearchTextBox.FilteredFieldNames="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(xclb:SearchTextBox.FilteredFieldNames)}"
xclb:SearchTextBox.TooComplexText="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(xclb:SearchTextBox.TooComplexText)}" />
xclb:SearchTextBox.TooComplexText="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(xclb:SearchTextBox.TooComplexText)}"
xclb:SearchTextBox.IsCaseSensitive="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(xclb:SearchTextBox.IsCaseSensitive)}"/>
<Rectangle Height="1"
VerticalAlignment="Bottom"
@ -1037,7 +1038,8 @@
<xclb:ListBox x:Name="_listBox"
ItemsSource="{Binding}"
ItemTemplate="{StaticResource orderListBoxItemTemplate}"
xclb:SearchTextBox.FilteredFieldNames="{StaticResource filteredFieldNameList}">
xclb:SearchTextBox.FilteredFieldNames="{StaticResource filteredFieldNameList}"
xclb:SearchTextBox.IsCaseSensitive="False">
</xclb:ListBox>
</Grid >
<!--##END-->

1
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/NumericView.xaml.txt

@ -109,6 +109,7 @@
<!-- 1st column -->
<TextBlock Text="Mouse Wheel:" Grid.Row="0" VerticalAlignment="Center" />
<ComboBox Grid.Row="0" Grid.Column="1" SelectedItem="{Binding MouseWheelActiveTrigger, ElementName=_doubleUpDown}" Margin="5" VerticalAlignment="Center" >
<x:StaticExtension Member="xctk:MouseWheelActiveTrigger.Focused" />
<x:StaticExtension Member="xctk:MouseWheelActiveTrigger.FocusedMouseOver" />
<x:StaticExtension Member="xctk:MouseWheelActiveTrigger.MouseOver" />
<x:StaticExtension Member="xctk:MouseWheelActiveTrigger.Disabled" />

1
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridPropertiesSourceView.xaml.cs.txt

@ -55,7 +55,6 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
list.Add( new MyData( "FontFamily", Fonts.SystemFontFamilies.First() ) );
list.Add( new MyData( "FontStyle", FontStyles.Italic ) );
list.Add( new MyData( "FontStretch", FontStretches.ExtraExpanded ) );
list.Add( new MyData( "TimeSpan", System.TimeSpan.FromHours( 2 ) ) );
// PropertyGrid PropertiesSource property is bound to the DataContext
this.DataContext = list;

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/RadialGaugeView.xaml.txt

@ -947,7 +947,7 @@
MarkerOffset="0"
NumericIndicatorOffsetX="0"
NumericIndicatorOffsetY="60"
Value="60"
Value="88"
IsFullCircleBackground="False"
IsTickMarkVisible="True"
IsTickLabelVisible="True"

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/RangeSliderView.xaml.txt

@ -439,7 +439,7 @@
<!-- //#TODODOC -->
<Paragraph FontSize="14"
FontFamily="Segoe">
The RangeSlider control let you sets a range with 2 slider thumbs. The lower limit is marked with the right side of the left thumb while the higher limit is marked with the left side of the right thumb.
The RangeSlider control lets you set a range with 2 slider thumbs. The lower limit is marked with the right side of the left thumb while the higher limit is marked with the left side of the right thumb.
</Paragraph>
</local:DemoView.Description>

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/RatingView.xaml.txt

@ -440,4 +440,4 @@
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\Rating.png" Width="600" Height="400"/>
##END-->
</local:DemoView>
</local:DemoView>

5
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ThemingExtendedToolkitView.xaml.txt

@ -181,7 +181,7 @@
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="400" />
<RowDefinition Height="450" />
</Grid.RowDefinitions>
<GroupBox Header="Features" Grid.Row="0" Margin="5">
@ -473,6 +473,9 @@
<TextBlock Text="MaskedTextBox:" Grid.Row="7" Style="{StaticResource TextBlockStyle}"/>
<xctk:MaskedTextBox Grid.Row="7" Grid.Column="1" Mask="(000) 000-0000" Text="5256963" Margin="5" />
<TextBlock Text="ToggleSwitch:" Grid.Row="8" Style="{StaticResource TextBlockStyle}"/>
<xctk:ToggleSwitch Grid.Row="8" Grid.Column="1" Margin="5" />
</Grid>
<Grid Grid.Column="1">

38
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ToggleSwitchView.xaml.cs.txt

@ -0,0 +1,38 @@
/*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2014 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.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows.Controls;
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Documents;
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.ToggleSwitch.Views
{
/// <summary>
/// Interaction logic for ToggleSwitchView.xaml
/// </summary>
public partial class ToggleSwitchView : DemoView
{
public ToggleSwitchView()
{
InitializeComponent();
}
}
}

392
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ToggleSwitchView.xaml.txt

@ -0,0 +1,392 @@
<!--*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2014 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
***********************************************************************************-->
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.ToggleSwitch.Views.ToggleSwitchView"
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:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters;assembly=Xceed.Wpf.Toolkit"
Title="ToggleSwitch">
<local:DemoView.Description>
<!-- //#TODODOC-->
<Paragraph FontSize="14"
FontFamily="Segoe">
<Run>The ToggleSwitch control is a fully customizable on/off switch that can be used to enhance the UI experience.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak />
<LineBreak />
<Run>This feature is only available in the "Plus" version.</Run>
<LineBreak />
<Hyperlink NavigateUri="http://www.xceed.com/Extended_WPF_Toolkit_Intro.html" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Extended WPF Toolkit Plus.
</Hyperlink>
##END-->
</Paragraph>
</local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<conv:SolidColorBrushToColorConverter x:Key="SolidColorBrushToColorConverter" />
<conv:ThicknessToDoubleConverter x:Key="ThicknessToDoubleConverter" />
<conv:CornerRadiusToDoubleConverter x:Key="CornerRadiusToDoubleConverter" />
<LinearGradientBrush x:Key="customAccentBrush1"
EndPoint="0.5,1"
StartPoint="0.5,0">
<GradientStop Color="#FF0086c6"
Offset="0" />
<GradientStop Color="#FF66ccff"
Offset="0.94" />
<GradientStop Color="#FFddf4ff"
Offset="0.94" />
<GradientStop Color="#FFddf4ff"
Offset="0.97" />
<GradientStop Color="#FFddf4ff"
Offset="1" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="customAccentBrush2"
EndPoint="0.5,1"
StartPoint="0.5,0">
<GradientStop Color="#FFff0099"
Offset="0" />
<GradientStop Color="#FF993366"
Offset="1" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="customAccentBrush3"
EndPoint="0.5,1"
StartPoint="0.5,0">
<GradientStop Color="#FF9DE214"
Offset="0" />
<GradientStop Color="#FF9DE214"
Offset="0.2" />
<GradientStop Color="#FF95CA2A"
Offset="0.2" />
<GradientStop Color="#FF339933"
Offset="1" />
</LinearGradientBrush>
<Style x:Key="MetroSampleRadioButtonTemplate" TargetType="RadioButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.2" />
<VisualTransition From="Normal"
GeneratedDuration="0"
To="Pressed">
<Storyboard>
<DoubleAnimation Duration="0"
To="0.45"
Storyboard.TargetProperty="(UIElement.Opacity)"
Storyboard.TargetName="rectangle" />
</Storyboard>
</VisualTransition>
</VisualStateGroup.Transitions>
<VisualState x:Name="Normal" />
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Duration="0"
To="0.35"
Storyboard.TargetProperty="(UIElement.Opacity)"
Storyboard.TargetName="rectangle" />
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<DoubleAnimation Duration="0"
To="0.35"
Storyboard.TargetProperty="(UIElement.Opacity)"
Storyboard.TargetName="rectangle" />
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Duration="0"
To=".2"
Storyboard.TargetProperty="(UIElement.Opacity)"
Storyboard.TargetName="content" />
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="CheckStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.2" />
</VisualStateGroup.Transitions>
<VisualState x:Name="Checked">
<Storyboard>
<DoubleAnimation Duration="0"
To="1"
Storyboard.TargetProperty="(UIElement.Opacity)"
Storyboard.TargetName="CheckIcon" />
</Storyboard>
</VisualState>
<VisualState x:Name="Unchecked" />
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Rectangle x:Name="content"
Width="20"
Height="20"
Fill="{TemplateBinding Background}" />
<Path x:Name="CheckIcon"
Data="M 619,736 C619,736 617,738 617,738 617,738 621,742 621,742 621,742 629,732 629,732 629,732 627,730 627,730 627,730 621,738 621,738 621,738 619,736 619,736 z"
Fill="White"
FlowDirection="LeftToRight"
Opacity="0"
Stretch="Fill"
UseLayoutRounding="False"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Width="12"
Height="12"
Margin="0,0,1,1" />
<Rectangle x:Name="rectangle"
Fill="White"
Opacity="0" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</local:DemoView.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox Header="Features"
Margin="5">
<GroupBox.Resources>
<Style TargetType="TextBlock">
<Setter Property="Width" Value="125" />
<Setter Property="Margin" Value="0,5,0,5" />
</Style>
<Style x:Key="SubHeader" TargetType="TextBlock">
<Setter Property="Margin" Value="0,10,0,0" />
<Setter Property="Foreground" Value="Orange" />
<Setter Property="TextElement.FontWeight" Value="Bold" />
</Style>
</GroupBox.Resources>
<Grid>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<!-- General Section -->
<StackPanel Grid.Column="0" Margin="5,0,0,0">
<StackPanel>
<TextBlock Text="Section: General" Style="{StaticResource SubHeader}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="IsChecked:" />
<CheckBox Width="80" Margin="0,5,0,0"
IsChecked="{Binding IsChecked, ElementName=_toggleSwitch}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="IsCheckedLeft:" />
<CheckBox Width="80" Margin="0,5,0,0"
IsChecked="{Binding IsCheckedLeft, ElementName=_toggleSwitch}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Width:" />
<xctk:DoubleUpDown Width="80" Margin="0,5,0,0" Minimum="50.0" Maximum="300.0" Increment="1.0"
Value="{Binding Width, ElementName=_toggleSwitch}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Height:" />
<xctk:DoubleUpDown Width="80" Margin="0,5,0,0" Minimum="20.0" Maximum="100.0" Increment="0.1" FormatString="N1"
Value="{Binding Height, ElementName=_toggleSwitch}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Corner Radius:" />
<xctk:DoubleUpDown Width="80" Margin="0,5,0,0" Minimum="0.0" Maximum="25.0"
Value="{Binding CornerRadius, ElementName=_toggleSwitch, Converter={StaticResource CornerRadiusToDoubleConverter}}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Outer Margin:" />
<xctk:DoubleUpDown Width="80" Margin="0,5,0,0" Minimum="0.0" Maximum="5.0"
Value="{Binding OuterMargin, ElementName=_toggleSwitch, Converter={StaticResource ThicknessToDoubleConverter}}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Inner Margin:" />
<xctk:DoubleUpDown Width="80" Margin="0,5,0,0" Minimum="0.0" Maximum="5.0"
Value="{Binding InnerMargin, ElementName=_toggleSwitch, Converter={StaticResource ThicknessToDoubleConverter}}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Border Thickness:" />
<xctk:DoubleUpDown Width="80" Margin="0,5,0,0" Minimum="0.0" Maximum="3.0"
Value="{Binding BorderThickness, ElementName=_toggleSwitch, Converter={StaticResource ThicknessToDoubleConverter}}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Border Brush:" />
<xctk:ColorPicker Width="80" Margin="0,5,0,0"
SelectedColor="{Binding BorderBrush, ElementName=_toggleSwitch, Converter={StaticResource SolidColorBrushToColorConverter}}" />
</StackPanel>
</StackPanel>
<!-- Checked/Unchecked Sections -->
<StackPanel Grid.Column="1" Margin="5,0,0,0">
<StackPanel>
<TextBlock Text="Section: Checked" Style="{StaticResource SubHeader}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Label:" />
<TextBox Width="80" Margin="0,5,0,0"
Text="{Binding CheckedLabel, ElementName=_toggleSwitch, UpdateSourceTrigger=PropertyChanged}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="ToolTip:" />
<TextBox Width="80" Margin="0,5,0,0"
Text="{Binding CheckedToolTip, ElementName=_toggleSwitch, UpdateSourceTrigger=PropertyChanged}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Foreground:" />
<xctk:ColorPicker Width="80" Margin="0,5,0,0"
SelectedColor="{Binding CheckedForeground, ElementName=_toggleSwitch, Converter={StaticResource SolidColorBrushToColorConverter}}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Background:" />
<xctk:ColorPicker Width="80" Margin="0,5,0,0"
SelectedColor="{Binding CheckedBackground, ElementName=_toggleSwitch, Converter={StaticResource SolidColorBrushToColorConverter}}" />
</StackPanel>
<StackPanel>
<TextBlock Text="Section: Unchecked" Style="{StaticResource SubHeader}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Label:" />
<TextBox Width="80" Margin="0,5,0,0"
Text="{Binding UncheckedLabel, ElementName=_toggleSwitch, UpdateSourceTrigger=PropertyChanged}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="ToolTip:" />
<TextBox Width="80" Margin="0,5,0,0"
Text="{Binding UncheckedToolTip, ElementName=_toggleSwitch, UpdateSourceTrigger=PropertyChanged}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Foreground:" />
<xctk:ColorPicker Width="80" Margin="0,5,0,0"
SelectedColor="{Binding UncheckedForeground, ElementName=_toggleSwitch, Converter={StaticResource SolidColorBrushToColorConverter}}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Background:" />
<xctk:ColorPicker Width="80" Margin="0,5,0,0"
SelectedColor="{Binding UncheckedBackground, ElementName=_toggleSwitch, Converter={StaticResource SolidColorBrushToColorConverter}}" />
</StackPanel>
</StackPanel>
<!-- Thumb -->
<StackPanel Grid.Column="2" Margin="5,0,0,0">
<StackPanel>
<TextBlock Text="Section: Thumb" Style="{StaticResource SubHeader}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Width (%):" />
<xctk:DoubleUpDown Width="80" Minimum="25" Maximum="50" Margin="0,5,0,0"
Value="{Binding ThumbWidth, ElementName=_toggleSwitch}"
ToolTip="Gets/Sets the Width of the Thumb (as a percentage of the total width of the ToggleSwitch)" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Elasticity:" />
<xctk:DoubleUpDown Width="80" Minimum="10" Maximum="90" Margin="0,5,0,0"
Value="{Binding ThumbElasticity, ElementName=_toggleSwitch}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Right Content:" />
<TextBox Width="80" Margin="0,5,0,0"
Text="{Binding ThumbRightContent, ElementName=_toggleSwitch, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Left Content:" />
<TextBox Width="80" Margin="0,5,0,0"
Text="{Binding ThumbLeftContent, ElementName=_toggleSwitch, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Border Thickness:" />
<xctk:DoubleUpDown Width="80" Margin="0,5,0,0" Minimum="0.0" Maximum="3.0"
Value="{Binding ThumbBorderThickness, ElementName=_toggleSwitch, Converter={StaticResource ThicknessToDoubleConverter}}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Border Brush:" />
<xctk:ColorPicker Width="80" Margin="0,5,0,0"
SelectedColor="{Binding ThumbBorderBrush, ElementName=_toggleSwitch, Converter={StaticResource SolidColorBrushToColorConverter}}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Foreground:" />
<xctk:ColorPicker Width="80" Margin="0,5,0,0"
SelectedColor="{Binding ThumbForeground, ElementName=_toggleSwitch, Converter={StaticResource SolidColorBrushToColorConverter}}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Background:" />
<xctk:ColorPicker Width="80" Margin="0,5,0,0"
SelectedColor="{Binding ThumbBackground, ElementName=_toggleSwitch, Converter={StaticResource SolidColorBrushToColorConverter}}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Hover Background:" />
<xctk:ColorPicker Width="80" Margin="0,5,0,0"
SelectedColor="{Binding ThumbHoverBackground, ElementName=_toggleSwitch, Converter={StaticResource SolidColorBrushToColorConverter}}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Pressed Background:" />
<xctk:ColorPicker Width="80" Margin="0,5,0,0"
SelectedColor="{Binding ThumbPressedBackground, ElementName=_toggleSwitch, Converter={StaticResource SolidColorBrushToColorConverter}}" />
</StackPanel>
</StackPanel>
</Grid>
</Grid>
</GroupBox>
<StackPanel x:Name="_samplePanel"
Grid.Row="1"
Margin="10">
<TextBlock Text="Usage:"
Margin="10"
Style="{StaticResource Header}" />
<xctk:ToggleSwitch x:Name="_toggleSwitch"
Width="80.0"
Height="25.5"
Margin="10"
HorizontalAlignment="Left" />
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\ToggleSwitch.png" Width="200" Height="160"/>
##END-->
</local:DemoView>

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

@ -529,8 +529,7 @@
<core:LiveExplorerTreeViewItem Header="DateTime"
SampleType="{x:Type samples:DateTime.Views.DateTimeView}" />
<core:LiveExplorerTreeViewItem Header="TimeSpan"
SampleType="{x:Type samples:TimeSpan.Views.TimeSpanView}"
IsNewFeature="True"/>
SampleType="{x:Type samples:TimeSpan.Views.TimeSpanView}"/>
<core:LiveExplorerTreeViewItem Header="Color"
SampleType="{x:Type samples:Color.Views.ColorView}" />
<core:LiveExplorerTreeViewItem Header="Text"
@ -548,12 +547,14 @@
SampleType="{x:Type samples:Text.Views.WatermarkTextboxView}" />
</core:LiveExplorerTreeViewItem>
<core:LiveExplorerTreeViewItem Header="RangeSlider"
SampleType="{x:Type samples:RangeSlider.Views.RangeSliderView}"
IsNewFeature="True"/>
SampleType="{x:Type samples:RangeSlider.Views.RangeSliderView}"/>
<core:LiveExplorerTreeViewItem Header="Rating"
SampleType="{x:Type samples:Rating.Views.RatingView}"
IsNewFeature="True"
IsPlusOnlyFeature="True"/>
<core:LiveExplorerTreeViewItem Header="ToggleSwitch"
SampleType="{x:Type samples:ToggleSwitch.Views.ToggleSwitchView}"
IsNewFeature="True"
IsPlusOnlyFeature="True" />
<core:LiveExplorerTreeViewItem Header="Enumeration"
SampleType="{x:Type samples:Button.Views.ButtonSpinnerView}" />
</core:LiveExplorerTreeViewItem>
@ -616,8 +617,7 @@
<core:LiveExplorerTreeViewItem Header="Gauge"
ItemContainerStyle="{StaticResource TreeViewItemStyle}"
SampleType="{x:Type samples:Gauge.Views.RadialGaugeView}"
IsPlusOnlyFeature="True"
IsNewFeature="True">
IsPlusOnlyFeature="True">
</core:LiveExplorerTreeViewItem>
</core:LiveExplorerTreeViewItem>
<core:LiveExplorerTreeViewItem Header="Other"

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.2.*" )]
[assembly: AssemblyFileVersion( "2.2.0.0" )]
[assembly: AssemblyVersion( "2.3.*" )]
[assembly: AssemblyFileVersion( "2.3.0.0" )]
#pragma warning disable 1699
[assembly: AssemblyDelaySign( false )]

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

@ -106,12 +106,12 @@
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
<value>2.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/DateTime/Views/DateTimeView.xaml

@ -67,6 +67,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
@ -87,6 +88,8 @@
<CheckBox x:Name="_clipValueToMinMax" Grid.Row="4" Grid.Column="1" IsChecked="False" VerticalAlignment="Center" Margin="5,5,25,5"/>
<TextBlock Text="TimePickerVisibility:" Grid.Row="5" Grid.Column="0" VerticalAlignment="Center"/>
<ComboBox x:Name="_timePickerVisibility" Grid.Row="5" Grid.Column="1" SelectedIndex="0" ItemsSource="{Binding Source={StaticResource enumVisibility}}" Width="190" Margin="5,5,25,5"/>
<TextBlock Text="TimePickerShowButtonSpinner:" Grid.Row="6" Grid.Column="0" VerticalAlignment="Center"/>
<CheckBox x:Name="_timePickerShowButtonSpinner" Grid.Row="6" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5,5,25,5"/>
<TextBlock Text="TimeFormat:" Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" />
<ComboBox x:Name="_timeFormat" Grid.Row="0" Grid.Column="3" SelectedIndex="1" ItemsSource="{Binding Source={StaticResource enumTimeFormatData}}" Width="190" Margin="5"/>
@ -116,6 +119,7 @@
AutoCloseCalendar="{Binding IsChecked, ElementName=_autoCloseCalendar}"
ClipValueToMinMax="{Binding IsChecked, ElementName=_clipValueToMinMax}"
TimePickerVisibility="{Binding Source={x:Reference _timePickerVisibility}, Path=SelectedItem}"
TimePickerShowButtonSpinner="{Binding IsChecked, ElementName=_timePickerShowButtonSpinner}"
Minimum="{Binding Value, ElementName=_minimum}"
Maximum="{Binding Value, ElementName=_maximum}"/>
</StackPanel>

1
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Numeric/Views/NumericView.xaml

@ -109,6 +109,7 @@
<!-- 1st column -->
<TextBlock Text="Mouse Wheel:" Grid.Row="0" VerticalAlignment="Center" />
<ComboBox Grid.Row="0" Grid.Column="1" SelectedItem="{Binding MouseWheelActiveTrigger, ElementName=_doubleUpDown}" Margin="5" VerticalAlignment="Center" >
<x:StaticExtension Member="xctk:MouseWheelActiveTrigger.Focused" />
<x:StaticExtension Member="xctk:MouseWheelActiveTrigger.FocusedMouseOver" />
<x:StaticExtension Member="xctk:MouseWheelActiveTrigger.MouseOver" />
<x:StaticExtension Member="xctk:MouseWheelActiveTrigger.Disabled" />

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/RangeSlider/Views/RangeSliderView.xaml

@ -439,7 +439,7 @@
<!-- //#TODODOC -->
<Paragraph FontSize="14"
FontFamily="Segoe">
The RangeSlider control let you sets a range with 2 slider thumbs. The lower limit is marked with the right side of the left thumb while the higher limit is marked with the left side of the right thumb.
The RangeSlider control lets you set a range with 2 slider thumbs. The lower limit is marked with the right side of the left thumb while the higher limit is marked with the left side of the right thumb.
</Paragraph>
</local:DemoView.Description>

1
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Theming/Views/ThemingExtendedToolkitView.xaml

@ -59,6 +59,7 @@
<Image Source="..\OpenSourceImages\ExtendedWPFToolkitControls.png" Width="700" Height="500"/>

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/OpenSourceImages/ToggleSwitch.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

64
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Views/ToggleSwitchView.xaml

@ -0,0 +1,64 @@
<!--*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2014 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
***********************************************************************************-->
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.ToggleSwitch.Views.ToggleSwitchView"
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:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters;assembly=Xceed.Wpf.Toolkit"
Title="ToggleSwitch">
<local:DemoView.Description>
<!-- //#TODODOC-->
<Paragraph FontSize="14"
FontFamily="Segoe">
<Run>The ToggleSwitch control is a fully customizable on/off switch that can be used to enhance the UI experience.</Run>
<LineBreak />
<LineBreak />
<Run>This feature is only available in the "Plus" version.</Run>
<LineBreak />
<Hyperlink NavigateUri="http://www.xceed.com/Extended_WPF_Toolkit_Intro.html" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Extended WPF Toolkit Plus.
</Hyperlink>
</Paragraph>
</local:DemoView.Description>
<Image Source="..\OpenSourceImages\ToggleSwitch.png" Width="200" Height="160"/>
</local:DemoView>

38
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/ToggleSwitch/Views/ToggleSwitchView.xaml.cs

@ -0,0 +1,38 @@
/*************************************************************************************
Extended WPF Toolkit
Copyright (C) 2007-2014 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.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows.Controls;
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Documents;
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.ToggleSwitch.Views
{
/// <summary>
/// Interaction logic for ToggleSwitchView.xaml
/// </summary>
public partial class ToggleSwitchView : DemoView
{
public ToggleSwitchView()
{
InitializeComponent();
}
}
}

16
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Xceed.Wpf.Toolkit.LiveExplorer.csproj

@ -320,6 +320,9 @@
<Compile Include="Samples\TimeSpan\Views\TimeSpanView.xaml.cs">
<DependentUpon>TimeSpanView.xaml</DependentUpon>
</Compile>
<Compile Include="Samples\ToggleSwitch\Views\ToggleSwitchView.xaml.cs">
<DependentUpon>ToggleSwitchView.xaml</DependentUpon>
</Compile>
<Compile Include="Samples\Window\Converters\IntToBoolConverter.cs" />
<Compile Include="Samples\Window\Converters\WindowStateToBoolConverter.cs" />
<Compile Include="Samples\Window\Resources\WindowModelEditor.xaml.cs">
@ -623,6 +626,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Samples\ToggleSwitch\Views\ToggleSwitchView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Samples\Window\Resources\FancyStyles.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@ -1030,13 +1037,20 @@
<Resource Include="CodeFiles\TimeSpanView.xaml.cs.txt" />
<Resource Include="CodeFiles\TimeSpanView.xaml.txt" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Resource Include="CodeFiles\ToggleSwitchView.xaml.cs.txt" />
<Resource Include="CodeFiles\ToggleSwitchView.xaml.txt" />
</ItemGroup>
<ItemGroup>
<Resource Include="Samples\Gauge\OpenSourceImages\Gauge.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Samples\Rating\OpenSourceImages\Rating.png" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Resource Include="Samples\ToggleSwitch\OpenSourceImages\ToggleSwitch.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>

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.2";
public const string BaseVersion = "2.3";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";

12
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs

@ -100,7 +100,12 @@ namespace Xceed.Wpf.Toolkit
if( newValue != null )
{
foreach( var item in newValue )
Items.Add( item );
{
if( item != null )
{
Items.Add( item );
}
}
}
}
@ -368,7 +373,10 @@ namespace Xceed.Wpf.Toolkit
if( ItemsSourceType != null )
{
ConstructorInfo constructor = ItemsSourceType.GetConstructor( Type.EmptyTypes );
list = ( IList )constructor.Invoke( null );
if( constructor != null )
{
list = ( IList )constructor.Invoke( null );
}
}
return list;

129
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlButton.cs

@ -0,0 +1,129 @@
/*************************************************************************************
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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
namespace Xceed.Wpf.Toolkit
{
public class CollectionControlButton : Button
{
#region Constructors
static CollectionControlButton()
{
DefaultStyleKeyProperty.OverrideMetadata( typeof( CollectionControlButton ), new FrameworkPropertyMetadata( typeof( CollectionControlButton ) ) );
}
public CollectionControlButton()
{
this.Click += this.CollectionControlButton_Click;
}
#endregion //Constructors
#region Properties
#region IsReadOnly Property
public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register( "IsReadOnly", typeof( bool ), typeof( CollectionControlButton ), new UIPropertyMetadata( false ) );
public bool IsReadOnly
{
get
{
return ( bool )GetValue( IsReadOnlyProperty );
}
set
{
SetValue( IsReadOnlyProperty, value );
}
}
#endregion //IsReadOnly
#region ItemsSource Property
public static readonly DependencyProperty ItemsSourceProperty = DependencyProperty.Register( "ItemsSource", typeof( IList ), typeof( CollectionControlButton ), new UIPropertyMetadata( null ) );
public IList ItemsSource
{
get
{
return ( IList )GetValue( ItemsSourceProperty );
}
set
{
SetValue( ItemsSourceProperty, value );
}
}
#endregion //ItemsSource
#region ItemsSourceType Property
public static readonly DependencyProperty ItemsSourceTypeProperty = DependencyProperty.Register( "ItemsSourceType", typeof( Type ), typeof( CollectionControlButton ), new UIPropertyMetadata( null ) );
public Type ItemsSourceType
{
get
{
return ( Type )GetValue( ItemsSourceTypeProperty );
}
set
{
SetValue( ItemsSourceTypeProperty, value );
}
}
#endregion //ItemsSourceType
#region NewItemTypes Property
public static readonly DependencyProperty NewItemTypesProperty = DependencyProperty.Register( "NewItemTypes", typeof( IList ), typeof( CollectionControlButton ), new UIPropertyMetadata( null ) );
public IList<Type> NewItemTypes
{
get
{
return ( IList<Type> )GetValue( NewItemTypesProperty );
}
set
{
SetValue( NewItemTypesProperty, value );
}
}
#endregion //NewItemTypes
#endregion
#region Methods
private void CollectionControlButton_Click( object sender, RoutedEventArgs e )
{
CollectionControlDialog collectionControlDialog = new CollectionControlDialog();
collectionControlDialog.ItemsSource = this.ItemsSource;
collectionControlDialog.NewItemTypes = this.NewItemTypes;
collectionControlDialog.ItemsSourceType = this.ItemsSourceType;
collectionControlDialog.IsReadOnly = this.IsReadOnly;
collectionControlDialog.ShowDialog();
}
#endregion
}
}

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/PrimitiveTypeCollectionControl.cs

@ -94,7 +94,7 @@ namespace Xceed.Wpf.Toolkit
if( ItemsSourceType == null )
ItemsSourceType = newValue.GetType();
if( ItemType == null )
if( ItemType == null && newValue.GetType().ContainsGenericParameters )
ItemType = newValue.GetType().GetGenericArguments()[ 0 ];
SetText( newValue );

67
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Aero2.NormalColor.xaml

@ -20,6 +20,7 @@
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
xmlns:colconv="clr-namespace:Xceed.Wpf.Toolkit.Converters"
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"
xmlns:pg="clr-namespace:Xceed.Wpf.Toolkit.PropertyGrid">
<conv:InverseBoolConverter x:Key="InverseBoolConverter" />
@ -138,7 +139,7 @@
</Setter>
</Style>
<Style TargetType="{x:Type local:PrimitiveTypeCollectionControl}">
<Style x:Key="PrimitiveTypeCollectionControl" TargetType="{x:Type local:PrimitiveTypeCollectionControl}">
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ControlNormalBorderKey}}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="1,1,0,1" />
@ -176,4 +177,68 @@
</Setter>
</Style>
<Style TargetType="{x:Type local:PrimitiveTypeCollectionControl}" BasedOn="{StaticResource PrimitiveTypeCollectionControl}" />
<Style x:Key="CollectionControlButton" TargetType="{x:Type local:CollectionControlButton}">
<Setter Property="Background" Value="White" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="2,0,0,0" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Content" Value="(Collection)"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="MinHeight" Value="22"/>
<Setter Property="IsTabStop" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid SnapsToDevicePixels="True">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}"
SnapsToDevicePixels="True">
<ContentPresenter Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</Border>
<chrome:ButtonChrome x:Name="ToggleButtonChrome"
Grid.Column="1"
CornerRadius="0,2.75,2.75,0"
RenderEnabled="{Binding IsEnabled, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CollectionControlButton}}"
RenderMouseOver="{TemplateBinding IsMouseOver}">
<Grid x:Name="arrowGlyph" IsHitTestVisible="False" Grid.Column="1" Margin="5">
<Path x:Name="Arrow"
Width="7"
Height="4"
Data="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"
Fill="#FF000000" />
</Grid>
</chrome:ButtonChrome>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF" />
<Setter Property="Foreground" Value="Gray" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:CollectionControlButton}"
BasedOn="{StaticResource CollectionControlButton}" />
</ResourceDictionary>

84
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml

@ -19,6 +19,7 @@
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
xmlns:colconv="clr-namespace:Xceed.Wpf.Toolkit.Converters"
xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"
xmlns:pg="clr-namespace:Xceed.Wpf.Toolkit.PropertyGrid">
<conv:InverseBoolConverter x:Key="InverseBoolConverter" />
@ -137,7 +138,7 @@
</Setter>
</Style>
<Style TargetType="{x:Type local:PrimitiveTypeCollectionControl}">
<Style x:Key="PrimitiveTypeCollectionControl" TargetType="{x:Type local:PrimitiveTypeCollectionControl}">
<Setter Property="BorderBrush">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
@ -171,4 +172,85 @@
</Setter>
</Style>
<Style TargetType="{x:Type local:PrimitiveTypeCollectionControl}" BasedOn="{StaticResource PrimitiveTypeCollectionControl}" />
<Style x:Key="CollectionControlButton"
TargetType="{x:Type local:CollectionControlButton}">
<Setter Property="Background"
Value="White" />
<Setter Property="BorderThickness"
Value="0" />
<Setter Property="Padding"
Value="2,0,0,0" />
<Setter Property="HorizontalContentAlignment"
Value="Left" />
<Setter Property="VerticalContentAlignment"
Value="Center" />
<Setter Property="Content"
Value="(Collection)" />
<Setter Property="SnapsToDevicePixels"
Value="True" />
<Setter Property="MinHeight"
Value="22" />
<Setter Property="IsTabStop"
Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid SnapsToDevicePixels="True">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}"
SnapsToDevicePixels="True">
<ContentPresenter Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</Border>
<chrome:ButtonChrome x:Name="ToggleButtonChrome"
Grid.Column="1"
CornerRadius="0,2.75,2.75,0"
RenderEnabled="{Binding IsEnabled, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CollectionControlButton}}"
RenderMouseOver="{TemplateBinding IsMouseOver}">
<Grid x:Name="arrowGlyph"
IsHitTestVisible="False"
Grid.Column="1"
Margin="5">
<Path x:Name="Arrow"
Width="7"
Height="4"
Data="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"
Fill="#FF000000" />
</Grid>
</chrome:ButtonChrome>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Fill"
TargetName="Arrow"
Value="#AFAFAF" />
<Setter Property="Foreground"
Value="Gray" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:CollectionControlButton}"
BasedOn="{StaticResource CollectionControlButton}" />
</ResourceDictionary>

48
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/CornerRadiusToDoubleConverter.cs

@ -0,0 +1,48 @@
/*************************************************************************************
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.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows;
namespace Xceed.Wpf.Toolkit.Core.Converters
{
public class CornerRadiusToDoubleConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
double radius = 0.0;
if (value != null)
radius = ((CornerRadius)value).TopLeft;
return radius;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
double radius = 0.0;
if (value != null)
radius = (double)value;
return new CornerRadius(radius);
}
}
}

48
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessToDoubleConverter.cs

@ -0,0 +1,48 @@
/*************************************************************************************
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.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows;
namespace Xceed.Wpf.Toolkit.Core.Converters
{
public class ThicknessToDoubleConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
double thickness = 1.0;
if (value != null)
thickness = ((Thickness)value).Top;
return thickness;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
double thickness = 1.0;
if (value != null)
thickness = (double)value;
return new Thickness(thickness);
}
}
}

1
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/MouseWheelActiveTriggerEnum.cs

@ -26,6 +26,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
/// </summary>
public enum MouseWheelActiveTrigger
{
Focused,
FocusedMouseOver,
MouseOver,
Disabled

10
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/Selector.cs

@ -94,7 +94,15 @@ namespace Xceed.Wpf.Toolkit.Primitives
private static void OnDelimiterChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
{
( ( Selector )o ).UpdateSelectedValue();
( (Selector)o ).OnSelectedItemChanged( (string)e.OldValue, (string)e.NewValue );
}
protected virtual void OnSelectedItemChanged( string oldValue, string newValue )
{
if( !this.IsInitialized )
return;
this.UpdateSelectedValue();
}
#endregion

24
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/UpDownBase.cs

@ -47,6 +47,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
/// Flags if the Text and Value properties are in the process of being sync'd
/// </summary>
private bool _isSyncingTextAndValueProperties;
private bool _isSpinnerCaptured;
#endregion //Members
@ -375,6 +376,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
internal UpDownBase()
{
this.AddHandler( Mouse.PreviewMouseDownOutsideCapturedElementEvent, new RoutedEventHandler( this.HandleClickOutsideOfControl ), true );
}
#endregion //Constructors
@ -397,6 +399,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
if( TextBox != null )
{
TextBox.Text = Text;
TextBox.GotFocus += new RoutedEventHandler( TextBox_GotFocus );
TextBox.LostFocus += new RoutedEventHandler( TextBox_LostFocus );
TextBox.TextChanged += new TextChangedEventHandler( TextBox_TextChanged );
}
@ -452,14 +455,24 @@ namespace Xceed.Wpf.Toolkit.Primitives
#region Event Handlers
private void HandleClickOutsideOfControl( object sender, RoutedEventArgs e )
{
if( _isSpinnerCaptured )
{
this.Spinner.ReleaseMouseCapture();
_isSpinnerCaptured = false;
}
}
private void OnSpinnerSpin( object sender, SpinEventArgs e )
{
if( AllowSpin && !IsReadOnly )
{
var activeTrigger = this.MouseWheelActiveTrigger;
bool spin = !e.UsingMouseWheel;
spin |= (activeTrigger == MouseWheelActiveTrigger.MouseOver);
spin |= ( activeTrigger == MouseWheelActiveTrigger.MouseOver );
spin |= ( TextBox.IsFocused && ( activeTrigger == MouseWheelActiveTrigger.FocusedMouseOver ) );
spin |= ( TextBox.IsFocused && ( activeTrigger == MouseWheelActiveTrigger.Focused ) && (Mouse.Captured != null) );
if( spin )
{
@ -566,6 +579,15 @@ namespace Xceed.Wpf.Toolkit.Primitives
}
}
private void TextBox_GotFocus( object sender, RoutedEventArgs e )
{
if( ( this.MouseWheelActiveTrigger == Primitives.MouseWheelActiveTrigger.Focused ) && !_isSpinnerCaptured )
{
_isSpinnerCaptured = true;
Mouse.Capture( this.Spinner );
}
}
private void TextBox_LostFocus( object sender, RoutedEventArgs e )
{
CommitInput();

9
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Core/Primitives/WindowContainer.cs

@ -52,6 +52,10 @@ namespace Xceed.Wpf.Toolkit.Primitives
void WindowContainer_Loaded( object sender, RoutedEventArgs e )
{
foreach( WindowControl window in this.Children )
{
window.SetIsActiveInternal( false );
}
this.SetNextActiveWindow( null );
}
@ -309,7 +313,9 @@ namespace Xceed.Wpf.Toolkit.Primitives
if( ( windowControl.ActualWidth != 0 ) && ( windowControl.ActualHeight != 0 ) )
{
windowControl.Left = ( this.ActualWidth - windowControl.ActualWidth ) / 2.0;
windowControl.Left += (windowControl.Margin.Left - windowControl.Margin.Right);
windowControl.Top = ( this.ActualHeight - windowControl.ActualHeight ) / 2.0;
windowControl.Top += ( windowControl.Margin.Top - windowControl.Margin.Bottom );
}
}
@ -356,6 +362,9 @@ namespace Xceed.Wpf.Toolkit.Primitives
private void SetActiveWindow( WindowControl windowControl )
{
if( windowControl.IsActive )
return;
foreach( WindowControl window in this.Children )
{
window.SetIsActiveInternal( false );

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

@ -133,6 +133,40 @@ namespace Xceed.Wpf.Toolkit
#endregion //TimeFormatString
#region TimePickerAllowSpin
public static readonly DependencyProperty TimePickerAllowSpinProperty = DependencyProperty.Register( "TimePickerAllowSpin", typeof( bool ), typeof( DateTimePicker ), new UIPropertyMetadata( true ) );
public bool TimePickerAllowSpin
{
get
{
return (bool)GetValue( TimePickerAllowSpinProperty );
}
set
{
SetValue( TimePickerAllowSpinProperty, value );
}
}
#endregion //TimePickerAllowSpin
#region TimePickerShowButtonSpinner
public static readonly DependencyProperty TimePickerShowButtonSpinnerProperty = DependencyProperty.Register( "TimePickerShowButtonSpinner", typeof( bool ), typeof( DateTimePicker ), new UIPropertyMetadata( true ) );
public bool TimePickerShowButtonSpinner
{
get
{
return (bool)GetValue( TimePickerShowButtonSpinnerProperty );
}
set
{
SetValue( TimePickerShowButtonSpinnerProperty, value );
}
}
#endregion //TimePickerShowButtonSpinner
#region TimePickerVisibility
public static readonly DependencyProperty TimePickerVisibilityProperty = DependencyProperty.Register( "TimePickerVisibility", typeof( Visibility ), typeof( DateTimePicker ), new UIPropertyMetadata( Visibility.Visible ) );
@ -225,6 +259,7 @@ namespace Xceed.Wpf.Toolkit
_calendar.SelectedDatesChanged += Calendar_SelectedDatesChanged;
_calendar.SelectedDate = Value ?? null;
_calendar.DisplayDate = Value ?? DateTime.Now;
this.SetBlackOutDates();
}
_timePicker = GetTemplateChild( PART_TimeUpDown ) as TimePicker;
@ -261,6 +296,20 @@ namespace Xceed.Wpf.Toolkit
base.OnPreviewKeyDown( e );
}
protected override void OnMaximumChanged( DateTime? oldValue, DateTime? newValue )
{
base.OnMaximumChanged( oldValue, newValue );
this.SetBlackOutDates();
}
protected override void OnMinimumChanged( DateTime? oldValue, DateTime? newValue )
{
base.OnMinimumChanged( oldValue, newValue );
this.SetBlackOutDates();
}
#endregion //Base Class Overrides
#region Event Handlers
@ -361,6 +410,25 @@ namespace Xceed.Wpf.Toolkit
}
}
private void SetBlackOutDates()
{
if( _calendar != null )
{
_calendar.BlackoutDates.Clear();
if( ( this.Minimum != null ) && this.Minimum.HasValue && ( this.Minimum.Value != DateTime.MinValue ) )
{
DateTime minDate = this.Minimum.Value;
_calendar.BlackoutDates.Add( new CalendarDateRange( DateTime.MinValue, minDate.AddDays( -1 ) ) );
}
if( ( this.Maximum != null ) && this.Maximum.HasValue && ( this.Maximum.Value != DateTime.MaxValue ) )
{
DateTime maxDate = this.Maximum.Value;
_calendar.BlackoutDates.Add( new CalendarDateRange( maxDate.AddDays( 1 ), DateTime.MaxValue ) );
}
}
}
#endregion //Methods
}
}

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

@ -40,8 +40,8 @@
CornerRadius="0"
RenderChecked="{Binding IsOpen, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DateTimePicker}}"
RenderEnabled="{Binding IsEnabled, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DateTimePicker}}"
RenderMouseOver="{TemplateBinding IsMouseOver}"
RenderPressed="{TemplateBinding IsPressed}">
RenderMouseOver="{TemplateBinding IsMouseOver}"
RenderPressed="{TemplateBinding IsPressed}">
<Grid>
<Grid.ColumnDefinitions>
@ -134,17 +134,19 @@
<StackPanel>
<Calendar x:Name="PART_Calendar" BorderThickness="0" />
<local:TimePicker x:Name="PART_TimeUpDown"
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
Format="{TemplateBinding TimeFormat}"
FormatString="{TemplateBinding TimeFormatString}"
Value="{Binding Value, RelativeSource={RelativeSource TemplatedParent}}"
Minimum="{Binding Minimum, RelativeSource={RelativeSource TemplatedParent}}"
Maximum="{Binding Maximum, RelativeSource={RelativeSource TemplatedParent}}"
ClipValueToMinMax="{Binding ClipValueToMinMax, RelativeSource={RelativeSource TemplatedParent}}"
Watermark="{TemplateBinding TimeWatermark}"
WatermarkTemplate="{TemplateBinding TimeWatermarkTemplate}"
Visibility="{TemplateBinding TimePickerVisibility}"/>
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
Format="{TemplateBinding TimeFormat}"
FormatString="{TemplateBinding TimeFormatString}"
Value="{Binding Value, RelativeSource={RelativeSource TemplatedParent}}"
Minimum="{Binding Minimum, RelativeSource={RelativeSource TemplatedParent}}"
Maximum="{Binding Maximum, RelativeSource={RelativeSource TemplatedParent}}"
ClipValueToMinMax="{Binding ClipValueToMinMax, RelativeSource={RelativeSource TemplatedParent}}"
AllowSpin="{TemplateBinding TimePickerAllowSpin}"
ShowButtonSpinner="{TemplateBinding TimePickerShowButtonSpinner}"
Watermark="{TemplateBinding TimeWatermark}"
WatermarkTemplate="{TemplateBinding TimeWatermarkTemplate}"
Visibility="{TemplateBinding TimePickerVisibility}"/>
</StackPanel>
</Border>
</Popup>

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

@ -150,6 +150,8 @@
Minimum="{Binding Minimum, RelativeSource={RelativeSource TemplatedParent}}"
Maximum="{Binding Maximum, RelativeSource={RelativeSource TemplatedParent}}"
ClipValueToMinMax="{Binding ClipValueToMinMax, RelativeSource={RelativeSource TemplatedParent}}"
AllowSpin="{TemplateBinding TimePickerAllowSpin}"
ShowButtonSpinner="{TemplateBinding TimePickerShowButtonSpinner}"
Watermark="{TemplateBinding TimeWatermark}"
WatermarkTemplate="{TemplateBinding TimeWatermarkTemplate}"
Visibility="{TemplateBinding TimePickerVisibility}"/>

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

@ -134,7 +134,10 @@ namespace Xceed.Wpf.Toolkit
key = "Year";
value = currentDate.Year.ToString("D4");
}
dateParts.Add( key, value );
if( !dateParts.ContainsKey( key ) )
{
dateParts.Add( key, value );
}
} );
return dateParts;
}

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

@ -18,6 +18,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit">
<ResourceDictionary.MergedDictionaries>
@ -36,6 +37,8 @@
<Setter Property="IsTabStop" Value="False" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalBackgroundKey}}" />
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalOuterBorderKey}}" />
<Setter Property="Padding" Value="3" />
<Setter Property="Template">
<Setter.Value>
@ -52,6 +55,10 @@
</ToggleButton.Template>
<Grid>
<chrome:ButtonChrome x:Name="ToggleButtonChrome"
Background="{TemplateBinding Background}"
Foreground="{TemplateBinding Foreground}"
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}"
RenderChecked="{TemplateBinding IsOpen}"
RenderEnabled="{TemplateBinding IsEnabled}"
RenderMouseOver="{Binding IsMouseOver, ElementName=PART_DropDownButton}"

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

@ -18,6 +18,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit">
<conv:InverseBoolConverter x:Key="InverseBoolConverter" />
@ -43,6 +44,8 @@
<Setter Property="IsTabStop" Value="False" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalBackgroundKey}}" />
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalOuterBorderKey}}" />
<Setter Property="Padding" Value="3" />
<Setter Property="Template">
<Setter.Value>
@ -59,6 +62,10 @@
</ToggleButton.Template>
<Grid>
<chrome:ButtonChrome x:Name="ToggleButtonChrome"
Background="{TemplateBinding Background}"
Foreground="{TemplateBinding Foreground}"
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}"
CornerRadius="2.75"
RenderChecked="{TemplateBinding IsOpen}"
RenderEnabled="{TemplateBinding IsEnabled}"

12
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Attributes/ExpandableObjectAttribute.cs

@ -20,8 +20,20 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid.Attributes
{
public class ExpandableObjectAttribute : Attribute
{
#region Constructors
public ExpandableObjectAttribute()
{
}
#endregion
#region Properties
#endregion
}
}

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

@ -0,0 +1,58 @@
/*************************************************************************************
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.Linq;
using System.Text;
using System.Windows;
namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
public class CollectionEditor : TypeEditor<CollectionControlButton>
{
protected override void SetValueDependencyProperty()
{
ValueProperty = CollectionControlButton.ItemsSourceProperty;
}
protected override void ResolveValueBinding( PropertyItem propertyItem )
{
var type = propertyItem.PropertyType;
Editor.ItemsSourceType = type;
if( type.BaseType == typeof( System.Array ) )
{
Editor.NewItemTypes = new List<Type>() { type.GetElementType() };
}
else if( type.GetGenericArguments().Count() > 0 )
{
Editor.NewItemTypes = new List<Type>() { type.GetGenericArguments()[ 0 ] };
}
base.ResolveValueBinding( propertyItem );
}
}
public class PropertyGridEditorCollectionControl : CollectionControlButton
{
static PropertyGridEditorCollectionControl()
{
DefaultStyleKeyProperty.OverrideMetadata( typeof( PropertyGridEditorCollectionControl ), new FrameworkPropertyMetadata( typeof( PropertyGridEditorCollectionControl ) ) );
}
}
}

79
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml

@ -1,79 +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
**********************************************************************************-->
<UserControl x:Class="Xceed.Wpf.Toolkit.PropertyGrid.Editors.CollectionEditor"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes">
<UserControl.Resources>
<Style x:Key="ButtonStyle" TargetType="Button">
<Setter Property="Background" Value="White" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="2,0,0,0" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid SnapsToDevicePixels="True">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
<ContentPresenter Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</Border>
<chrome:ButtonChrome x:Name="ToggleButtonChrome"
Grid.Column="1"
CornerRadius="0,2.75,2.75,0"
RenderEnabled="{Binding IsEnabled, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}"
RenderMouseOver="{TemplateBinding IsMouseOver}">
<Grid x:Name="arrowGlyph" IsHitTestVisible="False" Grid.Column="1" Margin="5">
<Path x:Name="Arrow" Width="7" Height="4" Data="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" Fill="#FF000000" />
</Grid>
</chrome:ButtonChrome>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF" />
<Setter Property="Foreground" Value="Gray" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Button Grid.Column="1"
IsTabStop="True"
MinHeight="22"
SnapsToDevicePixels="True"
Content="(Collection)"
Style="{StaticResource ButtonStyle}"
Click="Button_Click" />
</UserControl>

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

@ -1,51 +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.Windows;
using System.Windows.Controls;
using System.Windows.Data;
namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
/// <summary>
/// Interaction logic for CollectionEditor.xaml
/// </summary>
public partial class CollectionEditor : UserControl, ITypeEditor
{
PropertyItem _item;
public CollectionEditor()
{
InitializeComponent();
}
private void Button_Click( object sender, RoutedEventArgs e )
{
CollectionControlDialog editor = new CollectionControlDialog( _item.PropertyType, _item.DescriptorDefinition.NewItemTypes );
Binding binding = new Binding( "Value" );
binding.Source = _item;
binding.Mode = _item.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay;
BindingOperations.SetBinding( editor, CollectionControlDialog.ItemsSourceProperty, binding );
editor.ShowDialog();
}
public FrameworkElement ResolveEditor( PropertyItem propertyItem )
{
_item = propertyItem;
return this;
}
}
}

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

@ -14,6 +14,7 @@
***********************************************************************************/
using System.Windows;
namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
public class PrimitiveTypeCollectionEditor : TypeEditor<PrimitiveTypeCollectionControl>
@ -38,7 +39,7 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
Editor.ItemType = type.GetElementType();
}
else
else if( type.ContainsGenericParameters )
{
Editor.ItemType = type.GetGenericArguments()[ 0 ];
}
@ -46,4 +47,12 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
base.ResolveValueBinding( propertyItem );
}
}
public class PropertyGridEditorPrimitiveTypeCollectionControl : PrimitiveTypeCollectionControl
{
static PropertyGridEditorPrimitiveTypeCollectionControl()
{
DefaultStyleKeyProperty.OverrideMetadata( typeof( PropertyGridEditorPrimitiveTypeCollectionControl ), new FrameworkPropertyMetadata( typeof( PropertyGridEditorPrimitiveTypeCollectionControl ) ) );
}
}
}

1
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/ObjectContainerHelper.cs

@ -93,7 +93,6 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
Debug.Assert( SelectedObject != null );
propertyItem.Instance = SelectedObject;
propertyItem.CategoryOrder = this.GetCategoryOrder( definition.CategoryValue );
return propertyItem;
}

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

@ -28,6 +28,7 @@ using Xceed.Wpf.Toolkit.PropertyGrid.Editors;
using System.Collections;
using System.Collections.ObjectModel;
using System.Windows.Controls.Primitives;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
namespace Xceed.Wpf.Toolkit.PropertyGrid
{
@ -256,6 +257,9 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
: null;
}
internal void InitializeDescriptorDefinition(
DescriptorPropertyDefinitionBase descriptorDef,
PropertyDefinition propertyDefinition )

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

@ -359,6 +359,10 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid
private void OnPropertyDefinitionsCollectionChanged( object sender, NotifyCollectionChangedEventArgs e )
{
_containerHelper.NotifyPropertyDefinitionsCollectionChanged();
if( this.IsLoaded )
{
this.UpdateContainerHelper();
}
}
#endregion //PropertyDefinitions

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

@ -33,7 +33,8 @@
<ResourceDictionary Source="../../TimeSpanUpDown/Themes/Aero2.NormalColor.xaml" />
<ResourceDictionary Source="../../WatermarkTextBox/Themes/Aero2.NormalColor.xaml" />
<ResourceDictionary Source="../../ColorPicker/Themes/Aero2.NormalColor.xaml" />
</ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../CollectionControl/Themes/Aero2.NormalColor.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- =============================================================================== -->
<!-- PropertyGrid -->
@ -223,6 +224,20 @@
</Style.Triggers>
</Style>
<!-- PropertyGrid PrimitiveTypeCollectionControl Editors -->
<Style TargetType="{x:Type editor:PropertyGridEditorPrimitiveTypeCollectionControl}"
BasedOn="{StaticResource PrimitiveTypeCollectionControl}" >
<Setter Property="BorderThickness"
Value="0" />
<Setter Property="Content"
Value="(Collection)" />
</Style>
<!-- PropertyGrid CollectionControl Editors -->
<Style TargetType="{x:Type editor:PropertyGridEditorCollectionControl}"
BasedOn="{StaticResource CollectionControlButton}">
</Style>
<!-- =============================================================================== -->
<!-- Style for all internal derived types of NumericUpDown will be done in code-behind -->
<!-- for external themes to redefine the default style. The reason is that the -->
@ -501,6 +516,8 @@
Value="Center" />
<Setter Property="SnapsToDevicePixels"
Value="True" />
<Setter Property="IsTabStop"
Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type pg:PropertyItemBase}">

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

@ -30,8 +30,9 @@
<ResourceDictionary Source="../../DateTimeUpDown/Themes/Generic.xaml" />
<ResourceDictionary Source="../../TimeSpanUpDown/Themes/Generic.xaml" />
<ResourceDictionary Source="../../WatermarkTextBox/Themes/Generic.xaml" />
<ResourceDictionary Source="../../ColorPicker/Themes/Generic.xaml" />
</ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../ColorPicker/Themes/Generic.xaml" />
<ResourceDictionary Source="../../CollectionControl/Themes/Generic.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- =============================================================================== -->
<!-- PropertyGrid -->
@ -220,6 +221,20 @@
</Style.Triggers>
</Style>
<!-- PropertyGrid PrimitiveTypeCollectionControl Editors -->
<Style TargetType="{x:Type editor:PropertyGridEditorPrimitiveTypeCollectionControl}"
BasedOn="{StaticResource PrimitiveTypeCollectionControl}" >
<Setter Property="BorderThickness"
Value="0" />
<Setter Property="Content"
Value="(Collection)" />
</Style>
<!-- PropertyGrid CollectionControl Editors -->
<Style TargetType="{x:Type editor:PropertyGridEditorCollectionControl}"
BasedOn="{StaticResource CollectionControlButton}">
</Style>
<!-- =============================================================================== -->
<!-- Style for all internal derived types of NumericUpDown will be done in code-behind -->
<!-- for external themes to redefine the default style. The reason is that the -->
@ -554,6 +569,7 @@
<Setter Property="Margin" Value="0,0,0,1" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type pg:PropertyItemBase}">

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

@ -361,7 +361,15 @@ namespace Xceed.Wpf.Toolkit
if( ( value == null ) || ( Target == null ) || ( Target.Selection == null ) )
return;
Target.Selection.ApplyPropertyValue( formattingProperty, value );
SolidColorBrush solidColorBrush = value as SolidColorBrush;
if( ( solidColorBrush != null ) && solidColorBrush.Color.Equals( Colors.Transparent ) )
{
Target.Selection.ApplyPropertyValue( formattingProperty, null );
}
else
{
Target.Selection.ApplyPropertyValue( formattingProperty, value );
}
}
private void ProcessMove( DragDeltaEventArgs e )

20
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/SplitButton/Themes/Aero2.NormalColor.xaml

@ -38,6 +38,7 @@
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalBackgroundKey}}" />
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalOuterBorderKey}}" />
<Setter Property="Padding" Value="3" />
<Setter Property="Template">
<Setter.Value>
@ -58,19 +59,21 @@
<Grid>
<chrome:ButtonChrome x:Name="ActionButtonChrome"
Background="{TemplateBinding Background}"
Foreground="{TemplateBinding Foreground}"
BorderThickness="1,1,0,1"
BorderBrush="{TemplateBinding BorderBrush}"
RenderEnabled="{TemplateBinding IsEnabled}"
RenderMouseOver="{Binding IsMouseOver, ElementName=PART_ActionButton}"
RenderPressed="{Binding IsPressed, ElementName=PART_ActionButton}">
RenderMouseOver="{Binding IsMouseOver, ElementName=PART_ActionButton}"
RenderPressed="{Binding IsPressed, ElementName=PART_ActionButton}">
<ContentPresenter Name="ActionButtonContent" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="true" />
</chrome:ButtonChrome>
</Grid>
</Button>
<ToggleButton x:Name="PART_ToggleButton"
Grid.Column="1"
IsTabStop="False"
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}">
Grid.Column="1"
IsTabStop="False"
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}">
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<ContentPresenter />
@ -79,11 +82,12 @@
<Grid>
<chrome:ButtonChrome x:Name="ToggleButtonChrome"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
Padding="1,0,1,0"
RenderChecked="{TemplateBinding IsOpen}"
RenderEnabled="{TemplateBinding IsEnabled}"
RenderMouseOver="{Binding IsMouseOver, ElementName=PART_ToggleButton}"
RenderPressed="{Binding IsPressed, ElementName=PART_ToggleButton}">
RenderMouseOver="{Binding IsMouseOver, ElementName=PART_ToggleButton}"
RenderPressed="{Binding IsPressed, ElementName=PART_ToggleButton}">
<Grid x:Name="arrowGlyph" IsHitTestVisible="False" Margin="4,3,4,3">
<Path x:Name="Arrow" Width="7" Height="4" Data="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" Fill="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
</Grid>

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

@ -49,6 +49,7 @@
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalBackgroundKey}}" />
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalOuterBorderKey}}" />
<Setter Property="Padding" Value="3" />
<Setter Property="Template">
<Setter.Value>
@ -68,7 +69,10 @@
</Button.Template>
<Grid>
<chrome:ButtonChrome x:Name="ActionButtonChrome"
Background="{TemplateBinding Background}"
Foreground="{TemplateBinding Foreground}"
BorderThickness="1,1,0,1"
BorderBrush="{TemplateBinding BorderBrush}"
CornerRadius="2.75, 0, 0, 2.75"
RenderEnabled="{TemplateBinding IsEnabled}"
RenderMouseOver="{Binding IsMouseOver, ElementName=PART_ActionButton}"
@ -89,6 +93,8 @@
</ToggleButton.Template>
<Grid>
<chrome:ButtonChrome x:Name="ToggleButtonChrome"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
Padding="1,0,1,0"
CornerRadius="0, 2.75, 2.75, 0"
RenderChecked="{TemplateBinding IsOpen}"

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

@ -221,10 +221,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="PropertyGrid\Implementation\Editors\CollectionEditor.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="PropertyGrid\Themes\Aero2.NormalColor.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@ -392,6 +388,7 @@
<Compile Include="Chromes\Implementation\ButtonChrome.cs" />
<Compile Include="CheckComboBox\Implementation\CheckComboBox.cs" />
<Compile Include="CollectionControl\Implementation\CollectionControl.cs" />
<Compile Include="CollectionControl\Implementation\CollectionControlButton.cs" />
<Compile Include="CollectionControl\Implementation\CollectionControlDialog.xaml.cs">
<DependentUpon>CollectionControlDialog.xaml</DependentUpon>
</Compile>
@ -404,7 +401,10 @@
<Compile Include="Core\CancelRoutedEventArgs.cs" />
<Compile Include="Core\Converters\CenterTitleConverter.cs" />
<Compile Include="Core\Converters\ColorBlendConverter.cs" />
<Compile Include="Core\Converters\CornerRadiusToDoubleConverter.cs" />
<Compile Include="Core\Converters\IntToThicknessConverter.cs" />
<Compile Include="Core\Converters\ThicknessToDoubleConverter.cs" />
<Compile Include="PropertyGrid\Implementation\Editors\CollectionEditor.cs" />
<Compile Include="Core\Converters\WindowContentBorderMarginConverter.cs" />
<Compile Include="Core\Converters\WindowControlBackgroundConverter.cs" />
<Compile Include="Core\Input\IValidateInput.cs" />
@ -565,9 +565,6 @@
<Compile Include="PropertyGrid\Implementation\ObjectContainerHelperBase.cs" />
<Compile Include="PropertyGrid\Implementation\DescriptorPropertyDefinitionBase.cs" />
<Compile Include="PropertyGrid\Implementation\Editors\CheckBoxEditor.cs" />
<Compile Include="PropertyGrid\Implementation\Editors\CollectionEditor.xaml.cs">
<DependentUpon>CollectionEditor.xaml</DependentUpon>
</Compile>
<Compile Include="PropertyGrid\Implementation\Editors\ColorEditor.cs" />
<Compile Include="PropertyGrid\Implementation\Editors\ComboBoxEditor.cs" />
<Compile Include="PropertyGrid\Implementation\EditorDefinition.cs" />

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

@ -3315,6 +3315,9 @@ namespace Xceed.Wpf.Toolkit.Zoombox
if( _content == null )
return;
if( double.IsNaN( scale ) )
return;
// if necessary, verify that the relativeTo point falls within the content
if( restrictRelativePointToContent && !( new Rect( _content.RenderSize ) ).Contains( relativeTo ) )
return;

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.2";
public const string BaseVersion = "2.3";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion +
".0.0";

12
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs

@ -100,7 +100,12 @@ namespace Xceed.Wpf.Toolkit
if( newValue != null )
{
foreach( var item in newValue )
Items.Add( item );
{
if( item != null )
{
Items.Add( item );
}
}
}
}
@ -368,7 +373,10 @@ namespace Xceed.Wpf.Toolkit
if( ItemsSourceType != null )
{
ConstructorInfo constructor = ItemsSourceType.GetConstructor( Type.EmptyTypes );
list = ( IList )constructor.Invoke( null );
if( constructor != null )
{
list = ( IList )constructor.Invoke( null );
}
}
return list;

129
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlButton.cs

@ -0,0 +1,129 @@
/*************************************************************************************
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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
namespace Xceed.Wpf.Toolkit
{
public class CollectionControlButton : Button
{
#region Constructors
static CollectionControlButton()
{
DefaultStyleKeyProperty.OverrideMetadata( typeof( CollectionControlButton ), new FrameworkPropertyMetadata( typeof( CollectionControlButton ) ) );
}
public CollectionControlButton()
{
this.Click += this.CollectionControlButton_Click;
}
#endregion //Constructors
#region Properties
#region IsReadOnly Property
public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register( "IsReadOnly", typeof( bool ), typeof( CollectionControlButton ), new UIPropertyMetadata( false ) );
public bool IsReadOnly
{
get
{
return ( bool )GetValue( IsReadOnlyProperty );
}
set
{
SetValue( IsReadOnlyProperty, value );
}
}
#endregion //IsReadOnly
#region ItemsSource Property
public static readonly DependencyProperty ItemsSourceProperty = DependencyProperty.Register( "ItemsSource", typeof( IList ), typeof( CollectionControlButton ), new UIPropertyMetadata( null ) );
public IList ItemsSource
{
get
{
return ( IList )GetValue( ItemsSourceProperty );
}
set
{
SetValue( ItemsSourceProperty, value );
}
}
#endregion //ItemsSource
#region ItemsSourceType Property
public static readonly DependencyProperty ItemsSourceTypeProperty = DependencyProperty.Register( "ItemsSourceType", typeof( Type ), typeof( CollectionControlButton ), new UIPropertyMetadata( null ) );
public Type ItemsSourceType
{
get
{
return ( Type )GetValue( ItemsSourceTypeProperty );
}
set
{
SetValue( ItemsSourceTypeProperty, value );
}
}
#endregion //ItemsSourceType
#region NewItemTypes Property
public static readonly DependencyProperty NewItemTypesProperty = DependencyProperty.Register( "NewItemTypes", typeof( IList ), typeof( CollectionControlButton ), new UIPropertyMetadata( null ) );
public IList<Type> NewItemTypes
{
get
{
return ( IList<Type> )GetValue( NewItemTypesProperty );
}
set
{
SetValue( NewItemTypesProperty, value );
}
}
#endregion //NewItemTypes
#endregion
#region Methods
private void CollectionControlButton_Click( object sender, RoutedEventArgs e )
{
CollectionControlDialog collectionControlDialog = new CollectionControlDialog();
collectionControlDialog.ItemsSource = this.ItemsSource;
collectionControlDialog.NewItemTypes = this.NewItemTypes;
collectionControlDialog.ItemsSourceType = this.ItemsSourceType;
collectionControlDialog.IsReadOnly = this.IsReadOnly;
collectionControlDialog.ShowDialog();
}
#endregion
}
}

11
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/PrimitiveTypeCollectionControl.cs

@ -94,7 +94,7 @@ namespace Xceed.Wpf.Toolkit
if( ItemsSourceType == null )
ItemsSourceType = newValue.GetType();
if( ItemType == null )
if( ItemType == null && newValue.GetType().ContainsGenericParameters )
ItemType = newValue.GetType().GetGenericArguments()[ 0 ];
SetText( newValue );
@ -234,7 +234,14 @@ namespace Xceed.Wpf.Toolkit
object value = null;
try
{
value = Convert.ChangeType( valueString, ItemType );
if( ItemType.IsEnum )
{
value = Enum.Parse( ItemType, valueString );
}
else
{
value = Convert.ChangeType( valueString, ItemType );
}
}
catch
{

67
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Aero2.NormalColor.xaml

@ -20,6 +20,7 @@
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
xmlns:colconv="clr-namespace:Xceed.Wpf.Toolkit.Converters"
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"
xmlns:pg="clr-namespace:Xceed.Wpf.Toolkit.PropertyGrid">
<conv:InverseBoolConverter x:Key="InverseBoolConverter" />
@ -138,7 +139,7 @@
</Setter>
</Style>
<Style TargetType="{x:Type local:PrimitiveTypeCollectionControl}">
<Style x:Key="PrimitiveTypeCollectionControl" TargetType="{x:Type local:PrimitiveTypeCollectionControl}">
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ControlNormalBorderKey}}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="1,1,0,1" />
@ -176,4 +177,68 @@
</Setter>
</Style>
<Style TargetType="{x:Type local:PrimitiveTypeCollectionControl}" BasedOn="{StaticResource PrimitiveTypeCollectionControl}" />
<Style x:Key="CollectionControlButton" TargetType="{x:Type local:CollectionControlButton}">
<Setter Property="Background" Value="White" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="2,0,0,0" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Content" Value="(Collection)"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="MinHeight" Value="22"/>
<Setter Property="IsTabStop" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid SnapsToDevicePixels="True">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}"
SnapsToDevicePixels="True">
<ContentPresenter Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</Border>
<chrome:ButtonChrome x:Name="ToggleButtonChrome"
Grid.Column="1"
CornerRadius="0,2.75,2.75,0"
RenderEnabled="{Binding IsEnabled, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CollectionControlButton}}"
RenderMouseOver="{TemplateBinding IsMouseOver}">
<Grid x:Name="arrowGlyph" IsHitTestVisible="False" Grid.Column="1" Margin="5">
<Path x:Name="Arrow"
Width="7"
Height="4"
Data="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"
Fill="#FF000000" />
</Grid>
</chrome:ButtonChrome>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF" />
<Setter Property="Foreground" Value="Gray" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:CollectionControlButton}"
BasedOn="{StaticResource CollectionControlButton}" />
</ResourceDictionary>

84
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/CollectionControl/Themes/Generic.xaml

@ -19,6 +19,7 @@
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
xmlns:colconv="clr-namespace:Xceed.Wpf.Toolkit.Converters"
xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"
xmlns:pg="clr-namespace:Xceed.Wpf.Toolkit.PropertyGrid">
<conv:InverseBoolConverter x:Key="InverseBoolConverter" />
@ -137,7 +138,7 @@
</Setter>
</Style>
<Style TargetType="{x:Type local:PrimitiveTypeCollectionControl}">
<Style x:Key="PrimitiveTypeCollectionControl" TargetType="{x:Type local:PrimitiveTypeCollectionControl}">
<Setter Property="BorderBrush">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
@ -171,4 +172,85 @@
</Setter>
</Style>
<Style TargetType="{x:Type local:PrimitiveTypeCollectionControl}" BasedOn="{StaticResource PrimitiveTypeCollectionControl}" />
<Style x:Key="CollectionControlButton"
TargetType="{x:Type local:CollectionControlButton}">
<Setter Property="Background"
Value="White" />
<Setter Property="BorderThickness"
Value="0" />
<Setter Property="Padding"
Value="2,0,0,0" />
<Setter Property="HorizontalContentAlignment"
Value="Left" />
<Setter Property="VerticalContentAlignment"
Value="Center" />
<Setter Property="Content"
Value="(Collection)" />
<Setter Property="SnapsToDevicePixels"
Value="True" />
<Setter Property="MinHeight"
Value="22" />
<Setter Property="IsTabStop"
Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid SnapsToDevicePixels="True">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}"
SnapsToDevicePixels="True">
<ContentPresenter Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</Border>
<chrome:ButtonChrome x:Name="ToggleButtonChrome"
Grid.Column="1"
CornerRadius="0,2.75,2.75,0"
RenderEnabled="{Binding IsEnabled, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CollectionControlButton}}"
RenderMouseOver="{TemplateBinding IsMouseOver}">
<Grid x:Name="arrowGlyph"
IsHitTestVisible="False"
Grid.Column="1"
Margin="5">
<Path x:Name="Arrow"
Width="7"
Height="4"
Data="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"
Fill="#FF000000" />
</Grid>
</chrome:ButtonChrome>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Fill"
TargetName="Arrow"
Value="#AFAFAF" />
<Setter Property="Foreground"
Value="Gray" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:CollectionControlButton}"
BasedOn="{StaticResource CollectionControlButton}" />
</ResourceDictionary>

5
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Aero2.NormalColor.xaml

@ -255,7 +255,10 @@
SelectedColor="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}}" />
</Grid>
<Separator Grid.Row="1" HorizontalAlignment="Stretch" Margin="5,0,5,0" />
<Separator Grid.Row="1"
HorizontalAlignment="Stretch"
Margin="5,0,5,0"
Visibility="{TemplateBinding ShowAdvancedButton, Converter={StaticResource BooleanToVisibilityConverter}}" />
<!-- More Colors Button -->
<Button x:Name="PART_ColorModeButton" Grid.Row="2" Margin="5" Visibility="{TemplateBinding ShowAdvancedButton, Converter={StaticResource BooleanToVisibilityConverter}}" />

5
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/ColorPicker/Themes/Generic.xaml

@ -275,7 +275,10 @@
SelectedColor="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}}" />
</Grid>
<Separator Grid.Row="1" HorizontalAlignment="Stretch" Margin="5,0,5,0" />
<Separator Grid.Row="1"
HorizontalAlignment="Stretch"
Margin="5,0,5,0"
Visibility="{TemplateBinding ShowAdvancedButton, Converter={StaticResource BooleanToVisibilityConverter}}" />
<!-- More Colors Button -->
<Button x:Name="PART_ColorModeButton" Grid.Row="2" Margin="5" Visibility="{TemplateBinding ShowAdvancedButton, Converter={StaticResource BooleanToVisibilityConverter}}" />

48
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/CornerRadiusToDoubleConverter.cs

@ -0,0 +1,48 @@
/*************************************************************************************
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.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows;
namespace Xceed.Wpf.Toolkit.Core.Converters
{
public class CornerRadiusToDoubleConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
double radius = 0.0;
if (value != null)
radius = ((CornerRadius)value).TopLeft;
return radius;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
double radius = 0.0;
if (value != null)
radius = (double)value;
return new CornerRadius(radius);
}
}
}

48
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Converters/ThicknessToDoubleConverter.cs

@ -0,0 +1,48 @@
/*************************************************************************************
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.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows;
namespace Xceed.Wpf.Toolkit.Core.Converters
{
public class ThicknessToDoubleConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
double thickness = 1.0;
if (value != null)
thickness = ((Thickness)value).Top;
return thickness;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
double thickness = 1.0;
if (value != null)
thickness = (double)value;
return new Thickness(thickness);
}
}
}

1
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/MouseWheelActiveTriggerEnum.cs

@ -26,6 +26,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
/// </summary>
public enum MouseWheelActiveTrigger
{
Focused,
FocusedMouseOver,
MouseOver,
Disabled

10
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/Selector.cs

@ -94,7 +94,15 @@ namespace Xceed.Wpf.Toolkit.Primitives
private static void OnDelimiterChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
{
( ( Selector )o ).UpdateSelectedValue();
( (Selector)o ).OnSelectedItemChanged( (string)e.OldValue, (string)e.NewValue );
}
protected virtual void OnSelectedItemChanged( string oldValue, string newValue )
{
if( !this.IsInitialized )
return;
this.UpdateSelectedValue();
}
#endregion

24
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/UpDownBase.cs

@ -47,6 +47,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
/// Flags if the Text and Value properties are in the process of being sync'd
/// </summary>
private bool _isSyncingTextAndValueProperties;
private bool _isSpinnerCaptured;
#endregion //Members
@ -375,6 +376,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
internal UpDownBase()
{
this.AddHandler( Mouse.PreviewMouseDownOutsideCapturedElementEvent, new RoutedEventHandler( this.HandleClickOutsideOfControl ), true );
}
#endregion //Constructors
@ -397,6 +399,7 @@ namespace Xceed.Wpf.Toolkit.Primitives
if( TextBox != null )
{
TextBox.Text = Text;
TextBox.GotFocus += new RoutedEventHandler( TextBox_GotFocus );
TextBox.LostFocus += new RoutedEventHandler( TextBox_LostFocus );
TextBox.TextChanged += new TextChangedEventHandler( TextBox_TextChanged );
}
@ -452,14 +455,24 @@ namespace Xceed.Wpf.Toolkit.Primitives
#region Event Handlers
private void HandleClickOutsideOfControl( object sender, RoutedEventArgs e )
{
if( _isSpinnerCaptured )
{
this.Spinner.ReleaseMouseCapture();
_isSpinnerCaptured = false;
}
}
private void OnSpinnerSpin( object sender, SpinEventArgs e )
{
if( AllowSpin && !IsReadOnly )
{
var activeTrigger = this.MouseWheelActiveTrigger;
bool spin = !e.UsingMouseWheel;
spin |= (activeTrigger == MouseWheelActiveTrigger.MouseOver);
spin |= ( activeTrigger == MouseWheelActiveTrigger.MouseOver );
spin |= ( TextBox.IsFocused && ( activeTrigger == MouseWheelActiveTrigger.FocusedMouseOver ) );
spin |= ( TextBox.IsFocused && ( activeTrigger == MouseWheelActiveTrigger.Focused ) && (Mouse.Captured != null) );
if( spin )
{
@ -566,6 +579,15 @@ namespace Xceed.Wpf.Toolkit.Primitives
}
}
private void TextBox_GotFocus( object sender, RoutedEventArgs e )
{
if( ( this.MouseWheelActiveTrigger == Primitives.MouseWheelActiveTrigger.Focused ) && !_isSpinnerCaptured )
{
_isSpinnerCaptured = true;
Mouse.Capture( this.Spinner );
}
}
private void TextBox_LostFocus( object sender, RoutedEventArgs e )
{
CommitInput();

9
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/Core/Primitives/WindowContainer.cs

@ -52,6 +52,10 @@ namespace Xceed.Wpf.Toolkit.Primitives
void WindowContainer_Loaded( object sender, RoutedEventArgs e )
{
foreach( WindowControl window in this.Children )
{
window.SetIsActiveInternal( false );
}
this.SetNextActiveWindow( null );
}
@ -309,7 +313,9 @@ namespace Xceed.Wpf.Toolkit.Primitives
if( ( windowControl.ActualWidth != 0 ) && ( windowControl.ActualHeight != 0 ) )
{
windowControl.Left = ( this.ActualWidth - windowControl.ActualWidth ) / 2.0;
windowControl.Left += (windowControl.Margin.Left - windowControl.Margin.Right);
windowControl.Top = ( this.ActualHeight - windowControl.ActualHeight ) / 2.0;
windowControl.Top += ( windowControl.Margin.Top - windowControl.Margin.Bottom );
}
}
@ -356,6 +362,9 @@ namespace Xceed.Wpf.Toolkit.Primitives
private void SetActiveWindow( WindowControl windowControl )
{
if( windowControl.IsActive )
return;
foreach( WindowControl window in this.Children )
{
window.SetIsActiveInternal( false );

68
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs

@ -133,6 +133,40 @@ namespace Xceed.Wpf.Toolkit
#endregion //TimeFormatString
#region TimePickerAllowSpin
public static readonly DependencyProperty TimePickerAllowSpinProperty = DependencyProperty.Register( "TimePickerAllowSpin", typeof( bool ), typeof( DateTimePicker ), new UIPropertyMetadata( true ) );
public bool TimePickerAllowSpin
{
get
{
return (bool)GetValue( TimePickerAllowSpinProperty );
}
set
{
SetValue( TimePickerAllowSpinProperty, value );
}
}
#endregion //TimePickerAllowSpin
#region TimePickerShowButtonSpinner
public static readonly DependencyProperty TimePickerShowButtonSpinnerProperty = DependencyProperty.Register( "TimePickerShowButtonSpinner", typeof( bool ), typeof( DateTimePicker ), new UIPropertyMetadata( true ) );
public bool TimePickerShowButtonSpinner
{
get
{
return (bool)GetValue( TimePickerShowButtonSpinnerProperty );
}
set
{
SetValue( TimePickerShowButtonSpinnerProperty, value );
}
}
#endregion //TimePickerShowButtonSpinner
#region TimePickerVisibility
public static readonly DependencyProperty TimePickerVisibilityProperty = DependencyProperty.Register( "TimePickerVisibility", typeof( Visibility ), typeof( DateTimePicker ), new UIPropertyMetadata( Visibility.Visible ) );
@ -225,6 +259,7 @@ namespace Xceed.Wpf.Toolkit
_calendar.SelectedDatesChanged += Calendar_SelectedDatesChanged;
_calendar.SelectedDate = Value ?? null;
_calendar.DisplayDate = Value ?? DateTime.Now;
this.SetBlackOutDates();
}
_timePicker = GetTemplateChild( PART_TimeUpDown ) as TimePicker;
@ -261,6 +296,20 @@ namespace Xceed.Wpf.Toolkit
base.OnPreviewKeyDown( e );
}
protected override void OnMaximumChanged( DateTime? oldValue, DateTime? newValue )
{
base.OnMaximumChanged( oldValue, newValue );
this.SetBlackOutDates();
}
protected override void OnMinimumChanged( DateTime? oldValue, DateTime? newValue )
{
base.OnMinimumChanged( oldValue, newValue );
this.SetBlackOutDates();
}
#endregion //Base Class Overrides
#region Event Handlers
@ -361,6 +410,25 @@ namespace Xceed.Wpf.Toolkit
}
}
private void SetBlackOutDates()
{
if( _calendar != null )
{
_calendar.BlackoutDates.Clear();
if( ( this.Minimum != null ) && this.Minimum.HasValue && ( this.Minimum.Value != DateTime.MinValue ) )
{
DateTime minDate = this.Minimum.Value;
_calendar.BlackoutDates.Add( new CalendarDateRange( DateTime.MinValue, minDate.AddDays( -1 ) ) );
}
if( ( this.Maximum != null ) && this.Maximum.HasValue && ( this.Maximum.Value != DateTime.MaxValue ) )
{
DateTime maxDate = this.Maximum.Value;
_calendar.BlackoutDates.Add( new CalendarDateRange( maxDate.AddDays( 1 ), DateTime.MaxValue ) );
}
}
}
#endregion //Methods
}
}

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

@ -134,7 +134,10 @@ namespace Xceed.Wpf.Toolkit
key = "Year";
value = currentDate.Year.ToString("D4");
}
dateParts.Add( key, value );
if( !dateParts.ContainsKey( key ) )
{
dateParts.Add( key, value );
}
} );
return dateParts;
}

7
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Aero2.NormalColor.xaml

@ -18,6 +18,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit">
<ResourceDictionary.MergedDictionaries>
@ -36,6 +37,8 @@
<Setter Property="IsTabStop" Value="False" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalBackgroundKey}}" />
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalOuterBorderKey}}" />
<Setter Property="Padding" Value="3" />
<Setter Property="Template">
<Setter.Value>
@ -52,6 +55,10 @@
</ToggleButton.Template>
<Grid>
<chrome:ButtonChrome x:Name="ToggleButtonChrome"
Background="{TemplateBinding Background}"
Foreground="{TemplateBinding Foreground}"
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}"
RenderChecked="{TemplateBinding IsOpen}"
RenderEnabled="{TemplateBinding IsEnabled}"
RenderMouseOver="{Binding IsMouseOver, ElementName=PART_DropDownButton}"

7
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml

@ -18,6 +18,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes"
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit">
<conv:InverseBoolConverter x:Key="InverseBoolConverter" />
@ -43,6 +44,8 @@
<Setter Property="IsTabStop" Value="False" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalBackgroundKey}}" />
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalOuterBorderKey}}" />
<Setter Property="Padding" Value="3" />
<Setter Property="Template">
<Setter.Value>
@ -59,6 +62,10 @@
</ToggleButton.Template>
<Grid>
<chrome:ButtonChrome x:Name="ToggleButtonChrome"
Background="{TemplateBinding Background}"
Foreground="{TemplateBinding Foreground}"
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}"
CornerRadius="2.75"
RenderChecked="{TemplateBinding IsOpen}"
RenderEnabled="{TemplateBinding IsEnabled}"

12
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Attributes/ExpandableObjectAttribute.cs

@ -20,8 +20,20 @@ namespace Xceed.Wpf.Toolkit.PropertyGrid.Attributes
{
public class ExpandableObjectAttribute : Attribute
{
#region Constructors
public ExpandableObjectAttribute()
{
}
#endregion
#region Properties
#endregion
}
}

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

@ -0,0 +1,58 @@
/*************************************************************************************
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.Linq;
using System.Text;
using System.Windows;
namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
public class CollectionEditor : TypeEditor<CollectionControlButton>
{
protected override void SetValueDependencyProperty()
{
ValueProperty = CollectionControlButton.ItemsSourceProperty;
}
protected override void ResolveValueBinding( PropertyItem propertyItem )
{
var type = propertyItem.PropertyType;
Editor.ItemsSourceType = type;
if( type.BaseType == typeof( System.Array ) )
{
Editor.NewItemTypes = new List<Type>() { type.GetElementType() };
}
else if( type.GetGenericArguments().Count() > 0 )
{
Editor.NewItemTypes = new List<Type>() { type.GetGenericArguments()[ 0 ] };
}
base.ResolveValueBinding( propertyItem );
}
}
public class PropertyGridEditorCollectionControl : CollectionControlButton
{
static PropertyGridEditorCollectionControl()
{
DefaultStyleKeyProperty.OverrideMetadata( typeof( PropertyGridEditorCollectionControl ), new FrameworkPropertyMetadata( typeof( PropertyGridEditorCollectionControl ) ) );
}
}
}

79
ExtendedWPFToolkitSolution_35/Src/Xceed.Wpf.Toolkit/PropertyGrid/Implementation/Editors/CollectionEditor.xaml

@ -1,79 +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
**********************************************************************************-->
<UserControl x:Class="Xceed.Wpf.Toolkit.PropertyGrid.Editors.CollectionEditor"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes">
<UserControl.Resources>
<Style x:Key="ButtonStyle" TargetType="Button">
<Setter Property="Background" Value="White" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="2,0,0,0" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid SnapsToDevicePixels="True">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
<ContentPresenter Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</Border>
<chrome:ButtonChrome x:Name="ToggleButtonChrome"
Grid.Column="1"
CornerRadius="0,2.75,2.75,0"
RenderEnabled="{Binding IsEnabled, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}"
RenderMouseOver="{TemplateBinding IsMouseOver}">
<Grid x:Name="arrowGlyph" IsHitTestVisible="False" Grid.Column="1" Margin="5">
<Path x:Name="Arrow" Width="7" Height="4" Data="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" Fill="#FF000000" />
</Grid>
</chrome:ButtonChrome>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF" />
<Setter Property="Foreground" Value="Gray" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Button Grid.Column="1"
IsTabStop="True"
MinHeight="22"
SnapsToDevicePixels="True"
Content="(Collection)"
Style="{StaticResource ButtonStyle}"
Click="Button_Click" />
</UserControl>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save