xceed.com 9 years ago
parent
commit
ea69ec8e41
  1. 142
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/BusyIndicator.xaml
  2. 17
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CheckListBox/Implementation/CheckListBoxCheckedChangedEventArgs.cs
  3. 81
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CheckListBox/Implementation/CheckListBoxItem.cs
  4. 196
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/ChildWindow.xaml
  5. 22
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/Implementation/VisualStates.ChildWindow.cs
  6. 367
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.xaml
  7. 85
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorSpectrumSlider.cs
  8. 18
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/HsvColor.cs
  9. 55
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Themes/Generic.xaml
  10. 286
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/MessageBox.xaml
  11. 63
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs
  12. 117
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.resx
  13. 26
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs
  14. 7
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.settings
  15. 18
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Attributes/TypeEditorAttribute.cs
  16. 45
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/EditorProviders/CheckBoxEditorProvider.cs
  17. 67
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/EditorProviders/EnumComboBoxEditorProvider.cs
  18. 110
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/EditorProviders/FontComboBoxEditorProvider.cs
  19. 11
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/EditorProviders/ITypeEditorProvider.cs
  20. 41
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/EditorProviders/NumericUpDownEditorProvider.cs
  21. 42
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/EditorProviders/TextBoxEditorProvider.cs
  22. 33
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DateTimeUpDownEditor.cs
  23. 34
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DecimalUpDownEditor.cs
  24. 34
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DoubleUpDownEditor.cs
  25. 33
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/IntegerUpDownEditor.cs
  26. 12
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/NumericUpDownEditor.cs
  27. 12
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/IEditorDefinition.cs
  28. 72
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyCategoryItem.cs
  29. 186
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/FormatToolbar.xaml
  30. 148
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/FormatToolbar.xaml.cs
  31. 107
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/FormatToolbarManager.cs
  32. BIN
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/Images/Bold16.png
  33. BIN
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/Images/CenterAlign16.png
  34. BIN
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/Images/Italic16.png
  35. BIN
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/Images/JustifyAlign16.png
  36. BIN
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/Images/LeftAlign16.png
  37. BIN
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/Images/RightAlign16.png
  38. BIN
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/Images/Underline16.png
  39. 60
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Aero/Buttons.xaml
  40. 135
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Common/Generic_Common.xaml
  41. BIN
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TokenizedTextBox/Images/delete8.png
  42. 55
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TokenizedTextBox/Implementation/Token.cs
  43. 45
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TokenizedTextBox/Implementation/TokenItem.cs
  44. 394
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TokenizedTextBox/Implementation/TokenizedTextBox.cs
  45. 36
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TokenizedTextBox/Implementation/TokenizedTextBoxCommands.cs
  46. 78
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TokenizedTextBox/Themes/Generic.xaml
  47. 10
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc
  48. BIN
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/sn.pfx
  49. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs
  50. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml
  51. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs
  52. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml
  53. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs
  54. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml
  55. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/AssemblyVersionInfo.cs
  56. 21
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableFloatingWindowControl.cs
  57. 25
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAutoHideWindowControl.cs
  58. 81
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentControl.cs
  59. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentFloatingWindowControl.cs
  60. 48
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs
  61. 5
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs
  62. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/DockingManager.cs
  63. 7
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Themes/generic.xaml
  64. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.DataGrid/AssemblyVersionInfo.cs
  65. 91
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartAxisView.xaml.cs.txt
  66. 213
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartAxisView.xaml.txt
  67. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartLegendView.xaml.cs.txt
  68. 131
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartLegendView.xaml.txt
  69. 122
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartSeriesBasicTypesView.xaml.cs.txt
  70. 137
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartSeriesBasicTypesView.xaml.txt
  71. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartSeriesDataPointsBindingView.xaml.cs.txt
  72. 40
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartSeriesDataPointsBindingView.xaml.txt
  73. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingAxesGridView.xaml.cs.txt
  74. 182
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingAxesGridView.xaml.txt
  75. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingColumnSeriesView.xaml.cs.txt
  76. 171
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingColumnSeriesView.xaml.txt
  77. 12
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingLineSeriesView.xaml.cs.txt
  78. 137
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingLineSeriesView.xaml.txt
  79. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingPieSeriesView.xaml.cs.txt
  80. 171
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingPieSeriesView.xaml.txt
  81. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChildWindowView.xaml.txt
  82. 19
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ColorView.xaml.txt
  83. 16
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/DateTimeView.xaml.txt
  84. 159
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/DisplayLocalizationRes.fr.resx.txt
  85. 159
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/DisplayLocalizationRes.resx.txt
  86. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/FilePickerView.xaml.cs.txt
  87. 200
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/FilePickerView.xaml.txt
  88. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ListBoxView.xaml.cs.txt
  89. 1099
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ListBoxView.xaml.txt
  90. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialButtonView.xaml.cs.txt
  91. 171
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialButtonView.xaml.txt
  92. 76
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialCheckBoxView.xaml.txt
  93. 142
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialComboBoxView.xaml.txt
  94. 121
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialControlsView.xaml.cs.txt
  95. 923
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialControlsView.xaml.txt
  96. 151
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialDropDownView.xaml.txt
  97. 159
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialFrameView.xaml.txt
  98. 124
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialListBoxView.xaml.txt
  99. 27
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialProgressBarCircularView.xaml.cs.txt
  100. 191
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialProgressBarCircularView.xaml.txt

142
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/BusyIndicator/BusyIndicator.xaml

@ -1,142 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Microsoft.Windows.Controls">
<!-- =============================================================================== -->
<!-- BusyIndicator -->
<!-- =============================================================================== -->
<Style TargetType="{x:Type local:BusyIndicator}">
<Setter Property="BusyContent" Value="Please wait..."/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="OverlayStyle">
<Setter.Value>
<Style TargetType="Rectangle">
<Setter Property="Fill" Value="White"/>
<Setter Property="Opacity" Value="0.5"/>
</Style>
</Setter.Value>
</Setter>
<Setter Property="ProgressBarStyle">
<Setter.Value>
<Style TargetType="ProgressBar">
<Setter Property="IsIndeterminate" Value="True"/>
<Setter Property="Height" Value="15"/>
<Setter Property="Margin" Value="8,0,8,8"/>
</Style>
</Setter.Value>
</Setter>
<Setter Property="DisplayAfter" Value="00:00:00.1"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:BusyIndicator}">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="VisibilityStates">
<VisualState x:Name="Hidden">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetName="busycontent" Storyboard.TargetProperty="(UIElement.Visibility)">
<DiscreteObjectKeyFrame KeyTime="00:00:00">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetName="overlay" Storyboard.TargetProperty="(UIElement.Visibility)">
<DiscreteObjectKeyFrame KeyTime="00:00:00">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Visible">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetName="busycontent" Storyboard.TargetProperty="(UIElement.Visibility)">
<DiscreteObjectKeyFrame KeyTime="00:00:00">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetName="overlay" Storyboard.TargetProperty="(UIElement.Visibility)">
<DiscreteObjectKeyFrame KeyTime="00:00:00">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="BusyStatusStates">
<VisualState x:Name="Idle">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetName="content" Storyboard.TargetProperty="(Control.IsEnabled)">
<DiscreteObjectKeyFrame KeyTime="00:00:00">
<DiscreteObjectKeyFrame.Value>
<sys:Boolean>True</sys:Boolean>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Busy">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetName="content" Storyboard.TargetProperty="(Control.IsEnabled)">
<DiscreteObjectKeyFrame KeyTime="00:00:00">
<DiscreteObjectKeyFrame.Value>
<sys:Boolean>False</sys:Boolean>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<ContentControl x:Name="content" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<Rectangle x:Name="overlay" Style="{TemplateBinding OverlayStyle}"/>
<ContentPresenter x:Name="busycontent">
<ContentPresenter.Content>
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<Border Background="White" BorderThickness="1" CornerRadius="2">
<Border.BorderBrush>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Color="#FFA3AEB9" Offset="0"/>
<GradientStop Color="#FF8399A9" Offset="0.375"/>
<GradientStop Color="#FF718597" Offset="0.375"/>
<GradientStop Color="#FF617584" Offset="1"/>
</LinearGradientBrush>
</Border.BorderBrush>
<Border CornerRadius="1.5" Margin="1">
<Border.Background>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Color="#FFF6F8F9" Offset="0.02"/>
<GradientStop Color="#FFB8B8B8" Offset="0.996"/>
</LinearGradientBrush>
</Border.Background>
<Grid MinWidth="150">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ContentPresenter Content="{TemplateBinding BusyContent}" ContentTemplate="{TemplateBinding BusyContentTemplate}" Margin="8"/>
<ProgressBar Grid.Row="1" Style="{TemplateBinding ProgressBarStyle}"/>
</Grid>
</Border>
</Border>
</Grid>
</ContentPresenter.Content>
</ContentPresenter>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

17
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CheckListBox/Implementation/CheckListBoxCheckedChangedEventArgs.cs

@ -1,17 +0,0 @@
using System;
using System.Windows;
namespace Microsoft.Windows.Controls
{
public delegate void CheckListBoxCheckedChangedEventHandler(object sender, CheckListBoxCheckedChangedEventArgs e);
public class CheckListBoxCheckedChangedEventArgs : RoutedEventArgs
{
public object Item { get; private set; }
public CheckListBoxCheckedChangedEventArgs(RoutedEvent routedEvent, object source, object item)
: base(routedEvent, source)
{
Item = item;
}
}
}

81
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/CheckListBox/Implementation/CheckListBoxItem.cs

@ -1,81 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Controls.Primitives;
namespace Microsoft.Windows.Controls
{
public class CheckListBoxItem : ContentControl
{
static CheckListBoxItem()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(CheckListBoxItem), new FrameworkPropertyMetadata(typeof(CheckListBoxItem)));
}
public CheckListBoxItem()
{
AddHandler(Mouse.MouseDownEvent, new MouseButtonEventHandler(CheckListBoxItem_MouseDown));
}
#region Properties
public static readonly DependencyProperty IsCheckedProperty = DependencyProperty.Register("IsChecked", typeof(bool), typeof(CheckListBoxItem), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnIsSelectedChanged));
public bool IsChecked
{
get { return (bool)GetValue(IsCheckedProperty); }
set { SetValue(IsCheckedProperty, value); }
}
private static void OnIsSelectedChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
CheckListBoxItem checkListBoxItem = o as CheckListBoxItem;
if (checkListBoxItem != null)
checkListBoxItem.OnIsSelectedChanged((bool)e.OldValue, (bool)e.NewValue);
}
protected virtual void OnIsSelectedChanged(bool oldValue, bool newValue)
{
if (newValue)
RaiseSelectionChangedEvent(new RoutedEventArgs(CheckListBox.CheckedEvent, this));
else
RaiseSelectionChangedEvent(new RoutedEventArgs(CheckListBox.UncheckedEvent, this));
}
#endregion //Properties
#region Events
public static readonly RoutedEvent SelectedEvent = CheckListBox.CheckedEvent.AddOwner(typeof(CheckListBoxItem));
public static readonly RoutedEvent UnselectedEvent = CheckListBox.UncheckedEvent.AddOwner(typeof(CheckListBoxItem));
#endregion
#region Event Hanlders
void CheckListBoxItem_MouseDown(object sender, MouseButtonEventArgs e)
{
IsChecked = !IsChecked;
}
#endregion //Event Hanlders
#region Methods
private void RaiseSelectionChangedEvent(RoutedEventArgs e)
{
base.RaiseEvent(e);
}
#endregion //Methods
}
}

196
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/ChildWindow.xaml

@ -1,196 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Microsoft.Windows.Controls">
<!-- =============================================================================== -->
<!-- ChildWindow -->
<!-- =============================================================================== -->
<SolidColorBrush x:Key="ChildWindowMainBrushColor" Color="#FF3C688D"/>
<LinearGradientBrush x:Key="BorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#7FFFFFFF" Offset="0.05"/>
<GradientStop Color="#B2FFFFFF" Offset="0.07"/>
<GradientStop Color="#00FFFFFF" Offset="1"/>
</LinearGradientBrush>
<LinearGradientBrush x:Key="ChildWindowDarkBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFA3AEB9" Offset="0"/>
<GradientStop Color="#FF8399A9" Offset="0.375"/>
<GradientStop Color="#FF718597" Offset="0.375"/>
<GradientStop Color="#FF617584" Offset="1"/>
</LinearGradientBrush>
<LinearGradientBrush x:Key="ChildWindowBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Offset="0" Color="#FFffffff"/>
<GradientStop Offset="0.479" Color="#FFf4f5f6"/>
<GradientStop Offset="1" Color="#FFd0d6db"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<LinearGradientBrush x:Key="ChildWindowButtonHoverBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Offset="0" Color="#FFb5bdc8"/>
<GradientStop Offset="0.370" Color="#FF8399a9"/>
<GradientStop Offset="0.370" Color="#FF718597"/>
<GradientStop Offset="0.906" Color="#FFb9c1ca"/>
<GradientStop Offset="1" Color="#FFb9c1ca"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<LinearGradientBrush x:Key="ChildWindowButtonPressedBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Offset="0" Color="#FF6b7c8d"/>
<GradientStop Offset="0.370" Color="#FF4d606f"/>
<GradientStop Offset="0.370" Color="#FF465460"/>
<GradientStop Offset="0.906" Color="#FF262d33"/>
<GradientStop Offset="1" Color="#FF262d33"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<Style x:Key="ChildWindowCloseButtonStyle" TargetType="Button">
<Setter Property="Foreground" Value="#FF000000"/>
<Setter Property="Padding" Value="3"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background)">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ChildWindowButtonHoverBrush}"></DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background)">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ChildWindowButtonPressedBrush}"></DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border x:Name="Background" CornerRadius="0,0,2,0" Background="{StaticResource ChildWindowDarkBrush}">
<Border Margin="1,0,1,1" BorderBrush="#59FFFFFF" BorderThickness="1" CornerRadius="0,0,1,0"/>
</Border>
<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
<Path x:Name="path"
Height="6"
Width="7"
Stretch="Fill"
Opacity="1"
Data="M 2,6 C2,6 3,6 3,6 3,6 3,5 3,5 3,5 4,5 4,5 4,5 4,6 4,6 4,6 5,6 5,6 5,6 7,6 7,6 7,6 7,5 7,5 7,5 6,5 6,5 6,5 6,4 6,4 6,4 5,4 5,4 5,4 5,2 5,2 5,2 6,2 6,2 6,2 6,1 6,1 6,1 7,1 7,1 7,1 7,0 7,0 7,0 5,0 5,0 5,0 4,0 4,0 4,0 4,1 4,1 4,1 3,1 3,1 3,1 3,0 3,0 3,0 2,0 2,0 2,0 0,0 0,0 0,0 0,1 0,1 0,1 1,1 1,1 1,1 1,2 1,2 1,2 2,2 2,2 2,2 2,4 2,4 2,4 1,4 1,4 1,4 1,5 1,5 1,5 0,5 0,5 0,5 0,6 0,6 0,6 2,6 2,6 z"
Fill="White" Margin="0,0,0,1" Visibility="Collapsed" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:ChildWindow}">
<Setter Property="Background" Value="#FFFFFFFF"/>
<Setter Property="BorderBrush" Value="{StaticResource ChildWindowDarkBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CaptionForeground" Value="#FF000000" />
<Setter Property="CloseButtonStyle" Value="{StaticResource ChildWindowCloseButtonStyle}" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="IsEnabled" Value="true" />
<Setter Property="OverlayBrush" Value="#7F000000" />
<Setter Property="OverlayOpacity" Value="1" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="VerticalContentAlignment" Value="Top" />
<Setter Property="WindowBorderBrush" Value="{StaticResource ChildWindowDarkBrush}" />
<Setter Property="WindowBackground" Value="{StaticResource ChildWindowBackgroundBrush}" />
<Setter Property="WindowOpacity" Value="1.0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:ChildWindow}">
<Grid x:Name="Root">
<Grid.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
</Grid.Resources>
<Grid x:Name="PART_Overlay" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0" RenderTransformOrigin="0.5,0.5"
Background="{TemplateBinding OverlayBrush}"
Opacity="{TemplateBinding OverlayOpacity}"
Visibility="{TemplateBinding IsModal, Converter={StaticResource BooleanToVisibilityConverter}}"/>
<Grid x:Name="PART_WindowRoot" HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid.RenderTransform>
<TransformGroup>
<ScaleTransform />
<SkewTransform />
<RotateTransform />
<TranslateTransform />
</TransformGroup>
</Grid.RenderTransform>
<!-- Borders -->
<Grid x:Name="WindowGrid">
<Border BorderBrush="{TemplateBinding WindowBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="5,5,0,0" Opacity="{TemplateBinding WindowOpacity}"/>
<Grid Margin="0" Background="{x:Null}">
<Border x:Name="WindowBorder" Margin="1,1,1,1" Background="{TemplateBinding WindowBackground}" CornerRadius="4,4,0,0" Opacity="{TemplateBinding WindowOpacity}"/>
<Border BorderBrush="White" BorderThickness="1" CornerRadius="4,4,0,0" Margin="1" Opacity="0.7"/>
</Grid>
</Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" MinHeight="26"/>
<RowDefinition />
</Grid.RowDefinitions>
<!-- Content Border -->
<Grid Margin="6,0,6,6" x:Name="ContentGrid" Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Border BorderBrush="#FFFFFFFF" BorderThickness="1" CornerRadius="1"/>
<Border Margin="1" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0.1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
<ContentPresenter x:Name="Content" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
</Border>
</Grid>
<!-- Header -->
<Border x:Name="PART_DragWidget" Background="Transparent" Grid.Column="1" CornerRadius="5,5,0,0" Margin="1,1,1,0">
<Grid>
<Grid x:Name="CaptionHeader" Margin="1,1,105,0" VerticalAlignment="Center">
<!-- Caption -->
<ContentControl x:Name="Caption" Margin="5,0,0,0" IsTabStop="False" HorizontalAlignment="Stretch"
Content="{TemplateBinding Caption}"
Foreground="{TemplateBinding CaptionForeground}"/>
</Grid>
</Grid>
</Border>
</Grid>
<!-- Buttons -->
<Border BorderBrush="#A5FFFFFF" BorderThickness="1,0,1,1" CornerRadius="0,0,3,3" VerticalAlignment="Top" Margin="0,1,7,0" HorizontalAlignment="Right">
<Button x:Name="PART_CloseButton" Style="{TemplateBinding CloseButtonStyle}" Visibility="{TemplateBinding CloseButtonVisibility}" Height="17" Width="43" IsTabStop="False">
<Path Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Width="12" Fill="#E4FFFFFF" Stretch="Fill" Stroke="#FF535666"
Data="M0.5,0.5 L4.5178828,0.5 L6.0620003,3.125 L7.4936447,0.5 L11.5,0.5 L11.5,1.5476431 L8.7425003,6.1201854 L11.5,10.359666 L11.5,11.5 L7.4941902,11.5 L6.0620003,8.8740005 L4.5172949,11.5 L0.5,11.5 L0.5,10.43379 L3.3059995,6.1201582 L0.5,1.4676378 L0.5,0.5 z"/>
</Button>
</Border>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

22
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/Implementation/VisualStates.ChildWindow.cs

@ -1,22 +0,0 @@
using System;
namespace Microsoft.Windows.Controls
{
internal static partial class VisualStates
{
/// <summary>
/// Window State group name.
/// </summary>
public const string WindowStatesGroup = "WindowStatesGroup";
/// <summary>
/// Open state name for ChildWindow.
/// </summary>
public const string Open = "Open";
/// <summary>
/// Closed state name for ChildWindow.
/// </summary>
public const string Closed = "Closed";
}
}

367
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.xaml

@ -1,367 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Microsoft.Windows.Controls">
<!-- =============================================================================== -->
<!-- ColorPicker -->
<!-- =============================================================================== -->
<LinearGradientBrush x:Key="ColorPickerDarkBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFA3AEB9" Offset="0"/>
<GradientStop Color="#FF8399A9" Offset="0.375"/>
<GradientStop Color="#FF718597" Offset="0.375"/>
<GradientStop Color="#FF617584" Offset="1"/>
</LinearGradientBrush>
<DrawingBrush x:Key="CheckerBrush" Viewport="0,0,10,10" ViewportUnits="Absolute" TileMode="Tile">
<DrawingBrush.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="White">
<GeometryDrawing.Geometry>
<RectangleGeometry Rect="0,0 100,100" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="LightGray">
<GeometryDrawing.Geometry>
<GeometryGroup>
<RectangleGeometry Rect="0,0 50,50" />
<RectangleGeometry Rect="50,50 50,50" />
</GeometryGroup>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
<Style x:Key="SliderRepeatButtonStyle"
TargetType="{x:Type RepeatButton}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
<Border Background="{TemplateBinding Background}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="VerticalSlideThumbStyle" TargetType="{x:Type Thumb}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Canvas x:Name="selector" Height="8" Background="Transparent" IsHitTestVisible="True" >
<Path Width="5" Height="8" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF000000" Fill="#FF000000" Data="F1 M 276.761,316L 262.619,307.835L 262.619,324.165L 276.761,316 Z " />
<Path Width="5" Height="8" Canvas.Top="8" Canvas.Left="20" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF000000" Fill="#FF000000" Data="F1 M 276.761,316L 262.619,307.835L 262.619,324.165L 276.761,316 Z ">
<Path.RenderTransform>
<RotateTransform Angle="180"/>
</Path.RenderTransform>
</Path>
</Canvas>
<ControlTemplate.Triggers>
<Trigger Property="IsDragging" Value="True">
<Setter Property="Foreground"
Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground"
Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="OpacitySliderStyle" TargetType="{x:Type Slider}">
<Setter Property="Orientation" Value="Vertical"/>
<Setter Property="Minimum" Value="0" />
<Setter Property="Maximum" Value="1" />
<Setter Property="TickFrequency" Value="0.01" />
<Setter Property="SmallChange" Value="0.01" />
<Setter Property="LargeChange" Value="0.02" />
<Setter Property="IsDirectionReversed" Value="False" />
<Setter Property="IsMoveToPointEnabled" Value="True" />
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
<LinearGradientBrush.RelativeTransform>
<TransformGroup>
<ScaleTransform CenterY="0.5" CenterX="0.5"/>
<SkewTransform CenterY="0.5" CenterX="0.5"/>
<RotateTransform Angle="90" CenterY="0.5" CenterX="0.5"/>
<TranslateTransform/>
</TransformGroup>
</LinearGradientBrush.RelativeTransform>
<GradientStop Color="White" />
<GradientStop Color="Transparent" Offset="1" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Slider}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border x:Name="PART_TrackBackground" Background="{TemplateBinding Background}" Grid.Column="1" Width="20" />
<Track Grid.Column="1" Name="PART_Track">
<Track.DecreaseRepeatButton>
<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="Slider.DecreaseLarge"/>
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="Slider.IncreaseLarge"/>
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource VerticalSlideThumbStyle}" />
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ColorPickerToggleButton" TargetType="ToggleButton">
<Setter Property="Foreground" Value="#FF000000"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="BorderThickness" Value="1,0,0,0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="_backgroundHighlight" Storyboard.TargetProperty="Opacity">
<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="_backgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
<SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="_backgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
<SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="_backgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
<SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
</ColorAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Border x:Name="Background" Background="White" BorderThickness="0" Grid.ColumnSpan="3" Cursor="Hand">
<Grid Margin="1" Background="#FF1F3B53">
<Border x:Name="_backgroundHighlight" Opacity="0" Background="#FF448DCA"/>
<Rectangle x:Name="_backgroundGradient">
<Rectangle.Fill>
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#F3F3F3" Offset="0"/>
<GradientStop Color="#EBEBEB" Offset="0.5"/>
<GradientStop Color="#DDDDDD" Offset="0.5"/>
<GradientStop Color="#CDCDCD" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
</Grid>
</Border>
<Border Margin="5" BorderBrush="{StaticResource ColorPickerDarkBorderBrush}" BorderThickness="1" CornerRadius="3">
<Rectangle Fill="{TemplateBinding Background}" />
</Border>
<Border Grid.Column="1" Background="#FFC9CACA" BorderBrush="White" BorderThickness="1,0,0,0" Margin="0,2"/>
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Grid.Column="2"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:ColorPicker}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:ColorPicker}">
<Grid>
<Border BorderBrush="{StaticResource ColorPickerDarkBorderBrush}" BorderThickness="1" CornerRadius="1">
<Grid>
<ToggleButton x:Name="PART_ColorPickerToggleButton" Style="{StaticResource ColorPickerToggleButton}" Height="25">
<ToggleButton.Background>
<SolidColorBrush Color="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}}"/>
</ToggleButton.Background>
<ToggleButton.Content>
<Grid x:Name="arrowGlyph" IsHitTestVisible="False">
<Path Height="3" Width="5" Stretch="Fill" Fill="#FFFFFFFF" Margin="0,1,0,0"
Data="M 0,0 C0,0 0,1 0,1 0,1 1,1 1,1 1,1 1,2 1,2 1,2 2,2 2,2 2,2 2,3 2,3 2,3 3,3 3,3 3,3 3,2 3,2 3,2 4,2 4,2 4,2 4,1 4,1 4,1 5,1 5,1 5,1 5,0 5,0 5,0 0,0 0,0 z" />
<Path Height="3" Width="5" Stretch="Fill" Fill="{StaticResource ColorPickerDarkBorderBrush}"
Data="M 0,0 C0,0 0,1 0,1 0,1 1,1 1,1 1,1 1,2 1,2 1,2 2,2 2,2 2,2 2,3 2,3 2,3 3,3 3,3 3,3 3,2 3,2 3,2 4,2 4,2 4,2 4,1 4,1 4,1 5,1 5,1 5,1 5,0 5,0 5,0 0,0 0,0 z" />
</Grid>
</ToggleButton.Content>
</ToggleButton>
</Grid>
</Border>
<Popup x:Name="PART_ColorPickerCanvasPopup" VerticalAlignment="Bottom" IsOpen="False" >
<Border BorderThickness="1" Background="White" BorderBrush="{StaticResource ColorPickerDarkBorderBrush}" Padding="3">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Margin="2">
<Grid>
<Grid.ColumnDefinitions >
<ColumnDefinition Width="200"></ColumnDefinition>
<ColumnDefinition Width="5"></ColumnDefinition>
<ColumnDefinition Width="22"></ColumnDefinition>
<ColumnDefinition Width="5"></ColumnDefinition>
<ColumnDefinition Width="22"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="20"/>
</Grid.RowDefinitions>
<Border BorderThickness="1" BorderBrush="DarkGray" ClipToBounds="True" Background="{StaticResource CheckerBrush}">
<Canvas x:Name="PART_ColorShadingCanvas" Width="200" Height="100" HorizontalAlignment="Left" VerticalAlignment="Top">
<Rectangle x:Name="ColorShadingRectangle" Height="{Binding ElementName=PART_ColorShadingCanvas,Path=Height}" Width="{Binding ElementName=PART_ColorShadingCanvas,Path=Width}" >
<Rectangle.Fill>
<SolidColorBrush Color="{Binding ElementName=PART_SpectrumSlider, Path=SelectedColor}" />
</Rectangle.Fill>
</Rectangle>
<Rectangle x:Name="WhiteGradient" Width="{Binding ElementName=PART_ColorShadingCanvas,Path=Width}" Height="{Binding ElementName=PART_ColorShadingCanvas,Path=Height}" >
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Offset="0" Color="#ffffffff"/>
<GradientStop Offset="1" Color="Transparent"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle x:Name="BlackGradient" Width="{Binding ElementName=PART_ColorShadingCanvas,Path=Width}" Height="{Binding ElementName=PART_ColorShadingCanvas,Path=Height}" >
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,1" EndPoint="0, 0">
<GradientStop Offset="0" Color="#ff000000"/>
<GradientStop Offset="1" Color="#00000000"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Canvas x:Name="PART_ColorShadeSelector" Width="10" Height="10" IsHitTestVisible="False">
<Ellipse Width="10" Height="10" StrokeThickness="3" Stroke="#FFFFFFFF" IsHitTestVisible="False" />
<Ellipse Width="10" Height="10" StrokeThickness="1" Stroke="#FF000000" IsHitTestVisible="False" />
</Canvas>
</Canvas>
</Border>
<Border BorderThickness="0,1,0,0" Grid.Row="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Background="{StaticResource CheckerBrush}">
<Rectangle x:Name="SelectedColor">
<Rectangle.Fill>
<SolidColorBrush Color="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}}"/>
</Rectangle.Fill>
</Rectangle>
</Grid>
<Grid Grid.Column="1" Background="{StaticResource CheckerBrush}">
<Rectangle x:Name="CurrentColor">
<Rectangle.Fill>
<SolidColorBrush Color="{Binding CurrentColor, RelativeSource={RelativeSource TemplatedParent}}"/>
</Rectangle.Fill>
</Rectangle>
</Grid>
</Grid>
</Border>
<Border BorderThickness="1" BorderBrush="DarkGray" Grid.Column="2" Grid.RowSpan="2" ClipToBounds="True">
<local:ColorSpectrumSlider x:Name="PART_SpectrumSlider" Width="20" />
</Border>
<Border Grid.Column="4" Grid.RowSpan="2" BorderThickness="1" BorderBrush="DarkGray" Background="{StaticResource CheckerBrush}" ClipToBounds="True">
<Slider x:Name="PART_OpacitySlider"
Style="{StaticResource OpacitySliderStyle}"
Value="{Binding Path=ScA, RelativeSource={RelativeSource TemplatedParent}}"/>
</Border>
</Grid>
</Grid>
<Button x:Name="PART_OkButton" Grid.Row="1" HorizontalAlignment="Right" MinWidth="50" Cursor="Hand" Content="OK" />
</Grid>
</Border>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:ColorSpectrumSlider}">
<Setter Property="Orientation" Value="Vertical"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Minimum" Value="1"/>
<Setter Property="Maximum" Value="360"/>
<Setter Property="TickFrequency" Value="0.001" />
<Setter Property="IsSnapToTickEnabled" Value="True" />
<Setter Property="IsDirectionReversed" Value="False" />
<Setter Property="IsMoveToPointEnabled" Value="True" />
<Setter Property="Value" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:ColorSpectrumSlider}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border x:Name="PART_TrackBackground" Grid.Column="1" Width="20">
<Rectangle x:Name="PART_SpectrumDisplay" Stretch="Fill" VerticalAlignment="Stretch" />
</Border>
<Track Grid.Column="1" Name="PART_Track">
<Track.DecreaseRepeatButton>
<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="Slider.DecreaseLarge"/>
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="Slider.IncreaseLarge"/>
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource VerticalSlideThumbStyle}" />
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

85
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorSpectrumSlider.cs

@ -1,85 +0,0 @@
using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;
namespace Microsoft.Windows.Controls
{
internal class ColorSpectrumSlider : Slider
{
#region Private Members
private Rectangle _spectrumDisplay;
private LinearGradientBrush _pickerBrush;
#endregion //Private Members
#region Constructors
static ColorSpectrumSlider()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(ColorSpectrumSlider), new FrameworkPropertyMetadata(typeof(ColorSpectrumSlider)));
}
#endregion //Constructors
#region Dependency Properties
public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register("SelectedColor", typeof(Color), typeof(ColorSpectrumSlider), new PropertyMetadata(System.Windows.Media.Colors.Transparent));
public Color SelectedColor
{
get { return (Color)GetValue(SelectedColorProperty); }
set { SetValue(SelectedColorProperty, value); }
}
#endregion //Dependency Properties
#region Base Class Overrides
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
_spectrumDisplay = (Rectangle)GetTemplateChild("PART_SpectrumDisplay");
CreateSpectrum();
OnValueChanged(Double.NaN, Value);
}
protected override void OnValueChanged(double oldValue, double newValue)
{
base.OnValueChanged(oldValue, newValue);
Color color = ColorUtilities.ConvertHsvToRgb(360 - newValue, 1, 1);
SelectedColor = color;
}
#endregion //Base Class Overrides
#region Methods
private void CreateSpectrum()
{
_pickerBrush = new LinearGradientBrush();
_pickerBrush.StartPoint = new Point(0.5, 0);
_pickerBrush.EndPoint = new Point(0.5, 1);
_pickerBrush.ColorInterpolationMode = ColorInterpolationMode.SRgbLinearInterpolation;
List<Color> colorsList = ColorUtilities.GenerateHsvSpectrum();
double stopIncrement = (double)1 / colorsList.Count;
int i;
for (i = 0; i < colorsList.Count; i++)
{
_pickerBrush.GradientStops.Add(new GradientStop(colorsList[i], i * stopIncrement));
}
_pickerBrush.GradientStops[i - 1].Offset = 1.0;
_spectrumDisplay.Fill = _pickerBrush;
}
#endregion //Methods
}
}

18
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/HsvColor.cs

@ -1,18 +0,0 @@
using System;
namespace Microsoft.Windows.Controls
{
internal struct HsvColor
{
public double H;
public double S;
public double V;
public HsvColor(double h, double s, double v)
{
H = h;
S = s;
V = v;
}
}
}

55
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MaskedTextBox/Themes/Generic.xaml

@ -1,55 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes"
xmlns:local="clr-namespace:Microsoft.Windows.Controls"
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters">
<coreConverters:InverseBoolConverter x:Key="InverseBoolConverter" />
<DataTemplate x:Key="DefaultWatermarkTemplate">
<ContentControl Content="{Binding}" Foreground="Gray" Focusable="False" />
</DataTemplate>
<LinearGradientBrush x:Key="TextBoxBorder" EndPoint="0,20" MappingMode="Absolute" StartPoint="0,0">
<GradientStop Color="#ABADB3" Offset="0.05"/>
<GradientStop Color="#E2E3EA" Offset="0.07"/>
<GradientStop Color="#E3E9EF" Offset="1"/>
</LinearGradientBrush>
<!-- =============================================================================== -->
<!-- MaskedTextBox -->
<!-- =============================================================================== -->
<Style TargetType="{x:Type local:MaskedTextBox}">
<Setter Property="Background" Value="White"/>
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
<Setter Property="Focusable" Value="False" />
<Setter Property="WatermarkTemplate" Value="{StaticResource DefaultWatermarkTemplate}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:MaskedTextBox}">
<local:WatermarkTextBox x:Name="TextBox"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
FontStyle="{TemplateBinding FontStyle}"
FontWeight="{TemplateBinding FontWeight}"
Foreground="{TemplateBinding Foreground}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
IsReadOnly="{Binding IsEditable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"
MinWidth="20" AcceptsReturn="False" TextWrapping="NoWrap"
TabIndex="{TemplateBinding TabIndex}"
Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}"
Watermark="{TemplateBinding Watermark}"
WatermarkTemplate="{TemplateBinding WatermarkTemplate}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

286
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/MessageBox.xaml

@ -1,286 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Microsoft.Windows.Controls">
<!-- =============================================================================== -->
<!-- MessageBox -->
<!-- =============================================================================== -->
<LinearGradientBrush x:Key="MessageBoxDarkBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFA3AEB9" Offset="0"/>
<GradientStop Color="#FF8399A9" Offset="0.375"/>
<GradientStop Color="#FF718597" Offset="0.375"/>
<GradientStop Color="#FF617584" Offset="1"/>
</LinearGradientBrush>
<LinearGradientBrush x:Key="MessageBoxWindowBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Offset="0" Color="#FFffffff"/>
<GradientStop Offset="0.479" Color="#FFf4f5f6"/>
<GradientStop Offset="1" Color="#FFd0d6db"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<LinearGradientBrush x:Key="MessageBoxWindowButtonHoverBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Offset="0" Color="#FFb5bdc8"/>
<GradientStop Offset="0.370" Color="#FF8399a9"/>
<GradientStop Offset="0.370" Color="#FF718597"/>
<GradientStop Offset="0.906" Color="#FFb9c1ca"/>
<GradientStop Offset="1" Color="#FFb9c1ca"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<LinearGradientBrush x:Key="MessageBoxWindowButtonPressedBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Offset="0" Color="#FF6b7c8d"/>
<GradientStop Offset="0.370" Color="#FF4d606f"/>
<GradientStop Offset="0.370" Color="#FF465460"/>
<GradientStop Offset="0.906" Color="#FF262d33"/>
<GradientStop Offset="1" Color="#FF262d33"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<Style x:Key="MessageBoxCloseButtonStyle" TargetType="Button">
<Setter Property="Foreground" Value="#FF000000"/>
<Setter Property="Padding" Value="3"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background)">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource MessageBoxWindowButtonHoverBrush}"></DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background)">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource MessageBoxWindowButtonPressedBrush}"></DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border x:Name="Background" CornerRadius="0,0,2,0" Background="{StaticResource MessageBoxDarkBrush}">
<Border Margin="1,0,1,1" BorderBrush="#59FFFFFF" BorderThickness="1" CornerRadius="0,0,1,0"/>
</Border>
<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
<Path x:Name="path"
Height="6"
Width="7"
Stretch="Fill"
Opacity="1"
Data="M 2,6 C2,6 3,6 3,6 3,6 3,5 3,5 3,5 4,5 4,5 4,5 4,6 4,6 4,6 5,6 5,6 5,6 7,6 7,6 7,6 7,5 7,5 7,5 6,5 6,5 6,5 6,4 6,4 6,4 5,4 5,4 5,4 5,2 5,2 5,2 6,2 6,2 6,2 6,1 6,1 6,1 7,1 7,1 7,1 7,0 7,0 7,0 5,0 5,0 5,0 4,0 4,0 4,0 4,1 4,1 4,1 3,1 3,1 3,1 3,0 3,0 3,0 2,0 2,0 2,0 0,0 0,0 0,0 0,1 0,1 0,1 1,1 1,1 1,1 1,2 1,2 1,2 2,2 2,2 2,2 2,4 2,4 2,4 1,4 1,4 1,4 1,5 1,5 1,5 0,5 0,5 0,5 0,6 0,6 0,6 2,6 2,6 z"
Fill="White" Margin="0,0,0,1" Visibility="Collapsed" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="MessageBoxDragWidgetTemplate" TargetType="{x:Type Thumb}">
<Border Background="Transparent">
</Border>
</ControlTemplate>
<Style TargetType="{x:Type local:MessageBox}">
<Setter Property="Background" Value="#FFFFFFFF"/>
<Setter Property="BorderBrush" Value="{StaticResource MessageBoxDarkBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CaptionForeground" Value="#FF000000" />
<Setter Property="CloseButtonStyle" Value="{StaticResource MessageBoxCloseButtonStyle}" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="IsEnabled" Value="true" />
<Setter Property="MinWidth" Value="350" />
<Setter Property="MinHeight" Value="50" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="VerticalContentAlignment" Value="Top" />
<Setter Property="WindowBorderBrush" Value="{StaticResource MessageBoxDarkBrush}" />
<Setter Property="WindowBackground" Value="{StaticResource MessageBoxWindowBackgroundBrush}" />
<Setter Property="WindowOpacity" Value="1.0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:MessageBox}">
<Grid x:Name="Root">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="group1">
<VisualState x:Name="OK">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OkGrid" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="OKCancel">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OkCancelGrid" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="YesNo">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="YesNoGrid" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="YesNoCancel">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="YesNoCancelGrid" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<!-- Borders -->
<Grid x:Name="MessageBoxWindowGrid">
<Border BorderBrush="{TemplateBinding WindowBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="5,5,0,0" Opacity="{TemplateBinding WindowOpacity}"/>
<Grid Margin="0" Background="{x:Null}">
<Border x:Name="MessageBoxWindow" Margin="1,1,1,1" Background="{TemplateBinding WindowBackground}" CornerRadius="4,4,0,0" Opacity="{TemplateBinding WindowOpacity}"/>
<Border BorderBrush="White" BorderThickness="1" CornerRadius="4,4,0,0" Margin="1" Opacity="0.7"/>
</Grid>
</Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" MinHeight="26"/>
<RowDefinition />
</Grid.RowDefinitions>
<!-- Content Border -->
<Grid Margin="6,0,6,6" x:Name="ContentGrid" Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Border BorderBrush="#FFFFFFFF" BorderThickness="1" CornerRadius="1"/>
<Border Margin="1" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0.1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
<Grid MinWidth="350">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Margin="24,16,24,22">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Message Image -->
<Image x:Name="MessageBoxImage" VerticalAlignment="Top" SnapsToDevicePixels="True" Stretch="None" Margin="-6,-1,10,-4" Source="{TemplateBinding ImageSource}"></Image>
<!-- Message Text -->
<TextBlock x:Name="MessageText" Grid.Column="1" TextWrapping="Wrap" VerticalAlignment="Center" MaxWidth="450"
Text="{TemplateBinding Text}"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStyle="{TemplateBinding FontStyle}"
FontWeight="{TemplateBinding FontWeight}"
Foreground="{TemplateBinding Foreground}"/>
</Grid>
<!-- Buttons -->
<Grid Grid.Row="1" HorizontalAlignment="Right" Margin="12,0,12,12">
<Grid x:Name="OkGrid" Visibility="Collapsed">
<Button x:Name="PART_OkButton" MinWidth="65" Margin="6,0,0,0">OK</Button>
</Grid>
<Grid x:Name="OkCancelGrid" Visibility="Collapsed">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button x:Name="PART_OkButton1" MinWidth="65" Margin="6,0,0,0">OK</Button>
<Button Grid.Column="1" x:Name="PART_CancelButton" MinWidth="65" Margin="6,0,0,0">Cancel</Button>
</Grid>
<Grid x:Name="YesNoGrid" Visibility="Collapsed">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button x:Name="PART_YesButton" MinWidth="65" Margin="6,0,0,0">Yes</Button>
<Button Grid.Column="1" x:Name="PART_NoButton" MinWidth="65" Margin="6,0,0,0">No</Button>
</Grid>
<Grid x:Name="YesNoCancelGrid" Visibility="Collapsed">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button x:Name="PART_YesButton1" MinWidth="65" Margin="6,0,0,0">Yes</Button>
<Button Grid.Column="1" x:Name="PART_NoButton1" MinWidth="65" Margin="6,0,0,0">No</Button>
<Button Grid.Column="2" x:Name="PART_CancelButton1" MinWidth="65" Margin="6,0,0,0">Cancel</Button>
</Grid>
</Grid>
</Grid>
</Border>
</Grid>
<!-- Header -->
<Border x:Name="HeaderArea" Background="Transparent" Grid.Column="1" CornerRadius="5,5,0,0" Margin="1,1,1,0">
<Grid>
<Grid x:Name="CaptionHeader" Margin="1,1,105,0" VerticalAlignment="Center">
<!-- Caption -->
<ContentControl x:Name="Caption" Margin="5,0,0,0" IsTabStop="False" HorizontalAlignment="Stretch"
Content="{TemplateBinding Caption}"
Foreground="{TemplateBinding CaptionForeground}"/>
</Grid>
<Thumb x:Name="PART_DragWidget" Template="{StaticResource MessageBoxDragWidgetTemplate}"/>
</Grid>
</Border>
</Grid>
<Border x:Name="Resize" BorderThickness="7" BorderBrush="Transparent" />
<!-- Close Button -->
<Border BorderBrush="#A5FFFFFF" BorderThickness="1,0,1,1" CornerRadius="0,0,3,3" VerticalAlignment="Top" Margin="0,1,7,0" HorizontalAlignment="Right">
<Button x:Name="PART_CloseButton" Style="{TemplateBinding CloseButtonStyle}" Height="17" Width="43" IsTabStop="False">
<Path Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Width="12" Fill="#E4FFFFFF" Stretch="Fill" Stroke="#FF535666"
Data="M0.5,0.5 L4.5178828,0.5 L6.0620003,3.125 L7.4936447,0.5 L11.5,0.5 L11.5,1.5476431 L8.7425003,6.1201854 L11.5,10.359666 L11.5,11.5 L7.4941902,11.5 L6.0620003,8.8740005 L4.5172949,11.5 L0.5,11.5 L0.5,10.43379 L3.3059995,6.1201582 L0.5,1.4676378 L0.5,0.5 z"/>
</Button>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

63
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.Designer.cs

@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.261
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Xceed.Wpf.Toolkit.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Xceed.Wpf.Toolkit.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

117
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Resources.resx

@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.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>
</resheader>
</root>

26
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.Designer.cs

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.261
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Xceed.Wpf.Toolkit.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

7
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Properties/Settings.settings

@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

18
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Attributes/TypeEditorAttribute.cs

@ -1,18 +0,0 @@
using System;
namespace Microsoft.Windows.Controls.PropertyGrid.Attributes
{
public class TypeEditorAttribute : Attribute
{
public Type Type { get; set; }
public TypeEditorAttribute(Type type)
{
var valueSourceInterface = type.GetInterface("Microsoft.Windows.Controls.PropertyGrid.Editors.ITypeEditor");
if (valueSourceInterface == null)
throw new ArgumentException("Type must implement the ITypeEditor interface.", "type");
Type = type;
}
}
}

45
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/EditorProviders/CheckBoxEditorProvider.cs

@ -1,45 +0,0 @@
using System;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows;
namespace Microsoft.Windows.Controls.PropertyGrid.Implementation.EditorProviders
{
public class CheckBoxEditorProvider : ITypeEditorProvider
{
CheckBox _checkbox;
public CheckBoxEditorProvider()
{
_checkbox = new CheckBox();
_checkbox.Margin = new Thickness(2, 0, 0, 0);
}
public void Initialize(PropertyItem propertyItem)
{
ResolveBinding(propertyItem);
}
public FrameworkElement ResolveEditor()
{
return _checkbox;
}
private void ResolveBinding(PropertyItem property)
{
var binding = new Binding(property.Name);
binding.Source = property.Instance;
binding.ValidatesOnExceptions = true;
binding.ValidatesOnDataErrors = true;
if (property.IsWriteable)
binding.Mode = BindingMode.TwoWay;
else
binding.Mode = BindingMode.OneWay;
BindingOperations.SetBinding(_checkbox, CheckBox.IsCheckedProperty, binding);
}
}
}

67
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/EditorProviders/EnumComboBoxEditorProvider.cs

@ -1,67 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Controls;
using System.Windows;
using System.Windows.Data;
using System.Reflection;
namespace Microsoft.Windows.Controls.PropertyGrid.Implementation.EditorProviders
{
public class EnumComboBoxEditorProvider : ITypeEditorProvider
{
ComboBox _comboBox;
public EnumComboBoxEditorProvider()
{
_comboBox = new ComboBox();
}
public void Initialize(PropertyItem propertyItem)
{
ResolveBinding(propertyItem);
SetItemsSource(propertyItem);
}
public FrameworkElement ResolveEditor()
{
return _comboBox;
}
private void ResolveBinding(PropertyItem property)
{
var binding = new Binding(property.Name);
binding.Source = property.Instance;
binding.ValidatesOnExceptions = true;
binding.ValidatesOnDataErrors = true;
if (property.IsWriteable)
binding.Mode = BindingMode.TwoWay;
else
binding.Mode = BindingMode.OneWay;
BindingOperations.SetBinding(_comboBox, ComboBox.SelectedItemProperty, binding);
}
private void SetItemsSource(PropertyItem property)
{
_comboBox.ItemsSource = GetValues(property.PropertyType);
}
public static object[] GetValues(Type enumType)
{
List<object> values = new List<object>();
var fields = from field in enumType.GetFields()
where field.IsLiteral
select field;
foreach (FieldInfo field in fields)
{
values.Add(field.GetValue(enumType));
}
return values.ToArray();
}
}
}

110
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/EditorProviders/FontComboBoxEditorProvider.cs

@ -1,110 +0,0 @@
using System;
using System.Collections.Generic;
using System.Windows.Controls;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;
namespace Microsoft.Windows.Controls.PropertyGrid.Implementation.EditorProviders
{
public class FontComboBoxEditorProvider : ITypeEditorProvider
{
ComboBox _comboBox;
public FontComboBoxEditorProvider()
{
_comboBox = new ComboBox();
}
public void Initialize(PropertyItem propertyItem)
{
ResolveBinding(propertyItem);
SetItemsSource(propertyItem);
}
public FrameworkElement ResolveEditor()
{
return _comboBox;
}
private void ResolveBinding(PropertyItem property)
{
var binding = new Binding(property.Name);
binding.Source = property.Instance;
binding.ValidatesOnExceptions = true;
binding.ValidatesOnDataErrors = true;
if (property.IsWriteable)
binding.Mode = BindingMode.TwoWay;
else
binding.Mode = BindingMode.OneWay;
BindingOperations.SetBinding(_comboBox, ComboBox.SelectedItemProperty, binding);
}
private void SetItemsSource(PropertyItem property)
{
if (property.PropertyType == typeof(FontFamily))
{
List<FontFamily> fonts = new List<FontFamily>();
fonts.Add(new FontFamily("Arial"));
fonts.Add(new FontFamily("Courier New"));
fonts.Add(new FontFamily("Times New Roman"));
fonts.Add(new FontFamily("Batang"));
fonts.Add(new FontFamily("BatangChe"));
fonts.Add(new FontFamily("DFKai-SB"));
fonts.Add(new FontFamily("Dotum"));
fonts.Add(new FontFamily("DutumChe"));
fonts.Add(new FontFamily("FangSong"));
fonts.Add(new FontFamily("GulimChe"));
fonts.Add(new FontFamily("Gungsuh"));
fonts.Add(new FontFamily("GungsuhChe"));
fonts.Add(new FontFamily("KaiTi"));
fonts.Add(new FontFamily("Malgun Gothic"));
fonts.Add(new FontFamily("Meiryo"));
fonts.Add(new FontFamily("Microsoft JhengHei"));
fonts.Add(new FontFamily("Microsoft YaHei"));
fonts.Add(new FontFamily("MingLiU"));
fonts.Add(new FontFamily("MingLiu_HKSCS"));
fonts.Add(new FontFamily("MingLiu_HKSCS-ExtB"));
fonts.Add(new FontFamily("MingLiu-ExtB"));
_comboBox.ItemsSource = fonts;
}
else if (property.PropertyType == typeof(FontWeight))
{
List<FontWeight> list = new List<FontWeight>()
{
FontWeights.Black, FontWeights.Bold, FontWeights.ExtraBlack, FontWeights.ExtraBold,
FontWeights.ExtraLight, FontWeights.Light, FontWeights.Medium, FontWeights.Normal, FontWeights.SemiBold,
FontWeights.Thin
};
_comboBox.ItemsSource = list;
}
else if (property.PropertyType == typeof(FontStyle))
{
List<FontStyle> list = new List<FontStyle>()
{
FontStyles.Italic,
FontStyles.Normal
};
_comboBox.ItemsSource = list;
}
else if (property.PropertyType == typeof(FontStretch))
{
List<FontStretch> list = new List<FontStretch>()
{
FontStretches.Condensed,
FontStretches.Expanded,
FontStretches.ExtraCondensed,
FontStretches.ExtraExpanded,
FontStretches.Normal,
FontStretches.SemiCondensed,
FontStretches.SemiExpanded,
FontStretches.UltraCondensed,
FontStretches.UltraExpanded
};
_comboBox.ItemsSource = list;
}
}
}
}

11
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/EditorProviders/ITypeEditorProvider.cs

@ -1,11 +0,0 @@
using System;
using System.Windows;
namespace Microsoft.Windows.Controls.PropertyGrid.Implementation.EditorProviders
{
interface ITypeEditorProvider
{
void Initialize(PropertyItem propertyItem);
FrameworkElement ResolveEditor();
}
}

41
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/EditorProviders/NumericUpDownEditorProvider.cs

@ -1,41 +0,0 @@
using System;
using System.Windows.Data;
using System.Windows;
namespace Microsoft.Windows.Controls.PropertyGrid.Implementation.EditorProviders
{
public class NumericUpDownEditorProvider : ITypeEditorProvider
{
NumericUpDown _numericUpDown;
public NumericUpDownEditorProvider()
{
_numericUpDown = new NumericUpDown();
}
public void Initialize(PropertyItem propertyItem)
{
ResolveBinding(propertyItem);
}
public FrameworkElement ResolveEditor()
{
return _numericUpDown;
}
private void ResolveBinding(PropertyItem property)
{
var binding = new Binding(property.Name);
binding.Source = property.Instance;
binding.ValidatesOnExceptions = true;
binding.ValidatesOnDataErrors = true;
if (property.IsWriteable)
binding.Mode = BindingMode.TwoWay;
else
binding.Mode = BindingMode.OneWay;
BindingOperations.SetBinding(_numericUpDown, NumericUpDown.ValueProperty, binding);
}
}
}

42
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/EditorProviders/TextBoxEditorProvider.cs

@ -1,42 +0,0 @@
using System;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows;
namespace Microsoft.Windows.Controls.PropertyGrid.Implementation.EditorProviders
{
public class TextBoxEditorProvider : ITypeEditorProvider
{
FrameworkElement _editor;
public TextBoxEditorProvider()
{
_editor = new TextBox();
}
public void Initialize(PropertyItem propertyItem)
{
ResolveBinding(propertyItem);
}
public FrameworkElement ResolveEditor()
{
return _editor;
}
private void ResolveBinding(PropertyItem property)
{
var binding = new Binding(property.Name);
binding.Source = property.Instance;
binding.ValidatesOnExceptions = true;
binding.ValidatesOnDataErrors = true;
if (property.IsWriteable)
binding.Mode = BindingMode.TwoWay;
else
binding.Mode = BindingMode.OneWay;
BindingOperations.SetBinding(_editor, TextBox.TextProperty, binding);
}
}
}

33
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DateTimeUpDownEditor.cs

@ -1,33 +0,0 @@
/************************************************************************
Extended WPF Toolkit
Copyright (C) 2010-2012 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
This program can be provided to you by Xceed Software Inc. under a
proprietary commercial license agreement for use in non-Open Source
projects. The commercial version of Extended WPF Toolkit also includes
priority technical support, commercial updates, and many additional
useful WPF controls if you license Xceed Business Suite for WPF.
Visit http://xceed.com and follow @datagrid on Twitter.
**********************************************************************/
namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
public class DateTimeUpDownEditor : TypeEditor<DateTimeUpDown>
{
protected override void SetControlProperties()
{
Editor.BorderThickness = new System.Windows.Thickness( 0 );
}
protected override void SetValueDependencyProperty()
{
ValueProperty = DateTimeUpDown.ValueProperty;
}
}
}

34
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DecimalUpDownEditor.cs

@ -1,34 +0,0 @@
/************************************************************************
Extended WPF Toolkit
Copyright (C) 2010-2012 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
This program can be provided to you by Xceed Software Inc. under a
proprietary commercial license agreement for use in non-Open Source
projects. The commercial version of Extended WPF Toolkit also includes
priority technical support, commercial updates, and many additional
useful WPF controls if you license Xceed Business Suite for WPF.
Visit http://xceed.com and follow @datagrid on Twitter.
**********************************************************************/
namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
public class DecimalUpDownEditor : TypeEditor<DecimalUpDown>
{
protected override void SetControlProperties()
{
Editor.BorderThickness = new System.Windows.Thickness( 0 );
}
protected override void SetValueDependencyProperty()
{
ValueProperty = DecimalUpDown.ValueProperty;
}
}
}

34
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/DoubleUpDownEditor.cs

@ -1,34 +0,0 @@
/************************************************************************
Extended WPF Toolkit
Copyright (C) 2010-2012 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
This program can be provided to you by Xceed Software Inc. under a
proprietary commercial license agreement for use in non-Open Source
projects. The commercial version of Extended WPF Toolkit also includes
priority technical support, commercial updates, and many additional
useful WPF controls if you license Xceed Business Suite for WPF.
Visit http://xceed.com and follow @datagrid on Twitter.
**********************************************************************/
namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
public class DoubleUpDownEditor : TypeEditor<DoubleUpDown>
{
protected override void SetControlProperties()
{
Editor.BorderThickness = new System.Windows.Thickness( 0 );
}
protected override void SetValueDependencyProperty()
{
ValueProperty = DoubleUpDown.ValueProperty;
}
}
}

33
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/IntegerUpDownEditor.cs

@ -1,33 +0,0 @@
/************************************************************************
Extended WPF Toolkit
Copyright (C) 2010-2012 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
This program can be provided to you by Xceed Software Inc. under a
proprietary commercial license agreement for use in non-Open Source
projects. The commercial version of Extended WPF Toolkit also includes
priority technical support, commercial updates, and many additional
useful WPF controls if you license Xceed Business Suite for WPF.
Visit http://xceed.com and follow @datagrid on Twitter.
**********************************************************************/
namespace Xceed.Wpf.Toolkit.PropertyGrid.Editors
{
public class IntegerUpDownEditor : TypeEditor<IntegerUpDown>
{
protected override void SetControlProperties()
{
Editor.BorderThickness = new System.Windows.Thickness( 0 );
}
protected override void SetValueDependencyProperty()
{
ValueProperty = IntegerUpDown.ValueProperty;
}
}
}

12
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/Editors/NumericUpDownEditor.cs

@ -1,12 +0,0 @@
using System;
namespace Microsoft.Windows.Controls.PropertyGrid.Editors
{
public class NumericUpDownEditor : TypeEditor<NumericUpDown>
{
protected override void SetValueDependencyProperty()
{
ValueProperty = NumericUpDown.ValueProperty;
}
}
}

12
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/IEditorDefinition.cs

@ -1,12 +0,0 @@
using System;
using System.Windows;
namespace Microsoft.Windows.Controls.PropertyGrid
{
public interface IEditorDefinition
{
DataTemplate EditorTemplate { get; set; }
PropertyDefinitionCollection PropertiesDefinitions { get; set; }
Type TargetType { get; set; }
}
}

72
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyCategoryItem.cs

@ -1,72 +0,0 @@
using System;
using System.Collections.Generic;
using System.Windows.Controls;
using System.Windows;
namespace Microsoft.Windows.Controls.PropertyGrid
{
public class PropertyCategoryItem : Control
{
public static readonly DependencyProperty CategoryProperty = DependencyProperty.Register("Category", typeof(string), typeof(PropertyCategoryItem), new UIPropertyMetadata(String.Empty, new PropertyChangedCallback(OnCategoryChanged), new CoerceValueCallback(OnCoerceCategory)));
private static object OnCoerceCategory(DependencyObject o, object value)
{
PropertyCategoryItem propertyCategoryItem = o as PropertyCategoryItem;
if (propertyCategoryItem != null)
return propertyCategoryItem.OnCoerceCategory((string)value);
else
return value;
}
private static void OnCategoryChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
PropertyCategoryItem propertyCategoryItem = o as PropertyCategoryItem;
if (propertyCategoryItem != null)
propertyCategoryItem.OnCategoryChanged((string)e.OldValue, (string)e.NewValue);
}
protected virtual string OnCoerceCategory(string value)
{
// TODO: Keep the proposed value within the desired range.
return value;
}
protected virtual void OnCategoryChanged(string oldValue, string newValue)
{
// TODO: Add your property changed side-effects. Descendants can override as well.
}
public string Category
{
// IMPORTANT: To maintain parity between setting a property in XAML and procedural code, do not touch the getter and setter inside this dependency property!
get
{
return (string)GetValue(CategoryProperty);
}
set
{
SetValue(CategoryProperty, value);
}
}
private List<PropertyItem> _Properties = new List<PropertyItem>();
public List<PropertyItem> Properties
{
get
{
return _Properties;
}
set
{
_Properties = value;
}
}
static PropertyCategoryItem()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(PropertyCategoryItem), new FrameworkPropertyMetadata(typeof(PropertyCategoryItem)));
}
}
}

186
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/FormatToolbar.xaml

@ -1,186 +0,0 @@
<UserControl x:Class="Microsoft.Windows.Controls.Formatting.FormatToolbar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Background="Transparent"
IsTabStop="False"
x:Name="_window">
<UserControl.Effect>
<DropShadowEffect BlurRadius="5" Opacity=".25" />
</UserControl.Effect>
<UserControl.Resources>
<ControlTemplate x:Key="ThumbControlTemplate" TargetType="{x:Type Thumb}">
<Border Background="Transparent" Cursor="Hand" ToolTip="Click to Drag">
</Border>
</ControlTemplate>
<Style TargetType="{x:Type Separator}" BasedOn="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}"/>
<SolidColorBrush x:Key="MouseOverBorderBrush" Color="#FFFFB700" />
<LinearGradientBrush x:Key="MouseOverBackgroundBrush" StartPoint="0,0" EndPoint="0,1" >
<GradientStop Offset="0" Color="#FFFEFBF4" />
<GradientStop Offset="0.19" Color="#FFFDE7CE" />
<GradientStop Offset="0.39" Color="#FFFDDEB8" />
<GradientStop Offset="0.39" Color="#FFFFCE6B" />
<GradientStop Offset="0.79" Color="#FFFFDE9A" />
<GradientStop Offset="1" Color="#FFFFEBAA" />
</LinearGradientBrush>
<SolidColorBrush x:Key="CheckedBorderBrush" Color="#FFC29B29" />
<LinearGradientBrush x:Key="CheckedBackgroundBrush" StartPoint="0,0" EndPoint="0,1" >
<GradientStop Offset="0" Color="#FFFFDCA0" />
<GradientStop Offset="0.18" Color="#FFFFD692" />
<GradientStop Offset="0.39" Color="#FFFFC45D" />
<GradientStop Offset="1" Color="#FFFFD178" />
</LinearGradientBrush>
<SolidColorBrush x:Key="PressedBorderBrush" Color="#FFC29B29" />
<LinearGradientBrush x:Key="PressedBackgroundBrush" StartPoint="0,0" EndPoint="0,1" >
<GradientStop Offset="0" Color="#FFE3C085" />
<GradientStop Offset="0.19" Color="#FFF4CC89" />
<GradientStop Offset="0.36" Color="#FFF5C777" />
<GradientStop Offset="0.36" Color="#FFF5BB56" />
<GradientStop Offset="0.79" Color="#FFF4CE9A" />
<GradientStop Offset="1" Color="#FFF3E28D" />
</LinearGradientBrush>
<Style x:Key="FormatBarToggleButtonStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Height" Value="22" />
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="ToolTipService.InitialShowDelay" Value="900"/>
<Setter Property="ToolTipService.ShowDuration" Value="20000"/>
<Setter Property="ToolTipService.BetweenShowDelay" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Grid SnapsToDevicePixels="True">
<Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2"/>
<Border x:Name="MiddleBorder" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="2">
<Border x:Name="InnerBorder" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" CornerRadius="2" Padding="{TemplateBinding Padding}">
<StackPanel x:Name="StackPanel" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<ContentPresenter x:Name="Content" Content="{TemplateBinding Content}" Margin="1"
RenderOptions.BitmapScalingMode="NearestNeighbor"
VerticalAlignment="Center"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</StackPanel>
</Border>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="OuterBorder" Value="{StaticResource MouseOverBackgroundBrush}"/>
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="{StaticResource MouseOverBorderBrush}"/>
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" TargetName="Content" Value="0.5"/>
<Setter Property="TextElement.Foreground" TargetName="OuterBorder" Value="#FF9E9E9E"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" TargetName="OuterBorder" Value="{StaticResource CheckedBackgroundBrush}"/>
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="{StaticResource CheckedBorderBrush}"/>
<Setter Property="BorderBrush" TargetName="InnerBorder">
<Setter.Value>
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFE7CBAD" Offset="0"/>
<GradientStop Color="#FFF7D7B5" Offset="0.1"/>
<GradientStop Color="#FFFFD38C" Offset="0.36"/>
<GradientStop Color="#FFFFC75A" Offset="0.36"/>
<GradientStop Color="#FFFFEFA5" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="OuterBorder" Value="{StaticResource PressedBackgroundBrush}"/>
<Setter Property="BorderBrush" TargetName="OuterBorder" Value="{StaticResource PressedBorderBrush}"/>
<Setter Property="BorderBrush" TargetName="InnerBorder" Value="Transparent"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsChecked" Value="True"/>
<Condition Property="IsMouseOver" Value="True"/>
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="MiddleBorder">
<Setter.Value>
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#40FFFEFE" Offset="0"/>
<GradientStop Color="#40FFFEFE" Offset="0.39"/>
<GradientStop Color="#20FFCE68" Offset="0.39"/>
<GradientStop Color="#20FFCE68" Offset="0.69"/>
<GradientStop Color="#10FFFFFF" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Border CornerRadius="3" BorderThickness="1" BorderBrush="Gray" Background="WhiteSmoke">
<Grid Margin="5,0,5,5">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Thumb x:Name="_dragWidget" Height="10"
Template="{StaticResource ThumbControlTemplate}"
DragDelta="DragWidget_DragDelta"/>
<StackPanel Grid.Row="1">
<StackPanel Orientation="Horizontal">
<ComboBox x:Name="_cmbFontFamilies" IsEditable="True" Width="110"
SelectionChanged="FontFamily_SelectionChanged"/>
<ComboBox x:Name="_cmbFontSizes" IsEditable="True" Width="45"
SelectionChanged="FontSize_SelectionChanged"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,3,0,0">
<ToggleButton x:Name="_btnBold" Style="{StaticResource FormatBarToggleButtonStyle}"
Command="EditingCommands.ToggleBold" CommandTarget="{Binding ElementName=_window, Path=RichTextBox}">
<Image Source="/WPFToolkit.Extended;component/RichTextBox/FormatToolbar/Images/Bold16.png" />
</ToggleButton>
<ToggleButton x:Name="_btnItalic" Style="{StaticResource FormatBarToggleButtonStyle}"
Command="{x:Static EditingCommands.ToggleItalic}" CommandTarget="{Binding ElementName=_window, Path=RichTextBox}">
<Image Source="/WPFToolkit.Extended;component/RichTextBox/FormatToolbar/Images/Italic16.png" />
</ToggleButton>
<ToggleButton x:Name="_btnUnderline" Style="{StaticResource FormatBarToggleButtonStyle}"
Command="{x:Static EditingCommands.ToggleUnderline}" CommandTarget="{Binding ElementName=_window, Path=RichTextBox}">
<Image Source="/WPFToolkit.Extended;component/RichTextBox/FormatToolbar/Images/Underline16.png" />
</ToggleButton>
<Separator />
<RadioButton x:Name="_btnAlignLeft" Style="{StaticResource FormatBarToggleButtonStyle}"
Command="{x:Static EditingCommands.AlignLeft}" CommandTarget="{Binding ElementName=_window, Path=RichTextBox}" >
<Image Source="/WPFToolkit.Extended;component/RichTextBox/FormatToolbar/Images/LeftAlign16.png" />
</RadioButton>
<RadioButton x:Name="_btnAlignCenter" Style="{StaticResource FormatBarToggleButtonStyle}"
Command="{x:Static EditingCommands.AlignCenter}" CommandTarget="{Binding ElementName=_window, Path=RichTextBox}" >
<Image Source="/WPFToolkit.Extended;component/RichTextBox/FormatToolbar/Images/CenterAlign16.png" />
</RadioButton>
<RadioButton x:Name="_btnAlignRight" Style="{StaticResource FormatBarToggleButtonStyle}"
Command="{x:Static EditingCommands.AlignRight}" CommandTarget="{Binding ElementName=_window, Path=RichTextBox}" >
<Image Source="/WPFToolkit.Extended;component/RichTextBox/FormatToolbar/Images/RightAlign16.png" />
</RadioButton>
</StackPanel>
</StackPanel>
</Grid>
</Border>
</UserControl>

148
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/FormatToolbar.xaml.cs

@ -1,148 +0,0 @@
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Controls.Primitives;
namespace Microsoft.Windows.Controls.Formatting
{
/// <summary>
/// Interaction logic for FormatToolbar.xaml
/// </summary>
public partial class FormatToolbar : UserControl
{
#region Properties
public static readonly DependencyProperty RichTextBoxProperty = DependencyProperty.Register("RichTextBox", typeof(RichTextBox), typeof(FormatToolbar));
public RichTextBox RichTextBox
{
get { return (RichTextBox)GetValue(RichTextBoxProperty); }
set { SetValue(RichTextBoxProperty, value); }
}
public double[] FontSizes
{
get
{
return new double[] {
3.0, 4.0, 5.0, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5,
10.0, 10.5, 11.0, 11.5, 12.0, 12.5, 13.0, 13.5, 14.0, 15.0,
16.0, 17.0, 18.0, 19.0, 20.0, 22.0, 24.0, 26.0, 28.0, 30.0,
32.0, 34.0, 36.0, 38.0, 40.0, 44.0, 48.0, 52.0, 56.0, 60.0, 64.0, 68.0, 72.0, 76.0,
80.0, 88.0, 96.0, 104.0, 112.0, 120.0, 128.0, 136.0, 144.0
};
}
}
#endregion
#region Constructors
public FormatToolbar(RichTextBox richTextBox)
{
InitializeComponent();
Loaded += FormatToolbar_Loaded;
RichTextBox = richTextBox;
RichTextBox.SelectionChanged += RichTextBox_SelectionChanged;
}
#endregion //Constructors
#region Event Hanlders
void FormatToolbar_Loaded(object sender, RoutedEventArgs e)
{
_cmbFontFamilies.ItemsSource = System.Windows.Media.Fonts.SystemFontFamilies;
_cmbFontSizes.ItemsSource = FontSizes;
}
private void FontFamily_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (e.AddedItems.Count == 0)
return;
FontFamily editValue = (FontFamily)e.AddedItems[0];
ApplyPropertyValueToSelectedText(TextElement.FontFamilyProperty, editValue);
}
private void FontSize_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (e.AddedItems.Count == 0)
return;
ApplyPropertyValueToSelectedText(TextElement.FontSizeProperty, e.AddedItems[0]);
}
void RichTextBox_SelectionChanged(object sender, RoutedEventArgs e)
{
UpdateVisualState();
}
private void DragWidget_DragDelta(object sender, DragDeltaEventArgs e)
{
ProcessMove(e);
}
#endregion //Event Hanlders
#region Methods
private void UpdateVisualState()
{
UpdateToggleButtonState();
UpdateSelectedFontFamily();
UpdateSelectedFontSize();
}
private void UpdateToggleButtonState()
{
UpdateItemCheckedState(_btnBold, TextElement.FontWeightProperty, FontWeights.Bold);
UpdateItemCheckedState(_btnItalic, TextElement.FontStyleProperty, FontStyles.Italic);
UpdateItemCheckedState(_btnUnderline, Inline.TextDecorationsProperty, TextDecorations.Underline);
UpdateItemCheckedState(_btnAlignLeft, Paragraph.TextAlignmentProperty, TextAlignment.Left);
UpdateItemCheckedState(_btnAlignCenter, Paragraph.TextAlignmentProperty, TextAlignment.Center);
UpdateItemCheckedState(_btnAlignRight, Paragraph.TextAlignmentProperty, TextAlignment.Right);
}
void UpdateItemCheckedState(ToggleButton button, DependencyProperty formattingProperty, object expectedValue)
{
object currentValue = RichTextBox.Selection.GetPropertyValue(formattingProperty);
button.IsChecked = (currentValue == DependencyProperty.UnsetValue) ? false : currentValue != null && currentValue.Equals(expectedValue);
}
private void UpdateSelectedFontFamily()
{
object value = RichTextBox.Selection.GetPropertyValue(TextElement.FontFamilyProperty);
FontFamily currentFontFamily = (FontFamily)((value == DependencyProperty.UnsetValue) ? null : value);
if (currentFontFamily != null)
{
_cmbFontFamilies.SelectedItem = currentFontFamily;
}
}
private void UpdateSelectedFontSize()
{
object value = RichTextBox.Selection.GetPropertyValue(TextElement.FontSizeProperty);
_cmbFontSizes.SelectedValue = (value == DependencyProperty.UnsetValue) ? null : value;
}
void ApplyPropertyValueToSelectedText(DependencyProperty formattingProperty, object value)
{
if (value == null)
return;
RichTextBox.Selection.ApplyPropertyValue(formattingProperty, value);
}
private void ProcessMove(DragDeltaEventArgs e)
{
AdornerLayer layer = AdornerLayer.GetAdornerLayer(RichTextBox);
UIElementAdorner<Control> adorner = layer.GetAdorners(RichTextBox)[0] as UIElementAdorner<Control>;
adorner.SetOffsets(adorner.OffsetLeft + e.HorizontalChange, adorner.OffsetTop + e.VerticalChange);
}
#endregion //Methods
}
}

107
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/FormatToolbarManager.cs

@ -1,107 +0,0 @@
using System;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows;
namespace Microsoft.Windows.Controls.Formatting
{
internal class FormatToolbarManager
{
RichTextBox _richTextBox;
readonly UIElementAdorner<Control> _adorner;
FormatToolbar toolbar;
bool AdornerIsVisible
{
get { return _adorner.Visibility == Visibility.Visible; }
}
public FormatToolbarManager(RichTextBox richTextBox)
{
_richTextBox = richTextBox;
_adorner = new UIElementAdorner<Control>(richTextBox);
toolbar = new FormatToolbar(richTextBox);
AttachToRichtextBox();
}
private void AttachToRichtextBox()
{
_richTextBox.Selection.Changed += Selection_Changed;
}
void Selection_Changed(object sender, EventArgs e)
{
TextRange selectedText = new TextRange(_richTextBox.Selection.Start, _richTextBox.Selection.End);
if (selectedText.Text.Length > 0)
{
VerifyAdorner();
}
else
{
HideAdorner();
}
}
//TODO: refactor
void VerifyAdorner()
{
VerifyAdornerLayer();
Control adorningEditor = toolbar;
_adorner.Child = adorningEditor;
_adorner.Visibility = Visibility.Visible;
Rect wordBoundary = _richTextBox.Selection.End.GetPositionAtOffset(0, LogicalDirection.Backward).GetCharacterRect(LogicalDirection.Backward);
double left = wordBoundary.X;
double top = (wordBoundary.Y + wordBoundary.Height) - toolbar.ActualHeight;
//top boundary
if (top < 0)
{
top = wordBoundary.Y + wordBoundary.Height;
}
//right boundary
if (left + toolbar.ActualWidth > _richTextBox.ActualWidth - 20)
{
left = left - toolbar.ActualWidth;
top = wordBoundary.Y + wordBoundary.Height + 5;
}
//bottom boundary
if (top + toolbar.ActualHeight > _richTextBox.ActualHeight - 20)
{
top = wordBoundary.Y - (toolbar.ActualHeight + wordBoundary.Height);
}
_adorner.SetOffsets(left, top);
}
/// <summary>
/// Ensures that the adorner is in the adorner layer.
/// </summary>
/// <returns>True if the adorner is in the adorner layer, else false.</returns>
bool VerifyAdornerLayer()
{
if (_adorner.Parent != null)
return true;
AdornerLayer layer = AdornerLayer.GetAdornerLayer(_richTextBox);
if (layer == null)
return false;
layer.Add(_adorner);
return true;
}
void HideAdorner()
{
if (this.AdornerIsVisible)
{
_adorner.Visibility = Visibility.Collapsed;
_adorner.Child = null;
}
}
}
}

BIN
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/Images/Bold16.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

BIN
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/Images/CenterAlign16.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

BIN
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/Images/Italic16.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 B

BIN
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/Images/JustifyAlign16.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

BIN
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/Images/LeftAlign16.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

BIN
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/Images/RightAlign16.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

BIN
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBox/FormatToolbar/Images/Underline16.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 B

60
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Aero/Buttons.xaml

@ -1,60 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Brushes.xaml" />
</ResourceDictionary.MergedDictionaries>
<DataTemplate x:Key="IncreaseGlyphKey">
<Path
Width="7"
Height="4"
Data="M 0,3 C0,3 0,4 0,4 0,4 3,4 3,4 3,4 3,3 3,3 3,3 4,3 4,3 4,3 4,4 4,4 4,4 7,4 7,4 7,4 7,3 7,3 7,3 6,3 6,3 6,3 6,2 6,2 6,2 5,2 5,2 5,2 5,1 5,1 5,1 4,1 4,1 4,1 4,0 4,0 4,0 3,0 3,0 3,0 3,1 3,1 3,1 2,1 2,1 2,1 2,2 2,2 2,2 1,2 1,2 1,2 1,3 1,3 1,3 0,3 0,3 z"
Fill="{StaticResource DropdownBtnGlyphNormalForegroundFillKey}"
SnapsToDevicePixels="True"
HorizontalAlignment="Center" VerticalAlignment="Center" Focusable="False" />
</DataTemplate>
<DataTemplate x:Key="DecreaseGlyphKey">
<Path
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="{StaticResource DropdownBtnGlyphNormalForegroundFillKey}"
SnapsToDevicePixels="True"
HorizontalAlignment="Center" VerticalAlignment="Center" Focusable="False" />
</DataTemplate>
<Style x:Key="SpinnerButtonStyle" TargetType="RepeatButton">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{StaticResource DropdownBtnGlyphNormalForegroundFillKey}"/>
<Setter Property="Padding" Value="4,2"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RepeatButton">
<Border x:Name="Bd" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" CornerRadius="{StaticResource SpinButtonCornerRadiusKey}" >
<Grid>
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="Bd" Value="{StaticResource DropdownBtnHottrackCenterFillKey}"/>
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource DropdownBtnHottrackOuterBorderFillKey}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource DropdownBtnPressedOuterBorderFillKey}"/>
<Setter Property="Background" TargetName="Bd" Value="{StaticResource DropdownBtnPressedCenterFillKey}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" TargetName="Bd" Value="{StaticResource ControlDisabledBackgroundKey}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

135
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Common/Generic_Common.xaml

@ -1,135 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Microsoft.Windows.Controls"
xmlns:primitives="clr-namespace:Microsoft.Windows.Controls.Primitives"
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters"
xmlns:magConverters="clr-namespace:Microsoft.Windows.Controls.Mag.Converters"
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes">
<!-- =============================================================================== -->
<!-- Common Styles -->
<!-- Need to find a way to share these for ChildWIndow and MessageBox -->
<!-- =============================================================================== -->
<LinearGradientBrush x:Key="WindowDarkBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFA3AEB9" Offset="0"/>
<GradientStop Color="#FF8399A9" Offset="0.375"/>
<GradientStop Color="#FF718597" Offset="0.375"/>
<GradientStop Color="#FF617584" Offset="1"/>
</LinearGradientBrush>
<LinearGradientBrush x:Key="WindowBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Offset="0" Color="#FFffffff"/>
<GradientStop Offset="0.479" Color="#FFf4f5f6"/>
<GradientStop Offset="1" Color="#FFd0d6db"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<LinearGradientBrush x:Key="WindowButtonHoverBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Offset="0" Color="#FFb5bdc8"/>
<GradientStop Offset="0.370" Color="#FF8399a9"/>
<GradientStop Offset="0.370" Color="#FF718597"/>
<GradientStop Offset="0.906" Color="#FFb9c1ca"/>
<GradientStop Offset="1" Color="#FFb9c1ca"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<LinearGradientBrush x:Key="WindowButtonPressedBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Offset="0" Color="#FF6b7c8d"/>
<GradientStop Offset="0.370" Color="#FF4d606f"/>
<GradientStop Offset="0.370" Color="#FF465460"/>
<GradientStop Offset="0.906" Color="#FF262d33"/>
<GradientStop Offset="1" Color="#FF262d33"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<Style x:Key="WindowCloseButtonStyle" TargetType="Button">
<Setter Property="Foreground" Value="#FF000000"/>
<Setter Property="Padding" Value="3"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background)">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource WindowButtonHoverBrush}"></DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background)">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource WindowButtonPressedBrush}"></DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border x:Name="Background" CornerRadius="0,0,2,0" Background="{StaticResource WindowDarkBrush}">
<Border Margin="1,0,1,1" BorderBrush="#59FFFFFF" BorderThickness="1" CornerRadius="0,0,1,0"/>
</Border>
<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
<Path x:Name="path"
Height="6"
Width="7"
Stretch="Fill"
Opacity="1"
Data="M 2,6 C2,6 3,6 3,6 3,6 3,5 3,5 3,5 4,5 4,5 4,5 4,6 4,6 4,6 5,6 5,6 5,6 7,6 7,6 7,6 7,5 7,5 7,5 6,5 6,5 6,5 6,4 6,4 6,4 5,4 5,4 5,4 5,2 5,2 5,2 6,2 6,2 6,2 6,1 6,1 6,1 7,1 7,1 7,1 7,0 7,0 7,0 5,0 5,0 5,0 4,0 4,0 4,0 4,1 4,1 4,1 3,1 3,1 3,1 3,0 3,0 3,0 2,0 2,0 2,0 0,0 0,0 0,0 0,1 0,1 0,1 1,1 1,1 1,1 1,2 1,2 1,2 2,2 2,2 2,2 2,4 2,4 2,4 1,4 1,4 1,4 1,5 1,5 1,5 0,5 0,5 0,5 0,6 0,6 0,6 2,6 2,6 z"
Fill="White" Margin="0,0,0,1" Visibility="Collapsed" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- =============================================================================== -->
<!-- SelectorItem -->
<!-- =============================================================================== -->
<Style TargetType="{x:Type primitives:SelectorItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type primitives:SelectorItem}">
<Border x:Name="_background"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<CheckBox Name="PART_CheckBox" IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Center" Focusable="False" Margin="3,1,5,1"/>
<Border Grid.Column="1">
<ContentPresenter Margin="2" ContentSource="Content" />
</Border>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="_background" Property="Background" Value="Blue"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

BIN
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TokenizedTextBox/Images/delete8.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 B

55
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TokenizedTextBox/Implementation/Token.cs

@ -1,55 +0,0 @@
/************************************************************************
Extended WPF Toolkit
Copyright (C) 2010-2012 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
This program can be provided to you by Xceed Software Inc. under a
proprietary commercial license agreement for use in non-Open Source
projects. The commercial version of Extended WPF Toolkit also includes
priority technical support, commercial updates, and many additional
useful WPF controls if you license Xceed Business Suite for WPF.
Visit http://xceed.com and follow @datagrid on Twitter.
**********************************************************************/
using System;
namespace Xceed.Wpf.Toolkit
{
internal class Token
{
public string Delimiter
{
get;
private set;
}
public object Item
{
get;
set;
}
private string _tokenKey;
public string TokenKey
{
get
{
return _tokenKey;
}
set
{
_tokenKey = String.Format( "{0}{1}", value, Delimiter );
}
}
public Token( string delimiter )
{
Delimiter = delimiter;
}
}
}

45
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TokenizedTextBox/Implementation/TokenItem.cs

@ -1,45 +0,0 @@
/************************************************************************
Extended WPF Toolkit
Copyright (C) 2010-2012 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
This program can be provided to you by Xceed Software Inc. under a
proprietary commercial license agreement for use in non-Open Source
projects. The commercial version of Extended WPF Toolkit also includes
priority technical support, commercial updates, and many additional
useful WPF controls if you license Xceed Business Suite for WPF.
Visit http://xceed.com and follow @datagrid on Twitter.
**********************************************************************/
using System.Windows;
using System.Windows.Controls;
namespace Xceed.Wpf.Toolkit
{
public class TokenItem : ContentControl
{
static TokenItem()
{
DefaultStyleKeyProperty.OverrideMetadata( typeof( TokenItem ), new FrameworkPropertyMetadata( typeof( TokenItem ) ) );
}
public static readonly DependencyProperty TokenKeyProperty = DependencyProperty.Register( "TokenKey", typeof( string ), typeof( TokenItem ), new UIPropertyMetadata( null ) );
public string TokenKey
{
get
{
return ( string )GetValue( TokenKeyProperty );
}
set
{
SetValue( TokenKeyProperty, value );
}
}
}
}

394
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TokenizedTextBox/Implementation/TokenizedTextBox.cs

@ -1,394 +0,0 @@
/************************************************************************
Extended WPF Toolkit
Copyright (C) 2010-2012 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
This program can be provided to you by Xceed Software Inc. under a
proprietary commercial license agreement for use in non-Open Source
projects. The commercial version of Extended WPF Toolkit also includes
priority technical support, commercial updates, and many additional
useful WPF controls if you license Xceed Business Suite for WPF.
Visit http://xceed.com and follow @datagrid on Twitter.
**********************************************************************/
//Based of the code written by Pavan Podila
//http://blog.pixelingene.com/2010/10/tokenizing-control-convert-text-to-tokens/
using System;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
namespace Xceed.Wpf.Toolkit
{
public class TokenizedTextBox : ItemsControl
{
#region Members
private System.Windows.Controls.RichTextBox _rtb = null;
private bool _surpressTextChanged = false;
private bool _surpressTextChangedEvent = false;
#endregion //Members
#region Properties
public static readonly DependencyProperty SearchMemberPathProperty = DependencyProperty.Register( "SearchMemberPath", typeof( string ), typeof( TokenizedTextBox ), new UIPropertyMetadata( String.Empty ) );
public string SearchMemberPath
{
get
{
return ( string )GetValue( SearchMemberPathProperty );
}
set
{
SetValue( SearchMemberPathProperty, value );
}
}
public static readonly DependencyProperty TokenDelimiterProperty = DependencyProperty.Register( "TokenDelimiter", typeof( string ), typeof( TokenizedTextBox ), new UIPropertyMetadata( ";" ) );
public string TokenDelimiter
{
get
{
return ( string )GetValue( TokenDelimiterProperty );
}
set
{
SetValue( TokenDelimiterProperty, value );
}
}
public static readonly DependencyProperty TokenTemplateProperty = DependencyProperty.Register( "TokenTemplate", typeof( DataTemplate ), typeof( TokenizedTextBox ), new UIPropertyMetadata( null ) );
public DataTemplate TokenTemplate
{
get
{
return ( DataTemplate )GetValue( TokenTemplateProperty );
}
set
{
SetValue( TokenTemplateProperty, value );
}
}
#region Text
public static readonly DependencyProperty TextProperty = DependencyProperty.Register( "Text", typeof( string ), typeof( TokenizedTextBox ), new UIPropertyMetadata( null, OnTextChanged ) );
public string Text
{
get
{
return ( string )GetValue( TextProperty );
}
set
{
SetValue( TextProperty, value );
}
}
private static void OnTextChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
{
TokenizedTextBox tokenizedTextBox = o as TokenizedTextBox;
if( tokenizedTextBox != null )
tokenizedTextBox.OnTextChanged( ( string )e.OldValue, ( string )e.NewValue );
}
protected virtual void OnTextChanged( string oldValue, string newValue )
{
if( _rtb == null || _surpressTextChanged )
return;
//TODO: when text changes update tokens
}
#endregion //Text
public static readonly DependencyProperty ValueMemberPathProperty = DependencyProperty.Register( "ValueMemberPath", typeof( string ), typeof( TokenizedTextBox ), new UIPropertyMetadata( String.Empty ) );
public string ValueMemberPath
{
get
{
return ( string )GetValue( ValueMemberPathProperty );
}
set
{
SetValue( ValueMemberPathProperty, value );
}
}
#endregion //Properties
#region Constructors
static TokenizedTextBox()
{
DefaultStyleKeyProperty.OverrideMetadata( typeof( TokenizedTextBox ), new FrameworkPropertyMetadata( typeof( TokenizedTextBox ) ) );
}
public TokenizedTextBox()
{
CommandBindings.Add( new CommandBinding( TokenizedTextBoxCommands.Delete, DeleteToken ) );
}
#endregion //Constructors
#region Base Class Overrides
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
if( _rtb != null )
{
_rtb.TextChanged -= RichTextBox_TextChanged;
_rtb.PreviewKeyDown -= RichTextBox_PreviewKeyDown;
}
_rtb = GetTemplateChild( "PART_ContentHost" ) as System.Windows.Controls.RichTextBox;
if( _rtb != null )
{
_rtb.TextChanged += RichTextBox_TextChanged;
_rtb.PreviewKeyDown += RichTextBox_PreviewKeyDown;
}
InitializeTokensFromText();
}
#endregion //Base Class Overrides
#region Event Handlers
private void RichTextBox_TextChanged( object sender, TextChangedEventArgs e )
{
if( _surpressTextChangedEvent )
return;
var text = _rtb.CaretPosition.GetTextInRun( LogicalDirection.Backward );
var token = ResolveToken( text );
if( token != null )
{
ReplaceTextWithToken( text.Trim(), token );
}
}
void RichTextBox_PreviewKeyDown( object sender, KeyEventArgs e )
{
InlineUIContainer container = null;
if( e.Key == Key.Back )
{
container = _rtb.CaretPosition.GetAdjacentElement( LogicalDirection.Backward ) as InlineUIContainer;
}
else if( e.Key == Key.Delete )
{
//if the selected text is a blank space, I will assume that a token item is selected.
//if a token item is selected, we need to move the caret position to the left of the element so we can grab the InlineUIContainer
if( _rtb.Selection.Text == " " )
{
TextPointer moveTo = _rtb.CaretPosition.GetNextInsertionPosition( LogicalDirection.Backward );
_rtb.CaretPosition = moveTo;
}
//the cursor is to the left of a token item
container = _rtb.CaretPosition.GetAdjacentElement( LogicalDirection.Forward ) as InlineUIContainer;
}
//if the container is not null that means we have something to delete
if( container != null )
{
var token = ( container as InlineUIContainer ).Child as TokenItem;
if( token != null )
{
SetTextInternal( Text.Replace( token.TokenKey, "" ) );
}
}
}
#endregion //Event Handlers
#region Methods
private void InitializeTokensFromText()
{
if( !String.IsNullOrEmpty( Text ) )
{
string[] tokenKeys = Text.Split( new string[] { TokenDelimiter }, StringSplitOptions.RemoveEmptyEntries );
foreach( string tokenKey in tokenKeys )
{
var para = _rtb.CaretPosition.Paragraph;
var token = new Token( TokenDelimiter )
{
TokenKey = tokenKey,
Item = ResolveItemByTokenKey( tokenKey )
};
para.Inlines.Add( CreateTokenContainer( token ) );
}
}
}
private Token ResolveToken( string text )
{
if( text.EndsWith( TokenDelimiter ) )
return ResolveTokenBySearchMemberPath( text.Substring( 0, text.Length - 1 ).Trim() );
return null;
}
private Token ResolveTokenBySearchMemberPath( string searchText )
{
//create a new token and default the settings to the search text
var token = new Token( TokenDelimiter )
{
TokenKey = searchText,
Item = searchText
};
if( ItemsSource != null )
{
foreach( object item in ItemsSource )
{
var searchProperty = item.GetType().GetProperty( SearchMemberPath );
if( searchProperty != null )
{
var searchValue = searchProperty.GetValue( item, null );
if( searchText.Equals( searchValue.ToString(), StringComparison.InvariantCultureIgnoreCase ) )
{
var valueProperty = item.GetType().GetProperty( ValueMemberPath );
if( valueProperty != null )
token.TokenKey = valueProperty.GetValue( item, null ).ToString();
token.Item = item;
break;
}
}
}
}
return token;
}
private object ResolveItemByTokenKey( string tokenKey )
{
if( ItemsSource != null )
{
foreach( object item in ItemsSource )
{
var property = item.GetType().GetProperty( ValueMemberPath );
if( property != null )
{
var value = property.GetValue( item, null );
if( tokenKey.Equals( value.ToString(), StringComparison.InvariantCultureIgnoreCase ) )
return item;
}
}
}
return tokenKey;
}
private void ReplaceTextWithToken( string inputText, Token token )
{
_surpressTextChangedEvent = true;
var para = _rtb.CaretPosition.Paragraph;
var matchedRun = para.Inlines.FirstOrDefault( inline =>
{
var run = inline as Run;
return ( run != null && run.Text.EndsWith( inputText ) );
} ) as Run;
if( matchedRun != null ) // Found a Run that matched the inputText
{
var tokenContainer = CreateTokenContainer( token );
para.Inlines.InsertBefore( matchedRun, tokenContainer );
// Remove only if the Text in the Run is the same as inputText, else split up
if( matchedRun.Text == inputText )
{
para.Inlines.Remove( matchedRun );
}
else // Split up
{
var index = matchedRun.Text.IndexOf( inputText ) + inputText.Length;
var tailEnd = new Run( matchedRun.Text.Substring( index ) );
para.Inlines.InsertAfter( matchedRun, tailEnd );
para.Inlines.Remove( matchedRun );
}
//now append the Text with the token key
SetTextInternal( Text + token.TokenKey );
}
_surpressTextChangedEvent = false;
}
private InlineUIContainer CreateTokenContainer( Token token )
{
return new InlineUIContainer( CreateTokenItem( token ) )
{
BaselineAlignment = BaselineAlignment.Center
};
}
private TokenItem CreateTokenItem( Token token )
{
object item = token.Item;
var tokenItem = new TokenItem()
{
TokenKey = token.TokenKey,
Content = item,
ContentTemplate = TokenTemplate
};
if( TokenTemplate == null )
{
//if no template was supplied let's try to get a value from the object using the DisplayMemberPath
if( !String.IsNullOrEmpty( DisplayMemberPath ) )
{
var property = item.GetType().GetProperty( DisplayMemberPath );
if( property != null )
{
var value = property.GetValue( item, null );
if( value != null )
tokenItem.Content = value;
}
}
}
return tokenItem;
}
private void DeleteToken( object sender, ExecutedRoutedEventArgs e )
{
var para = _rtb.CaretPosition.Paragraph;
Inline inlineToRemove = para.Inlines.Where( inline => inline is InlineUIContainer && ( ( inline as InlineUIContainer ).Child as TokenItem ).TokenKey.Equals( e.Parameter ) ).FirstOrDefault();
if( inlineToRemove != null )
para.Inlines.Remove( inlineToRemove );
//update Text to remove delimited value
SetTextInternal( Text.Replace( e.Parameter.ToString(), "" ) );
}
private void SetTextInternal( string text )
{
_surpressTextChanged = true;
Text = text;
_surpressTextChanged = false;
}
#endregion //Methods
}
}

36
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TokenizedTextBox/Implementation/TokenizedTextBoxCommands.cs

@ -1,36 +0,0 @@
/************************************************************************
Extended WPF Toolkit
Copyright (C) 2010-2012 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
This program can be provided to you by Xceed Software Inc. under a
proprietary commercial license agreement for use in non-Open Source
projects. The commercial version of Extended WPF Toolkit also includes
priority technical support, commercial updates, and many additional
useful WPF controls if you license Xceed Business Suite for WPF.
Visit http://xceed.com and follow @datagrid on Twitter.
**********************************************************************/
using System.Windows.Input;
namespace Xceed.Wpf.Toolkit
{
public static class TokenizedTextBoxCommands
{
private static RoutedCommand _deleteCommand = new RoutedCommand();
public static RoutedCommand Delete
{
get
{
return _deleteCommand;
}
}
}
}

78
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/TokenizedTextBox/Themes/Generic.xaml

@ -1,78 +0,0 @@
<!--*********************************************************************
Extended WPF Toolkit
Copyright (C) 2010-2012 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
This program can be provided to you by Xceed Software Inc. under a
proprietary commercial license agreement for use in non-Open Source
projects. The commercial version of Extended WPF Toolkit also includes
priority technical support, commercial updates, and many additional
useful WPF controls if you license Xceed Business Suite for WPF.
Visit http://xceed.com and follow @datagrid on Twitter.
********************************************************************-->
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit">
<Style TargetType="{x:Type local:TokenItem}">
<Setter Property="Background" Value="#F3F7FD" />
<Setter Property="BorderBrush" Value="#BBD8FB" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Cursor" Value="Arrow" />
<Setter Property="Padding" Value="5,1,5,1" />
<Setter Property="Margin" Value="1,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TokenItem}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}"
Margin="{TemplateBinding Margin}">
<StackPanel Orientation="Horizontal" Margin="1">
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" />
<Button Margin="3,0,0,0" Cursor="Hand" Command="local:TokenizedTextBoxCommands.Delete" CommandParameter="{TemplateBinding TokenKey}">
<Button.Template>
<ControlTemplate TargetType="Button">
<ContentPresenter />
</ControlTemplate>
</Button.Template>
<Image Source="/WPFToolkit.Extended;component/TokenizedTextBox/Images/delete8.png" Width="8" Height="8" />
</Button>
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:TokenizedTextBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TokenizedTextBox}">
<Border x:Name="Bd"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid>
<RichTextBox x:Name="PART_ContentHost" AcceptsReturn="False" IsDocumentEnabled="True" Padding="-3,0,0,0" />
<!--<Popup>
<Grid Background="White">
<ItemsPresenter />
</Grid>
</Popup>-->
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

10
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/WPFToolkit.Extended.csproj.vspscc

@ -1,10 +0,0 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}

BIN
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/sn.pfx

Binary file not shown.

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

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

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

@ -1334,7 +1334,7 @@
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/> <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
<Setter Property="SizeToContent" Value="WidthAndHeight"/> <Setter Property="SizeToContent" Value="WidthAndHeight"/>
<Setter Property="ResizeMode" Value="NoResize"/> <Setter Property="ResizeMode" Value="NoResize"/>
<Setter Property="shell:WindowChrome.WindowChrome"> <!--<Setter Property="shell:WindowChrome.WindowChrome">
<Setter.Value> <Setter.Value>
<shell:WindowChrome <shell:WindowChrome
ResizeBorderThickness="10" ResizeBorderThickness="10"
@ -1342,7 +1342,7 @@
CornerRadius="3,3,3,3" CornerRadius="3,3,3,3"
GlassFrameThickness="4"/> GlassFrameThickness="4"/>
</Setter.Value> </Setter.Value>
</Setter> </Setter>-->
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:NavigatorWindow}"> <ControlTemplate TargetType="{x:Type avalonDockControls:NavigatorWindow}">

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

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

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

@ -1360,20 +1360,20 @@
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/> <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
<Setter Property="SizeToContent" Value="WidthAndHeight"/> <Setter Property="SizeToContent" Value="WidthAndHeight"/>
<Setter Property="ResizeMode" Value="NoResize"/> <Setter Property="ResizeMode" Value="NoResize"/>
<Setter Property="shell:WindowChrome.WindowChrome"> <!--<Setter Property="shell:WindowChrome.WindowChrome">
<Setter.Value> <Setter.Value>
<shell:WindowChrome <shell:WindowChrome
ResizeBorderThickness="10" ResizeBorderThickness="10"
CaptionHeight="16" CaptionHeight="16"
GlassFrameThickness="4"/> GlassFrameThickness="4"/>
</Setter.Value> </Setter.Value>
</Setter> </Setter>-->
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:NavigatorWindow}"> <ControlTemplate TargetType="{x:Type avalonDockControls:NavigatorWindow}">
<Grid> <Grid>
<Border x:Name="WindowBorder" BorderThickness="1" <Border x:Name="WindowBorder" BorderThickness="1"
Background="{DynamicResource AvalonDock_ThemeMetro_BaseColor2}" Background="White"
BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"> BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>

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

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

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

@ -1445,7 +1445,7 @@
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/> <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
<Setter Property="SizeToContent" Value="WidthAndHeight"/> <Setter Property="SizeToContent" Value="WidthAndHeight"/>
<Setter Property="ResizeMode" Value="NoResize"/> <Setter Property="ResizeMode" Value="NoResize"/>
<Setter Property="shell:WindowChrome.WindowChrome"> <!--<Setter Property="shell:WindowChrome.WindowChrome">
<Setter.Value> <Setter.Value>
<shell:WindowChrome <shell:WindowChrome
ResizeBorderThickness="10" ResizeBorderThickness="10"
@ -1453,7 +1453,7 @@
CornerRadius="3,3,3,3" CornerRadius="3,3,3,3"
GlassFrameThickness="4"/> GlassFrameThickness="4"/>
</Setter.Value> </Setter.Value>
</Setter> </Setter>-->
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type avalonDockControls:NavigatorWindow}"> <ControlTemplate TargetType="{x:Type avalonDockControls:NavigatorWindow}">

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

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

21
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableFloatingWindowControl.cs

@ -47,6 +47,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
_model = model; _model = model;
HideWindowCommand = new RelayCommand( ( p ) => OnExecuteHideWindowCommand( p ), ( p ) => CanExecuteHideWindowCommand( p ) ); HideWindowCommand = new RelayCommand( ( p ) => OnExecuteHideWindowCommand( p ), ( p ) => CanExecuteHideWindowCommand( p ) );
UpdateThemeResources();
} }
internal override void UpdateThemeResources( Xceed.Wpf.AvalonDock.Themes.Theme oldTheme = null ) internal override void UpdateThemeResources( Xceed.Wpf.AvalonDock.Themes.Theme oldTheme = null )
@ -61,7 +62,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
public override ILayoutElement Model public override ILayoutElement Model
{ {
get { return _model; } get
{
return _model;
}
} }
#region SingleContentLayoutItem #region SingleContentLayoutItem
@ -80,8 +84,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public LayoutItem SingleContentLayoutItem public LayoutItem SingleContentLayoutItem
{ {
get { return (LayoutItem)GetValue(SingleContentLayoutItemProperty); } get
set { SetValue(SingleContentLayoutItemProperty, value); } {
return ( LayoutItem )GetValue( SingleContentLayoutItemProperty );
}
set
{
SetValue( SingleContentLayoutItemProperty, value );
}
} }
/// <summary> /// <summary>
@ -147,7 +157,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
DockingManager IOverlayWindowHost.Manager DockingManager IOverlayWindowHost.Manager
{ {
get { return _model.Root.Manager; } get
{
return _model.Root.Manager;
}
} }
OverlayWindow _overlayWindow = null; OverlayWindow _overlayWindow = null;

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

@ -99,7 +99,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
Height = 0, Height = 0,
}); });
_internalHost_ContentRendered = false; //_internalHost_ContentRendered = false;
_internalHwndSource.ContentRendered += _internalHwndSource_ContentRendered; _internalHwndSource.ContentRendered += _internalHwndSource_ContentRendered;
_internalHwndSource.RootVisual = _internalHostPresenter; _internalHwndSource.RootVisual = _internalHostPresenter;
AddLogicalChild(_internalHostPresenter); AddLogicalChild(_internalHostPresenter);
@ -107,22 +107,23 @@ namespace Xceed.Wpf.AvalonDock.Controls
return new HandleRef(this, _internalHwndSource.Handle); return new HandleRef(this, _internalHwndSource.Handle);
} }
private bool _internalHost_ContentRendered = false; // private bool _internalHost_ContentRendered = false;
void _internalHwndSource_ContentRendered(object sender, EventArgs e) void _internalHwndSource_ContentRendered(object sender, EventArgs e)
{ {
_internalHost_ContentRendered = true; // _internalHost_ContentRendered = true;
} }
protected override IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{ //protected override IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
if (msg == Win32Helper.WM_WINDOWPOSCHANGING) //{
{ // if (msg == Win32Helper.WM_WINDOWPOSCHANGING)
if (_internalHost_ContentRendered) // {
Win32Helper.SetWindowPos(_internalHwndSource.Handle, Win32Helper.HWND_TOP, 0, 0, 0, 0, Win32Helper.SetWindowPosFlags.IgnoreMove | Win32Helper.SetWindowPosFlags.IgnoreResize); // if (_internalHost_ContentRendered)
} // Win32Helper.SetWindowPos(_internalHwndSource.Handle, Win32Helper.HWND_TOP, 0, 0, 0, 0, Win32Helper.SetWindowPosFlags.IgnoreMove | Win32Helper.SetWindowPosFlags.IgnoreResize);
return base.WndProc(hwnd, msg, wParam, lParam, ref handled); // }
} // return base.WndProc(hwnd, msg, wParam, lParam, ref handled);
//}
protected override void DestroyWindowCore(System.Runtime.InteropServices.HandleRef hwnd) protected override void DestroyWindowCore(System.Runtime.InteropServices.HandleRef hwnd)
{ {

81
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentControl.cs

@ -14,19 +14,10 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System.ComponentModel;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
@ -36,24 +27,18 @@ namespace Xceed.Wpf.AvalonDock.Controls
static LayoutDocumentControl() static LayoutDocumentControl()
{ {
DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutDocumentControl ), new FrameworkPropertyMetadata( typeof( LayoutDocumentControl ) ) ); DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutDocumentControl ), new FrameworkPropertyMetadata( typeof( LayoutDocumentControl ) ) );
FocusableProperty.OverrideMetadata(typeof(LayoutDocumentControl), new FrameworkPropertyMetadata(false)); FocusableProperty.OverrideMetadata( typeof( LayoutDocumentControl ), new FrameworkPropertyMetadata( true ) );
} }
public LayoutDocumentControl()
{
//SetBinding(FlowDirectionProperty, new Binding("Model.Root.Manager.FlowDirection") { Source = this });
}
#region Model #region Model
/// <summary> /// <summary>
/// Model Dependency Property /// Model Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty ModelProperty = public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model",
DependencyProperty.Register("Model", typeof(LayoutContent), typeof(LayoutDocumentControl), typeof( LayoutContent ),
new FrameworkPropertyMetadata((LayoutContent)null, typeof( LayoutDocumentControl ),
new PropertyChangedCallback(OnModelChanged))); new FrameworkPropertyMetadata( null, OnModelChanged ) );
/// <summary> /// <summary>
/// Gets or sets the Model property. This dependency property /// Gets or sets the Model property. This dependency property
@ -61,8 +46,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public LayoutContent Model public LayoutContent Model
{ {
get { return (LayoutContent)GetValue(ModelProperty); } get
set { SetValue(ModelProperty, value); } {
return ( LayoutContent )GetValue( ModelProperty );
}
set
{
SetValue( ModelProperty, value );
}
} }
/// <summary> /// <summary>
@ -89,10 +80,12 @@ namespace Xceed.Wpf.AvalonDock.Controls
SetLayoutItem( Model.Root.Manager.GetLayoutItemFromModel( Model ) ); SetLayoutItem( Model.Root.Manager.GetLayoutItemFromModel( Model ) );
} }
else else
{
SetLayoutItem( null ); SetLayoutItem( null );
} }
}
private void Model_PropertyChanged( object sender, System.ComponentModel.PropertyChangedEventArgs e ) private void Model_PropertyChanged( object sender, PropertyChangedEventArgs e )
{ {
if( e.PropertyName == "IsEnabled" ) if( e.PropertyName == "IsEnabled" )
{ {
@ -109,6 +102,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
} }
#endregion #endregion
#region LayoutItem #region LayoutItem
@ -116,12 +110,13 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// LayoutItem Read-Only Dependency Property /// LayoutItem Read-Only Dependency Property
/// </summary> /// </summary>
private static readonly DependencyPropertyKey LayoutItemPropertyKey private static readonly DependencyPropertyKey LayoutItemPropertyKey = DependencyProperty.RegisterReadOnly( "LayoutItem",
= DependencyProperty.RegisterReadOnly("LayoutItem", typeof(LayoutItem), typeof(LayoutDocumentControl), typeof( LayoutItem ),
new FrameworkPropertyMetadata((LayoutItem)null)); typeof( LayoutDocumentControl ),
new FrameworkPropertyMetadata(
( LayoutItem )null ) );
public static readonly DependencyProperty LayoutItemProperty public static readonly DependencyProperty LayoutItemProperty = LayoutItemPropertyKey.DependencyProperty;
= LayoutItemPropertyKey.DependencyProperty;
/// <summary> /// <summary>
/// Gets the LayoutItem property. This dependency property /// Gets the LayoutItem property. This dependency property
@ -129,7 +124,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public LayoutItem LayoutItem public LayoutItem LayoutItem
{ {
get { return (LayoutItem)GetValue(LayoutItemProperty); } get
{
return ( LayoutItem )GetValue( LayoutItemProperty );
}
} }
/// <summary> /// <summary>
@ -144,13 +142,30 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
protected override void OnPreviewGotKeyboardFocus(System.Windows.Input.KeyboardFocusChangedEventArgs e) protected override void OnPreviewGotKeyboardFocus( KeyboardFocusChangedEventArgs e )
{ {
if (Model != null) this.SetIsActive();
Model.IsActive = true;
base.OnPreviewGotKeyboardFocus( e ); base.OnPreviewGotKeyboardFocus( e );
} }
protected override void OnMouseLeftButtonDown( MouseButtonEventArgs e )
{
this.SetIsActive();
base.OnMouseLeftButtonDown( e );
}
protected override void OnMouseRightButtonDown( MouseButtonEventArgs e )
{
this.SetIsActive();
base.OnMouseLeftButtonDown( e );
}
private void SetIsActive()
{
if( this.Model != null )
{
this.Model.IsActive = true;
}
}
} }
} }

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

@ -38,6 +38,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
: base( model ) : base( model )
{ {
_model = model; _model = model;
UpdateThemeResources();
} }
@ -45,12 +46,18 @@ namespace Xceed.Wpf.AvalonDock.Controls
public override ILayoutElement Model public override ILayoutElement Model
{ {
get { return _model; } get
{
return _model;
}
} }
public LayoutItem RootDocumentLayoutItem public LayoutItem RootDocumentLayoutItem
{ {
get { return _model.Root.Manager.GetLayoutItemFromModel(_model.RootDocument); } get
{
return _model.Root.Manager.GetLayoutItemFromModel( _model.RootDocument );
}
} }
protected override void OnInitialized( EventArgs e ) protected override void OnInitialized( EventArgs e )

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

@ -96,7 +96,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
public Visual RootVisual public Visual RootVisual
{ {
get { return _rootPresenter; } get
{
return _rootPresenter;
}
} }
protected override Size MeasureOverride( Size constraint ) protected override Size MeasureOverride( Size constraint )
@ -124,8 +127,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public UIElement Content public UIElement Content
{ {
get { return (UIElement)GetValue(ContentProperty); } get
set { SetValue(ContentProperty, value); } {
return ( UIElement )GetValue( ContentProperty );
}
set
{
SetValue( ContentProperty, value );
}
} }
/// <summary> /// <summary>
@ -155,7 +164,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
this.Loaded += new RoutedEventHandler( OnLoaded ); this.Loaded += new RoutedEventHandler( OnLoaded );
this.Unloaded += new RoutedEventHandler( OnUnloaded ); this.Unloaded += new RoutedEventHandler( OnUnloaded );
_model = model; _model = model;
UpdateThemeResources();
} }
internal virtual void UpdateThemeResources( Theme oldTheme = null ) internal virtual void UpdateThemeResources( Theme oldTheme = null )
@ -200,10 +208,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
if( Content != null ) if( Content != null )
{ {
var host = Content as FloatingWindowContentHost; var host = Content as FloatingWindowContentHost;
if( host != null )
{
host.Dispose(); host.Dispose();
}
if( _hwndSrc != null ) if( _hwndSrc != null )
{ {
@ -296,7 +301,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
base.OnInitialized( e ); base.OnInitialized( e );
} }
public abstract ILayoutElement Model { get; } public abstract ILayoutElement Model
{
get;
}
#region IsDragging #region IsDragging
@ -318,7 +326,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public bool IsDragging public bool IsDragging
{ {
get { return (bool)GetValue(IsDraggingProperty); } get
{
return ( bool )GetValue( IsDraggingProperty );
}
} }
/// <summary> /// <summary>
@ -421,6 +432,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
case Win32Helper.WM_MOVING: case Win32Helper.WM_MOVING:
{ {
UpdateDragPosition(); UpdateDragPosition();
if( this.IsMaximized )
{
this.UpdateMaximizedState( false );
}
} }
break; break;
case Win32Helper.WM_LBUTTONUP: //set as handled right button click on title area (after showing context menu) case Win32Helper.WM_LBUTTONUP: //set as handled right button click on title area (after showing context menu)
@ -468,7 +483,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected bool CloseInitiatedByUser protected bool CloseInitiatedByUser
{ {
get { return !_internalCloseFlag; } get
{
return !_internalCloseFlag;
}
} }
internal bool KeepContentVisibleOnClose internal bool KeepContentVisibleOnClose
@ -477,11 +495,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
set; set;
} }
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
{
base.OnMouseLeftButtonUp(e);
}
#region IsMaximized #region IsMaximized
/// <summary> /// <summary>
@ -497,7 +510,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public bool IsMaximized public bool IsMaximized
{ {
get { return (bool)GetValue(IsMaximizedProperty); } get
{
return ( bool )GetValue( IsMaximizedProperty );
}
private set private set
{ {
SetValue( IsMaximizedProperty, value ); SetValue( IsMaximizedProperty, value );

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

@ -189,6 +189,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
SetDefaultBindings(); SetDefaultBindings();
} }
internal bool IsViewExists()
{
return (_view != null);
}
ContentPresenter _view = null; ContentPresenter _view = null;
public ContentPresenter View public ContentPresenter View
{ {

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

@ -2578,10 +2578,13 @@ namespace Xceed.Wpf.AvalonDock
var layoutItem = this.GetLayoutItemFromModel( layoutContent ); var layoutItem = this.GetLayoutItemFromModel( layoutContent );
if( layoutItem != null ) if( layoutItem != null )
{
if( layoutItem.IsViewExists() )
{ {
this.InternalRemoveLogicalChild( layoutItem.View ); this.InternalRemoveLogicalChild( layoutItem.View );
} }
} }
}
#region ActiveContent #region ActiveContent

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

@ -823,6 +823,9 @@
<Trigger Property="WindowState" Value="Maximized"> <Trigger Property="WindowState" Value="Maximized">
<Setter Property="Padding" Value="3" TargetName="WindowBorder"/> <Setter Property="Padding" Value="3" TargetName="WindowBorder"/>
</Trigger> </Trigger>
<DataTrigger Binding="{Binding Model.RootDocument.IsActive, RelativeSource={RelativeSource Self}}" Value="True">
<Setter TargetName="WindowBorder" Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</DataTrigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
@ -930,9 +933,9 @@
<Trigger Property="WindowState" Value="Maximized"> <Trigger Property="WindowState" Value="Maximized">
<Setter Property="Padding" Value="3" TargetName="WindowBorder"/> <Setter Property="Padding" Value="3" TargetName="WindowBorder"/>
</Trigger> </Trigger>
<Trigger Property="IsKeyboardFocused" Value="True"> <DataTrigger Binding="{Binding Model.SinglePane.SelectedContent.IsActive, RelativeSource={RelativeSource Self}}" Value="True">
<Setter TargetName="WindowBorder" Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/> <Setter TargetName="WindowBorder" Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger> </DataTrigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>

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

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

91
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartAxisView.xaml.cs.txt

@ -14,6 +14,9 @@
************************************************************************************/ ************************************************************************************/
#if !OPEN_SOURCE
using Xceed.Wpf.Toolkit.Chart;
#endif
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Controls; using System.Windows.Controls;
using System; using System;
@ -26,33 +29,119 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views
/// </summary> /// </summary>
public partial class ChartAxisView : DemoView public partial class ChartAxisView : DemoView
{ {
#if !OPEN_SOURCE
#region Members
private static DataPointsList<DataPoint> _numericDataPoints = new DataPointsList<DataPoint>()
{ new DataPoint(1, 1)
, new DataPoint(2, 2)
, new DataPoint(1.5, 3)
, new DataPoint(5, 3.5)
};
private static DataPointsList<DataPoint> _dateTimeDataPoints = new DataPointsList<DataPoint>()
{
new DataPoint( new System.DateTime( 2000, 1, 1 ).ToOADate(), 1 )
, new DataPoint( new System.DateTime( 2001, 1, 1 ).ToOADate(), 2 )
, new DataPoint( new System.DateTime( 2002, 5, 5 ).ToOADate(), 4 )
, new DataPoint( new System.DateTime( 2003, 1, 1 ).ToOADate(), 3 )
};
private static DataPointsList<DataPoint> _labelsDataPoints = new DataPointsList<DataPoint>()
{
new DataPoint( 0, 5, "Zeus" )
, new DataPoint( 0, 2, "Poseidon" )
, new DataPoint( 0, 3, "Hades" )
, new DataPoint( 0, 4, "Hestia" )
, new DataPoint( 0, 1, "Hera" )
};
#endregion
#region Dependency Properties
public static readonly DependencyProperty SelectedAxisProperty = DependencyProperty.Register(
"SelectedAxis",
typeof( Axis ),
typeof( ChartAxisView ),
new UIPropertyMetadata( null ) );
#endregion
#region Properties
public Axis SelectedAxis
{
get
{
return ( Axis )GetValue( SelectedAxisProperty );
}
set
{
SetValue( SelectedAxisProperty, value );
}
}
#endregion
#endif
#region Initialization #region Initialization
public ChartAxisView() public ChartAxisView()
{ {
InitializeComponent(); InitializeComponent();
#if !OPEN_SOURCE
_axisComboBox.SelectedIndex = 0;
_xAxis.DateTimeFormat = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern;
#endif
} }
#endregion #endregion
#if !OPEN_SOURCE
#region Event Handlers
private void OnAxisComboBoxSelectionChanged( object sender, SelectionChangedEventArgs e )
{
ComboBox comboBox = ( ComboBox )sender;
this.SelectedAxis = ( comboBox.SelectedIndex == 0 ) ? _xAxis : _yAxis;
}
private void OnAxisLabelsTypeChanged( object sender, SelectionChangedEventArgs e )
{
ComboBox comboBox = ( ComboBox )sender;
switch( (LabelsType)comboBox.SelectedItem )
{
case LabelsType.Numeric:
this.SetSeriesDataPoints( _numericDataPoints );
break;
case LabelsType.DateTime:
this.SetSeriesDataPoints( _dateTimeDataPoints );
break;
case LabelsType.Labels :
this.SetSeriesDataPoints( _labelsDataPoints );
this.SelectedAxis.GraduationMode = AxisGraduationMode.Manual;
break;
}
}
#endregion
#endif
#region Implementation #region Implementation
#if !OPEN_SOURCE
private void SetSeriesDataPoints( DataPointsList<DataPoint> list )
{
if( _series != null )
{
_series.DataPoints.Clear();
foreach( DataPoint dataPoint in list )
_series.DataPoints.Add( dataPoint );
}
}
#endif
#endregion #endregion
} }
} }

213
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartAxisView.xaml.txt

@ -25,29 +25,212 @@
<local:DemoView.Description> <local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe"> <Paragraph FontSize="14" FontFamily="Segoe">
<Run>The chart's Axis class represents the x- and y-axis of an area (Area class) in a chart. They can be individually configured with many properties.</Run> <Run>The chart's Axis class represents the x- and y-axis of an area (Area class) in a chart. They can be individually configured with many properties.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
<LineBreak /> <LineBreak />
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<ObjectDataProvider x:Key="AxisLabelsType" MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="xctk:LabelsType" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ObjectDataProvider x:Key="AxisGraduationMode" MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="xctk:AxisGraduationMode" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ObjectDataProvider x:Key="AxisScaleMode" MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="xctk:AxisScaleMode" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ObjectDataProvider x:Key="AxisLabelLayout" MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="xctk:AxisLabelLayout" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<x:Array x:Key="AxisArray" Type="sys:String">
<sys:String>X Axis</sys:String>
<sys:String>Y Axis</sys:String>
</x:Array>
<conv:GraduationModeToComboBoxConverter x:Key="GraduationModeToComboBoxConverter" />
<conv:LabelsTypeToPropertyEnabledConverter x:Key="LabelsTypeToPropertyEnabledConverter" />
<conv:ScaleModeToPropertyEnabledConverter x:Key="ScaleModeToPropertyEnabledConverter" />
<conv:AxesLabelsTypePropertyEnabledConverter x:Key="AxesLabelsTypePropertyEnabledConverter" />
<sys:String x:Key="AxisLabelsLayoutTooltip">
Resize the window along the orientation of the selected axis to see all labels (staggered) or only the ones that fit (every second, third label, etc., is omitted).
</sys:String>
</local:DemoView.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox Header="Features" Grid.Row="0" Margin="3">
<Grid Margin="3" HorizontalAlignment="Left">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- 1st column -->
<TextBlock Text="Axis: " VerticalAlignment="Center" FontWeight="Bold" FontSize="13"/>
<ComboBox x:Name="_axisComboBox" FontWeight="Bold" FontSize="13" Grid.Column="1" ItemsSource="{StaticResource AxisArray}" SelectionChanged="OnAxisComboBoxSelectionChanged" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3"/>
<TextBlock Text="Labels Type: " Grid.Row="1" VerticalAlignment="Center" />
<ComboBox x:Name="_labelsType" Grid.Row="1" Grid.Column="1" ItemsSource="{Binding Source={StaticResource AxisLabelsType}}" SelectedItem="{Binding SelectedAxis.LabelsType, ElementName=_demo}" SelectionChanged="OnAxisLabelsTypeChanged" IsEnabled="{Binding SelectedIndex, ElementName=_axisComboBox, Converter={StaticResource AxesLabelsTypePropertyEnabledConverter}}" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
<TextBlock Text="Graduation Mode: " Grid.Row="2" VerticalAlignment="Center" IsEnabled="{Binding IsEnabled, ElementName=_graduationMode}" />
<ComboBox x:Name="_graduationMode" Grid.Row="2" Grid.Column="1" ItemsSource="{Binding Source={StaticResource AxisGraduationMode}}" Width="100" IsEnabled="{Binding SelectedItem, ElementName=_labelsType, Converter={StaticResource LabelsTypeToPropertyEnabledConverter}, ConverterParameter=0}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3">
<ComboBox.SelectedItem>
<MultiBinding Converter="{StaticResource GraduationModeToComboBoxConverter}" >
<Binding Path="SelectedAxis.GraduationMode" ElementName="_demo" />
<Binding Path="SelectedAxis.LabelsType" ElementName="_demo" />
</MultiBinding>
</ComboBox.SelectedItem>
</ComboBox>
<TextBlock Text="Scale Mode: " Grid.Row="3" VerticalAlignment="Center" />
<ComboBox x:Name="_scaleMode" Grid.Row="3" Grid.Column="1" ItemsSource="{Binding Source={StaticResource AxisScaleMode}}" SelectedItem="{Binding SelectedAxis.ScaleMode, ElementName=_demo}" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
<TextBlock Text="Custom Range Start: " Grid.Row="4" VerticalAlignment="Center" IsEnabled="{Binding SelectedItem, ElementName=_scaleMode, Converter={StaticResource ScaleModeToPropertyEnabledConverter}}" Style="{StaticResource DisableGrayText}"/>
<xctk:DoubleUpDown x:Name="_customRangeStart" Grid.Row="4" Grid.Column="1" Minimum="0" Maximum="{Binding Value, ElementName=_customRangeEnd}" Value="{Binding SelectedAxis.CustomRangeStart, ElementName=_demo}" Width="100" IsEnabled="{Binding SelectedItem, ElementName=_scaleMode, Converter={StaticResource ScaleModeToPropertyEnabledConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
<TextBlock Text="Custom Range End: " Grid.Row="5" VerticalAlignment="Center" IsEnabled="{Binding SelectedItem, ElementName=_scaleMode, Converter={StaticResource ScaleModeToPropertyEnabledConverter}}" Style="{StaticResource DisableGrayText}"/>
<xctk:DoubleUpDown x:Name="_customRangeEnd" Grid.Row="5" Grid.Column="1" Minimum="{Binding Value, ElementName=_customRangeStart}" Maximum="100" Value="{Binding SelectedAxis.CustomRangeEnd, ElementName=_demo}" Width="100" IsEnabled="{Binding SelectedItem, ElementName=_scaleMode, Converter={StaticResource ScaleModeToPropertyEnabledConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
<TextBlock Text="Label Decimal Count: " Grid.Row="6" VerticalAlignment="Center" IsEnabled="{Binding IsEnabled, ElementName=_labelDecimalCount}" Style="{StaticResource DisableGrayText}"/>
<ComboBox x:Name="_labelDecimalCount" Grid.Row="6" Grid.Column="1" SelectedValue="{Binding SelectedAxis.LabelDecimalCount, ElementName=_demo}" SelectedValuePath="Tag" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center" IsEnabled="{Binding SelectedItem, ElementName=_labelsType, Converter={StaticResource LabelsTypeToPropertyEnabledConverter}, ConverterParameter=1}" Margin="3" ToolTip="Gets/sets the decimal count on labels when GraduationMode is Numeric.">
<ComboBoxItem Content="Null" Tag="{x:Null}"/>
<ComboBoxItem Content="0" Tag="0"/>
<ComboBoxItem Content="1" Tag="1"/>
<ComboBoxItem Content="2" Tag="2"/>
<ComboBoxItem Content="3" Tag="3"/>
<ComboBoxItem Content="4" Tag="4"/>
</ComboBox>
<!-- 2nd column -->
<TextBlock Text="Title: " Grid.Column="2" VerticalAlignment="Center" Margin="10,0,0,0"/>
<TextBox Grid.Column="3" Text="{Binding SelectedAxis.Title, ElementName=_demo, UpdateSourceTrigger=PropertyChanged}" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
<TextBlock Text="Title Margin: " Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" Margin="10,0,0,0"/>
<xctk:IntegerUpDown Grid.Row="1" Grid.Column="3" Minimum="0" Maximum="100" Value="{Binding SelectedAxis.TitleMargin, ElementName=_demo}" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
<TextBlock Text="Axis Labels Layout: " Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" Margin="10,0,0,0"/>
<ComboBox Grid.Row="2" Grid.Column="3" ItemsSource="{Binding Source={StaticResource AxisLabelLayout}}" SelectedItem="{Binding SelectedAxis.AxisLabelsLayout, ElementName=_demo}" ToolTip="{StaticResource AxisLabelsLayoutTooltip}" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
<TextBlock Text="Ticks Count: " Grid.Row="3" Grid.Column="2" VerticalAlignment="Center" Margin="10,0,0,0"/>
<xctk:IntegerUpDown Grid.Row="3" Grid.Column="3" Minimum="0" Maximum="100" Value="{Binding SelectedAxis.TicksCount, ElementName=_demo}" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
<TextBlock Text="Reversed: " Grid.Row="4" Grid.Column="2" VerticalAlignment="Center" Margin="10,0,0,0"/>
<CheckBox Grid.Row="4" Grid.Column="3" IsChecked="{Binding SelectedAxis.Reversed, ElementName=_demo}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
<TextBlock Text="IntersectMinValue: " Grid.Row="5" Grid.Column="2" VerticalAlignment="Center" Margin="10,0,0,0"/>
<CheckBox Grid.Row="5" Grid.Column="3" IsChecked="{Binding SelectedAxis.IntersectMinValue, ElementName=_demo}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" ToolTip="Gets/Sets if the axis intersects the other axis at other axis minimim value."/>
<!-- 3rd column -->
<TextBlock Text="Show Arrow: " Grid.Column="4" VerticalAlignment="Center" Margin="10,0,0,0"/>
<CheckBox Grid.Column="5" IsChecked="{Binding SelectedAxis.ShowArrow, ElementName=_demo}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
<TextBlock Text="Show Axis: " Grid.Row="1" Grid.Column="4" VerticalAlignment="Center" Margin="10,0,0,0"/>
<CheckBox Grid.Row="1" Grid.Column="5" IsChecked="{Binding SelectedAxis.ShowAxis, ElementName=_demo}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
<TextBlock Text="Show Grid Lines: " Grid.Row="2" Grid.Column="4" VerticalAlignment="Center" Margin="10,0,0,0"/>
<CheckBox Grid.Row="2" Grid.Column="5" IsChecked="{Binding SelectedAxis.ShowGridLines, ElementName=_demo}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
<TextBlock Text="Show Ticks: " Grid.Row="3" Grid.Column="4" VerticalAlignment="Center" Margin="10,0,0,0"/>
<CheckBox Grid.Row="3" Grid.Column="5" IsChecked="{Binding SelectedAxis.ShowTicks, ElementName=_demo}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
<TextBlock Text="Show Tick Labels: " Grid.Row="4" Grid.Column="4" VerticalAlignment="Center" Margin="10,0,0,0"/>
<CheckBox Grid.Row="4" Grid.Column="5" IsChecked="{Binding SelectedAxis.ShowTickLabels, ElementName=_demo}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
<TextBlock Text="Show Axis Label: " Grid.Row="5" Grid.Column="4" VerticalAlignment="Center" Margin="10,0,0,0"/>
<CheckBox Grid.Row="5" Grid.Column="5" IsChecked="{Binding SelectedAxis.ShowAxisLabel, ElementName=_demo}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3" />
</Grid>
</GroupBox>
<TextBlock Grid.Row="1" Text="Usage:" Style="{StaticResource Header}" Margin="10"/>
<xctk:Chart Grid.Row="2" MinHeight="200" ShowLegend="False">
<xctk:Chart.Areas>
<xctk:Area Title="Area #1">
<xctk:Area.XAxis>
<xctk:Axis x:Name="_xAxis"
LabelsType="Numeric"
GraduationMode="Automatic"
TicksCount="10"
ScaleMode="Automatic"
CustomRangeStart="0"
CustomRangeEnd="10"
Title="X Axis"
TitleMargin="10"
AxisLabelsLayout="ShowAll"
ShowArrow="False"
ShowAxis="True"
ShowGridLines="True"
ShowTicks="True"
ShowTickLabels="True"
ShowAxisLabel="True"
Reversed="False"
IntersectMinValue="True"
LabelDecimalCount="{x:Null}"/>
</xctk:Area.XAxis>
<xctk:Area.YAxis>
<xctk:Axis x:Name="_yAxis"
LabelsType="Numeric"
GraduationMode="Automatic"
TicksCount="10"
ScaleMode="Automatic"
CustomRangeStart="0"
CustomRangeEnd="10"
Title="Y Axis"
TitleMargin="10"
AxisLabelsLayout="ShowAll"
ShowArrow="False"
ShowAxis="True"
ShowGridLines="True"
ShowTicks="True"
ShowTickLabels="True"
ShowAxisLabel="True"
Reversed="False"
IntersectMinValue="True"
LabelDecimalCount="{x:Null}" />
</xctk:Area.YAxis>
<xctk:Area.Series>
<xctk:Series x:Name="_series"
DefaultInterior="Red">
<xctk:Series.Layout>
<xctk:ColumnLayout/>
</xctk:Series.Layout>
</xctk:Series>
</xctk:Area.Series>
</xctk:Area>
</xctk:Chart.Areas>
</xctk:Chart>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\ChartAxis.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\ChartAxis.png" Width="600" Height="400"/>
##END-->
</local:DemoView> </local:DemoView>

3
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartLegendView.xaml.cs.txt

@ -14,6 +14,9 @@
**************************************************************************************/ **************************************************************************************/
#if !OPEN_SOURCE
using Xceed.Wpf.Toolkit.Chart;
#endif
using System.Windows.Media; using System.Windows.Media;
using System.Diagnostics; using System.Diagnostics;
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views

131
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartLegendView.xaml.txt

@ -28,24 +28,135 @@
<LineBreak /> <LineBreak />
<LineBreak /> <LineBreak />
<Run>A legend can be moved around, resized, and docked. Please note that a legend can be resized only when its Dock property is set to Float and if the AllowResize property is set to true.</Run> <Run>A legend can be moved around, resized, and docked. Please note that a legend can be resized only when its Dock property is set to Float and if the AllowResize property is set to true.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
<LineBreak /> <LineBreak />
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<ObjectDataProvider x:Key="LegendDock" MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="xctk:LegendDock" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
</local:DemoView.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox Header="Features" Grid.Row="0" Margin="5">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- 1st column-->
<TextBlock Text="Dock: " VerticalAlignment="Center" />
<ComboBox Grid.Column="1" ItemsSource="{Binding Source={StaticResource LegendDock}}" SelectedItem="{Binding Dock, ElementName=_legend}" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<TextBlock Text="Title: " Grid.Row="1" VerticalAlignment="Center" />
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Title, ElementName=_legend, UpdateSourceTrigger=PropertyChanged}" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<!-- 2nd column-->
<TextBlock Text="Allow Resize: " Grid.Column="2" VerticalAlignment="Center" Margin="10,0,0,0"/>
<CheckBox Grid.Column="3" IsChecked="{Binding AllowResize, ElementName=_legend}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<TextBlock Text="Allow Move: " Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" Margin="10,0,0,0"/>
<CheckBox x:Name="_allowMove" Grid.Row="1" Grid.Column="3" IsChecked="{Binding AllowMove, ElementName=_legend}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<!--3rd column-->
<TextBlock Text="Allow Dock: " Grid.Column="4" VerticalAlignment="Center" IsEnabled="{Binding IsChecked, ElementName=_allowMove}" Margin="10,0,0,0" Style="{StaticResource DisableGrayText}"/>
<CheckBox Grid.Column="5" IsChecked="{Binding AllowDock, ElementName=_legend}" IsEnabled="{Binding IsChecked, ElementName=_allowMove}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
</Grid>
</GroupBox>
<TextBlock Grid.Row="1" Text="Usage:" Style="{StaticResource Header}" Margin="10"/>
<xctk:Chart Grid.Row="2" MinHeight="350">
<xctk:Chart.Legend>
<xctk:Legend x:Name="_legend"
Dock="Left"
AllowResize="True"
AllowDock="True"
AllowMove="True"
Title="Legend"/>
</xctk:Chart.Legend>
<xctk:Chart.Areas>
<xctk:Area Title="Wins/month">
<xctk:Area.XAxis>
<xctk:Axis ShowAxisLabel="False" ShowTickLabels="False" ShowTicks="False"/>
</xctk:Area.XAxis>
<xctk:Area.YAxis>
<xctk:Axis ShowAxisLabel="False" ShowTickLabels="False" ShowTicks="False"/>
</xctk:Area.YAxis>
<xctk:Area.Series>
<xctk:Series Title="Months"
DefaultInterior="Green"
ShowPointsInLegend="True"
ShowHintLabels="True">
<xctk:Series.Layout>
<xctk:PieLayout />
</xctk:Series.Layout>
<xctk:Series.DataPoints>
<xctk:DataPoint X="6" Y="6" Label="Jan" />
<xctk:DataPoint X="7" Y="7" Label="Feb"/>
<xctk:DataPoint X="4" Y="4" Label="Mar" />
<xctk:DataPoint X="2" Y="2" Label="Apr"/>
</xctk:Series.DataPoints>
</xctk:Series>
</xctk:Area.Series>
</xctk:Area>
<xctk:Area Title="Goals/player">
<xctk:Area.XAxis>
<xctk:Axis Title="Player's Name" LabelsType="Labels" GraduationMode="Manual"/>
</xctk:Area.XAxis>
<xctk:Area.YAxis>
<xctk:Axis Title="Goals" AxisLabelsLayout="ShowToFit"/>
</xctk:Area.YAxis>
<xctk:Area.Series>
<xctk:Series Title="Players"
DefaultInterior="Orange">
<xctk:Series.Layout>
<xctk:ColumnLayout />
</xctk:Series.Layout>
<xctk:Series.DataPoints>
<xctk:DataPoint Y="36" Label="Tom" />
<xctk:DataPoint Y="7" Label="Steven"/>
<xctk:DataPoint Y="24" Label="Kirk" />
<xctk:DataPoint Y="12" Label="Erik"/>
<xctk:DataPoint Y="10" Label="Scott"/>
</xctk:Series.DataPoints>
</xctk:Series>
</xctk:Area.Series>
</xctk:Area>
</xctk:Chart.Areas>
</xctk:Chart>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\ChartLegend.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\ChartLegend.png" Width="600" Height="400"/>
##END-->
</local:DemoView> </local:DemoView>

122
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartSeriesBasicTypesView.xaml.cs.txt

@ -14,6 +14,9 @@
*************************************************************************************/ *************************************************************************************/
#if !OPEN_SOURCE
using Xceed.Wpf.Toolkit.Chart;
#endif
using System.Windows.Media; using System.Windows.Media;
using System.Windows; using System.Windows;
using Xceed.Wpf.Toolkit.Panels; using Xceed.Wpf.Toolkit.Panels;
@ -26,8 +29,16 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views
/// </summary> /// </summary>
public partial class ChartSeriesBasicTypesView : DemoView public partial class ChartSeriesBasicTypesView : DemoView
{ {
#if !OPEN_SOURCE
#region Members
private Series _columnSeries;
private Series _lineSeries;
private Series _pieSeries;
private Series _areaSeries;
#endregion
#endif
#region Initialization #region Initialization
@ -38,15 +49,126 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views
#endregion #endregion
#if !OPEN_SOURCE
#region Envent Handlers
private void OnSeriesCollectionChecked( object sender, RoutedEventArgs e )
{
this.AddDefaultSeries();
}
private void OnSeriesCollectionUnchecked( object sender, RoutedEventArgs e )
{
this.CleanDefaultSeries();
}
private void OnLayoutSelectionChanged( object sender, RoutedEventArgs e )
{
if( _seriesCollectionCheckBox.IsChecked.HasValue && _seriesCollectionCheckBox.IsChecked.Value )
{
this.CleanDefaultSeries();
this.AddDefaultSeries();
}
}
#endregion
#endif
#region Implementation #region Implementation
#if !OPEN_SOURCE
private void CleanDefaultSeries()
{
if( _area1.Series.Contains( _pieSeries ) )
{
_area1.Series.Remove( _pieSeries );
}
if( _area1.Series.Contains( _areaSeries ) )
{
_area1.Series.Remove( _areaSeries );
}
if( _area1.Series.Contains( _columnSeries ) )
{
_area1.Series.Remove( _columnSeries );
}
if( _area1.Series.Contains( _lineSeries ) )
{
_area1.Series.Remove( _lineSeries );
}
}
private void AddDefaultSeries()
{
if( _series.Layout.LayoutType != PredefinedLayoutTypes.Pie )
{
if( _pieSeries == null )
{
//init pieSeries
_pieSeries = new Series();
_pieSeries.DataPoints.Add( new DataPoint( 0, 1, "Cars" ) );
_pieSeries.DataPoints.Add( new DataPoint( 1, 2, "Toys" ) );
_pieSeries.DataPoints.Add( new DataPoint( 2, 2.5, "Trees" ) );
_pieSeries.DataPoints.Add( new DataPoint( 3, 4, "Pens" ) );
_pieSeries.Layout = new PieLayout();
_pieSeries.Title = "Pie Series";
_pieSeries.ShowPointsInLegend = true;
_pieSeries.DefaultInterior = Brushes.YellowGreen;
}
_area1.Series.Add( _pieSeries );
}
if( _series.Layout.LayoutType != PredefinedLayoutTypes.Area )
{
if( _areaSeries == null )
{
//init areaSeries
_areaSeries = new Series();
_areaSeries.DataPoints.Add( new DataPoint( -2, 0 ) );
_areaSeries.DataPoints.Add( new DataPoint( 0, 3.5 ) );
_areaSeries.DataPoints.Add( new DataPoint( 3, 1 ) );
_areaSeries.DataPoints.Add( new DataPoint( 5, 2.8 ) );
_areaSeries.DataPoints.Add( new DataPoint( 4, 1.5 ) );
_areaSeries.Layout = new AreaLayout();
_areaSeries.Title = "Area Series";
_areaSeries.DefaultInterior = Brushes.Orange;
}
_area1.Series.Add( _areaSeries );
}
if( _series.Layout.LayoutType != PredefinedLayoutTypes.Column )
{
if( _columnSeries == null )
{
//init columnSeries
_columnSeries = new Series();
_columnSeries.DataPoints.Add( new DataPoint( 1, 1 ) );
_columnSeries.DataPoints.Add( new DataPoint( 2, 2 ) );
_columnSeries.DataPoints.Add( new DataPoint( 2.5, 4 ) );
_columnSeries.DataPoints.Add( new DataPoint( 4, 3 ) );
_columnSeries.Title = "Column Series";
_columnSeries.DefaultInterior = Brushes.Red;
}
_area1.Series.Add( _columnSeries );
}
if( _series.Layout.LayoutType != PredefinedLayoutTypes.Line )
{
if( _lineSeries == null )
{
//init lineSeries
_lineSeries = new Series();
_lineSeries.DataPoints.Add( new DataPoint( 1, 1 ) );
_lineSeries.DataPoints.Add( new DataPoint( 2, 1 ) );
_lineSeries.DataPoints.Add( new DataPoint( 0.5, 1.5 ) );
_lineSeries.DataPoints.Add( new DataPoint( 3, 3 ) );
_lineSeries.DataPoints.Add( new DataPoint( 6, 2 ) );
_lineSeries.DataPoints.Add( new DataPoint( 5, 0.5 ) );
_lineSeries.Layout = new LineLayout();
_lineSeries.Title = "Line Series";
_lineSeries.DefaultInterior = Brushes.Black;
}
_area1.Series.Add( _lineSeries );
}
}
#endif
#endregion #endregion
} }

137
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartSeriesBasicTypesView.xaml.txt

@ -25,26 +25,139 @@
<local:DemoView.Description> <local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe"> <Paragraph FontSize="14" FontFamily="Segoe">
<Run>A series contains DataPoint objects and are layed out in an area (Area class) of a chart. They can be displayed with predefined layouts, such as column (bar), line, area, or pie, or they can be displayed using a custom layout (not implemented in this sample).</Run> <Run>A series contains DataPoint objects and are layed out in an area (Area class) of a chart. They can be displayed with predefined layouts, such as column (bar), line, area, or pie, or they can be displayed using a custom layout (not implemented in this sample).</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
<LineBreak /> <LineBreak />
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<ObjectDataProvider x:Key="SeriesLayout" MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="xctk:PredefinedLayoutTypes" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<conv:LayoutEngineToPredefinedLayoutConverter x:Key="LayoutEngineToPredefinedLayoutConverter" />
<conv:PredefinedLayoutToPropertyEnabledConverter x:Key="PredefinedLayoutToPropertyEnabledConverter" />
<conv:LineLengthToPropertyEnabledConverter x:Key="LineLengthToPropertyEnabledConverter" />
<xctkconv:SolidColorBrushToColorConverter x:Key="SolidColorBrushToColorConverter" />
<Style x:Key="ComboBoxItemStyle" TargetType="{x:Type ComboBoxItem}">
<Style.Triggers>
<DataTrigger Binding="{Binding}" Value="Custom">
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
</Style>
</local:DemoView.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Header="Features" Grid.Row="0" Margin="5">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- 1st column-->
<TextBlock Text="Layout: " VerticalAlignment="Center" />
<ComboBox x:Name="_layoutComboBox" Grid.Column="1" SelectedValue="{Binding Layout, ElementName=_series, Converter={StaticResource LayoutEngineToPredefinedLayoutConverter}}" SelectedValuePath="Content" ItemContainerStyle="{StaticResource ComboBoxItemStyle}" SelectionChanged="OnLayoutSelectionChanged" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5">
<ComboBoxItem Content="{x:Static xctk:PredefinedLayoutTypes.Area}" />
<ComboBoxItem Content="{x:Static xctk:PredefinedLayoutTypes.Column}" />
<ComboBoxItem Content="{x:Static xctk:PredefinedLayoutTypes.Line}" />
<ComboBoxItem Content="{x:Static xctk:PredefinedLayoutTypes.Pie}" />
</ComboBox>
<TextBlock Grid.Row="1" Text="Title: " VerticalAlignment="Center" IsEnabled="{Binding IsEnabled, ElementName=_title}"/>
<TextBox x:Name="_title" Grid.Row="1" Grid.Column="1" Text="{Binding Title, ElementName=_series, UpdateSourceTrigger=PropertyChanged}" Width="75" IsEnabled="{Binding SelectedItem, ElementName=_layoutComboBox, Converter={StaticResource PredefinedLayoutToPropertyEnabledConverter}, ConverterParameter=title}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<TextBlock Grid.Row="2" Text="Default Interior: " VerticalAlignment="Center" IsEnabled="{Binding IsEnabled, ElementName=_defaultInterior}"/>
<xctk:ColorPicker x:Name="_defaultInterior" Grid.Row="2" Grid.Column="1" SelectedColor="{Binding DefaultInterior, ElementName=_series, Converter={StaticResource SolidColorBrushToColorConverter}}" Width="75" IsEnabled="{Binding SelectedItem, ElementName=_layoutComboBox, Converter={StaticResource PredefinedLayoutToPropertyEnabledConverter}, ConverterParameter=defaultInterior}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<!-- 2nd column-->
<TextBlock Grid.Column="2" Text="Show Hint Labels: " VerticalAlignment="Center" IsEnabled="{Binding IsEnabled, ElementName=_showHintLabels}" Margin="10,0,0,0" Style="{StaticResource DisableGrayText}"/>
<CheckBox x:Name="_showHintLabels" Grid.Column="3" IsChecked="{Binding ShowHintLabels, ElementName=_series}" IsEnabled="{Binding SelectedItem, ElementName=_layoutComboBox, Converter={StaticResource PredefinedLayoutToPropertyEnabledConverter}, ConverterParameter=showHintLabels}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<TextBlock Grid.Row="1" Grid.Column="2" Text="Show Points in Legend: " IsEnabled="{Binding IsEnabled, ElementName=_showPointsInLegend}" VerticalAlignment="Center" Margin="10,0,0,0" Style="{StaticResource DisableGrayText}"/>
<CheckBox x:Name="_showPointsInLegend" Grid.Row="1" Grid.Column="3" IsChecked="{Binding ShowPointsInLegend, ElementName=_series}" IsEnabled="{Binding SelectedItem, ElementName=_layoutComboBox, Converter={StaticResource PredefinedLayoutToPropertyEnabledConverter}, ConverterParameter=showPointsInLegend}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<!-- 3rd column-->
<TextBlock Grid.Column="4" Text="Hint Line Length: " VerticalAlignment="Center" IsEnabled="{Binding IsEnabled, ElementName=_hintLineLength}" Margin="10,0,0,0" Style="{StaticResource DisableGrayText}"/>
<xctk:IntegerUpDown x:Name="_hintLineLength" Grid.Column="5" Minimum="0" Maximum="200" Value="{Binding HintLineLength, ElementName=_series}" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5">
<xctk:IntegerUpDown.IsEnabled>
<MultiBinding Converter="{StaticResource LineLengthToPropertyEnabledConverter}">
<Binding Path="SelectedItem" ElementName="_layoutComboBox" Converter="{StaticResource PredefinedLayoutToPropertyEnabledConverter}" ConverterParameter="hintLineLength" />
<Binding Path="IsChecked" ElementName="_showHintLabels" />
</MultiBinding>
</xctk:IntegerUpDown.IsEnabled>
</xctk:IntegerUpDown>
<TextBlock Grid.Row="1" Grid.Column="4" Text="Spacing: " VerticalAlignment="Center" IsEnabled="{Binding IsEnabled, ElementName=_spacing}" Margin="10,0,0,0" Style="{StaticResource DisableGrayText}"/>
<xctk:IntegerUpDown x:Name="_spacing" Grid.Row="1" Grid.Column="5" Minimum="0" Maximum="100" Value="{Binding Spacing, ElementName=_series}" Width="75" IsEnabled="{Binding SelectedItem, ElementName=_layoutComboBox, Converter={StaticResource PredefinedLayoutToPropertyEnabledConverter}, ConverterParameter=spacing}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
</Grid>
</GroupBox>
<TextBlock Grid.Row="1" Text="Usage:" Style="{StaticResource Header}" Margin="10"/>
<xctk:Chart Grid.Row="2" MinHeight="200">
<xctk:Chart.Areas>
<xctk:Area x:Name="_area1" Title="Area #1">
<xctk:Area.Series>
<xctk:Series x:Name="_series"
DefaultInterior="BlueViolet"
Spacing="20"
Title="Average"
ShowPointsInLegend="false"
ShowHintLabels="false"
HintLineLength="20">
<xctk:Series.Layout>
<xctk:LineLayout />
</xctk:Series.Layout>
<xctk:Series.DataPoints>
<xctk:DataPoint X="1" Y="1" Label="Oct" />
<xctk:DataPoint X="2" Y="2" Label="Jan"/>
<xctk:DataPoint X="2.5" Y="1.5" Label="Feb" />
<xctk:DataPoint X="4" Y="1" Label="Jun"/>
<xctk:DataPoint X="1.5" Y="3" Label="Dec"/>
<xctk:DataPoint X="5" Y="5" Label="Apr"/>
<xctk:DataPoint X="3" Y="1" Label="Nov"/>
<xctk:DataPoint X="4.5" Y="7" Label="Jul"/>
<xctk:DataPoint X="3.5" Y="4.5" Label="Aug"/>
</xctk:Series.DataPoints>
</xctk:Series>
</xctk:Area.Series>
</xctk:Area>
</xctk:Chart.Areas>
</xctk:Chart>
<TextBlock Grid.Row="3" Text="A collection of Series instances can be added to an Area. Use the following Checkbox to display 3 new Series along with the current one." TextWrapping="Wrap" Margin="0,15,0,5" />
<CheckBox Grid.Row="4" x:Name="_seriesCollectionCheckBox" IsChecked="False" Checked="OnSeriesCollectionChecked" Unchecked="OnSeriesCollectionUnchecked" Content="Display 4 Series in one Area" Margin="0,0,0,10" />
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\ChartBasicTypes.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\ChartBasicTypes.png" Width="600" Height="400"/>
##END-->
</local:DemoView> </local:DemoView>

3
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartSeriesDataPointsBindingView.xaml.cs.txt

@ -14,6 +14,9 @@
************************************************************************************/ ************************************************************************************/
#if !OPEN_SOURCE
using Xceed.Wpf.Toolkit.Chart;
#endif
using System.Windows.Media; using System.Windows.Media;
using System; using System;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;

40
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartSeriesDataPointsBindingView.xaml.txt

@ -26,17 +26,57 @@
<local:DemoView.Description> <local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe"> <Paragraph FontSize="14" FontFamily="Segoe">
<Run>The DataPoint objects of a chart's series can be set by binding with the Series.DataPointsSource property. From there, a DataPointBinding can be set on the X, Y, or Label property of a DataPoint.</Run> <Run>The DataPoint objects of a chart's series can be set by binding with the Series.DataPointsSource property. From there, a DataPointBinding can be set on the X, Y, or Label property of a DataPoint.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
<LineBreak /> <LineBreak />
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xced Toolkit Plus for WPF. Click here for more details about Xced Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<sample:Persons x:Key="Persons"/>
<CollectionViewSource x:Key="PersonCollection" Source="{Binding Source={StaticResource Persons}, Path=PersonList}" />
</local:DemoView.Resources>
<Grid Margin="10">
<xctk:Chart MinHeight="300" ShowLegend="False">
<xctk:Chart.Areas>
<xctk:Area>
<xctk:Area.XAxis>
<xctk:Axis Title="Persons" GraduationMode="Manual" LabelsType="Labels"/>
</xctk:Area.XAxis>
<xctk:Area.YAxis>
<xctk:Axis Title="Skill Level" />
</xctk:Area.YAxis>
<xctk:Area.Series>
<xctk:Series DataPointsSource="{Binding Source={StaticResource PersonCollection}}">
<xctk:Series.DataPointBindings>
<xctk:BindingInfo PropertyName="Y">
<xctk:BindingInfo.Binding>
<Binding Path="Skill"/>
</xctk:BindingInfo.Binding>
</xctk:BindingInfo>
<xctk:BindingInfo PropertyName="Label">
<xctk:BindingInfo.Binding>
<Binding Path="Name"/>
</xctk:BindingInfo.Binding>
</xctk:BindingInfo>
</xctk:Series.DataPointBindings>
</xctk:Series>
</xctk:Area.Series>
</xctk:Area>
</xctk:Chart.Areas>
</xctk:Chart>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\ChartSeriesDataPointsBinding.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\ChartSeriesDataPointsBinding.png" Width="600" Height="400"/>
##END-->
</local:DemoView> </local:DemoView>

3
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingAxesGridView.xaml.cs.txt

@ -14,6 +14,9 @@
************************************************************************************/ ************************************************************************************/
#if !OPEN_SOURCE
using Xceed.Wpf.Toolkit.Chart;
#endif
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Controls; using System.Windows.Controls;
using System; using System;

182
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingAxesGridView.xaml.txt

@ -24,32 +24,178 @@
<local:DemoView.Description> <local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe"> <Paragraph FontSize="14" FontFamily="Segoe">
<Run>This sample shows how AxesGrid elements can be styled using a DataTemplate.</Run> <Run>This sample shows how AxesGrid elements can be styled using a DataTemplate.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
<LineBreak /> <LineBreak />
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<DataTemplate x:Key="BackgroundTemplate">
<Rectangle Margin="-5,-5,-5,-5" RadiusX="25" RadiusY="25" StrokeThickness="3" Stroke="Blue" Fill="#FFFFE1">
<Rectangle.BitmapEffect>
<DropShadowBitmapEffect/>
</Rectangle.BitmapEffect>
</Rectangle>
</DataTemplate>
<DataTemplate x:Key="AxisTitleTemplate">
<Border DockPanel.Dock="Top" BorderThickness="1" CornerRadius="4">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="White" Offset="0.0" />
<GradientStop Color="SkyBlue" Offset="1.0" />
</LinearGradientBrush>
</Border.Background>
<TextBlock FontFamily="Comic Sans MS" FontSize="18" Margin="2,2,2,1"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Path=Text}">
<TextBlock.Foreground>
<SolidColorBrush Color="Black"/>
</TextBlock.Foreground>
</TextBlock>
</Border>
</DataTemplate>
<DataTemplate x:Key="GridTemplateX">
<Canvas Width="{Binding Path=W}" Height="{Binding Path=H}">
<Polyline Points="{Binding Path=Points}" StrokeThickness="1" Stroke="Red" StrokeDashArray="1 5 1 1" />
</Canvas>
</DataTemplate>
<DataTemplate x:Key="GridTemplateY">
<Canvas Width="{Binding Path=W}" Height="{Binding Path=H}">
<Polyline Points="{Binding Path=Points}" StrokeThickness="1" Stroke="Green" StrokeDashArray="8 3 1 3"/>
</Canvas>
</DataTemplate>
<DataTemplate x:Key="TickTemplateX">
<Canvas Width="{Binding Path=W}" Height="{Binding Path=H}">
<Line X1="{Binding Path=XStart}" Y1="{Binding Path=YStart}" X2="{Binding Path=XEnd}" Y2="{Binding Path=YEnd}" StrokeThickness="5" Stroke="Red"/>
</Canvas>
</DataTemplate>
<DataTemplate x:Key="TickTemplateY">
<Canvas Width="{Binding Path=W}" Height="{Binding Path=H}">
<Line X1="{Binding Path=XStart}" Y1="{Binding Path=YStart}" X2="{Binding Path=XEnd}" Y2="{Binding Path=YEnd}" StrokeThickness="5" Stroke="Green"/>
</Canvas>
</DataTemplate>
<DataTemplate x:Key="ArrowTemplate">
<Polyline Points="{Binding Path=Points}"
StrokeThickness="2" Stroke="Blue"/>
</DataTemplate>
<DataTemplate x:Key="LabelTemplateX">
<Border DockPanel.Dock="Top" BorderThickness="1" CornerRadius="4">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="Yellow" Offset="0.0" />
<GradientStop Color="Red" Offset="1.0" />
</LinearGradientBrush>
</Border.Background>
<TextBlock FontFamily="Comic Sans MS" FontSize="18" Margin="2,2,2,1"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Path=Text}">
<TextBlock.Foreground>
<SolidColorBrush Color="Black"/>
</TextBlock.Foreground>
</TextBlock>
</Border>
</DataTemplate>
<DataTemplate x:Key="LabelTemplateY">
<Border DockPanel.Dock="Top" BorderThickness="1" CornerRadius ="4">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="Yellow" Offset="0.0" />
<GradientStop Color="LimeGreen" Offset="1.0" />
</LinearGradientBrush>
</Border.Background>
<TextBlock FontFamily="Comic Sans MS" FontSize="18" Margin="2,2,2,1"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Path=Text}">
<TextBlock.Foreground>
<SolidColorBrush Color="Black"/>
</TextBlock.Foreground>
</TextBlock>
</Border>
</DataTemplate>
<DataTemplate x:Key="AxisTemplate">
<Polyline Points="{Binding Path=Points}"
StrokeThickness="2" Stroke="Blue"/>
</DataTemplate>
</local:DemoView.Resources>
<Grid>
<xctk:Chart MinHeight="300" ShowLegend="False">
<xctk:Chart.Areas>
<xctk:Area BackgroundTemplate="{StaticResource BackgroundTemplate}" Margin="25,25,25,25">
<xctk:Area.XAxis>
<xctk:Axis AxisTitleTemplate="{StaticResource AxisTitleTemplate}"
GridTemplate="{StaticResource GridTemplateX}"
TickTemplate="{StaticResource TickTemplateX}"
ArrowTemplate="{StaticResource ArrowTemplate}"
LabelTemplate="{StaticResource LabelTemplateX}">
<xctk:Axis.Template>
<ControlTemplate TargetType="{x:Type xctk:Axis}">
<ContentPresenter ContentTemplate="{StaticResource AxisTemplate}"/>
</ControlTemplate>
</xctk:Axis.Template>
<xctk:Axis.Arrow>
<xctk:Arrow Length="20" Thickness="10"/>
</xctk:Axis.Arrow>
</xctk:Axis>
</xctk:Area.XAxis>
<xctk:Area.YAxis>
<xctk:Axis Reversed="true"
AxisTitleTemplate="{StaticResource AxisTitleTemplate}"
GridTemplate="{StaticResource GridTemplateY}"
TickTemplate="{StaticResource TickTemplateY}"
ArrowTemplate="{StaticResource ArrowTemplate}"
LabelTemplate="{StaticResource LabelTemplateY}">
<xctk:Axis.Template>
<ControlTemplate TargetType="{x:Type xctk:Axis}">
<ContentPresenter ContentTemplate="{StaticResource AxisTemplate}"/>
</ControlTemplate>
</xctk:Axis.Template>
<xctk:Axis.Arrow>
<xctk:Arrow Length="20" Thickness="10"/>
</xctk:Axis.Arrow>
</xctk:Axis>
</xctk:Area.YAxis>
<xctk:Area.Series>
<xctk:Series>
<xctk:Series.DataPoints>
<xctk:DataPoint X="1" Y="1" />
<xctk:DataPoint X="2" Y="3"/>
<xctk:DataPoint X="3" Y="2"/>
<xctk:DataPoint X="4" Y="5"/>
<xctk:DataPoint X="5" Y="4"/>
</xctk:Series.DataPoints>
<xctk:Series.Layout>
<xctk:LineLayout/>
</xctk:Series.Layout>
</xctk:Series>
</xctk:Area.Series>
</xctk:Area>
</xctk:Chart.Areas>
</xctk:Chart>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\ChartStylingAxesGrid.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\ChartStylingAxesGrid.png" Width="600" Height="400"/>
##END-->
</local:DemoView> </local:DemoView>

3
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingColumnSeriesView.xaml.cs.txt

@ -14,6 +14,9 @@
*************************************************************************************/ *************************************************************************************/
#if !OPEN_SOURCE
using Xceed.Wpf.Toolkit.Chart;
#endif
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Controls; using System.Windows.Controls;
using System.Diagnostics; using System.Diagnostics;

171
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingColumnSeriesView.xaml.txt

@ -25,26 +25,175 @@
<local:DemoView.Description> <local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe"> <Paragraph FontSize="14" FontFamily="Segoe">
<Run>This sample shows how a series with a column layout type and a legend can be styled using DataTemplates.</Run> <Run>This sample shows how a series with a column layout type and a legend can be styled using DataTemplates.</Run>
<!--##EXCLUDE_OPEN_SOURCE-->
<Run>Please move mouse on line and markers to see simple effects.</Run>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
<LineBreak /> <LineBreak />
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<sample:Persons x:Key="persons"/>
<CollectionViewSource x:Key="PersonCollection" Source="{Binding Source={StaticResource persons}, Path=PersonList}"/>
<DataTemplate x:Key="legendTemplate">
<DockPanel VerticalAlignment="Center">
<Image Source="{Binding Path=Photo}" Width="32" Height="32" Margin="5,1,1,1"/>
<TextBlock Text="{Binding Path=Name}" FontSize="11" VerticalAlignment="Center" Margin="5,1,2,1"/>
</DockPanel>
</DataTemplate>
<Style x:Key="TextBoxTextStyle" TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="FontFamily" Value="Comic Sans MS"/>
<Setter Property="FontSize" Value="12"/>
<Style.Triggers>
<EventTrigger RoutedEvent="Mouse.MouseEnter">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="FontSize" To="19" Duration="0:0:0.4"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
<EventTrigger RoutedEvent="Mouse.MouseLeave">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="FontSize" To="12" Duration="0:0:0.4" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Style.Triggers>
</Style>
<Style TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<ContentPresenter/>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Grid Width="{Binding Path=ActualWidth, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"
Height="{Binding Path=ActualHeight, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}">
<Rectangle RadiusX="5" RadiusY="5" >
<Rectangle.Triggers>
<EventTrigger RoutedEvent="Mouse.MouseEnter">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.5" Duration="0:0:0.4"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
<EventTrigger RoutedEvent="Mouse.MouseLeave">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.4" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Rectangle.Triggers>
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="Yellow" Offset="0.0" />
<GradientStop Color="Orange" Offset="0.25" />
<GradientStop Color="CornflowerBlue" Offset="0.75" />
<GradientStop Color="LimeGreen" Offset="1.0" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<ContentPresenter VerticalAlignment="Center" Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"/>
</Grid>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<DataTemplate x:Key="seriesTemplate">
<Button x:Name="Bar">
<StackPanel>
<DockPanel>
<TextBlock Text="Name: " Style="{StaticResource TextBoxTextStyle}" />
<TextBlock Text="{Binding Path=Content.Name}" Style="{StaticResource TextBoxTextStyle}" />
</DockPanel>
<DockPanel>
<TextBlock Text="Skill: " Style="{StaticResource TextBoxTextStyle}" />
<TextBlock Text="{Binding Path=Content.Skill}" Style="{StaticResource TextBoxTextStyle}" />
</DockPanel>
<TextBlock Text="Photo:" Style="{StaticResource TextBoxTextStyle}"/>
<Image Source="{Binding Path=Content.Photo}"/>
</StackPanel>
</Button>
</DataTemplate>
</local:DemoView.Resources>
<Grid>
<xctk:Chart MinHeight="400">
<xctk:Chart.Legend>
<xctk:Legend ItemTemplate="{StaticResource legendTemplate}" ItemsSource="{Binding Source={StaticResource PersonCollection}}" Title="Persons"/>
</xctk:Chart.Legend>
<xctk:Chart.Areas>
<xctk:Area >
<xctk:Area.XAxis>
<xctk:Axis GraduationMode="Manual" LabelsType="Labels"/>
</xctk:Area.XAxis>
<xctk:Area.YAxis>
<xctk:Axis Title="Skill"/>
</xctk:Area.YAxis>
<xctk:Area.Series>
<xctk:Series DataPointsSource="{Binding Source={StaticResource PersonCollection}}"
Template="{StaticResource seriesTemplate}"
ShowPointsInLegend="true">
<xctk:Series.DataPointBindings>
<xctk:BindingInfo PropertyName="X">
<xctk:BindingInfo.Binding>
<Binding Path="Age"/>
</xctk:BindingInfo.Binding>
</xctk:BindingInfo>
<xctk:BindingInfo PropertyName="Y">
<xctk:BindingInfo.Binding>
<Binding Path="Skill"/>
</xctk:BindingInfo.Binding>
</xctk:BindingInfo>
<xctk:BindingInfo PropertyName="Label">
<xctk:BindingInfo.Binding>
<Binding Path="Name"/>
</xctk:BindingInfo.Binding>
</xctk:BindingInfo>
</xctk:Series.DataPointBindings>
</xctk:Series>
</xctk:Area.Series>
</xctk:Area>
</xctk:Chart.Areas>
</xctk:Chart>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\ChartStylingColumnSeries.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\ChartStylingColumnSeries.png" Width="600" Height="400"/>
##END-->
</local:DemoView> </local:DemoView>

12
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingLineSeriesView.xaml.cs.txt

@ -14,6 +14,9 @@
*************************************************************************************/ *************************************************************************************/
#if !OPEN_SOURCE
using Xceed.Wpf.Toolkit.Chart;
#endif
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows; using System.Windows;
@ -31,7 +34,16 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views
InitializeComponent(); InitializeComponent();
} }
#if !OPEN_SOURCE
#region Event Handler
private void LegendButtonClick( object sender, RoutedEventArgs e )
{
Random r = new Random();
_series.DataPoints.Add( new DataPoint( _series.DataPoints.Count, r.NextDouble() ) );
}
#endregion
#endif
} }
} }

137
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingLineSeriesView.xaml.txt

@ -24,23 +24,144 @@
<local:DemoView.Description> <local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe"> <Paragraph FontSize="14" FontFamily="Segoe">
<Run>This sample demonstrates how a series with a line layout type and a legend can be styled via DataTemplates. The legend contains a button to add new DataPoints.</Run> <Run>This sample demonstrates how a series with a line layout type and a legend can be styled via DataTemplates. The legend contains a button to add new DataPoints.</Run>
<!--##EXCLUDE_OPEN_SOURCE-->
<Run>Please move mouse along the line and over the markers to see simple effects.</Run>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
<LineBreak /> <LineBreak />
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<DataTemplate x:Key="legendTemplate">
<DockPanel VerticalAlignment="Center">
<Path Width="32" Height="32" StrokeThickness="3" Data="M 0,24 Q 8,0 16,16 Q 24,32 32,8" >
<Path.Stroke>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="Green" Offset="1" />
<GradientStop Color="Yellow" Offset="0.5" />
<GradientStop Color="Red" Offset="0" />
</LinearGradientBrush>
</Path.Stroke>
</Path>
<TextBlock Text="{Binding Path=Text}" FontSize="11" VerticalAlignment="Center" Margin="5,1,2,1"/>
<Button Click="LegendButtonClick">Add DataPoint</Button>
</DockPanel>
</DataTemplate>
<DataTemplate x:Key="seriesTemplate">
<Canvas Width="{Binding Path=W}" Height="{Binding Path=H}">
<Polyline Points="{Binding Path=Points}" StrokeThickness="10" >
<Polyline.Triggers>
<EventTrigger RoutedEvent="Mouse.MouseEnter">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="StrokeThickness" To="20" Duration="0:0:0.4"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
<EventTrigger RoutedEvent="Mouse.MouseLeave">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="StrokeThickness" To="10" Duration="0:0:0.4" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Polyline.Triggers>
<Polyline.Stroke>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="Green" Offset="1" />
<GradientStop Color="Yellow" Offset="0.75" />
<GradientStop Color="Red" Offset="0" />
</LinearGradientBrush>
</Polyline.Stroke>
</Polyline>
</Canvas>
</DataTemplate>
<DataTemplate x:Key="markerTemplate">
<Ellipse Width="20" Height="20" >
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Mouse.MouseEnter">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Width" To="30" Duration="0:0:0.4"/>
<DoubleAnimation Storyboard.TargetProperty="Height" To="30" Duration="0:0:0.4"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
<EventTrigger RoutedEvent="Mouse.MouseLeave">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Width" To="20" Duration="0:0:0.4" />
<DoubleAnimation Storyboard.TargetProperty="Height" To="20" Duration="0:0:0.4"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Ellipse.Triggers>
<Ellipse.Fill>
<RadialGradientBrush Center="0.3, 0.3" RadiusX="0.6" RadiusY="0.6">
<GradientStop Color="LightBlue" Offset="0" />
<GradientStop Color="Blue" Offset="1" />
</RadialGradientBrush>
</Ellipse.Fill>
</Ellipse>
</DataTemplate>
</local:DemoView.Resources>
<Grid>
<xctk:Chart MinHeight="300">
<xctk:Chart.Legend>
<xctk:Legend ItemTemplate="{StaticResource legendTemplate}"/>
</xctk:Chart.Legend>
<xctk:Chart.Areas>
<xctk:Area Title="Area1">
<xctk:Area.Series>
<xctk:Series x:Name="_series"
Title="Average/Month"
Template="{StaticResource seriesTemplate}"
MarkerTemplate="{StaticResource markerTemplate}">
<xctk:Series.DataPoints>
<xctk:DataPoint X="0" Y="0" />
<xctk:DataPoint X="1" Y="0.1" />
<xctk:DataPoint X="2" Y="0.3" />
<xctk:DataPoint X="3" Y="0.5" />
<xctk:DataPoint X="4" Y="0.88" />
<xctk:DataPoint X="5" Y="0.9" />
<xctk:DataPoint X="6" Y="0.95" />
</xctk:Series.DataPoints>
<xctk:Series.Layout>
<xctk:LineLayout/>
</xctk:Series.Layout>
</xctk:Series>
</xctk:Area.Series>
</xctk:Area>
</xctk:Chart.Areas>
</xctk:Chart>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\ChartStylingLineSeries.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\ChartStylingLineSeries.png" Width="600" Height="400"/>
##END-->
</local:DemoView> </local:DemoView>

3
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingPieSeriesView.xaml.cs.txt

@ -14,6 +14,9 @@
*************************************************************************************/ *************************************************************************************/
#if !OPEN_SOURCE
using Xceed.Wpf.Toolkit.Chart;
#endif
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Controls; using System.Windows.Controls;
using System; using System;

171
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingPieSeriesView.xaml.txt

@ -24,26 +24,175 @@
<local:DemoView.Description> <local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe"> <Paragraph FontSize="14" FontFamily="Segoe">
<Run>This sample demonstrates how a series with a pie layout type can be styled via DataTemplates. The series, hint line, and hint label are all styled.</Run> <Run>This sample demonstrates how a series with a pie layout type can be styled via DataTemplates. The series, hint line, and hint label are all styled.</Run>
<!--##EXCLUDE_OPEN_SOURCE-->
<Run>Please move the mouse over the pie slices to view the tooltips of the pie layout DataTemplate.</Run>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
<LineBreak /> <LineBreak />
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<sys:String x:Key="Name1">Mary</sys:String>
<sys:String x:Key="Name2">Brad</sys:String>
<sys:String x:Key="Name3">Anne</sys:String>
<sys:String x:Key="Name4">Eric</sys:String>
<sys:String x:Key="Name5">Lisa</sys:String>
<sys:String x:Key="Name6">Carl</sys:String>
<sys:String x:Key="Name7">Whole Team</sys:String>
<DataTemplate x:Key="GridBackgroundTemplate">
<Rectangle Width="{Binding Path=W}" Height="{Binding Path=H}" Margin="-5,-5,-5,-5"
RadiusX="25" RadiusY="25" StrokeThickness="1" Stroke="Gray" Fill="#FFFFE1">
<Rectangle.BitmapEffect>
<DropShadowBitmapEffect/>
</Rectangle.BitmapEffect>
</Rectangle>
</DataTemplate>
<DataTemplate x:Key="PieTemplate">
<Canvas Width="{Binding Path=W}" Height="{Binding Path=H}">
<Path x:Name="PieSlice" Stroke="Gray" StrokeThickness="2" Data="{Binding Path=Geometry}" Fill="{Binding Path=Interior}">
<Path.ToolTip>
<ToolTip>
<StackPanel Orientation="Vertical">
<TextBlock Text="Name:"/>
<TextBlock Text="{Binding Path=DataPoint.Label}"/>
<TextBlock Text="Skills:"/>
<TextBlock Text="{Binding Path=DataPoint.Y}"/>
</StackPanel>
</ToolTip>
</Path.ToolTip>
<Path.Triggers>
<EventTrigger RoutedEvent="Mouse.MouseEnter">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.3" Duration="0:0:0.4"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
<EventTrigger RoutedEvent="Mouse.MouseLeave">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.4" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Path.Triggers>
</Path>
</Canvas>
</DataTemplate>
<DataTemplate x:Key="HintLineTemplate">
<Canvas Width="{Binding Path=W}" Height="{Binding Path=H}">
<Polyline Points="{Binding Path=Points}" StrokeThickness="3" StrokeDashArray="2 1">
<Polyline.Stroke>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="Orange" Offset="1" />
<GradientStop Color="Blue" Offset="0.50" />
<GradientStop Color="Green" Offset="0" />
</LinearGradientBrush>
</Polyline.Stroke>
</Polyline>
</Canvas>
</DataTemplate>
<DataTemplate x:Key="HintLabelTemplate">
<Border DockPanel.Dock="Top" BorderThickness="1" CornerRadius ="4">
<Border.BorderBrush>
<SolidColorBrush Color="Gray"/>
</Border.BorderBrush>
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="White" Offset="0.0" />
<GradientStop Color="SkyBlue" Offset="1.0" />
</LinearGradientBrush>
</Border.Background>
<StackPanel>
<TextBlock FontFamily="Sans Serif" FontSize="18" FontStyle="Oblique" Margin="2,2,2,1"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Path=DataPoint.Label}"/>
<Image x:Name="_image" Width="20" Height="20"/>
</StackPanel>
</Border>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding DataPoint.Label}" Value="{StaticResource Name1}">
<Setter Property="Source" Value="../Photo/1.bmp" TargetName="_image" />
</DataTrigger>
<DataTrigger Binding="{Binding DataPoint.Label}" Value="{StaticResource Name2}">
<Setter Property="Source" Value="../Photo/2.bmp" TargetName="_image" />
</DataTrigger>
<DataTrigger Binding="{Binding DataPoint.Label}" Value="{StaticResource Name3}">
<Setter Property="Source" Value="../Photo/3.bmp" TargetName="_image" />
</DataTrigger>
<DataTrigger Binding="{Binding DataPoint.Label}" Value="{StaticResource Name4}">
<Setter Property="Source" Value="../Photo/4.bmp" TargetName="_image" />
</DataTrigger>
<DataTrigger Binding="{Binding DataPoint.Label}" Value="{StaticResource Name5}">
<Setter Property="Source" Value="../Photo/5.bmp" TargetName="_image" />
</DataTrigger>
<DataTrigger Binding="{Binding DataPoint.Label}" Value="{StaticResource Name6}">
<Setter Property="Source" Value="../Photo/6.bmp" TargetName="_image" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</local:DemoView.Resources>
<Grid>
<xctk:Chart MinHeight="400">
<xctk:Chart.Areas >
<xctk:Area Title="Area1" BackgroundTemplate="{StaticResource GridBackgroundTemplate}" Margin="10,25,20,25">
<xctk:Area.XAxis>
<xctk:Axis ShowAxisLabel="false" ShowGridLines="false" ShowAxis="false" ShowArrow="false" ShowTickLabels="false" ShowTicks="false" />
</xctk:Area.XAxis>
<xctk:Area.YAxis>
<xctk:Axis ShowAxisLabel="false" ShowGridLines="false" ShowAxis="false" ShowArrow="false" ShowTickLabels="false" ShowTicks="false" />
</xctk:Area.YAxis>
<xctk:Area.Series>
<xctk:Series Title="Family Members"
ShowPointsInLegend="true"
Template="{StaticResource PieTemplate}"
ShowHintLabels="true"
HintLineTemplate="{StaticResource HintLineTemplate}"
HintLabelTemplate="{StaticResource HintLabelTemplate}"
HintLineLength="30">
<xctk:Series.DataPoints>
<xctk:DataPoint Y="-3" Label="{StaticResource Name1}" />
<xctk:DataPoint Y="-2" Label="{StaticResource Name2}" />
<xctk:DataPoint Y="-1" Label="{StaticResource Name3}" />
<xctk:DataPoint Y="1" Label="{StaticResource Name4}"/>
<xctk:DataPoint Y="1" Label="{StaticResource Name5}"/>
<xctk:DataPoint Y="2" Label="{StaticResource Name6}"/>
<xctk:DataPoint Y="5" Label="{StaticResource Name7}"/>
</xctk:Series.DataPoints>
<xctk:Series.Layout>
<xctk:PieLayout/>
</xctk:Series.Layout>
</xctk:Series>
</xctk:Area.Series>
</xctk:Area>
</xctk:Chart.Areas>
</xctk:Chart>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\ChartStylingPieSeries.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\ChartStylingPieSeries.png" Width="600" Height="400"/>
##END-->
</local:DemoView> </local:DemoView>

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

@ -25,6 +25,7 @@
<local:DemoView.Description> <local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe"> <Paragraph FontSize="14" FontFamily="Segoe">
<Run>The ChildWindow control can be used to create a window that is displayed within the bounds of a specific parent container.</Run> <Run>The ChildWindow control can be used to create a window that is displayed within the bounds of a specific parent container.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<LineBreak /> <LineBreak />
<Run>In addition to the following features, the "Plus" version allows ChildWindow to be resizable and to use a Maximize/Restore button.</Run> <Run>In addition to the following features, the "Plus" version allows ChildWindow to be resizable and to use a Maximize/Restore button.</Run>
@ -32,6 +33,7 @@
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>

19
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ColorView.xaml.txt

@ -219,6 +219,7 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
@ -297,21 +298,29 @@
IsChecked="{Binding ElementName=_colorPicker, Path=UsingAlphaChannel, Mode=TwoWay}" /> IsChecked="{Binding ElementName=_colorPicker, Path=UsingAlphaChannel, Mode=TwoWay}" />
<TextBlock Grid.Column="0" <TextBlock Grid.Column="0"
Grid.Row="12" Grid.Row="12"
Text="MaxDropDownWidth:" />
<xctk:IntegerUpDown Grid.Column="1"
Grid.Row="12"
Minimum="50"
Maximum="550"
Value="{Binding ElementName=_colorPicker, Path=MaxDropDownWidth}" />
<TextBlock Grid.Column="0"
Grid.Row="13"
Text="AdvancedButtonHeader:" /> Text="AdvancedButtonHeader:" />
<TextBox Grid.Column="1" <TextBox Grid.Column="1"
Grid.Row="12" Grid.Row="13"
Text="{Binding ElementName=_colorPicker, Path=AdvancedButtonHeader, Mode=TwoWay}" /> Text="{Binding ElementName=_colorPicker, Path=AdvancedButtonHeader, Mode=TwoWay}" />
<TextBlock Grid.Column="0" <TextBlock Grid.Column="0"
Grid.Row="13" Grid.Row="14"
Text="StandardButtonHeader:" /> Text="StandardButtonHeader:" />
<TextBox Grid.Column="1" <TextBox Grid.Column="1"
Grid.Row="13" Grid.Row="14"
Text="{Binding ElementName=_colorPicker, Path=StandardButtonHeader, Mode=TwoWay}" /> Text="{Binding ElementName=_colorPicker, Path=StandardButtonHeader, Mode=TwoWay}" />
<TextBlock Grid.Column="0" <TextBlock Grid.Column="0"
Grid.Row="14" Grid.Row="15"
Text="SelectedColorText:" /> Text="SelectedColorText:" />
<TextBox Grid.Column="1" <TextBox Grid.Column="1"
Grid.Row="14" Grid.Row="15"
IsEnabled="False" IsEnabled="False"
Text="{Binding ElementName=_colorPicker, Path=SelectedColorText}" /> Text="{Binding ElementName=_colorPicker, Path=SelectedColorText}" />
</Grid> </Grid>

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

@ -83,6 +83,7 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
@ -105,12 +106,14 @@
<ComboBox x:Name="_kind" Grid.Row="5" Grid.Column="1" SelectedIndex="2" ItemsSource="{Binding Source={StaticResource enumKind}}" Width="190" Margin="5,5,25,5"/> <ComboBox x:Name="_kind" Grid.Row="5" Grid.Column="1" SelectedIndex="2" ItemsSource="{Binding Source={StaticResource enumKind}}" Width="190" Margin="5,5,25,5"/>
<TextBlock Text="CalendarDisplayMode:" Grid.Row="6" Grid.Column="0" VerticalAlignment="Center"/> <TextBlock Text="CalendarDisplayMode:" Grid.Row="6" Grid.Column="0" VerticalAlignment="Center"/>
<ComboBox x:Name="_calendarDisplayMode" Grid.Row="6" Grid.Column="1" SelectedIndex="0" ItemsSource="{Binding Source={StaticResource enumCalendarDisplayMode}}" Width="190" Margin="5,5,25,5"/> <ComboBox x:Name="_calendarDisplayMode" Grid.Row="6" Grid.Column="1" SelectedIndex="0" ItemsSource="{Binding Source={StaticResource enumCalendarDisplayMode}}" Width="190" Margin="5,5,25,5"/>
<TextBlock Text="ShowDropDownButton:" Grid.Row="7" Grid.Column="0" VerticalAlignment="Center"/> <TextBlock Text="CalendarWidth:" Grid.Row="7" Grid.Column="0" VerticalAlignment="Center"/>
<CheckBox x:Name="_showDropDownButton" Grid.Row="7" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5,5,25,5"/> <xctk:DoubleUpDown x:Name="_calendarWidth" Grid.Row="7" Grid.Column="1" Value="178" Minimum="100" Maximum="500" Width="190" Margin="5,5,25,5"/>
<TextBlock Text="TimePickerVisibility:" Grid.Row="8" Grid.Column="0" VerticalAlignment="Center"/> <TextBlock Text="ShowDropDownButton:" Grid.Row="8" Grid.Column="0" VerticalAlignment="Center"/>
<ComboBox x:Name="_timePickerVisibility" Grid.Row="8" Grid.Column="1" SelectedIndex="0" ItemsSource="{Binding Source={StaticResource enumVisibility}}" Width="190" Margin="5,5,25,5"/> <CheckBox x:Name="_showDropDownButton" Grid.Row="8" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5,5,25,5"/>
<TextBlock Text="TimePickerShowButtonSpinner:" Grid.Row="9" Grid.Column="0" VerticalAlignment="Center"/> <TextBlock Text="TimePickerVisibility:" Grid.Row="9" Grid.Column="0" VerticalAlignment="Center"/>
<CheckBox x:Name="_timePickerShowButtonSpinner" Grid.Row="9" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5,5,25,5"/> <ComboBox x:Name="_timePickerVisibility" Grid.Row="9" Grid.Column="1" SelectedIndex="0" ItemsSource="{Binding Source={StaticResource enumVisibility}}" Width="190" Margin="5,5,25,5"/>
<TextBlock Text="TimePickerShowButtonSpinner:" Grid.Row="10" Grid.Column="0" VerticalAlignment="Center"/>
<CheckBox x:Name="_timePickerShowButtonSpinner" Grid.Row="10" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5,5,25,5"/>
<TextBlock Text="TimeFormat:" Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" /> <TextBlock Text="TimeFormat:" Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" />
<ComboBox x:Name="_timeFormat" Grid.Row="0" Grid.Column="3" SelectedIndex="7" ItemsSource="{Binding Source={StaticResource enumDateFormatData}}" Width="190" Margin="5"/> <ComboBox x:Name="_timeFormat" Grid.Row="0" Grid.Column="3" SelectedIndex="7" ItemsSource="{Binding Source={StaticResource enumDateFormatData}}" Width="190" Margin="5"/>
@ -147,6 +150,7 @@
Maximum="{Binding Value, ElementName=_maximum}" Maximum="{Binding Value, ElementName=_maximum}"
Kind="{Binding SelectedItem, ElementName=_kind}" Kind="{Binding SelectedItem, ElementName=_kind}"
CalendarDisplayMode="{Binding SelectedItem, ElementName=_calendarDisplayMode}" CalendarDisplayMode="{Binding SelectedItem, ElementName=_calendarDisplayMode}"
CalendarWidth="{Binding Value, ElementName=_calendarWidth}"
ShowDropDownButton="{Binding IsChecked, ElementName=_showDropDownButton}" ShowDropDownButton="{Binding IsChecked, ElementName=_showDropDownButton}"
CurrentDateTimePart="{Binding SelectedItem, ElementName=_currentDateTimePart, Mode=TwoWay}"/> CurrentDateTimePart="{Binding SelectedItem, ElementName=_currentDateTimePart, Mode=TwoWay}"/>
</StackPanel> </StackPanel>

159
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/DisplayLocalizationRes.fr.resx.txt

@ -1,159 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="DetailsCategory" xml:space="preserve">
<value>Détails</value>
</data>
<data name="FavoriteActor1" xml:space="preserve">
<value>Acteur favori 1 (aucun DisplayName)</value>
</data>
<data name="FavoriteActor1Desc" xml:space="preserve">
<value>Le type de cette propriété est un enum où les valeurs n'ont aucun attribut "DisplayName". Les valeurs affichées sont retournées par la méthode ToString().</value>
</data>
<data name="FavoriteActor2" xml:space="preserve">
<value>Acteur favori 2 (avec DisplayName)</value>
</data>
<data name="FavoriteActor2Desc" xml:space="preserve">
<value>Le type de cette propriété est un enum où les valeurs sont décorés avec l'attribut "DisplayName". Les valeurs affichées sont celles spécifiées par l'attribut ExtendedDisplayName.</value>
</data>
<data name="FavoriteActor3" xml:space="preserve">
<value>Acteur favori 3</value>
</data>
<data name="FavoriteActor3Desc" xml:space="preserve">
<value>La valeur "(Non proposé)" démontre que les valeurs des enums peuvent aussi être localisées.</value>
</data>
<data name="FirstName" xml:space="preserve">
<value>Prénom</value>
</data>
<data name="FirstNameDesc" xml:space="preserve">
<value>Prénom de la personne</value>
</data>
<data name="InfoCategory" xml:space="preserve">
<value>Information</value>
</data>
<data name="LastName" xml:space="preserve">
<value>Nom de famille</value>
</data>
<data name="LastNameDesc" xml:space="preserve">
<value>Le nom de famille de la personne</value>
</data>
<data name="NotListed" xml:space="preserve">
<value>(Non proposé)</value>
</data>
</root>

159
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/DisplayLocalizationRes.resx.txt

@ -1,159 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="DetailsCategory" xml:space="preserve">
<value>Details</value>
</data>
<data name="FavoriteActor1" xml:space="preserve">
<value>Favorite actor 1 (no DisplayName)</value>
</data>
<data name="FavoriteActor1Desc" xml:space="preserve">
<value>This property's type is an enum whose values have no DisplayName attributes. These values displayed are provided by the ToString() method.</value>
</data>
<data name="FavoriteActor2" xml:space="preserve">
<value>Favorite actor 2 (with DisplayName)</value>
</data>
<data name="FavoriteActor2Desc" xml:space="preserve">
<value>This property's type is an enum whose values are decorated with the ExtendedDisplayName attribute. Combined with the EnumDisplayNameConverter, this allows display values to be customized.</value>
</data>
<data name="FavoriteActor3" xml:space="preserve">
<value>Favorite actor 3</value>
</data>
<data name="FavoriteActor3Desc" xml:space="preserve">
<value>"(Not listed)" enum value shows that enum values can also be localized.</value>
</data>
<data name="FirstName" xml:space="preserve">
<value>First name</value>
</data>
<data name="FirstNameDesc" xml:space="preserve">
<value>First name of that person</value>
</data>
<data name="InfoCategory" xml:space="preserve">
<value>Information</value>
</data>
<data name="LastName" xml:space="preserve">
<value>Last name</value>
</data>
<data name="LastNameDesc" xml:space="preserve">
<value>Usually the familly name of the person</value>
</data>
<data name="NotListed" xml:space="preserve">
<value>(Not listed)</value>
</data>
</root>

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/FilePickerView.xaml.cs.txt

@ -28,7 +28,18 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.FilePicker.Views
public FilePickerView() public FilePickerView()
{ {
InitializeComponent(); InitializeComponent();
#if !OPEN_SOURCE
_filePicker.SelectedFiles.CollectionChanged += this.SelectedFiles_CollectionChanged;
#endif
} }
#if !OPEN_SOURCE
private void SelectedFiles_CollectionChanged( object sender, NotifyCollectionChangedEventArgs e )
{
//Refresh PrimitiveTypeCollectionControl.ItemsSource to be up to date with FilePicker.SelectedFiles.
_primitiveTypeCollectionControl.ItemsSource = null;
_primitiveTypeCollectionControl.ItemsSource = _filePicker.SelectedFiles;
}
#endif
} }
} }

200
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/FilePickerView.xaml.txt

@ -26,6 +26,7 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
<Run>The FilePicker is a control that can be used to select one or more files in a browsing window.</Run> <Run>The FilePicker is a control that can be used to select one or more files in a browsing window.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
@ -33,26 +34,189 @@
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<x:Array x:Key="FilterStrings"
Type="sys:String">
<sys:String>All files |*.*</sys:String>
<sys:String>Text Files |*.txt</sys:String>
<sys:String>Office Files |*.docx;*.xlsx;*.pptx</sys:String>
<sys:String>Image files |*.jpg;*.jpeg</sys:String>
</x:Array>
<conv:InverseBoolConverter x:Key="InverseBoolConverter" />
<Style TargetType="TextBlock">
<Style.Triggers>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Foreground"
Value="Gray" />
</Trigger>
</Style.Triggers>
</Style>
</local:DemoView.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox Header="Features"
Grid.Row="0"
Margin="5">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- 1st Column -->
<TextBlock Text="Filter: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Margin="5"
Width="187"
ToolTip="Gets/Sets the type of files to show when Dialog is opened."
ItemsSource="{StaticResource FilterStrings}"
SelectedItem="{Binding Filter, ElementName=_filePicker}" />
<TextBlock Text="Use Full Path: "
Grid.Row="1"
VerticalAlignment="Center" />
<CheckBox Grid.Column="1"
Grid.Row="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Margin="5"
ToolTip="Gets/Sets if the full path should be used for SelectedFile and SelectedFiles."
IsChecked="{Binding UseFullPath, ElementName=_filePicker}" />
<TextBlock Text="Multi Select: "
Grid.Row="2"
VerticalAlignment="Center" />
<CheckBox Grid.Column="1"
Grid.Row="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Margin="5"
ToolTip="Gets/Sets if the browsing window permits to do multi-selection of files."
IsChecked="{Binding MultiSelect, ElementName=_filePicker}" />
<TextBlock Text="Selected File: "
Grid.Row="3"
VerticalAlignment="Center"
IsEnabled="{Binding MultiSelect, ElementName=_filePicker, Converter={StaticResource InverseBoolConverter}}"/>
<TextBox Grid.Column="1"
Grid.Row="3"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Margin="5"
ToolTip="Gets/Sets the file that is selected when MultiSelect is false."
Text="{Binding SelectedFile, ElementName=_filePicker}"
IsEnabled="{Binding MultiSelect, ElementName=_filePicker, Converter={StaticResource InverseBoolConverter}}"/>
<TextBlock Text="Selected Files: "
Grid.Row="4"
VerticalAlignment="Center"
IsEnabled="{Binding MultiSelect, ElementName=_filePicker}"/>
<xctk:PrimitiveTypeCollectionControl x:Name="_primitiveTypeCollectionControl"
Grid.Column="1"
Grid.Row="4"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Margin="5"
ToolTip="Gets/Sets the files that are selected when MultiSelect is true."
Content="Selected Files"
ItemsSource="{Binding SelectedFiles, ElementName=_filePicker}"
ItemType="{x:Type sys:String}"
IsEnabled="{Binding MultiSelect, ElementName=_filePicker}"/>
<!-- 2nd Column -->
<TextBlock Text="Watermark: "
Grid.Column="2"
VerticalAlignment="Center" />
<TextBox Grid.Column="3"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Margin="5"
ToolTip="Gets/Sets the watermark when there are no file selected."
Text="{Binding Watermark, ElementName=_filePicker}" />
<TextBlock Text="Title: "
Grid.Row="1"
Grid.Column="2"
VerticalAlignment="Center" />
<TextBox Grid.Row="1"
Grid.Column="3"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Margin="5"
ToolTip="Gets/Sets the tile of the window browser."
Text="{Binding Title, ElementName=_filePicker}" />
<TextBlock Text="Initial Directory: "
Grid.Row="2"
Grid.Column="2"
VerticalAlignment="Center" />
<TextBox Grid.Row="2"
Grid.Column="3"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Margin="5"
ToolTip="Gets/Sets the current directory of the window browser."
Text="{Binding InitialDirectory, ElementName=_filePicker}" />
<TextBlock Text="Browse Content: "
Grid.Row="3"
Grid.Column="2"
VerticalAlignment="Center" />
<TextBox Grid.Row="3"
Grid.Column="3"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Margin="5"
ToolTip="Gets/Sets the content of the Browse Button."
Text="{Binding BrowseContent, ElementName=_filePicker, UpdateSourceTrigger=PropertyChanged}" />
</Grid>
</GroupBox>
<StackPanel Grid.Row="1"
Margin="10">
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<xctk:FilePicker x:Name="_filePicker"
Filter="All files |*.*"
Title="The FilePicker"
UseFullPath="True"
MultiSelect="False"
InitialDirectory="C:\"
BrowseContent=". . ."
Watermark="Choose your file(s)..."/>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\FilePicker.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\FilePicker.png" Width="600" Height="400"/>
##END-->
</local:DemoView> </local:DemoView>

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

@ -32,9 +32,17 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.ListBox.Views
public ListBoxView() public ListBoxView()
{ {
#if !OPEN_SOURCE
this.DataContext = SampleDataProvider.GetOrders();
#endif
InitializeComponent(); InitializeComponent();
#if !OPEN_SOURCE
//Add the default GroupDescriptions to the ListBox's GroupDescriptions collection.
_listBox.GroupDescriptions.Add( this.Resources[ "shipCountryGroupDescription" ] as GroupDescription );
_listBox.GroupDescriptions.Add( this.Resources[ "shipCityGroupDescription" ] as GroupDescription );
#endif
} }
#endregion #endregion

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

File diff suppressed because it is too large

8
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialButtonView.xaml.cs.txt

@ -31,5 +31,13 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views
InitializeComponent(); InitializeComponent();
} }
#if !OPEN_SOURCE
private void ModeComboBox_SelectionChanged( object sender, SelectionChangedEventArgs e )
{
materialButton.Content = e.AddedItems[ 0 ].Equals( MaterialButtonModeEnum.Circle )
? ((ComboBoxItem)contentComboBox.Items.GetItemAt( 1 )).Tag
: ((ComboBoxItem)contentComboBox.Items.GetItemAt( 0 )).Tag;
}
#endif
} }
} }

171
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialButtonView.xaml.txt

@ -25,6 +25,7 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
<Run>A Button with a raised animation on mouse over and a customizable ink animation on MousePress. It uses the Material Brushes.</Run> <Run>A Button with a raised animation on mouse over and a customizable ink animation on MousePress. It uses the Material Brushes.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
@ -32,18 +33,168 @@
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/CommonResources.xaml" />
</ResourceDictionary.MergedDictionaries>
<xctk:SolidColorBrushToColorConverter x:Key="SolidColorBrushToColorConverter" />
<ObjectDataProvider x:Key="ButtonEnumData"
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="xctk:MaterialButtonModeEnum" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
</ResourceDictionary>
</local:DemoView.Resources>
<Grid>
<StackPanel Margin="10">
<GroupBox Header="Features"
Margin="0,5,0,5">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="95" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- First Column-->
<TextBlock Grid.Column="0"
Text="Is Raised Active: "
VerticalAlignment="Center" />
<CheckBox Grid.Column="1"
IsChecked="{Binding IsRaisedActive, ElementName=materialButton}"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Grid.Column="0"
Grid.Row="1"
Text="Mode: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
Grid.Row="1"
ItemsSource="{Binding Source={StaticResource ButtonEnumData}}"
SelectedItem="{Binding Mode, ElementName=materialButton}"
SelectionChanged="ModeComboBox_SelectionChanged"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Grid.Column="0"
Grid.Row="2"
Text="Content: "
VerticalAlignment="Center" />
<ComboBox x:Name="contentComboBox"
Grid.Column="1"
Grid.Row="2"
SelectedValue="{Binding Content, ElementName=materialButton}"
SelectedValuePath="Tag"
VerticalAlignment="Center"
Margin="5">
<ComboBoxItem Content="A string"
Tag="PRIMARY" />
<ComboBoxItem Content="An image">
<ComboBoxItem.Tag>
<Image Source="../Resources/WhitePen.png"
Width="30"
Height="30" />
</ComboBoxItem.Tag>
</ComboBoxItem>
</ComboBox>
<TextBlock Grid.Column="0"
Grid.Row="3"
Text="Material Accent Brush: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
Grid.Row="3"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding MaterialAccentBrush, ElementName=materialButton}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
<!-- Second Column -->
<TextBlock Grid.Column="2"
Grid.Row="0"
Text="Is Ink Effect Active: "
VerticalAlignment="Center"
Margin="10,0,0,0" />
<CheckBox x:Name="inkEffectActiveCheckBox"
Grid.Column="3"
Grid.Row="0"
IsChecked="{Binding IsInkEffectActive, ElementName=materialButton}"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Grid.Column="2"
Grid.Row="1"
Text="Ink Effect Brush: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
Style="{StaticResource DisableGrayText}" />
<xctk:ColorPicker Grid.Column="3"
Grid.Row="1"
SelectedColor="{Binding InkEffectBrush, ElementName=materialButton, Converter={StaticResource SolidColorBrushToColorConverter}}"
DisplayColorAndName="True"
VerticalAlignment="Center"
Width="125"
Margin="5"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}" />
<TextBlock Grid.Column="2"
Grid.Row="2"
Text="Ink Effect Opacity: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
Style="{StaticResource DisableGrayText}" />
<xctk:DoubleUpDown Grid.Column="3"
Grid.Row="2"
Value="{Binding InkEffectOpacity, ElementName=materialButton}"
Minimum="0"
Maximum="1"
Increment="0.05"
FormatString="N2"
VerticalAlignment="Center"
Margin="5"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}" />
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<xctk:MaterialButton x:Name="materialButton"
Content="PRIMARY"
Margin="20"
Padding="20"
IsRaisedActive="True"
IsInkEffectActive="True"
InkEffectBrush="White"
InkEffectOpacity="0.25"
Mode="Rectangle"
HorizontalAlignment="Center" />
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialButton.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialButton.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

76
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialCheckBoxView.xaml.txt

@ -24,6 +24,7 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
<Run>A CheckBox with transition animations when the checked state is changed. It uses the Material Brushes.</Run> <Run>A CheckBox with transition animations when the checked state is changed. It uses the Material Brushes.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
@ -31,16 +32,91 @@
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/CommonResources.xaml" />
</ResourceDictionary.MergedDictionaries>
<xctk:CornerRadiusToDoubleConverter x:Key="CornerRadiusToDoubleConverter" />
<xctk:SolidColorBrushToColorConverter x:Key="SolidColorBrushToColorConverter" />
</ResourceDictionary>
</local:DemoView.Resources>
<Grid>
<StackPanel Margin="10">
<GroupBox Header="Features"
Margin="0,5,0,5">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="95" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- First Column-->
<TextBlock Grid.Column="0"
Text="Corner Radius: "
VerticalAlignment="Center" />
<xctk:DoubleUpDown Grid.Column="1"
Value="{Binding CornerRadius, ElementName=materialCheckBox, Converter={StaticResource CornerRadiusToDoubleConverter}}"
Minimum="0"
Maximum="10"
Increment="1"
Margin="5"
VerticalContentAlignment="Center" />
<TextBlock Grid.Column="0"
Grid.Row="1"
Text="Material Accent Brush: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
Grid.Row="1"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding MaterialAccentBrush, ElementName=materialCheckBox}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
<!-- Second Column-->
<TextBlock Grid.Column="2"
Text="Check Mark Brush: "
VerticalAlignment="Center"
Margin="10,0,0,0"/>
<xctk:ColorPicker Grid.Column="3"
SelectedColor="{Binding CheckMarkBrush, ElementName=materialCheckBox, Converter={StaticResource SolidColorBrushToColorConverter}}"
DisplayColorAndName="True"
Margin="5"
Width="150"
VerticalContentAlignment="Center" />
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<xctk:MaterialCheckBox x:Name="materialCheckBox"
HorizontalAlignment="Center"
IsChecked="True"
Content="Accept conditions"
IsThreeState="True"/>
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialCheckBox.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialCheckBox.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

142
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialComboBoxView.xaml.txt

@ -26,6 +26,7 @@
<Run>MaterialComboBox is a ComboBox that is using the Material Brushes and contains MaterialComboBoxItems.</Run> <Run>MaterialComboBox is a ComboBox that is using the Material Brushes and contains MaterialComboBoxItems.</Run>
<LineBreak /> <LineBreak />
<Run>MaterialComboBoxItems are ComboBoxItems that are using the Material Brushes. They use an ink animation when they are selected.</Run> <Run>MaterialComboBoxItems are ComboBoxItems that are using the Material Brushes. They use an ink animation when they are selected.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
@ -33,16 +34,157 @@
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/CommonResources.xaml" />
</ResourceDictionary.MergedDictionaries>
<xctk:SolidColorBrushToColorConverter x:Key="SolidColorBrushToColorConverter" />
</ResourceDictionary>
</local:DemoView.Resources>
<Grid>
<StackPanel Margin="10">
<GroupBox Header="Features"
Margin="0,5,0,5">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="135" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- First Column-->
<TextBlock Grid.Column="0"
Grid.Row="0"
Text="Material Accent Brush: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
Grid.Row="0"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding MaterialAccentBrush, ElementName=materialComboBox}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Grid.Column="0"
Grid.Row="1"
Text="Line Brush: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
Grid.Row="1"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding LineBrush, ElementName=materialComboBox}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Grid.Column="0"
Grid.Row="2"
Text="Line Focus Brush: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
Grid.Row="2"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding LineFocusBrush, ElementName=materialComboBox}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Text="Is Using fade Animation: "
Grid.Row="3"
Grid.Column="0"
VerticalAlignment="Center" />
<CheckBox Grid.Column="1"
Grid.Row="3"
IsChecked="{Binding IsUsingFadeAnimation, ElementName=materialComboBox}"
VerticalAlignment="Center"
Margin="5" />
<!-- Second Column -->
<TextBlock Grid.Column="2"
Grid.Row="0"
Text="Is Ink Effect Active: "
VerticalAlignment="Center"
Margin="10,0,0,0"/>
<CheckBox x:Name="inkEffectActiveCheckBox"
Grid.Column="3"
Grid.Row="0"
IsChecked="{Binding IsInkEffectActive, ElementName=materialComboBox}"
VerticalAlignment="Center"
Margin="5"
ToolTip="Can be set a MaterialComboBox control or individually on each MaterialComboBoxItem." />
<TextBlock Grid.Column="2"
Grid.Row="1"
Text="Ink Effect Brush: "
VerticalAlignment="Center"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
Style="{StaticResource DisableGrayText}"
Margin="10,0,0,0"/>
<xctk:ColorPicker Grid.Column="3"
Grid.Row="1"
SelectedColor="{Binding InkEffectBrush, ElementName=materialComboBox, Converter={StaticResource SolidColorBrushToColorConverter}}"
DisplayColorAndName="True"
VerticalAlignment="Center"
Width="125"
Margin="5"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
ToolTip="Can be set a MaterialComboBox control or individually on each MaterialComboBoxItem." />
<TextBlock Grid.Column="2"
Grid.Row="2"
Text="Ink Effect Opacity: "
VerticalAlignment="Center"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
Style="{StaticResource DisableGrayText}"
Margin="10,0,0,0"/>
<xctk:DoubleUpDown Grid.Column="3"
Grid.Row="2"
Value="{Binding InkEffectOpacity, ElementName=materialComboBox}"
Minimum="0"
Maximum="1"
Increment="0.05"
FormatString="N2"
VerticalAlignment="Center"
Margin="5"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
ToolTip="Can be set a MaterialComboBox control or individually on each MaterialComboBoxItem." />
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<xctk:MaterialComboBox x:Name="materialComboBox"
HorizontalAlignment="Center"
IsInkEffectActive="True"
IsUsingFadeAnimation="True"
LineBrush="{Binding MaterialBrushes[17], RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
Width="150">
<xctk:MaterialComboBoxItem Content="First Item" />
<xctk:MaterialComboBoxItem Content="Second Item"
IsSelected="True" />
<xctk:MaterialComboBoxItem Content="Third Item" />
<xctk:MaterialComboBoxItem Content="Fourth Item" />
<xctk:MaterialComboBoxItem Content="Fifth Item" />
</xctk:MaterialComboBox>
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialComboBox.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialComboBox.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

121
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialControlsView.xaml.cs.txt

@ -19,6 +19,12 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
#if !OPEN_SOURCE
using System.Windows.Input;
using System.Windows.Media.Animation;
using System.Windows.Threading;
using Xceed.Wpf.Toolkit.MaterialControls;
#endif
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views
{ {
/// <summary> /// <summary>
@ -26,8 +32,15 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views
/// </summary> /// </summary>
public partial class MaterialControlsView : MaterialDemoView public partial class MaterialControlsView : MaterialDemoView
{ {
#if !OPEN_SOURCE
#region Members
private Storyboard _toastStoryboard = new Storyboard();
private Random _rand = new Random();
private List<MaterialToast> _toastList = new List<MaterialToast>();
#endregion
#endif
#region Constructors #region Constructors
@ -38,22 +51,130 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views
#endregion #endregion
#if !OPEN_SOURCE
#region Private Methods
private int GetRandomInteger( int max )
{
return _rand.Next( max );
}
private void PopToast()
{
MaterialAccentEnum accent;
MaterialToastLocationEnum location;
string text;
switch( this.GetRandomInteger( 8 ) )
{
case 0: accent = MaterialAccentEnum.Blue; break;
case 1: accent = MaterialAccentEnum.LightBlue; break;
case 2: accent = MaterialAccentEnum.Cyan; break;
case 3: accent = MaterialAccentEnum.Teal; break;
case 4: accent = MaterialAccentEnum.Green; break;
case 5: accent = MaterialAccentEnum.LightGreen; break;
case 6: accent = MaterialAccentEnum.Lime; break;
default: accent = MaterialAccentEnum.Yellow; break;
}
switch( this.GetRandomInteger( 6 ) )
{
case 0: location = MaterialToastLocationEnum.Bottom; break;
case 1: location = MaterialToastLocationEnum.BottomLeft; break;
case 2: location = MaterialToastLocationEnum.BottomRight; break;
case 3: location = MaterialToastLocationEnum.Top; break;
case 4: location = MaterialToastLocationEnum.TopLeft; break;
default: location = MaterialToastLocationEnum.TopRight; break;
}
switch( this.GetRandomInteger( 6 ) )
{
case 0: text = "Warning"; break;
case 1: text = "New Appointments"; break;
case 2: text = "New Mail"; break;
case 3: text = "New Message"; break;
case 4: text = "Times Up!"; break;
default: text = "Task Completed!";break;
}
var materialToast = new MaterialToast( _toastGrid );
materialToast.MaterialAccent = accent;
materialToast.Location = location;
materialToast.Content = text;
materialToast.DisplayTime = System.TimeSpan.FromMilliseconds( 3000 );
materialToast.HideCompleted += this.MaterialToast_HideCompleted;
_toastList.Add( materialToast );
materialToast.ShowToast();
}
private void StartToastCircularProgressBar()
{
Storyboard storyboard = new Storyboard();
var valueAnim = new DoubleAnimation( 0d, 100d, System.TimeSpan.FromMilliseconds( 3000 ) );
Storyboard.SetTarget( valueAnim, _toastProgressBarCircular );
Storyboard.SetTargetProperty( valueAnim, new PropertyPath( MaterialProgressBarCircular.ValueProperty ) );
storyboard.Children.Add( valueAnim );
storyboard.Completed += this.ToastCircularPropgressBarAnimation_Completed;
storyboard.Begin( _toastProgressBarCircular );
}
#endregion
#region Event Handlers
private void MaterialProgressBar_MouseLeftButtonDown( object sender, MouseButtonEventArgs e )
{
var progressBar = sender as MaterialProgressBarBase;
if( progressBar != null )
{
var storyboard = new Storyboard();
// Animate ProgressBar
var valueAnim = new DoubleAnimation( progressBar.Minimum, progressBar.Maximum, System.TimeSpan.FromMilliseconds( 4000 ) );
Storyboard.SetTarget( valueAnim, progressBar );
Storyboard.SetTargetProperty( valueAnim, new PropertyPath( MaterialProgressBarBase.ValueProperty ) );
storyboard.Children.Add( valueAnim );
storyboard.Begin( this );
}
}
private void MaterialTabControl_SelectionChanged( object sender, SelectionChangedEventArgs e )
{
var materialTabItem = e.AddedItems[ 0 ] as MaterialTabItem;
if( (materialTabItem != null) && materialTabItem.Equals( _materialTabItem5 ) )
{
this.StartToastCircularProgressBar();
}
else
{
foreach( var toast in _toastList )
{
toast.HideToast();
}
}
}
private void MaterialToast_HideCompleted( object sender, RoutedEventArgs e )
{
_toastList.Remove( sender as MaterialToast );
}
private void MaterialToastButton_Click( object sender, RoutedEventArgs e )
{
this.PopToast();
}
private void ToastCircularPropgressBarAnimation_Completed( object sender, EventArgs e )
{
if( _materialTabControl.SelectedItem.Equals( _materialTabItem5 ) )
{
this.PopToast();
this.StartToastCircularProgressBar();
}
}
#endregion
#endif
} }
} }

923
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialControlsView.xaml.txt

@ -27,6 +27,7 @@
<LineBreak /> <LineBreak />
<LineBreak /> <LineBreak />
<Run>The Material controls include a set of complimentary accent brush and foreground.</Run> <Run>The Material controls include a set of complimentary accent brush and foreground.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
@ -34,23 +35,945 @@
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<Path x:Key="IconVolumeUp"
Data="M17.071346,6.6599999C17.78875,8.1508932 18.122005,9.9854851 17.917633,11.917816 17.780151,13.210711 17.415701,14.404805 16.885771,15.449L15.177,14.644304C15.617841,13.787608 15.9243,12.790113 16.036884,11.719817 16.208162,10.105325 15.913901,8.568861 15.306683,7.365747z M20.566984,5.2669997C21.512329,7.3320866 21.947803,9.7617378 21.678318,12.318976 21.49543,14.033849 21.006458,15.634024 20.297501,17.052L18.59,16.251213C19.210964,15.018133 19.637339,13.622355 19.796829,12.11588 20.034515,9.8762961 19.647739,7.7448602 18.813787,5.9662089z M13.335,0L13.335,21.334999 5.6516771,14.88951 0,14.88951 0,6.4454007 5.6543674,6.4454007z"
Stretch="Uniform"
Fill="#FFFFFFFF"
Width="36"
Height="36"
Margin="0,0,0,0"
RenderTransformOrigin="0.5,0.5" />
<Path x:Key="IconVolumeDown"
Data="M17.069859,6.6599998C17.78598,8.1508932 18.11929,9.9855452 17.916285,11.917816 17.779579,13.210711 17.413668,14.404805 16.884953,15.449L15.174,14.644304C15.615413,13.787608 15.922723,12.790213 16.034725,11.719917 16.207932,10.105325 15.910922,8.568861 15.305504,7.365747z M13.333,0L13.333,21.333 5.6509034,14.889021 0,14.889021 0,6.445189 5.6522733,6.445189z"
Stretch="Uniform"
Fill="#FFFFFFFF"
Width="36"
Height="36"
Margin="0,0,0,0"
RenderTransformOrigin="0.5,0.5" />
<Path x:Key="IconVolumeMinus"
Data="M16.92,9.7449998L25.690001,9.7449998 25.690001,11.589 16.92,11.589z M11.066152,4.8618717L6.4789848,8.7133774 2.2655792,8.7133774 2.2655792,12.622222 6.4737949,12.622222 11.066152,16.473669z M13.333,0L13.333,21.333 5.6508131,14.889091 0,14.889091 0,6.4452193 5.6522131,6.4452193z"
Stretch="Uniform"
Fill="#FFFFFFFF"
Width="24"
Height="24"
Margin="0,0,0,0"
RenderTransformOrigin="0.5,0.5" />
<Path x:Key="IconVolumeMute"
Data="M17.648219,6.9439999L20.472552,9.7694447 23.299285,6.9439999 24.802002,8.4505004 21.97767,11.275985 24.799303,14.09623 23.294185,15.6014 20.472552,12.778555 17.648219,15.604001 16.143001,14.098829 18.968634,11.275985 16.143001,8.4505004z M11.066151,4.8619084L6.479044,8.7121162 2.2668591,8.7121162 2.2668591,12.622163 6.4750738,12.622163 11.066151,16.473691z M13.333,0L13.333,21.332999 5.6509323,14.88902 0,14.88902 0,6.4451885 5.6534328,6.4451885z"
Stretch="Uniform"
Fill="#FFFFFFFF"
Width="18"
Height="18"
Margin="0,0,0,0"
RenderTransformOrigin="0.5,0.5" />
<Style x:Key="ToolTipTextStyle"
TargetType="{x:Type TextBlock}">
<Setter Property="FontWeight"
Value="Bold" />
<Setter Property="HorizontalAlignment"
Value="Left" />
<Setter Property="VerticalAlignment"
Value="Top" />
<Setter Property="Foreground"
Value="Black" />
<Style.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Foreground"
Value="{Binding Tag, RelativeSource={RelativeSource Self}}" />
</Trigger>
</Style.Triggers>
</Style>
</local:DemoView.Resources>
<Grid>
<xctk:MaterialTabControl x:Name="_materialTabControl"
MaterialAccent="LightBlue"
SelectionChanged="MaterialTabControl_SelectionChanged">
<xctk:MaterialTabItem Header="Controls Page 1"
Padding="20"
FontSize="12">
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<xctk:MaterialFrame Margin="16"
VerticalContentAlignment="Top"
Z="4">
<StackPanel Orientation="Vertical"
HorizontalAlignment="Left"
Margin="20">
<TextBlock Text="Buttons : " />
<xctk:MaterialButton Margin="0,8,0,0"
Height="28"
Width="120"
Content="Button 1"
MaterialAccent="Blue" />
<xctk:MaterialButton Margin="0,8,0,0"
Height="28"
Width="120"
Content="Button 2"
MaterialAccent="LightBlue" />
<xctk:MaterialButton Margin="0,8,0,0"
Height="28"
Width="120"
Content="Button 3"
MaterialAccent="Cyan" />
<xctk:MaterialButton Margin="0,8,0,0"
Height="28"
Width="120"
Content="Button 4"
MaterialAccent="Teal" />
<xctk:MaterialButton Margin="0,8,0,0"
Height="28"
Width="120"
Content="Button 5"
MaterialAccent="Green" />
<xctk:MaterialButton Margin="0,8,0,0"
Height="28"
Width="120"
Content="Button 6"
MaterialAccent="LightGreen" />
<xctk:MaterialButton Margin="0,8,0,0"
Height="28"
Width="120"
Content="Button 7"
MaterialAccent="Lime" />
</StackPanel>
</xctk:MaterialFrame>
<xctk:MaterialFrame Margin="16"
VerticalContentAlignment="Top"
Z="4">
<StackPanel Orientation="Vertical"
HorizontalAlignment="Left"
Margin="20">
<TextBlock Text="Round Buttons : " />
<xctk:MaterialButton Margin="0,8,0,0"
Mode="Circle"
Height="64"
Width="64"
Content="{StaticResource IconVolumeUp}"
MaterialAccent="Blue" />
<xctk:MaterialButton Margin="0,8,0,0"
Mode="Circle"
Height="48"
Width="48"
Content="{StaticResource IconVolumeDown}"
MaterialAccent="LightBlue" />
<xctk:MaterialButton Margin="0,8,0,0"
Mode="Circle"
Height="36"
Width="36"
Content="{StaticResource IconVolumeMinus}"
MaterialAccent="Cyan" />
<xctk:MaterialButton Margin="0,8,0,0"
Mode="Circle"
Height="24"
Width="24"
Content="{StaticResource IconVolumeMute}"
MaterialAccent="Teal" />
<xctk:MaterialButton Margin="0,8,0,0"
Mode="Circle"
Height="18"
Width="18"
Content=""
MaterialAccent="Green" />
</StackPanel>
</xctk:MaterialFrame>
<xctk:MaterialFrame Margin="16"
VerticalContentAlignment="Top"
Z="4">
<StackPanel Orientation="Vertical"
HorizontalAlignment="Left"
Margin="20">
<TextBlock Text="Radio Buttons : " />
<xctk:MaterialRadioButton Content="Option 1"
Margin="0,8,0,0"
MaterialAccent="Blue" />
<xctk:MaterialRadioButton Content="Option 2"
Margin="0,8,0,0"
MaterialAccent="LightBlue" />
<xctk:MaterialRadioButton Content="Option 3"
Margin="0,8,0,0"
MaterialAccent="Cyan" />
<xctk:MaterialRadioButton Content="Option 4"
Margin="0,8,0,0"
MaterialAccent="Teal" />
<xctk:MaterialRadioButton Content="Option 5"
Margin="0,8,0,0"
MaterialAccent="Green" />
<xctk:MaterialRadioButton Content="Option 6"
Margin="0,8,0,0"
MaterialAccent="LightGreen" />
<xctk:MaterialRadioButton Content="Option 7"
Margin="0,8,0,0"
MaterialAccent="Lime" />
<xctk:MaterialRadioButton Content="Option 8"
Margin="0,8,0,0"
MaterialAccent="Yellow" />
</StackPanel>
</xctk:MaterialFrame>
</StackPanel >
</xctk:MaterialTabItem>
<xctk:MaterialTabItem Header="Controls Page 2"
Padding="20"
FontSize="12">
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<xctk:MaterialFrame Z="4"
VerticalContentAlignment="Top"
Margin="16">
<StackPanel Orientation="Vertical"
Margin="20"
Width="260">
<TextBlock Text="TextFields : " />
<xctk:MaterialTextField Watermark="First Name"
Margin="0,36,0,0"
MaterialAccent="Blue" />
<xctk:MaterialTextField Watermark="Last Name"
Margin="0,36,0,0"
MaterialAccent="Blue" />
<xctk:MaterialTextField Watermark="Company Name"
Margin="0,36,0,0"
MaterialAccent="Blue" />
<xctk:MaterialTextField Watermark="Address"
Margin="0,36,0,0"
MaterialAccent="Blue" />
<xctk:MaterialTextField Watermark="Address Line 2"
Margin="0,36,0,0"
MaterialAccent="Blue" />
</StackPanel>
</xctk:MaterialFrame>
<xctk:MaterialFrame Z="4"
Margin="16"
VerticalContentAlignment="Top">
<StackPanel Margin="20">
<TextBlock Text="CheckBoxes: " />
<xctk:MaterialCheckBox Content="Option 1"
Margin="0,8,0,0"
MaterialAccent="Blue"
IsChecked="True" />
<xctk:MaterialCheckBox Content="Option 2"
Margin="0,8,0,0"
MaterialAccent="LightBlue"
IsChecked="True" />
<xctk:MaterialCheckBox Content="Option 3"
Margin="0,8,0,0"
MaterialAccent="Cyan"
IsChecked="True" />
<xctk:MaterialCheckBox Content="Option 4"
Margin="0,8,0,0"
MaterialAccent="Teal"
IsChecked="True" />
<xctk:MaterialCheckBox Content="Option 5"
Margin="0,8,0,0"
MaterialAccent="Green"
IsChecked="True" />
<xctk:MaterialCheckBox Content="Option 6"
Margin="0,8,0,0"
MaterialAccent="LightGreen"
IsChecked="True" />
<xctk:MaterialCheckBox Content="Option 7"
Margin="0,8,0,0"
MaterialAccent="Lime"
IsChecked="True" />
<xctk:MaterialCheckBox Content="Option 8"
Margin="0,8,0,0"
MaterialAccent="Yellow"
IsChecked="True" />
</StackPanel>
</xctk:MaterialFrame>
<xctk:MaterialFrame Z="4"
Margin="16"
VerticalContentAlignment="Top">
<StackPanel Margin="20">
<TextBlock Text="DropDowns: " />
<xctk:MaterialDropDown Content="DropDown Button 1"
Margin="0,8,0,0"
MaterialAccent="Blue">
<xctk:MaterialDropDown.DropDownContent>
<Border CornerRadius="2"
Height="46"
Width="160">
<TextBlock Text="DropDown Content"
Foreground="Black"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</xctk:MaterialDropDown.DropDownContent>
</xctk:MaterialDropDown>
<xctk:MaterialDropDown Content="DropDown Button 2"
Margin="0,8,0,0"
MaterialAccent="LightBlue">
<xctk:MaterialDropDown.DropDownContent>
<Border CornerRadius="2"
Height="46"
Width="160">
<TextBlock Text="DropDown Content"
Foreground="Black"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</xctk:MaterialDropDown.DropDownContent>
</xctk:MaterialDropDown>
<xctk:MaterialDropDown Content="DropDown Button 3"
Margin="0,8,0,0"
MaterialAccent="Cyan">
<xctk:MaterialDropDown.DropDownContent>
<Border CornerRadius="2"
Height="46"
Width="160">
<TextBlock Text="DropDown Content"
Foreground="Black"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</xctk:MaterialDropDown.DropDownContent>
</xctk:MaterialDropDown>
<xctk:MaterialDropDown Content="DropDown Button 4"
Margin="0,8,0,0"
MaterialAccent="Teal">
<xctk:MaterialDropDown.DropDownContent>
<Border CornerRadius="2"
Height="46"
Width="160">
<TextBlock Text="DropDown Content"
Foreground="Black"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</xctk:MaterialDropDown.DropDownContent>
</xctk:MaterialDropDown>
<xctk:MaterialDropDown Content="DropDown Button 5"
Margin="0,8,0,0"
MaterialAccent="Green">
<xctk:MaterialDropDown.DropDownContent>
<Border CornerRadius="2"
Height="46"
Width="160">
<TextBlock Text="DropDown Content"
Foreground="Black"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</xctk:MaterialDropDown.DropDownContent>
</xctk:MaterialDropDown>
</StackPanel>
</xctk:MaterialFrame>
</StackPanel>
</xctk:MaterialTabItem>
<xctk:MaterialTabItem Header="Controls Page 3"
Padding="20"
FontSize="12">
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<xctk:MaterialFrame Z="4"
VerticalContentAlignment="Top"
HorizontalContentAlignment="Left"
Margin="16">
<StackPanel Margin="20">
<TextBlock Text="Switches : " />
<xctk:MaterialSwitch Width="80"
Margin="0,12,0,0"
MaterialAccent="Blue"
IsChecked="True" />
<xctk:MaterialSwitch Width="90"
Margin="0,12,0,0"
MaterialAccent="LightBlue"
IsChecked="True" />
<xctk:MaterialSwitch Width="100"
Margin="0,12,0,0"
MaterialAccent="Cyan"
IsChecked="True" />
<xctk:MaterialSwitch Width="110"
Margin="0,12,0,0"
MaterialAccent="Teal"
IsChecked="True" />
<xctk:MaterialSwitch Width="120"
Margin="0,12,0,0"
MaterialAccent="Green"
IsChecked="True" />
<xctk:MaterialSwitch Width="130"
Margin="0,12,0,0"
MaterialAccent="LightGreen"
IsChecked="True" />
<xctk:MaterialSwitch Width="140"
Margin="0,12,0,0"
MaterialAccent="Lime"
IsChecked="True" />
</StackPanel>
</xctk:MaterialFrame>
<xctk:MaterialFrame Z="4"
VerticalContentAlignment="Top"
HorizontalContentAlignment="Left"
Margin="16">
<StackPanel Margin="15">
<TextBlock Text="Sliders : " />
<Grid TextElement.Foreground="Black">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Text="Volume:"
Margin="0,15,0,15" />
<xctk:MaterialSlider Grid.Column="1"
Width="120"
MaterialAccent="Blue"
Minimum="0"
Maximum="10"
VerticalAlignment="Center" />
<TextBlock Text="Bass:"
Grid.Row="1"
Margin="0,15,0,15" />
<xctk:MaterialSlider Grid.Row="1"
Grid.Column="1"
Width="120"
MaterialAccent="LightBlue"
Minimum="0"
Maximum="10"
VerticalAlignment="Center" />
<TextBlock Text="Treble:"
Grid.Row="2"
Margin="0,15,0,15" />
<xctk:MaterialSlider Grid.Row="2"
Grid.Column="1"
Width="120"
MaterialAccent="Cyan"
Minimum="0"
Maximum="10"
VerticalAlignment="Center" />
<TextBlock Text="Mid:"
Grid.Row="3"
Margin="0,15,0,15" />
<xctk:MaterialSlider Grid.Row="3"
Grid.Column="1"
Width="120"
MaterialAccent="Teal"
Minimum="0"
Maximum="10"
VerticalAlignment="Center" />
<TextBlock Text="Master:"
Grid.Row="4"
Margin="0,15,0,15" />
<xctk:MaterialSlider Grid.Row="4"
Grid.Column="1"
Width="120"
MaterialAccent="Green"
Minimum="0"
Maximum="10"
VerticalAlignment="Center" />
<TextBlock Text="Equalizer:"
Grid.Row="5"
Margin="0,15,0,15" />
<xctk:MaterialSlider Grid.Row="5"
Grid.Column="1"
Width="120"
MaterialAccent="LightGreen"
Minimum="0"
Maximum="10"
VerticalAlignment="Center" />
<TextBlock Text="Balance:"
Grid.Row="6"
Margin="0,15,0,15" />
<xctk:MaterialSlider Grid.Row="6"
Grid.Column="1"
Width="120"
MaterialAccent="Lime"
Minimum="0"
Maximum="10"
VerticalAlignment="Center" />
</Grid>
</StackPanel>
</xctk:MaterialFrame>
<xctk:MaterialFrame Z="4"
VerticalContentAlignment="Top"
HorizontalContentAlignment="Left"
Margin="16">
<StackPanel Margin="15">
<TextBlock Text="ToolTips : "/>
<Grid Margin="0,15,0,0">
<Image Source="../Resources/italy.4.gif"
Stretch="Fill"
Height="328"
Width="204" />
<TextBlock Text="Venice"
Margin="49,50,0,0"
Tag="{Binding MaterialBrushes[6], RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
Style="{StaticResource ToolTipTextStyle}">
<TextBlock.ToolTip>
<xctk:MaterialToolTip MaterialAccent="LightBlue"
FontWeight="Light">
<StackPanel>
<TextBlock Text="Pop: 270,660" />
<TextBlock Text="Avg Temp: 13.0°C" />
</StackPanel>
</xctk:MaterialToolTip>
</TextBlock.ToolTip>
</TextBlock>
<TextBlock Text="Genoa"
Margin="15,76,0,0"
Tag="{Binding MaterialBrushes[7], RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
Style="{StaticResource ToolTipTextStyle}">
<TextBlock.ToolTip>
<xctk:MaterialToolTip MaterialAccent="Cyan"
FontWeight="Light">
<StackPanel>
<TextBlock Text="Pop: 594,904" />
<TextBlock Text="Avg Temp: 15.7°C" />
</StackPanel>
</xctk:MaterialToolTip>
</TextBlock.ToolTip>
</TextBlock>
<TextBlock Text="San Marino"
Margin="100,92,0,0"
Tag="{Binding MaterialBrushes[8], RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
Style="{StaticResource ToolTipTextStyle}">
<TextBlock.ToolTip>
<xctk:MaterialToolTip MaterialAccent="Teal"
FontWeight="Light">
<StackPanel>
<TextBlock Text="Pop: 32,576" />
<TextBlock Text="Avg Temp: 18.1°C" />
</StackPanel>
</xctk:MaterialToolTip>
</TextBlock.ToolTip>
</TextBlock>
<TextBlock Text="Florence"
Margin="58,113,0,0"
Tag="{Binding MaterialBrushes[9], RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
Style="{StaticResource ToolTipTextStyle}">
<TextBlock.ToolTip>
<xctk:MaterialToolTip MaterialAccent="Green"
FontWeight="Light">
<StackPanel>
<TextBlock Text="Pop: 379,180" />
<TextBlock Text="Avg Temp: 14.9°C" />
</StackPanel>
</xctk:MaterialToolTip>
</TextBlock.ToolTip>
</TextBlock>
<TextBlock Text="Rome"
Margin="62,167,0,0"
Tag="{Binding MaterialBrushes[15], RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
Style="{StaticResource ToolTipTextStyle}">
<TextBlock.ToolTip>
<xctk:MaterialToolTip MaterialAccent="DeepOrange"
FontWeight="Light">
<StackPanel>
<TextBlock Text="Pop: 4,321,244" />
<TextBlock Text="Avg Temp: 20.4°C" />
</StackPanel>
</xctk:MaterialToolTip>
</TextBlock.ToolTip>
</TextBlock>
<TextBlock Text="Brindisi"
Margin="149,180,0,0"
Tag="{Binding MaterialBrushes[16], RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
Style="{StaticResource ToolTipTextStyle}">
<TextBlock.ToolTip>
<xctk:MaterialToolTip MaterialAccent="Brown"
FontWeight="Light">
<StackPanel>
<TextBlock Text="Pop: 89,846" />
<TextBlock Text="Avg Temp: 17.2°C" />
</StackPanel>
</xctk:MaterialToolTip>
</TextBlock.ToolTip>
</TextBlock>
<TextBlock Text="Palermo"
Margin="72,237,0,0"
Tag="{Binding MaterialBrushes[18], RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
Style="{StaticResource ToolTipTextStyle}">
<TextBlock.ToolTip>
<xctk:MaterialToolTip MaterialAccent="BlueGray"
FontWeight="Light">
<StackPanel>
<TextBlock Text="Pop: 1,200,000" />
<TextBlock Text="Avg Temp: 18.5°C" />
</StackPanel>
</xctk:MaterialToolTip>
</TextBlock.ToolTip>
</TextBlock>
</Grid>
</StackPanel>
</xctk:MaterialFrame>
</StackPanel>
</xctk:MaterialTabItem>
<xctk:MaterialTabItem Header="Controls Page 4"
Padding="20"
FontSize="12">
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<xctk:MaterialFrame Z="4"
VerticalContentAlignment="Top"
HorizontalContentAlignment="Left"
Margin="16">
<StackPanel Margin="20">
<TextBlock Text="ProgressBars : " />
<TextBlock Text="(Click to animate progressBars)"
Foreground="Black"
FontSize="11" />
<Grid Margin="0,15,0,10">
<xctk:MaterialProgressBar x:Name="firstMaterialProgressBar"
Width="160"
MaterialAccent="Blue"
Minimum="0"
Maximum="100"
Height="20"
MouseLeftButtonDown="MaterialProgressBar_MouseLeftButtonDown" />
<TextBlock Text="{Binding Value, ElementName=firstMaterialProgressBar, StringFormat={}{0:N0}%}"
Foreground="Black"
IsHitTestVisible="False"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Grid>
<Grid Margin="0,10,0,10">
<xctk:MaterialProgressBar x:Name="secondMaterialProgressBar"
Width="160"
MaterialAccent="LightBlue"
Minimum="0"
Maximum="100"
Height="20"
MouseLeftButtonDown="MaterialProgressBar_MouseLeftButtonDown" />
<TextBlock Text="{Binding Value, ElementName=secondMaterialProgressBar, StringFormat={}{0:N0}%}"
Foreground="Black"
IsHitTestVisible="False"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Grid>
<Grid Margin="0,10,0,10">
<xctk:MaterialProgressBar x:Name="thirdMaterialProgressBar"
Width="160"
MaterialAccent="Cyan"
Minimum="0"
Maximum="100"
Height="20"
MouseLeftButtonDown="MaterialProgressBar_MouseLeftButtonDown" />
<TextBlock Text="{Binding Value, ElementName=thirdMaterialProgressBar, StringFormat={}{0:N0}%}"
Foreground="Black"
IsHitTestVisible="False"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Grid>
<Grid Margin="0,10,0,10">
<xctk:MaterialProgressBar x:Name="fourthMaterialProgressBar"
Width="160"
MaterialAccent="Teal"
Minimum="0"
Maximum="100"
Height="20"
MouseLeftButtonDown="MaterialProgressBar_MouseLeftButtonDown" />
<TextBlock Text="{Binding Value, ElementName=fourthMaterialProgressBar, StringFormat={}{0:N0}%}"
Foreground="Black"
IsHitTestVisible="False"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Grid>
<Grid Margin="0,10,0,10">
<xctk:MaterialProgressBar x:Name="fifthMaterialProgressBar"
Width="160"
MaterialAccent="Green"
Minimum="0"
Maximum="100"
Height="20"
MouseLeftButtonDown="MaterialProgressBar_MouseLeftButtonDown" />
<TextBlock Text="{Binding Value, ElementName=fifthMaterialProgressBar, StringFormat={}{0:N0}%}"
Foreground="Black"
IsHitTestVisible="False"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Grid>
<Grid Margin="0,10,0,10">
<xctk:MaterialProgressBar x:Name="sixthMaterialProgressBar"
Width="160"
MaterialAccent="LightGreen"
Minimum="0"
Maximum="100"
Height="20"
MouseLeftButtonDown="MaterialProgressBar_MouseLeftButtonDown" />
<TextBlock Text="{Binding Value, ElementName=sixthMaterialProgressBar, StringFormat={}{0:N0}%}"
Foreground="Black"
IsHitTestVisible="False"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Grid>
<Grid Margin="0,10,0,10">
<xctk:MaterialProgressBar x:Name="seventhMaterialProgressBar"
Width="160"
MaterialAccent="Lime"
Minimum="0"
Maximum="100"
Height="20"
MouseLeftButtonDown="MaterialProgressBar_MouseLeftButtonDown" />
<TextBlock Text="{Binding Value, ElementName=seventhMaterialProgressBar, StringFormat={}{0:N0}%}"
Foreground="Black"
IsHitTestVisible="False"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Grid>
</StackPanel>
</xctk:MaterialFrame>
<xctk:MaterialFrame Z="4"
VerticalContentAlignment="Top"
HorizontalContentAlignment="Left"
Margin="16">
<StackPanel Margin="20">
<TextBlock Text="Circular ProgressBars : " />
<TextBlock Text="(Click to animate progressBars)"
Foreground="Black"
FontSize="11"/>
<Grid Margin="0,15,0,6">
<xctk:MaterialProgressBarCircular x:Name="firstMaterialProgressBarCircular"
Width="75"
Height="75"
MaterialAccent="Blue"
Background="LightGray"
Minimum="0"
Maximum="100"
Thickness="15"
MouseLeftButtonDown="MaterialProgressBar_MouseLeftButtonDown" />
<TextBlock Text="{Binding Value, ElementName=firstMaterialProgressBarCircular, StringFormat={}{0:N0}%}"
Foreground="Black"
IsHitTestVisible="False"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Grid>
<Grid Margin="0,6,0,6">
<xctk:MaterialProgressBarCircular x:Name="secondMaterialProgressBarCircular"
Width="75"
Height="75"
Background="LightGray"
MaterialAccent="LightBlue"
Minimum="0"
Maximum="100"
Thickness="15"
MouseLeftButtonDown="MaterialProgressBar_MouseLeftButtonDown" />
<TextBlock Text="{Binding Value, ElementName=secondMaterialProgressBarCircular, StringFormat={}{0:N0}%}"
Foreground="Black"
IsHitTestVisible="False"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Grid>
<Grid Margin="0,6,0,6">
<xctk:MaterialProgressBarCircular x:Name="thirdMaterialProgressBarCircular"
Width="75"
Height="75"
Background="LightGray"
MaterialAccent="Cyan"
Minimum="0"
Maximum="100"
Thickness="15"
MouseLeftButtonDown="MaterialProgressBar_MouseLeftButtonDown" />
<TextBlock Text="{Binding Value, ElementName=thirdMaterialProgressBarCircular, StringFormat={}{0:N0}%}"
Foreground="Black"
IsHitTestVisible="False"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Grid>
<Grid Margin="0,6,0,6">
<xctk:MaterialProgressBarCircular x:Name="fourthMaterialProgressBarCircular"
Width="75"
Height="75"
Background="LightGray"
MaterialAccent="Teal"
Minimum="0"
Maximum="100"
Thickness="15"
MouseLeftButtonDown="MaterialProgressBar_MouseLeftButtonDown" />
<TextBlock Text="{Binding Value, ElementName=fourthMaterialProgressBarCircular, StringFormat={}{0:N0}%}"
Foreground="Black"
IsHitTestVisible="False"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Grid>
</StackPanel>
</xctk:MaterialFrame>
<xctk:MaterialFrame Z="4"
VerticalContentAlignment="Top"
HorizontalContentAlignment="Left"
Margin="16">
<StackPanel Margin="20">
<TextBlock Text="ListBoxes : " />
<xctk:MaterialListBox Margin="0,15,0,0"
MaterialAccent="Blue">
<xctk:MaterialListBoxItem Content="New York"
Padding="10,0,10,0"/>
<xctk:MaterialListBoxItem Content="Tokyo"
Padding="10,0,10,0"/>
<xctk:MaterialListBoxItem Content="Paris"
IsSelected="True"
Padding="10,0,10,0"/>
<xctk:MaterialListBoxItem Content="Sydney"
Padding="10,0,10,0" />
</xctk:MaterialListBox>
<xctk:MaterialListBox Margin="0,15,0,0"
MaterialAccent="LightBlue">
<xctk:MaterialListBoxItem Content="Brazil"
Padding="10,0,10,0"/>
<xctk:MaterialListBoxItem Content="USA"
IsSelected="True"
Padding="10,0,10,0" />
<xctk:MaterialListBoxItem Content="China"
Padding="10,0,10,0"/>
</xctk:MaterialListBox>
<xctk:MaterialListBox Margin="0,15,0,0"
MaterialAccent="Cyan">
<xctk:MaterialListBoxItem Content="English"
IsSelected="True"
Padding="10,0,10,0"/>
<xctk:MaterialListBoxItem Content="French"
Padding="10,0,10,0"/>
</xctk:MaterialListBox>
<xctk:MaterialListBox Margin="0,15,0,0"
MaterialAccent="Teal">
<xctk:MaterialListBoxItem Content="Red"
Padding="10,0,10,0" />
<xctk:MaterialListBoxItem Content="Green"
Padding="10,0,10,0" />
<xctk:MaterialListBoxItem Content="Blue"
IsSelected="True"
Padding="10,0,10,0" />
</xctk:MaterialListBox>
<xctk:MaterialListBox Margin="0,15,0,0"
MaterialAccent="Green">
<xctk:MaterialListBoxItem Content="True"
IsSelected="True"
Padding="10,0,10,0" />
<xctk:MaterialListBoxItem Content="False"
Padding="10,0,10,0" />
</xctk:MaterialListBox>
</StackPanel>
</xctk:MaterialFrame>
</StackPanel>
</xctk:MaterialTabItem>
<xctk:MaterialTabItem Header="Controls Page 5"
x:Name="_materialTabItem5"
Padding="20"
FontSize="12" >
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<xctk:MaterialFrame Z="4"
VerticalContentAlignment="Stretch"
HorizontalContentAlignment="Left"
Margin="16">
<Grid x:Name="_toastGrid"
Width="350">
<TextBlock Text="Toasts : "
Margin="20"/>
<Grid Margin="0,16,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<xctk:MaterialButton Content="Pop a toast"
Click="MaterialToastButton_Click"
Padding="15"
HorizontalAlignment="Center"/>
<Grid Grid.Row="1"
Margin="0,25,0,0"
Width="100"
Height="100">
<xctk:MaterialProgressBarCircular x:Name="_toastProgressBarCircular"
Background="LightGray"
Thickness="10"
Minimum="0"
Maximum="100" />
<TextBlock Text="Toast&#x0a;Timer"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Grid>
</Grid>
</Grid>
</xctk:MaterialFrame>
<xctk:MaterialFrame Z="4"
VerticalContentAlignment="Top"
HorizontalContentAlignment="Left"
Margin="16">
<StackPanel Orientation="Vertical"
Margin="20"
Width="200">
<TextBlock Text="ComboBoxes : " />
<xctk:MaterialComboBox Margin="0,36,0,0"
MaterialAccent="Blue">
<xctk:MaterialComboBoxItem Content="TV" />
<xctk:MaterialComboBoxItem Content="Computer"
IsSelected="True" />
<xctk:MaterialComboBoxItem Content="Cell phone" />
<xctk:MaterialComboBoxItem Content="Camera" />
<xctk:MaterialComboBoxItem Content="Radio" />
</xctk:MaterialComboBox>
<xctk:MaterialComboBox Margin="0,36,0,0"
MaterialAccent="LightBlue">
<xctk:MaterialComboBoxItem Content="Over 3000$" />
<xctk:MaterialComboBoxItem Content="From 2000$ - 3000$"
IsSelected="True" />
<xctk:MaterialComboBoxItem Content="From 1000$ - 2000$" />
<xctk:MaterialComboBoxItem Content="From 500$ - 1000$" />
<xctk:MaterialComboBoxItem Content="Under 500$" />
</xctk:MaterialComboBox>
<xctk:MaterialComboBox Margin="0,36,0,0"
MaterialAccent="Cyan">
<xctk:MaterialComboBoxItem Content="Sony" />
<xctk:MaterialComboBoxItem Content="Dell" />
<xctk:MaterialComboBoxItem Content="Samsung"
IsSelected="True" />
<xctk:MaterialComboBoxItem Content="Toshiba" />
<xctk:MaterialComboBoxItem Content="Sharp" />
</xctk:MaterialComboBox>
<xctk:MaterialComboBox Margin="0,36,0,0"
MaterialAccent="Teal">
<xctk:MaterialComboBoxItem Content="Over 100kg" />
<xctk:MaterialComboBoxItem Content="From 50 - 100kg" />
<xctk:MaterialComboBoxItem Content="From 30 - 50kg"
IsSelected="True" />
<xctk:MaterialComboBoxItem Content="From 10 - 30kg" />
<xctk:MaterialComboBoxItem Content="Under 10kg" />
</xctk:MaterialComboBox>
<xctk:MaterialComboBox Margin="0,36,0,0"
MaterialAccent="Green">
<xctk:MaterialComboBoxItem Content="Fed Ex" />
<xctk:MaterialComboBoxItem Content="UPS" />
<xctk:MaterialComboBoxItem Content="Regular Post"
IsSelected="True" />
</xctk:MaterialComboBox>
</StackPanel>
</xctk:MaterialFrame>
</StackPanel>
</xctk:MaterialTabItem>
</xctk:MaterialTabControl>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialControls.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialControls.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

151
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialDropDownView.xaml.txt

@ -24,6 +24,7 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
<Run>A DropDownButton from the Xceed Wpf Toolkit with animations when opening the popup. It uses the MaterialButton animations and the Material Brushes.</Run> <Run>A DropDownButton from the Xceed Wpf Toolkit with animations when opening the popup. It uses the MaterialButton animations and the Material Brushes.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
@ -31,19 +32,147 @@
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/CommonResources.xaml" />
</ResourceDictionary.MergedDictionaries>
<ObjectDataProvider x:Key="DropDownPlacementMode"
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="PlacementMode" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<xctk:SolidColorBrushToColorConverter x:Key="SolidColorBrushToColorConverter" />
</ResourceDictionary>
</local:DemoView.Resources>
<Grid>
<StackPanel Margin="10">
<GroupBox Header="Features"
Margin="0,5,0,5">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="120" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- First Column-->
<TextBlock Text="DropDown Position: "
VerticalAlignment="Center"/>
<ComboBox Grid.Column="1"
ItemsSource="{Binding Source={StaticResource DropDownPlacementMode}}"
SelectedItem="{Binding DropDownPosition, ElementName=materialDropDown}"
HorizontalAlignment="Left"
Width="110"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Grid.Column="0"
Grid.Row="1"
Text="Material Accent Brush: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
Grid.Row="1"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding MaterialAccentBrush, ElementName=materialDropDown}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Text="Is Using fade Animation: "
Grid.Row="2"
Grid.Column="0"
VerticalAlignment="Center"/>
<CheckBox Grid.Column="1"
Grid.Row="2"
IsChecked="{Binding IsUsingFadeAnimation, ElementName=materialDropDown}"
VerticalAlignment="Center"
Margin="5" />
<!-- Second Column-->
<TextBlock Grid.Column="2"
Grid.Row="0"
Text="Is Ink Effect Active: "
VerticalAlignment="Center"
Margin="10,0,0,0"/>
<CheckBox x:Name="inkEffectActiveCheckBox"
Grid.Column="3"
Grid.Row="0"
IsChecked="{Binding IsInkEffectActive, ElementName=materialDropDown}"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Grid.Column="2"
Grid.Row="1"
Text="Ink Effect Brush: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
Style="{StaticResource DisableGrayText}" />
<xctk:ColorPicker Grid.Column="3"
Grid.Row="1"
SelectedColor="{Binding InkEffectBrush, ElementName=materialDropDown, Converter={StaticResource SolidColorBrushToColorConverter}}"
DisplayColorAndName="True"
VerticalAlignment="Center"
Width="125"
Margin="5"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}" />
<TextBlock Grid.Column="2"
Grid.Row="2"
Text="Ink Effect Opacity: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
Style="{StaticResource DisableGrayText}" />
<xctk:DoubleUpDown Grid.Column="3"
Grid.Row="2"
Value="{Binding InkEffectOpacity, ElementName=materialDropDown}"
Minimum="0"
Maximum="1"
Increment="0.05"
FormatString="N2"
VerticalAlignment="Center"
Margin="5"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}" />
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<xctk:MaterialDropDown x:Name="materialDropDown"
Content="Click Me"
HorizontalAlignment="Center"
DropDownPosition="Bottom"
IsUsingFadeAnimation="True"
IsInkEffectActive="True">
<xctk:DropDownButton.DropDownContent>
<xctk:ColorCanvas Foreground="Black"/>
</xctk:DropDownButton.DropDownContent>
</xctk:MaterialDropDown>
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialDropDown.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialDropDown.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

159
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialFrameView.xaml.txt

@ -26,6 +26,7 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
<Run>A ContentControl with a fully customizable shadow that can be modified through Shadow properties or with a Z property that enables predefined shadows.</Run> <Run>A ContentControl with a fully customizable shadow that can be modified through Shadow properties or with a Z property that enables predefined shadows.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
@ -33,16 +34,174 @@
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<conv:EqualsMinusOneConverter x:Key="EqualsMinusOneConverter" />
<xctk:CornerRadiusToDoubleConverter x:Key="CornerRadiusToDoubleConverter" />
</local:DemoView.Resources>
<Grid>
<StackPanel Margin="10">
<GroupBox Header="Features"
Margin="0,5,0,5">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- First Column-->
<TextBlock Grid.Column="0"
Text="Z: "
VerticalAlignment="Center" />
<xctk:IntegerUpDown Grid.Column="1"
Value="{Binding Z, ElementName=materialFrame}"
Minimum="-1"
Maximum="7"
VerticalAlignment="Center"
Margin="5"
ToolTip="When the Z property is greater than 0, the shadow effects will be built using the default shadows."/>
<TextBlock Grid.Column="0"
Grid.Row="1"
Text="CornerRadius: "
VerticalAlignment="Center" />
<xctk:DoubleUpDown Grid.Column="1"
Grid.Row="1"
Value="{Binding CornerRadius, ElementName=materialFrame, Converter={StaticResource CornerRadiusToDoubleConverter}}"
Minimum="0"
Maximum="30"
VerticalAlignment="Center"
Margin="5"/>
<!-- Second Column-->
<TextBlock Grid.Column="2"
Grid.Row="0"
Text="Shadow Direction: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding Z, ElementName=materialFrame, Converter={StaticResource EqualsMinusOneConverter}}"
Style="{StaticResource DisableGrayText}"/>
<xctk:DoubleUpDown Grid.Column="3"
Grid.Row="0"
Value="{Binding ShadowDirection, ElementName=materialFrame}"
Minimum="0"
Maximum="360"
Increment="5"
VerticalAlignment="Center"
Margin="5"
ToolTip="The Z property should equal -1 in order to build the shadow from MaterialFrame Shadow properties."
IsEnabled="{Binding Z, ElementName=materialFrame, Converter={StaticResource EqualsMinusOneConverter}}"/>
<TextBlock Grid.Column="2"
Grid.Row="1"
Text="Shadow Depth: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding Z, ElementName=materialFrame, Converter={StaticResource EqualsMinusOneConverter}}"
Style="{StaticResource DisableGrayText}"/>
<xctk:DoubleUpDown Grid.Column="3"
Grid.Row="1"
Value="{Binding ShadowDepth, ElementName=materialFrame}"
Minimum="0"
Maximum="40"
VerticalAlignment="Center"
Margin="5"
ToolTip="The Z property should equal -1 in order to build the shadow from MaterialFrame Shadow properties."
IsEnabled="{Binding Z, ElementName=materialFrame, Converter={StaticResource EqualsMinusOneConverter}}"/>
<!--Third Column-->
<TextBlock Grid.Column="4"
Grid.Row="0"
Text="Shadow Blur Radius: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding Z, ElementName=materialFrame, Converter={StaticResource EqualsMinusOneConverter}}"
Style="{StaticResource DisableGrayText}"/>
<xctk:DoubleUpDown Grid.Column="5"
Grid.Row="0"
Value="{Binding ShadowBlurRadius, ElementName=materialFrame}"
Minimum="0"
Maximum="100"
VerticalAlignment="Center"
Margin="5"
ToolTip="The Z property should equal -1 in order to build the shadow from MaterialFrame Shadow properties."
IsEnabled="{Binding Z, ElementName=materialFrame, Converter={StaticResource EqualsMinusOneConverter}}"/>
<TextBlock Grid.Column="4"
Grid.Row="1"
Text="Shadow Opacity: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding Z, ElementName=materialFrame, Converter={StaticResource EqualsMinusOneConverter}}"
Style="{StaticResource DisableGrayText}"/>
<xctk:DoubleUpDown Grid.Column="5"
Grid.Row="1"
Value="{Binding ShadowOpacity, ElementName=materialFrame}"
Minimum="0"
Maximum="1"
Increment="0.1"
FormatString="N1"
VerticalAlignment="Center"
Margin="5"
ToolTip="The Z property should equal -1 in order to build the shadow from MaterialFrame Shadow properties."
IsEnabled="{Binding Z, ElementName=materialFrame, Converter={StaticResource EqualsMinusOneConverter}}"/>
<!--Fourth Column-->
<TextBlock Grid.Column="6"
Grid.Row="0"
Text="Shadow Color: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding Z, ElementName=materialFrame, Converter={StaticResource EqualsMinusOneConverter}}"
Style="{StaticResource DisableGrayText}" />
<xctk:ColorPicker Grid.Column="7"
Grid.Row="0"
SelectedColor="{Binding ShadowColor, ElementName=materialFrame}"
VerticalAlignment="Center"
Width="90"
Margin="5"
ToolTip="The Z property should equal -1 in order to build the shadow from MaterialFrame Shadow properties."
IsEnabled="{Binding Z, ElementName=materialFrame, Converter={StaticResource EqualsMinusOneConverter}}"/>
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<xctk:MaterialFrame x:Name="materialFrame"
Margin="20"
HorizontalAlignment="Center"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Width="400"
Height="300"
Z="2"
ShadowDirection="315"
ShadowDepth="10"
ShadowBlurRadius="20"
ShadowOpacity="0.7"
ShadowColor="Blue">
<TextBlock Text="This is a MaterialFrame"/>
</xctk:MaterialFrame>
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialFrame.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialFrame.png" Width="600" Height="400"/>
##END-->
</local:DemoView> </local:DemoView>

124
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialListBoxView.xaml.txt

@ -27,6 +27,7 @@
<Run>MaterialListBox is a ListBox that is using the Material Brushes and contains MaterialListBoxItems.</Run> <Run>MaterialListBox is a ListBox that is using the Material Brushes and contains MaterialListBoxItems.</Run>
<LineBreak /> <LineBreak />
<Run>MaterialListBoxItems are ListBoxItems that are using the Material Brushes. They use an ink animation when they are selected.</Run> <Run>MaterialListBoxItems are ListBoxItems that are using the Material Brushes. They use an ink animation when they are selected.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
@ -34,17 +35,122 @@
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/CommonResources.xaml" />
</ResourceDictionary.MergedDictionaries>
<xctk:SolidColorBrushToColorConverter x:Key="SolidColorBrushToColorConverter" />
</ResourceDictionary>
</local:DemoView.Resources>
<Grid>
<StackPanel Margin="10">
<GroupBox Header="Features"
Margin="0,5,0,5">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="135" />
</Grid.ColumnDefinitions>
<!-- First Column-->
<TextBlock Grid.Column="0"
Grid.Row="0"
Text="Is Ink Effect Active: "
VerticalAlignment="Center" />
<CheckBox x:Name="inkEffectActiveCheckBox"
Grid.Column="1"
Grid.Row="0"
IsChecked="{Binding IsInkEffectActive, ElementName=materialListBox}"
VerticalAlignment="Center"
Margin="5"
ToolTip="Can be set a MaterialListBox control or individually on each MaterialListBoxItem." />
<TextBlock Grid.Column="0"
Grid.Row="1"
Text="Ink Effect Brush: "
VerticalAlignment="Center"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
Style="{StaticResource DisableGrayText}" />
<xctk:ColorPicker Grid.Column="1"
Grid.Row="1"
SelectedColor="{Binding InkEffectBrush, ElementName=materialListBox, Converter={StaticResource SolidColorBrushToColorConverter}}"
DisplayColorAndName="True"
VerticalAlignment="Center"
Width="125"
Margin="5"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
ToolTip="Can be set a MaterialListBox control or individually on each MaterialListBoxItem." />
<TextBlock Grid.Column="0"
Grid.Row="2"
Text="Ink Effect Opacity: "
VerticalAlignment="Center"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
Style="{StaticResource DisableGrayText}" />
<xctk:DoubleUpDown Grid.Column="1"
Grid.Row="2"
Value="{Binding InkEffectOpacity, ElementName=materialListBox}"
Minimum="0"
Maximum="1"
Increment="0.05"
FormatString="N2"
VerticalAlignment="Center"
Margin="5"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
ToolTip="Can be set a MaterialListBox control or individually on each MaterialListBoxItem." />
<!-- Second Column-->
<TextBlock Grid.Column="2"
Grid.Row="0"
Text="Material Accent Brush: "
VerticalAlignment="Center"
Margin="10,0,0,0"/>
<ComboBox Grid.Column="3"
Grid.Row="0"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding MaterialAccentBrush, ElementName=materialListBox}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<xctk:MaterialListBox x:Name="materialListBox"
Margin="20"
HorizontalAlignment="Center"
SelectionMode="Extended"
IsInkEffectActive="True">
<xctk:MaterialListBoxItem Content="First Item"/>
<xctk:MaterialListBoxItem Content="Second Item" />
<xctk:MaterialListBoxItem Content="Third Item" />
<xctk:MaterialListBoxItem Content="Fourth Item" />
<xctk:MaterialListBoxItem Content="Fifth Item" />
</xctk:MaterialListBox>
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialListBox.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialListBox.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

27
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialProgressBarCircularView.xaml.cs.txt

@ -33,18 +33,45 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views
{ {
InitializeComponent(); InitializeComponent();
#if !OPEN_SOURCE
this.Loaded += this.MaterialProgressBarCircularView_Loaded;
#endif
} }
#endregion #endregion
#if !OPEN_SOURCE
#region Private Methods
private void AnimateDeterminateProgressBar()
{
var storyboard = new Storyboard();
// Animate Determinate Circular ProgressBar
DoubleAnimation valueAnim = new DoubleAnimation( materialDeterminateProgressBarCircular.Minimum, materialDeterminateProgressBarCircular.Maximum, System.TimeSpan.FromMilliseconds( 4000 ) );
Storyboard.SetTarget( valueAnim, materialDeterminateProgressBarCircular );
Storyboard.SetTargetProperty( valueAnim, new PropertyPath( MaterialProgressBarCircular.ValueProperty ) );
storyboard.Children.Add( valueAnim );
storyboard.Begin( this );
}
#endregion
#region Event Handlers
private void MaterialProgressBarCircularView_Loaded( object sender, RoutedEventArgs e )
{
this.AnimateDeterminateProgressBar();
}
private void ResetButton_Click( object sender, RoutedEventArgs e )
{
this.AnimateDeterminateProgressBar();
}
#endregion
#endif
} }
} }

191
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialProgressBarCircularView.xaml.txt

@ -25,6 +25,7 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
<Run>A circular ProgressBar that uses the Material Brushes. It contains properties to animate the indeterminate state.</Run> <Run>A circular ProgressBar that uses the Material Brushes. It contains properties to animate the indeterminate state.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<LineBreak /> <LineBreak />
<Run>This feature is only available in the "Plus" version.</Run> <Run>This feature is only available in the "Plus" version.</Run>
@ -32,6 +33,7 @@
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
Click here for more details about Xceed Toolkit Plus for WPF. Click here for more details about Xceed Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
@ -43,18 +45,181 @@
</ResourceDictionary> </ResourceDictionary>
</local:DemoView.Resources> </local:DemoView.Resources>
<!--##EXCLUDE_OPEN_SOURCE-->
<Grid>
<StackPanel Margin="10">
<GroupBox Header="Features"
Margin="0,5,0,5">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="95" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- First Column-->
<TextBlock Grid.Column="0"
Text="Thickness: "
VerticalAlignment="Center" />
<xctk:DoubleUpDown x:Name="thicknessDoubleUpDown"
Grid.Column="1"
Value="25"
Minimum="1"
Maximum="40"
Margin="5"
VerticalContentAlignment="Center" />
<TextBlock Grid.Column="0"
Grid.Row="1"
Text="Material Accent Brush: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
Grid.Row="1"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding MaterialAccentBrush, ElementName=materialDeterminateProgressBarCircular}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
<!-- Second Column-->
<TextBlock Grid.Column="2"
Grid.Row="0"
Text="Indeterminate Indicator Max Length: "
VerticalAlignment="Center"
Margin="10,0,0,0"/>
<xctk:DoubleUpDown x:Name="inteterminateIndicatorMaxLengthUpDown"
Grid.Column="3"
Grid.Row="0"
Value="{Binding IndeterminateIndicatorMaxLength, ElementName=materialIndeterminateProgressBarCircular}"
Minimum="{Binding Value, ElementName=inteterminateIndicatorMinLengthUpDown}"
Maximum="1"
Increment="0.01"
Margin="5"
Width="50"
FormatString="N2"
VerticalContentAlignment="Center"
ToolTip="The maximum percentage of the progress bar's size that the indicator will accept. Must be between 0 and 1."/>
<TextBlock Grid.Column="2"
Grid.Row="1"
Text="Indeterminate Indicator Min Length: "
VerticalAlignment="Center"
Margin="10,0,0,0"/>
<xctk:DoubleUpDown x:Name="inteterminateIndicatorMinLengthUpDown"
Grid.Column="3"
Grid.Row="1"
Value="{Binding IndeterminateIndicatorMinLength, ElementName=materialIndeterminateProgressBarCircular}"
Minimum="0"
Maximum="{Binding Value, ElementName=inteterminateIndicatorMaxLengthUpDown}"
Increment="0.01"
Margin="5"
Width="50"
FormatString="N2"
VerticalContentAlignment="Center"
ToolTip="The minimum percentage of the progress bar's size that the indicator will accept. Must be between 0 and 1."/>
<TextBlock Grid.Column="2"
Grid.Row="2"
Text="Indeterminate Indicator Speed Ratio: "
VerticalAlignment="Center"
Margin="10,0,0,0"/>
<xctk:DoubleUpDown Grid.Column="3"
Grid.Row="2"
Value="{Binding IndeterminateIndicatorSpeedRatio, ElementName=materialIndeterminateProgressBarCircular}"
Minimum="0.1"
Maximum="5"
Increment="0.5"
Margin="5"
VerticalContentAlignment="Center" />
<TextBlock Grid.Column="2"
Grid.Row="3"
Text="Indeterminate Rotation Speed Ratio: "
VerticalAlignment="Center"
Margin="10,0,0,0"/>
<xctk:DoubleUpDown Grid.Column="3"
Grid.Row="3"
Value="{Binding IndeterminateRotationSpeedRatio, ElementName=materialIndeterminateProgressBarCircular}"
Minimum="0.1"
Maximum="5"
Increment="0.5"
Margin="5"
VerticalContentAlignment="Center" />
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<Grid HorizontalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="Determinate:" />
<Grid Grid.Row="0"
Grid.Column="1"
Margin="20">
<xctk:MaterialProgressBarCircular x:Name="materialDeterminateProgressBarCircular"
IsIndeterminate="False"
Thickness="{Binding Value, ElementName=thicknessDoubleUpDown}"
Width="125"
Height="125"
Minimum="0"
Maximum="100" />
<TextBlock Text="{Binding Value, ElementName=materialDeterminateProgressBarCircular, StringFormat={}{0:N0}%}"
FontSize="15"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Grid>
<Button Grid.Row="0"
Grid.Column="2"
Content="Reset"
Click="ResetButton_Click"
VerticalAlignment="Center"
Padding="10" />
<TextBlock Grid.Row="1"
Grid.Column="0"
Text="Indeterminate:" />
<xctk:MaterialProgressBarCircular x:Name="materialIndeterminateProgressBarCircular"
Grid.Row="1"
Grid.Column="1"
IsIndeterminate="True"
Thickness="{Binding Value, ElementName=thicknessDoubleUpDown}"
MaterialAccentBrush="{Binding MaterialAccentBrush, ElementName=materialDeterminateProgressBarCircular}"
IndeterminateIndicatorSpeedRatio="1"
IndeterminateRotationSpeedRatio="1"
IndeterminateIndicatorMaxLength="0.75"
IndeterminateIndicatorMinLength="0.04"
Width="125"
Height="125"
Margin="20" />
</Grid>
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialProgressBarCircular.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialProgressBarCircular.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

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

Loading…
Cancel
Save