Browse Source

Added a simple WYSIWYG text to html formatting to the RTB

pull/1263/head
AlexejLiebenthal 9 years ago
parent
commit
cb30e94dc9
  1. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/AutoSelectTextboxView.xaml.txt
  2. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/AvalonDockView.xaml.txt
  3. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/BusyIndicatorCustomContentTemplateView.xaml.txt
  4. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/BusyIndicatorCustomContentView.xaml.txt
  5. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ButtonSpinnerView.xaml.txt
  6. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/CalculatorView.xaml.txt
  7. 95
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartAxisView.xaml.cs.txt
  8. 215
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartAxisView.xaml.txt
  9. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartLegendView.xaml.cs.txt
  10. 133
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartLegendView.xaml.txt
  11. 122
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartSeriesBasicTypesView.xaml.cs.txt
  12. 139
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartSeriesBasicTypesView.xaml.txt
  13. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartSeriesDataPointsBindingView.xaml.cs.txt
  14. 46
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartSeriesDataPointsBindingView.xaml.txt
  15. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingAxesGridView.xaml.cs.txt
  16. 184
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingAxesGridView.xaml.txt
  17. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingColumnSeriesView.xaml.cs.txt
  18. 175
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingColumnSeriesView.xaml.txt
  19. 12
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingLineSeriesView.xaml.cs.txt
  20. 141
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingLineSeriesView.xaml.txt
  21. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingPieSeriesView.xaml.cs.txt
  22. 173
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChartStylingPieSeriesView.xaml.txt
  23. 12
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/CheckListsView.xaml.txt
  24. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ChildWindowView.xaml.txt
  25. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ColorView.xaml.txt
  26. 32
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/DataGridView.xaml.txt
  27. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/DateTimeView.xaml.txt
  28. 40
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/DisplayLocalizationRes.Designer.cs.txt
  29. 159
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/DisplayLocalizationRes.fr.resx.txt
  30. 159
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/DisplayLocalizationRes.resx.txt
  31. 13
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/FilePickerView.xaml.cs.txt
  32. 200
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/FilePickerView.xaml.txt
  33. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/IconButtonView.xaml.txt
  34. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ListBoxView.xaml.cs.txt
  35. 1101
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/ListBoxView.xaml.txt
  36. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaskedTextboxView.xaml.txt
  37. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialButtonView.xaml.cs.txt
  38. 173
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialButtonView.xaml.txt
  39. 78
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialCheckBoxView.xaml.txt
  40. 144
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialComboBoxView.xaml.txt
  41. 127
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialControlsView.xaml.cs.txt
  42. 925
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialControlsView.xaml.txt
  43. 41
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialDemoView.cs.txt
  44. 151
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialDropDownView.xaml.txt
  45. 159
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialFrameView.xaml.txt
  46. 68
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialHamburgerView.xaml.cs.txt
  47. 604
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialHamburgerView.xaml.txt
  48. 124
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialListBoxView.xaml.txt
  49. 27
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialProgressBarCircularView.xaml.cs.txt
  50. 191
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialProgressBarCircularView.xaml.txt
  51. 27
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialProgressBarView.xaml.cs.txt
  52. 159
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialProgressBarView.xaml.txt
  53. 66
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialRadioButtonView.xaml.txt
  54. 284
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialSliderView.xaml.txt
  55. 101
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialSwitchView.xaml.txt
  56. 229
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialTabsView.xaml.txt
  57. 216
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialTextFieldView.xaml.txt
  58. 16
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialToastView.xaml.cs.txt
  59. 273
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialToastView.xaml.txt
  60. 66
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialToolTipView.xaml.txt
  61. 96
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiCalendarView.xaml.cs.txt
  62. 785
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiCalendarView.xaml.txt
  63. 25
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiColumnComboBoxView.xaml.cs.txt
  64. 136
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiColumnComboBoxView.xaml.txt
  65. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiLineTextEditorView.xaml.txt
  66. 30
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/NumericView.xaml.txt
  67. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PieChartView.xaml.txt
  68. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PieProgressView.xaml.txt
  69. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PieView.xaml.txt
  70. 124
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PileFlowPanelView.xaml.cs.txt
  71. 320
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PileFlowPanelView.xaml.txt
  72. 30
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridAttributesView.xaml.cs.txt
  73. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridAttributesView.xaml.txt
  74. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridBindingToStructsView.xaml.txt
  75. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridCategoryOrderView.xaml.txt
  76. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridCustomEditorsView.xaml.txt
  77. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridCustomPropertyView.xaml.cs.txt
  78. 63
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridCustomPropertyView.xaml.txt
  79. 8
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridDefaultEditorsView.xaml.cs.txt
  80. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridDefaultEditorsView.xaml.txt
  81. 20
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridDefinitionKeyView.xaml.cs.txt
  82. 18
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridDefinitionKeyView.xaml.txt
  83. 93
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridDisplayLocalizationView.xaml.cs.txt
  84. 37
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridDisplayLocalizationView.xaml.txt
  85. 48
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridEditorDefinitionsView.xaml.cs.txt
  86. 107
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridEditorDefinitionsView.xaml.txt
  87. 165
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridExpandingNonPrimitivesView.xaml.cs.txt
  88. 51
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridExpandingNonPrimitivesView.xaml.txt
  89. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridMultiSelectedObjectsView.xaml.cs.txt
  90. 37
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridMultiSelectedObjectsView.xaml.txt
  91. 51
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridPropertiesSourceView.xaml.cs.txt
  92. 61
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridPropertiesSourceView.xaml.txt
  93. 12
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridPropertiesView.xaml.cs.txt
  94. 73
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridPropertiesView.xaml.txt
  95. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridPropertyItemStyleView.xaml.cs.txt
  96. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridPropertyItemStyleView.xaml.txt
  97. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridSpecifyingPropertiesView.xaml.cs.txt
  98. 18
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridSpecifyingPropertiesView.xaml.txt
  99. 23
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/RadialGaugeView.xaml.cs.txt
  100. 1023
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/RadialGaugeView.xaml.txt

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

@ -24,7 +24,7 @@
The AutoSelectTextBox allows the text content to be selected when the control get the focus. It also allows the Focus navigation behavior within the control to be affected. The AutoSelectTextBox allows the text content to be selected when the control get the focus. It also allows the Focus navigation behavior within the control to be affected.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<StackPanel> <StackPanel>
<StackPanel.Resources> <StackPanel.Resources>
<Style TargetType="{x:Type xctk:AutoSelectTextBox}"> <Style TargetType="{x:Type xctk:AutoSelectTextBox}">
@ -54,7 +54,7 @@
</StackPanel> </StackPanel>
</Grid> </Grid>
</GroupBox> </GroupBox>
<StackPanel> <StackPanel>
<TextBlock Text="Usage:" Style="{StaticResource Header}"/> <TextBlock Text="Usage:" Style="{StaticResource Header}"/>
<RichTextBox IsReadOnly="True" BorderThickness="0"> <RichTextBox IsReadOnly="True" BorderThickness="0">
@ -75,7 +75,7 @@
</Paragraph> </Paragraph>
</FlowDocument> </FlowDocument>
</RichTextBox> </RichTextBox>
<!-- PHONE NUMBER FIELDS --> <!-- PHONE NUMBER FIELDS -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock Text="(" VerticalAlignment="Center"/> <TextBlock Text="(" VerticalAlignment="Center"/>

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

@ -26,7 +26,7 @@
The AvalonDock layout system allows developers to create customizable layouts using a window docking system similar to what is found in many popular integrated development environements. The AvalonDock layout system allows developers to create customizable layouts using a window docking system similar to what is found in many popular integrated development environements.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />

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

@ -24,7 +24,7 @@
This example demonstrates how to create a custom content template by setting the BusyContentTemplate property to an instance of a custom DataTemplate. Take notice of how the default ProgressBar is being hidden by setting the PrgressBarStyle property. The default OverlayStyle is also being set to a custom style. This example demonstrates how to create a custom content template by setting the BusyContentTemplate property to an instance of a custom DataTemplate. Take notice of how the default ProgressBar is being hidden by setting the PrgressBarStyle property. The default OverlayStyle is also being set to a custom style.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<local:DemoView.Resources> <local:DemoView.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>

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

@ -24,7 +24,7 @@
This example demonstrates how to define your own custom content. This is done by setting the BusyContent property. This example demonstrates how to define your own custom content. This is done by setting the BusyContent property.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<local:DemoView.Resources> <local:DemoView.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>

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

@ -25,9 +25,9 @@
The ButtonSpinner control allows you to add button spinners to any element and then respond to the Spin event to manipulate that element. The Spin event lets the developer know which direction the buttons are spinning; SpinDirection.Increase indicates an increment, SpinDirection.Decrease indicates a decrement. The ButtonSpinner control allows you to add button spinners to any element and then respond to the Spin event to manipulate that element. The Spin event lets the developer know which direction the buttons are spinning; SpinDirection.Increase indicates an increment, SpinDirection.Decrease indicates a decrement.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<local:DemoView.Resources> <local:DemoView.Resources>
<x:Array x:Key="names" Type="s:String"> <x:Array x:Key="names" Type="s:String">
<s:String>John Smith</s:String> <s:String>John Smith</s:String>
<s:String>Janel Leverling</s:String> <s:String>Janel Leverling</s:String>
@ -40,7 +40,7 @@
<s:String>Naomi Suyama</s:String> <s:String>Naomi Suyama</s:String>
</x:Array> </x:Array>
</local:DemoView.Resources> </local:DemoView.Resources>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />

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

@ -24,7 +24,7 @@
The Calculator is a control used for performing mathematical calculations. The Calculator is a control used for performing mathematical calculations.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />

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

@ -14,9 +14,6 @@
************************************************************************************/ ************************************************************************************/
#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;
@ -29,119 +26,33 @@ 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
} }
} }

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

@ -25,212 +25,29 @@
<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,9 +14,6 @@
**************************************************************************************/ **************************************************************************************/
#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

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

@ -28,135 +28,24 @@
<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,9 +14,6 @@
*************************************************************************************/ *************************************************************************************/
#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;
@ -29,16 +26,8 @@ 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
@ -49,126 +38,15 @@ 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
} }

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

@ -25,139 +25,26 @@
<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,9 +14,6 @@
************************************************************************************/ ************************************************************************************/
#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;

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

@ -26,57 +26,17 @@
<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,9 +14,6 @@
************************************************************************************/ ************************************************************************************/
#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;

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

@ -24,178 +24,32 @@
<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,9 +14,6 @@
*************************************************************************************/ *************************************************************************************/
#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;

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

@ -25,175 +25,26 @@
<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,9 +14,6 @@
*************************************************************************************/ *************************************************************************************/
#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;
@ -34,16 +31,7 @@ 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
} }
} }

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

@ -24,144 +24,23 @@
<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,9 +14,6 @@
*************************************************************************************/ *************************************************************************************/
#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;

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

@ -24,175 +24,26 @@
<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>

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

@ -26,7 +26,7 @@
The CheckListBox and CheckComboBox controls represent a list of selected items that are displayed as CheckBoxes. Besides the common SelectedItem and SelectedItems properties, these controls give developers more alternatives for managing and handling selections. The CheckListBox and CheckComboBox controls represent a list of selected items that are displayed as CheckBoxes. Besides the common SelectedItem and SelectedItems properties, these controls give developers more alternatives for managing and handling selections.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<local:DemoView.Resources> <local:DemoView.Resources>
<x:Array x:Key="personProperties" Type="s:String"> <x:Array x:Key="personProperties" Type="s:String">
<s:String>ID</s:String> <s:String>ID</s:String>
@ -34,7 +34,7 @@
<s:String>LastName</s:String> <s:String>LastName</s:String>
</x:Array> </x:Array>
</local:DemoView.Resources> </local:DemoView.Resources>
<Grid > <Grid >
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -56,7 +56,7 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" <TextBlock Grid.Row="0" Grid.Column="0"
Text="Delimiter:" Text="Delimiter:"
Margin="2,5,5,5"/> Margin="2,5,5,5"/>
@ -98,7 +98,7 @@
HorizontalAlignment="Left" HorizontalAlignment="Left"
IsEnabled="False" IsEnabled="False"
Text="IsSelected" /> Text="IsSelected" />
<TextBlock Grid.Row="0" Grid.Column="2" <TextBlock Grid.Row="0" Grid.Column="2"
Text="DisplayMemberPath:" Text="DisplayMemberPath:"
Margin="5"/> Margin="5"/>
@ -149,12 +149,12 @@
</StackPanel> </StackPanel>
</Grid> </Grid>
</GroupBox> </GroupBox>
<GroupBox Header="Item Models" Grid.Row="1" Margin="5"> <GroupBox Header="Item Models" Grid.Row="1" Margin="5">
<ListBox DisplayMemberPath="ModelDisplay" FontFamily="Global Monospace" <ListBox DisplayMemberPath="ModelDisplay" FontFamily="Global Monospace"
ItemsSource="{Binding}"/> ItemsSource="{Binding}"/>
</GroupBox> </GroupBox>
<Grid Grid.Row="2"> <Grid Grid.Row="2">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />

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

@ -25,7 +25,6 @@
<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>
@ -33,14 +32,13 @@
<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>
<local:DemoView.Resources> <local:DemoView.Resources>
<conv:IntToBoolConverter x:Key="IntToBoolConverter" /> <conv:IntToBoolConverter x:Key="IntToBoolConverter" />
<xctkconv:VisibilityToBoolConverter x:Key="VisibilityToBoolConverter" Inverted="True"/> <xctkconv:VisibilityToBoolConverter x:Key="VisibilityToBoolConverter" Inverted="True"/>
<ObjectDataProvider x:Key="WindowStates" MethodName="GetValues" <ObjectDataProvider x:Key="WindowStates" MethodName="GetValues"
ObjectType="{x:Type sys:Enum}"> ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters> <ObjectDataProvider.MethodParameters>
@ -54,7 +52,7 @@
</ObjectDataProvider.MethodParameters> </ObjectDataProvider.MethodParameters>
</ObjectDataProvider> </ObjectDataProvider>
</local:DemoView.Resources> </local:DemoView.Resources>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
@ -84,7 +82,7 @@
<TextBlock Grid.Row="2" Name="textBlock3" Text="Top:" Margin="2" VerticalAlignment="Center" IsEnabled="{Binding IsEnabled, ElementName=_txtTop}" Style="{StaticResource DisableGrayText}"/> <TextBlock Grid.Row="2" Name="textBlock3" Text="Top:" Margin="2" VerticalAlignment="Center" IsEnabled="{Binding IsEnabled, ElementName=_txtTop}" Style="{StaticResource DisableGrayText}"/>
<xctk:DoubleUpDown x:Name="_txtTop" Grid.Column="1" Grid.Row="2" Value="0" Minimum="0" VerticalAlignment="Center" Margin="5" IsEnabled="{Binding SelectedIndex, ElementName=_cboWindowStartupLocations}"/> <xctk:DoubleUpDown x:Name="_txtTop" Grid.Column="1" Grid.Row="2" Value="0" Minimum="0" VerticalAlignment="Center" Margin="5" IsEnabled="{Binding SelectedIndex, ElementName=_cboWindowStartupLocations}"/>
<TextBlock Text="IsModal:" VerticalAlignment="Center" Margin="10,2,2,2" Grid.Column="2" /> <TextBlock Text="IsModal:" VerticalAlignment="Center" Margin="10,2,2,2" Grid.Column="2" />
<CheckBox x:Name="_chkIsModal" Grid.Column="3" VerticalAlignment="Center" Margin="5" IsChecked="True" /> <CheckBox x:Name="_chkIsModal" Grid.Column="3" VerticalAlignment="Center" Margin="5" IsChecked="True" />

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

@ -39,7 +39,7 @@
</Trigger> </Trigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
<ObjectDataProvider x:Key="ColorModeOptions" MethodName="GetValues" <ObjectDataProvider x:Key="ColorModeOptions" MethodName="GetValues"
ObjectType="{x:Type sys:Enum}"> ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters> <ObjectDataProvider.MethodParameters>

32
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/DataGridView.xaml.txt

@ -33,12 +33,12 @@
</Hyperlink> </Hyperlink>
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<local:DemoView.Resources> <local:DemoView.Resources>
<xcdg:ImageConverter x:Key="imageConverter" /> <xcdg:ImageConverter x:Key="imageConverter" />
<!-- Converter used to return a BitmapImage from a Country name --> <!-- Converter used to return a BitmapImage from a Country name -->
<conv:FlagPathConverter x:Key="flagPathConverter" /> <conv:FlagPathConverter x:Key="flagPathConverter" />
<!-- DataTemplate to display an Employee object --> <!-- DataTemplate to display an Employee object -->
<DataTemplate x:Key="employeeDataTemplate"> <DataTemplate x:Key="employeeDataTemplate">
<Grid MaxHeight="30" <Grid MaxHeight="30"
@ -59,13 +59,13 @@
</StackPanel> </StackPanel>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
<!-- DataTemplate to display the $ in Freight column --> <!-- DataTemplate to display the $ in Freight column -->
<DataTemplate x:Key="freightDataTemplate"> <DataTemplate x:Key="freightDataTemplate">
<TextBlock Text="{Binding StringFormat=\{0:C\}}" <TextBlock Text="{Binding StringFormat=\{0:C\}}"
VerticalAlignment="Center" /> VerticalAlignment="Center" />
</DataTemplate> </DataTemplate>
<!-- DataTemplate to display a Country --> <!-- DataTemplate to display a Country -->
<DataTemplate x:Key="countryDataTemplate"> <DataTemplate x:Key="countryDataTemplate">
<StackPanel Orientation="Horizontal" <StackPanel Orientation="Horizontal"
@ -82,9 +82,9 @@
VerticalAlignment="Center" /> VerticalAlignment="Center" />
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</local:DemoView.Resources> </local:DemoView.Resources>
<Grid> <Grid>
<Grid.Resources> <Grid.Resources>
<xcdg:DataGridCollectionViewSource x:Key="cvsOrders" <xcdg:DataGridCollectionViewSource x:Key="cvsOrders"
@ -109,38 +109,38 @@
Width="100" Width="100"
IsMainColumn="True"> IsMainColumn="True">
</xcdg:Column> </xcdg:Column>
<xcdg:Column FieldName="Employee" <xcdg:Column FieldName="Employee"
Title="Employee" Title="Employee"
Width="160" Width="160"
CellContentTemplate="{StaticResource employeeDataTemplate}" CellContentTemplate="{StaticResource employeeDataTemplate}"
GroupValueTemplate="{StaticResource employeeDataTemplate}"/> GroupValueTemplate="{StaticResource employeeDataTemplate}"/>
<xcdg:Column FieldName="Customer.CompanyName" <xcdg:Column FieldName="Customer.CompanyName"
Title="Customer" Title="Customer"
Width="185"/> Width="185"/>
<xcdg:Column FieldName="OrderDate" <xcdg:Column FieldName="OrderDate"
Title="Order Date" Title="Order Date"
Width="120" /> Width="120" />
<xcdg:Column FieldName="Shipper.CompanyName" <xcdg:Column FieldName="Shipper.CompanyName"
Title="Ship Via" /> Title="Ship Via" />
<xcdg:Column FieldName="Freight" <xcdg:Column FieldName="Freight"
Width="100" Width="100"
CellContentTemplate="{StaticResource freightDataTemplate}" CellContentTemplate="{StaticResource freightDataTemplate}"
GroupValueTemplate="{StaticResource freightDataTemplate}"/> GroupValueTemplate="{StaticResource freightDataTemplate}"/>
<xcdg:Column FieldName="ShipCity" <xcdg:Column FieldName="ShipCity"
Title="City" Title="City"
Width="80" /> Width="80" />
<xcdg:Column FieldName="ShipCountry" <xcdg:Column FieldName="ShipCountry"
Title="Country" Title="Country"
CellContentTemplate="{StaticResource countryDataTemplate}" CellContentTemplate="{StaticResource countryDataTemplate}"
GroupValueTemplate="{StaticResource countryDataTemplate}"/> GroupValueTemplate="{StaticResource countryDataTemplate}"/>
<xcdg:Column FieldName="ShipAddress" <xcdg:Column FieldName="ShipAddress"
Title="Address" Title="Address"
Width="200" /> Width="200" />
@ -148,7 +148,7 @@
<xcdg:Column FieldName="ShipPostalCode" <xcdg:Column FieldName="ShipPostalCode"
Title="Postal Code" Title="Postal Code"
Width="120" /> Width="120" />
<xcdg:Column FieldName="RequiredDate" <xcdg:Column FieldName="RequiredDate"
Title="Required Date" Title="Required Date"
Width="140" /> Width="140" />
@ -156,7 +156,7 @@
<xcdg:Column FieldName="ShippedDate" <xcdg:Column FieldName="ShippedDate"
Title="Shipped Date" Title="Shipped Date"
Width="140" /> Width="140" />
<xcdg:Column FieldName="ShipName" <xcdg:Column FieldName="ShipName"
Visible="False" /> Visible="False" />

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

@ -27,7 +27,7 @@
The DateTimePicker and TimePicker controls let you select the date and the time in several ways. The TimePicker is used in the DateTimePicker. The DateTimePicker and TimePicker controls let you select the date and the time in several ways. The TimePicker is used in the DateTimePicker.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<local:DemoView.Resources> <local:DemoView.Resources>
<conv:DateTimeToTimeSpanConverter x:Key="dateTimeToTimeSpanConverter" /> <conv:DateTimeToTimeSpanConverter x:Key="dateTimeToTimeSpanConverter" />
<conv:CustomFormatToBoolConverter x:Key="CustomFormatToBoolConverter" /> <conv:CustomFormatToBoolConverter x:Key="CustomFormatToBoolConverter" />

40
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/DisplayLocalizationRes.Designer.cs.txt

@ -10,8 +10,8 @@
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views { namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
using System; using System;
/// <summary> /// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc. /// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary> /// </summary>
@ -23,15 +23,15 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class DisplayLocalizationRes { internal class DisplayLocalizationRes {
private static global::System.Resources.ResourceManager resourceMan; private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture; private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal DisplayLocalizationRes() { internal DisplayLocalizationRes() {
} }
/// <summary> /// <summary>
/// Returns the cached ResourceManager instance used by this class. /// Returns the cached ResourceManager instance used by this class.
/// </summary> /// </summary>
@ -45,7 +45,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
return resourceMan; return resourceMan;
} }
} }
/// <summary> /// <summary>
/// Overrides the current thread's CurrentUICulture property for all /// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class. /// resource lookups using this strongly typed resource class.
@ -59,7 +59,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
resourceCulture = value; resourceCulture = value;
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Details. /// Looks up a localized string similar to Details.
/// </summary> /// </summary>
@ -68,7 +68,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
return ResourceManager.GetString("DetailsCategory", resourceCulture); return ResourceManager.GetString("DetailsCategory", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Favorite actor 1 (no DisplayName). /// Looks up a localized string similar to Favorite actor 1 (no DisplayName).
/// </summary> /// </summary>
@ -77,7 +77,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
return ResourceManager.GetString("FavoriteActor1", resourceCulture); return ResourceManager.GetString("FavoriteActor1", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to This property&apos;s type is an enum whose values have no DisplayName attributes. These values displayed are provided by the ToString() method.. /// Looks up a localized string similar to This property&apos;s type is an enum whose values have no DisplayName attributes. These values displayed are provided by the ToString() method..
/// </summary> /// </summary>
@ -86,7 +86,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
return ResourceManager.GetString("FavoriteActor1Desc", resourceCulture); return ResourceManager.GetString("FavoriteActor1Desc", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Favorite actor 2 (with DisplayName). /// Looks up a localized string similar to Favorite actor 2 (with DisplayName).
/// </summary> /// </summary>
@ -95,7 +95,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
return ResourceManager.GetString("FavoriteActor2", resourceCulture); return ResourceManager.GetString("FavoriteActor2", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to This property&apos;s type is an enum whose values are decorated with the ExtendedDisplayName attribute. Combined with the EnumDisplayNameConverter, this allows display values to be customized.. /// Looks up a localized string similar to This property&apos;s type is an enum whose values are decorated with the ExtendedDisplayName attribute. Combined with the EnumDisplayNameConverter, this allows display values to be customized..
/// </summary> /// </summary>
@ -104,7 +104,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
return ResourceManager.GetString("FavoriteActor2Desc", resourceCulture); return ResourceManager.GetString("FavoriteActor2Desc", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Favorite actor 3. /// Looks up a localized string similar to Favorite actor 3.
/// </summary> /// </summary>
@ -113,7 +113,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
return ResourceManager.GetString("FavoriteActor3", resourceCulture); return ResourceManager.GetString("FavoriteActor3", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to &quot;(Not listed)&quot; enum value shows that enum values can also be localized.. /// Looks up a localized string similar to &quot;(Not listed)&quot; enum value shows that enum values can also be localized..
/// </summary> /// </summary>
@ -122,7 +122,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
return ResourceManager.GetString("FavoriteActor3Desc", resourceCulture); return ResourceManager.GetString("FavoriteActor3Desc", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to First name. /// Looks up a localized string similar to First name.
/// </summary> /// </summary>
@ -131,7 +131,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
return ResourceManager.GetString("FirstName", resourceCulture); return ResourceManager.GetString("FirstName", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to First name of that person. /// Looks up a localized string similar to First name of that person.
/// </summary> /// </summary>
@ -140,7 +140,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
return ResourceManager.GetString("FirstNameDesc", resourceCulture); return ResourceManager.GetString("FirstNameDesc", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Information. /// Looks up a localized string similar to Information.
/// </summary> /// </summary>
@ -149,7 +149,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
return ResourceManager.GetString("InfoCategory", resourceCulture); return ResourceManager.GetString("InfoCategory", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Last name. /// Looks up a localized string similar to Last name.
/// </summary> /// </summary>
@ -158,7 +158,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
return ResourceManager.GetString("LastName", resourceCulture); return ResourceManager.GetString("LastName", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Usually the familly name of the person. /// Looks up a localized string similar to Usually the familly name of the person.
/// </summary> /// </summary>
@ -167,7 +167,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views {
return ResourceManager.GetString("LastNameDesc", resourceCulture); return ResourceManager.GetString("LastNameDesc", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to (Not listed). /// Looks up a localized string similar to (Not listed).
/// </summary> /// </summary>

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

@ -0,0 +1,159 @@
<?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

@ -0,0 +1,159 @@
<?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>

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

@ -28,18 +28,7 @@ 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,7 +26,6 @@
<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>
@ -34,189 +33,26 @@
<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>

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

@ -29,7 +29,7 @@
<local:DemoView.Resources> <local:DemoView.Resources>
<xctk:SolidColorBrushToColorConverter x:Key="SolidColorBrushToColorConverter" /> <xctk:SolidColorBrushToColorConverter x:Key="SolidColorBrushToColorConverter" />
<Image x:Key="Image1" <Image x:Key="Image1"
Source="../Resources/PencilTool16.png" Source="../Resources/PencilTool16.png"
Width="20" Width="20"
@ -47,7 +47,7 @@
</ObjectDataProvider.MethodParameters> </ObjectDataProvider.MethodParameters>
</ObjectDataProvider> </ObjectDataProvider>
</local:DemoView.Resources> </local:DemoView.Resources>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -96,7 +96,7 @@
SelectedItem="{Binding IconLocation, ElementName=_iconButton}" SelectedItem="{Binding IconLocation, ElementName=_iconButton}"
Margin="5" Margin="5"
VerticalContentAlignment="Center" /> VerticalContentAlignment="Center" />
<!-- 2nd Column --> <!-- 2nd Column -->
<TextBlock Text="MouseOver Foreground:" <TextBlock Text="MouseOver Foreground:"
Grid.Column="2" Grid.Column="2"

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

@ -32,17 +32,9 @@ 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

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

File diff suppressed because it is too large

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

@ -25,7 +25,7 @@
The MaskedTextBox control lets you display and edit values based on a mask. The MaskedTextBox control lets you display and edit values based on a mask.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>

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

@ -31,13 +31,5 @@ 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
} }
} }

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

@ -25,7 +25,6 @@
<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>
@ -33,168 +32,18 @@
<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>

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

@ -24,7 +24,6 @@
<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>
@ -32,91 +31,16 @@
<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>

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

@ -26,7 +26,6 @@
<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>
@ -34,157 +33,16 @@
<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>

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

@ -19,12 +19,6 @@ 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>
@ -32,15 +26,8 @@ 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
@ -51,130 +38,22 @@ 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
} }
} }

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

@ -27,7 +27,6 @@
<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>
@ -35,945 +34,23 @@
<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>

41
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialDemoView.cs.txt

@ -0,0 +1,41 @@
/**************************************************************************************
Toolkit for WPF
Copyright (C) 2007-2016 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
**************************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
namespace Xceed.Wpf.Toolkit.LiveExplorer
{
public class MaterialDemoView : DemoView
{
#region Constructor
public MaterialDemoView()
{
}
#endregion
}
}

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

@ -24,7 +24,6 @@
<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>
@ -32,147 +31,19 @@
<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,7 +26,6 @@
<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>
@ -34,174 +33,16 @@
<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>

68
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialHamburgerView.xaml.cs.txt

@ -33,79 +33,15 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views
#endregion #endregion
#if !OPEN_SOURCE
#region EventHandlers
private void CheckedContentComboBox_SelectionChanged( object sender, SelectionChangedEventArgs e )
{
if( materialHamburger == null )
return;
if( ( e.AddedItems != null ) && ( e.AddedItems.Count > 0 ) )
{
var selection = e.AddedItems[ 0 ] as ComboBoxItem;
if( selection != null )
{
if( selection.Tag != null )
{
materialHamburger.CheckedContent = selection.Tag;
}
else
{
materialHamburger.ClearValue( MaterialHamburger.CheckedContentProperty );
}
}
}
}
private void UncheckedContentComboBox_SelectionChanged( object sender, SelectionChangedEventArgs e )
{
if( materialHamburger == null )
return;
if( ( e.AddedItems != null ) && ( e.AddedItems.Count > 0 ) )
{
var selection = e.AddedItems[ 0 ] as ComboBoxItem;
if( selection != null )
{
if( selection.Tag != null )
{
materialHamburger.UncheckedContent = selection.Tag;
}
else
{
materialHamburger.ClearValue( MaterialHamburger.UncheckedContentProperty );
}
}
}
}
private void MenuLocationComboBox_SelectionChanged( object sender, SelectionChangedEventArgs e )
{
if( ( e.AddedItems != null ) && ( e.AddedItems.Count > 0 ) )
{
var menuLocation = ( HamburgerLocation )e.AddedItems[ 0 ];
materialHamburgerMenu.CloseButtonLocation = ( menuLocation == HamburgerLocation.Right ) ? Location.Left : Location.Right;
}
}
private void IconButton_Click( object sender, RoutedEventArgs e )
{
var button = sender as IconButton;
if( button != null )
{
Process.Start( new ProcessStartInfo( button.Tag as string ) );
}
}
private void ApplyButton_Click( object sender, RoutedEventArgs e )
{
materialHamburger.IsChecked = false;
}
#endregion
#endif
} }
} }

604
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialHamburgerView.xaml.txt

@ -26,7 +26,6 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
<Run>A ToggleButton that pops a menu from left, right, top or bottom of a Window (or any FrameworkElement). The menu can be an animated HamburgerMenu or any customized content. It uses the Material Brushes.</Run> <Run>A ToggleButton that pops a menu from left, right, top or bottom of a Window (or any FrameworkElement). The menu can be an animated HamburgerMenu or any customized content. 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>
@ -34,577 +33,42 @@
<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="HamburgerLocationEnumData"
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="xctk:HamburgerLocation" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ObjectDataProvider x:Key="LocationEnumData"
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="xctk:Location" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<conv:ZeroToBoolConverter x:Key="ZeroToBoolConverter" />
<ContentControl x:Key="CheckedContent1"
Content="Close" />
<ContentControl x:Key="UncheckedContent1"
Content="Open" />
<DataTemplate x:Key="MenuHeaderTemplate1">
<StackPanel Margin="20">
<TextBlock Text="{Binding}"
Margin="5" />
<Button Content="Test"
Margin="5" />
</StackPanel>
</DataTemplate>
<Path x:Key="LeftArrowPath"
x:Shared="False"
Data="F1M-218.342,2910.79L-234.066,2926.52 -233.954,2926.63 -225.428,2926.63 -210.87,2912.07 -206.495,2907.7 -225.313,2888.88 -234.066,2888.88 -218.342,2904.6 -259.829,2904.6 -259.829,2910.79 -218.342,2910.79z"
Stretch="Uniform"
Fill="White"
Width="16"
Height="16"
RenderTransformOrigin="0.5,0.5">
<Path.RenderTransform>
<ScaleTransform ScaleX="-1"
ScaleY="1" />
</Path.RenderTransform>
</Path>
<Path x:Key="RightArrowPath"
x:Shared="False"
Data="F1M-218.342,2910.79L-234.066,2926.52 -233.954,2926.63 -225.428,2926.63 -210.87,2912.07 -206.495,2907.7 -225.313,2888.88 -234.066,2888.88 -218.342,2904.6 -259.829,2904.6 -259.829,2910.79 -218.342,2910.79z"
Stretch="Uniform"
Fill="White"
Width="16"
Height="16">
</Path>
<Path x:Key="TopArrowPath"
x:Shared="False"
Data="F1M-218.342,2910.79L-234.066,2926.52 -233.954,2926.63 -225.428,2926.63 -210.87,2912.07 -206.495,2907.7 -225.313,2888.88 -234.066,2888.88 -218.342,2904.6 -259.829,2904.6 -259.829,2910.79 -218.342,2910.79z"
Stretch="Uniform"
Fill="White"
Width="16"
Height="16"
RenderTransformOrigin="0.5,0.5">
<Path.RenderTransform>
<RotateTransform Angle="-90" />
</Path.RenderTransform>
</Path>
<Path x:Key="BottomArrowPath"
x:Shared="False"
Data="F1M-218.342,2910.79L-234.066,2926.52 -233.954,2926.63 -225.428,2926.63 -210.87,2912.07 -206.495,2907.7 -225.313,2888.88 -234.066,2888.88 -218.342,2904.6 -259.829,2904.6 -259.829,2910.79 -218.342,2910.79z"
Stretch="Uniform"
Fill="White"
Width="16"
Height="16"
RenderTransformOrigin="0.5,0.5">
<Path.RenderTransform>
<RotateTransform Angle="90" />
</Path.RenderTransform>
</Path>
<Style x:Key="DefaultHamburgerMenuCloseButtonStyle"
TargetType="{x:Type Button}">
<Setter Property="Content"
Value="{StaticResource LeftArrowPath}" />
<Setter Property="Foreground"
Value="White" />
<Setter Property="Margin"
Value="4" />
<Setter Property="Background"
Value="Transparent" />
<Setter Property="BorderBrush"
Value="Transparent" />
<Setter Property="Cursor"
Value="Hand" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<!--Right Arrow when Menu is positionned on right-->
<DataTrigger Binding="{Binding MenuLocation, RelativeSource={RelativeSource AncestorType={x:Type xctk:MaterialHamburgerMenu}}}"
Value="Right">
<Setter Property="Content"
Value="{StaticResource RightArrowPath}" />
</DataTrigger>
<!--Top Arrow when Menu is positionned on top-->
<DataTrigger Binding="{Binding MenuLocation, RelativeSource={RelativeSource AncestorType={x:Type xctk:MaterialHamburgerMenu}}}"
Value="Top">
<Setter Property="Content"
Value="{StaticResource TopArrowPath}" />
</DataTrigger>
<!--Bottom Arrow when Menu is positionned on Bottom-->
<DataTrigger Binding="{Binding MenuLocation, RelativeSource={RelativeSource AncestorType={x:Type xctk:MaterialHamburgerMenu}}}"
Value="Bottom">
<Setter Property="Content"
Value="{StaticResource BottomArrowPath}" />
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="HamburgerMenuCloseButtonStyle1"
TargetType="{x:Type Button}">
<Setter Property="Content"
Value="OK" />
</Style>
<Border x:Key="CustomizedHamburgerContent"
Background="White"
BorderBrush="Black"
BorderThickness="1"
Margin="5">
<StackPanel>
<xctk:MaterialTextField Text="Mike"
Watermark="Your Name"
Margin="10,30,10,10" />
<StackPanel Orientation="Horizontal"
Margin="10">
<TextBlock Text="Volume:"
Margin="3" />
<xctk:MaterialComboBox SelectedIndex="1"
Width="130">
<xctk:MaterialComboBoxItem Content="High" />
<xctk:MaterialComboBoxItem Content="Medium" />
<xctk:MaterialComboBoxItem Content="Low" />
<xctk:MaterialComboBoxItem Content="Vibration" />
</xctk:MaterialComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal"
Margin="10">
<TextBlock Text="Music: "
Margin="5" />
<xctk:MaterialRadioButton GroupName="Choice"
IsChecked="True"
Content="On"
Margin="5" />
<xctk:MaterialRadioButton GroupName="Choice"
Content="Off"
Margin="5" />
</StackPanel>
<StackPanel Orientation="Horizontal"
Margin="10">
<TextBlock Text="Plane Mode:"
Margin="5,0,5,0" />
<xctk:MaterialSwitch />
</StackPanel>
<StackPanel Orientation="Horizontal"
Margin="10">
<xctk:MaterialCheckBox IsChecked="True"
Content="English"
Margin="0,5,5,5" />
<xctk:MaterialCheckBox IsChecked="False"
Content="French"
Margin="5" />
</StackPanel>
<xctk:MaterialButton Content="Apply"
Margin="10"
Padding="8"
Click="ApplyButton_Click" />
</StackPanel>
</Border>
<Style x:Key="IconButtonStyle"
TargetType="{x:Type xctk:IconButton}">
<Setter Property="BorderThickness"
Value="0" />
<Setter Property="MouseOverForeground"
Value="{Binding MaterialAccentBrush, RelativeSource={RelativeSource AncestorType={x:Type xctk:MaterialHamburgerMenu}}}" />
<Setter Property="MousePressedForeground"
Value="{Binding MaterialAccentBrush, RelativeSource={RelativeSource AncestorType={x:Type xctk:MaterialHamburgerMenu}}}" />
<Setter Property="Background"
Value="White" />
<Setter Property="MouseOverBackground"
Value="White" />
<Setter Property="MousePressedBackground"
Value="White" />
<Setter Property="IconLocation"
Value="Left" />
<Setter Property="HorizontalAlignment"
Value="Left" />
<Setter Property="Margin"
Value="5" />
</Style>
</ResourceDictionary>
</local:DemoView.Resources>
<Grid>
<StackPanel Margin="10,5,10,5">
<GroupBox Header="Features"
Margin="0,3,0,3">
<Grid Margin="3">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<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="190" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="160" />
</Grid.ColumnDefinitions>
<!-- First Column -->
<TextBlock Text="MaterialHamburger:"
Foreground="#FFC72035"
Grid.ColumnSpan="2" />
<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=materialHamburger}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5,3,5,3" />
<TextBlock Grid.Column="0"
Grid.Row="2"
Text="MenuLocation: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
Grid.Row="2"
ItemsSource="{Binding Source={StaticResource HamburgerLocationEnumData}}"
SelectedItem="{Binding MenuLocation, ElementName=materialHamburger}"
SelectionChanged="MenuLocationComboBox_SelectionChanged"
Margin="5,3,5,3"
VerticalContentAlignment="Center" />
<TextBlock Grid.Column="0"
Grid.Row="3"
Text="Checked Content: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
Grid.Row="3"
Margin="5,3,5,3"
VerticalContentAlignment="Center"
SelectedIndex="0"
SelectionChanged="CheckedContentComboBox_SelectionChanged">
<ComboBoxItem Content="Default"
Tag="{x:Null}" />
<ComboBoxItem Content="Content 1"
Tag="{StaticResource CheckedContent1}" />
</ComboBox>
<TextBlock Grid.Column="0"
Grid.Row="4"
Text="Unchecked Content: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
Grid.Row="4"
Margin="5,3,5,3"
VerticalContentAlignment="Center"
SelectedIndex="0"
SelectionChanged="UncheckedContentComboBox_SelectionChanged">
<ComboBoxItem Content="Default"
Tag="{x:Null}" />
<ComboBoxItem Content="Content 1"
Tag="{StaticResource UncheckedContent1}" />
</ComboBox>
<TextBlock Grid.Column="0"
Grid.Row="5"
Text="Menu Owner: "
VerticalAlignment="Center" />
<ComboBox x:Name="toastOwnerComboBox"
Grid.Column="1"
Grid.Row="5"
Margin="5,3,5,3"
SelectedValue="{Binding MenuOwner, ElementName=materialHamburger}"
SelectedValuePath="Tag"
VerticalContentAlignment="Center">
<ComboBoxItem Content="Sample Window"
Tag="{x:Null}" />
<ComboBoxItem Content="LightBlue Border"
Tag="{Binding ElementName=LightBlueBorder}" />
<ComboBoxItem Content="LightGreen Border"
Tag="{Binding ElementName=LightGreenBorder}" />
</ComboBox>
<TextBlock Grid.Column="0"
Grid.Row="6"
Text="Menu Content: "
VerticalAlignment="Center" />
<ComboBox x:Name="menuContentComboBox"
Grid.Column="1"
Grid.Row="6"
Margin="5,3,5,3"
SelectedIndex="0"
VerticalContentAlignment="Center">
<ComboBoxItem Content="HamburgerMenu with items">
<ComboBoxItem.Tag>
<xctk:MaterialHamburgerMenu x:Name="materialHamburgerMenu"
Header="Xceed Products"
HeaderTemplate="{x:Null}"
CloseButtonLocation="Right"
Padding="0"
CloseButtonStyle="{StaticResource DefaultHamburgerMenuCloseButtonStyle}"
IsAnimatingItems="True">
<TextBlock Text="WPF Controls"
Foreground="Gray"
HorizontalAlignment="Center"
Margin="5" />
<xctk:IconButton Content="DataGrid For WPF"
Tag="https://xceed.com/xceed-datagrid-for-wpf/"
Click="IconButton_Click"
Style="{StaticResource IconButtonStyle}">
<xctk:IconButton.Icon>
<Image Source="../Resources/DataGrid.png"
Width="20"
Margin="5" />
</xctk:IconButton.Icon>
</xctk:IconButton>
<xctk:IconButton Content="Toolkit For WPF"
Tag="https://xceed.com/xceed-toolkit-plus-for-wpf/"
Click="IconButton_Click"
Style="{StaticResource IconButtonStyle}">
<xctk:IconButton.Icon>
<Image Source="../Resources/Toolkit.png"
Width="20"
Margin="5" />
</xctk:IconButton.Icon>
</xctk:IconButton>
<xctk:IconButton Content="Business Suite For WPF"
Tag="https://xceed.com/xceed-business-suite-for-wpf/"
Click="IconButton_Click"
Style="{StaticResource IconButtonStyle}">
<xctk:IconButton.Icon>
<Image Source="../Resources/Business.png"
Width="20"
Margin="5" />
</xctk:IconButton.Icon>
</xctk:IconButton>
<Separator Margin="0,20" />
<TextBlock Text=".NET Libraries"
HorizontalAlignment="Center"
Foreground="Gray"
Margin="5,0,5,5" />
<xctk:IconButton Content="Zip For .NET"
Tag="https://xceed.com/xceed-zip-for-net/"
Click="IconButton_Click"
Style="{StaticResource IconButtonStyle}">
<xctk:IconButton.Icon>
<Image Source="../Resources/Zip.png"
Width="20"
Margin="5" />
</xctk:IconButton.Icon>
</xctk:IconButton>
<xctk:IconButton Content="SFTP For .NET"
Tag="https://xceed.com/xceed-sftp-for-net/"
Click="IconButton_Click"
Style="{StaticResource IconButtonStyle}">
<xctk:IconButton.Icon>
<Image Source="../Resources/SFTP.png"
Width="20"
Margin="5" />
</xctk:IconButton.Icon>
</xctk:IconButton>
<xctk:IconButton Content="Real-Time Zip For .NET"
Tag="https://xceed.com/xceed-real-time-zip-for-net/"
Click="IconButton_Click"
Style="{StaticResource IconButtonStyle}">
<xctk:IconButton.Icon>
<Image Source="../Resources/Zip.png"
Width="20"
Margin="5" />
</xctk:IconButton.Icon>
</xctk:IconButton>
</xctk:MaterialHamburgerMenu>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="Customized content"
Tag="{StaticResource CustomizedHamburgerContent}" />
</ComboBox>
<TextBlock Grid.Column="0"
Grid.Row="7"
Text="Can Resize Menu: "
VerticalAlignment="Center" />
<CheckBox Grid.Column="1"
Grid.Row="7"
Margin="5,3,5,3"
IsChecked="{Binding CanResizeMenu, ElementName=materialHamburger}"
VerticalContentAlignment="Center" />
<!-- Second Column -->
<TextBlock Text="MaterialHamburgerMenu:"
Foreground="#FFC72035"
Grid.Column="2"
Grid.ColumnSpan="2"
Margin="10,0,0,0" />
<TextBlock Grid.Column="2"
Grid.Row="1"
Text="Material Accent Brush: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding SelectedIndex, ElementName=menuContentComboBox, Converter={StaticResource ZeroToBoolConverter}}"
Style="{StaticResource DisableGrayText}" />
<ComboBox Grid.Column="3"
Grid.Row="1"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding MaterialAccentBrush, ElementName=materialHamburgerMenu}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5,3,5,3"
IsEnabled="{Binding SelectedIndex, ElementName=menuContentComboBox, Converter={StaticResource ZeroToBoolConverter}}"
Style="{StaticResource DisableGrayComboBox}" />
<TextBlock Grid.Column="2"
Grid.Row="2"
Text="Header: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding SelectedIndex, ElementName=menuContentComboBox, Converter={StaticResource ZeroToBoolConverter}}"
Style="{StaticResource DisableGrayText}" />
<TextBox Grid.Column="3"
Grid.Row="2"
Text="{Binding Header, ElementName=materialHamburgerMenu}"
VerticalAlignment="Center"
Margin="5,3,5,3"
IsEnabled="{Binding SelectedIndex, ElementName=menuContentComboBox, Converter={StaticResource ZeroToBoolConverter}}" />
<TextBlock Grid.Column="2"
Grid.Row="3"
Text="Header Template: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding SelectedIndex, ElementName=menuContentComboBox, Converter={StaticResource ZeroToBoolConverter}}"
Style="{StaticResource DisableGrayText}" />
<ComboBox Grid.Column="3"
Grid.Row="3"
SelectedValue="{Binding HeaderTemplate, ElementName=materialHamburgerMenu}"
SelectedValuePath="Tag"
VerticalAlignment="Center"
Margin="5,3,5,3"
IsEnabled="{Binding SelectedIndex, ElementName=menuContentComboBox, Converter={StaticResource ZeroToBoolConverter}}"
Style="{StaticResource DisableGrayComboBox}">
<ComboBoxItem Content="Default"
Tag="{x:Null}" />
<ComboBoxItem Content="Template 1"
Tag="{StaticResource MenuHeaderTemplate1}" />
</ComboBox>
<TextBlock Grid.Column="2"
Grid.Row="4"
Text="Close Button Location: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding SelectedIndex, ElementName=menuContentComboBox, Converter={StaticResource ZeroToBoolConverter}}"
Style="{StaticResource DisableGrayText}" />
<ComboBox Grid.Column="3"
Grid.Row="4"
ItemsSource="{Binding Source={StaticResource LocationEnumData}}"
SelectedItem="{Binding CloseButtonLocation, ElementName=materialHamburgerMenu}"
VerticalAlignment="Center"
Margin="5,3,5,3"
IsEnabled="{Binding SelectedIndex, ElementName=menuContentComboBox, Converter={StaticResource ZeroToBoolConverter}}"
Style="{StaticResource DisableGrayComboBox}" />
<TextBlock Grid.Column="2"
Grid.Row="5"
Text="Close Button Style: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding SelectedIndex, ElementName=menuContentComboBox, Converter={StaticResource ZeroToBoolConverter}}"
Style="{StaticResource DisableGrayText}" />
<ComboBox Grid.Column="3"
Grid.Row="5"
SelectedValue="{Binding CloseButtonStyle, ElementName=materialHamburgerMenu}"
SelectedValuePath="Tag"
VerticalAlignment="Center"
Margin="5,3,5,3"
IsEnabled="{Binding SelectedIndex, ElementName=menuContentComboBox, Converter={StaticResource ZeroToBoolConverter}}"
Style="{StaticResource DisableGrayComboBox}">
<ComboBoxItem Content="Default"
Tag="{StaticResource DefaultHamburgerMenuCloseButtonStyle}" />
<ComboBoxItem Content="Style 1"
Tag="{StaticResource HamburgerMenuCloseButtonStyle1}" />
</ComboBox>
<TextBlock Grid.Column="2"
Grid.Row="6"
Text="Is Animating Items: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding SelectedIndex, ElementName=menuContentComboBox, Converter={StaticResource ZeroToBoolConverter}}"
Style="{StaticResource DisableGrayText}" />
<CheckBox Grid.Column="3"
Grid.Row="6"
IsChecked="{Binding IsAnimatingItems, ElementName=materialHamburgerMenu}"
VerticalAlignment="Center"
Margin="5,3,5,3"
IsEnabled="{Binding SelectedIndex, ElementName=menuContentComboBox, Converter={StaticResource ZeroToBoolConverter}}" />
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<xctk:MaterialHamburger x:Name="materialHamburger"
Margin="5"
MenuContent="{Binding SelectedItem.Tag, ElementName=menuContentComboBox}" />
<StackPanel Orientation="Horizontal">
<Border x:Name="LightBlueBorder"
Background="LightBlue"
Width="335"
Height="330"
Margin="5" />
<Border x:Name="LightGreenBorder"
Background="LightGreen"
Width="335"
Height="330"
Margin="5" />
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialHamburger.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialHamburger.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

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

@ -27,7 +27,6 @@
<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>
@ -35,122 +34,17 @@
<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,45 +33,18 @@ 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,7 +25,6 @@
<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>
@ -33,7 +32,6 @@
<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>
@ -45,181 +43,18 @@
</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>

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

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

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

@ -25,7 +25,6 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
<Run>A linear ProgressBar that uses the Material Brushes. It contains properties to animate the indeterminate state.</Run> <Run>A linear 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>
@ -33,10 +32,9 @@
<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>
<local:DemoView.Resources> <local:DemoView.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
@ -45,150 +43,15 @@
</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="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="95" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- First Column-->
<TextBlock Grid.Column="0"
Grid.Row="0"
Text="Indeterminate Indicator Max Length: "
VerticalAlignment="Center"/>
<xctk:DoubleUpDown x:Name="inteterminateIndicatorMaxLengthUpDown"
Grid.Column="1"
Grid.Row="0"
Value="{Binding IndeterminateIndicatorMaxLength, ElementName=materialIndeterminateProgressBar}"
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="0"
Grid.Row="1"
Text="Indeterminate Indicator Min Length: "
VerticalAlignment="Center"/>
<xctk:DoubleUpDown x:Name="inteterminateIndicatorMinLengthUpDown"
Grid.Column="1"
Grid.Row="1"
Value="{Binding IndeterminateIndicatorMinLength, ElementName=materialIndeterminateProgressBar}"
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="0"
Grid.Row="2"
Text="Indeterminate Indicator Speed Ratio: "
VerticalAlignment="Center"/>
<xctk:DoubleUpDown Grid.Column="1"
Grid.Row="2"
Value="{Binding IndeterminateIndicatorSpeedRatio, ElementName=materialIndeterminateProgressBar}"
Minimum="0.1"
Maximum="5"
Increment="0.5"
Margin="5"
VerticalContentAlignment="Center" />
<!-- 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=materialDeterminateProgressBar}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
</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:" />
<StackPanel Grid.Row="0"
Grid.Column="1"
Orientation="Horizontal">
<xctk:MaterialProgressBar x:Name="materialDeterminateProgressBar"
IsIndeterminate="False"
Width="400"
Height="10"
Maximum="100"
Minimum="0"
Margin="20" />
<TextBlock Text="{Binding Value, ElementName=materialDeterminateProgressBar, StringFormat={}{0:N0}%}"
FontSize="15"
Width="45"
VerticalAlignment="Center"
HorizontalAlignment="Center"/>
</StackPanel>
<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:MaterialProgressBar x:Name="materialIndeterminateProgressBar"
Grid.Row="1"
Grid.Column="1"
IsIndeterminate="True"
IndeterminateIndicatorSpeedRatio="1"
IndeterminateIndicatorMaxLength="0.25"
IndeterminateIndicatorMinLength="0"
MaterialAccentBrush="{Binding MaterialAccentBrush, ElementName=materialDeterminateProgressBar}"
Width="400"
Height="10"
Margin="20"
HorizontalAlignment="Left"/>
</Grid>
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialProgressBar.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialProgressBar.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

66
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialRadioButtonView.xaml.txt

@ -25,7 +25,6 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
<Run>A RadioButton with transition animations when the checked state is changed. It uses the Material Brushes.</Run> <Run>A RadioButton 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>
@ -33,78 +32,15 @@
<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>
</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="95" />
</Grid.ColumnDefinitions>
<!-- First Column-->
<TextBlock Grid.Column="0"
Text="Check Mark Brush: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
VerticalAlignment="Center"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding CheckMarkBrush, ElementName=materialRadioButton}"
ItemTemplate="{StaticResource ColorItemTemplate}"
Margin="5"/>
<!-- Second Column -->
<TextBlock Grid.Column="2"
Text="Material Accent Brush: "
VerticalAlignment="Center"
Margin="10,0,0,0"/>
<ComboBox Grid.Column="3"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding MaterialAccentBrush, ElementName=materialRadioButton}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<StackPanel HorizontalAlignment="Center">
<xctk:MaterialRadioButton x:Name="materialRadioButton"
GroupName="Choice"
IsChecked="True"
Content="First" />
<xctk:MaterialRadioButton x:Name="materialRadioButton2"
GroupName="Choice"
Content="Second"
CheckMarkBrush="{Binding CheckMarkBrush, ElementName=materialRadioButton}"
MaterialAccentBrush="{Binding MaterialAccentBrush, ElementName=materialRadioButton}"/>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialRadioButton.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialRadioButton.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

284
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialSliderView.xaml.txt

@ -26,7 +26,6 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
<Run>A Slider with customizable and animated thumb and bubble that is using the Material Brushes.</Run> <Run>A Slider with customizable and animated thumb and bubble that is using 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>
@ -34,310 +33,31 @@
<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>
<winConv:IntToBoolConverter x:Key="IntToBoolConverter" />
<xctk:InverseBoolConverter x:Key="InverseBoolConverter" />
<ObjectDataProvider x:Key="SliderEnumData"
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="xctk:MaterialSliderModeEnum" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ObjectDataProvider x:Key="SliderBubbleLocationEnumData"
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="xctk:MaterialSliderBubbleLocationEnum" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ObjectDataProvider x:Key="SliderOrientationEnumData"
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="Orientation" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<DataTemplate x:Key="MaterialSliderBubbleTemplate1">
<Border Background="Black"
Padding="7">
<TextBlock Text="{Binding ., StringFormat=N1}"
FontSize="12"
Foreground="White"
HorizontalAlignment="Center" />
</Border>
</DataTemplate>
<DataTemplate x:Key="MaterialSliderBubbleTemplate2">
<Grid>
<Ellipse Fill="Red"
Width="60"
Height="60"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
<TextBlock Text="{Binding ., StringFormat=N2}"
FontSize="20"
Foreground="Yellow"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Grid>
</DataTemplate>
<Style x:Key="MaterialSliderThumbStyle1"
TargetType="{x:Type Thumb}">
<Setter Property="VerticalAlignment"
Value="Center" />
<Setter Property="Width"
Value="10" />
<Setter Property="Height"
Value="10" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Grid>
<Border x:Name="border"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
HorizontalAlignment="Center"
BorderBrush="Orange"
BorderThickness="2"
Background="Black" />
</Grid>
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource TemplatedParent}}"
Value="True">
<Setter Property="BorderBrush"
Value="Green"
TargetName="border" />
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MaterialSliderThumbStyle2"
TargetType="{x:Type Thumb}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Grid>
<Image Source="..\Resources\PencilTool16.png"
Stretch="None" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</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="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="100" />
</Grid.ColumnDefinitions>
<!-- First Column-->
<TextBlock Grid.Column="0"
Grid.Row="0"
Text="Mode: "
VerticalAlignment="Center" />
<ComboBox x:Name="modeComboBox"
Grid.Column="1"
Grid.Row="0"
ItemsSource="{Binding Source={StaticResource SliderEnumData}}"
SelectedItem="{Binding Mode, ElementName=materialSlider}"
Width="100"
VerticalAlignment="Center"
Margin="5" />
<TextBlock x:Name="bubbleTemplateTextBlock"
Grid.Column="0"
Grid.Row="1"
Text="Bubble Template: "
VerticalAlignment="Center"
IsEnabled="{Binding SelectedIndex, ElementName=modeComboBox, Converter={StaticResource IntToBoolConverter}}"
Style="{StaticResource DisableGrayText}" />
<ComboBox Grid.Column="1"
Grid.Row="1"
SelectedValue="{Binding BubbleTemplate, ElementName=materialSlider}"
SelectedValuePath="Tag"
VerticalAlignment="Center"
Margin="5"
IsEnabled="{Binding SelectedIndex, ElementName=modeComboBox, Converter={StaticResource IntToBoolConverter}}"
Style="{StaticResource DisableGrayComboBox}">
<ComboBoxItem Content="Default"
Tag="{x:Null}" />
<ComboBoxItem Content="Template 1"
Tag="{StaticResource MaterialSliderBubbleTemplate1}" />
<ComboBoxItem Content="Template 2"
Tag="{StaticResource MaterialSliderBubbleTemplate2}" />
</ComboBox>
<TextBlock Grid.Column="0"
Grid.Row="2"
Text="Bubble Location: "
VerticalAlignment="Center"
IsEnabled="{Binding SelectedIndex, ElementName=modeComboBox, Converter={StaticResource IntToBoolConverter}}"
Style="{StaticResource DisableGrayText}" />
<ComboBox Grid.Column="1"
Grid.Row="2"
ItemsSource="{Binding Source={StaticResource SliderBubbleLocationEnumData}}"
SelectedItem="{Binding BubbleLocation, ElementName=materialSlider}"
VerticalAlignment="Center"
Margin="5"
IsEnabled="{Binding SelectedIndex, ElementName=modeComboBox, Converter={StaticResource IntToBoolConverter}}"
Style="{StaticResource DisableGrayComboBox}"
ToolTip="The location of the Slider's bubble. If its orientation is Vertical : Over will be on the left and under will be on the right of the slider."/>
<!-- Second Column -->
<TextBlock Grid.Column="2"
Grid.Row="0"
Text="Thumb Style: "
VerticalAlignment="Center"
Margin="10,0,0,0" />
<ComboBox Grid.Column="3"
Grid.Row="0"
SelectedValue="{Binding ThumbStyle, ElementName=materialSlider}"
SelectedValuePath="Tag"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Width="70"
Margin="5">
<ComboBoxItem Content="Default"
Tag="{x:Null}" />
<ComboBoxItem Content="Style 1"
Tag="{StaticResource MaterialSliderThumbStyle1}" />
<ComboBoxItem Content="Style 2"
Tag="{StaticResource MaterialSliderThumbStyle2}" />
</ComboBox>
<TextBlock Grid.Column="2"
Grid.Row="1"
Text="Thumb Resize Scale Factor: "
VerticalAlignment="Center"
Margin="10,0,0,0"
IsEnabled="{Binding IsEnabled, ElementName=bubbleTemplateTextBlock, Converter={StaticResource InverseBoolConverter}}"
Style="{StaticResource DisableGrayText}" />
<xctk:DoubleUpDown Grid.Column="3"
Grid.Row="1"
Value="{Binding ThumbResizeScaleFactor, ElementName=materialSlider}"
Minimum="0.6"
Maximum="4"
Increment="0.1"
FormatString="N1"
VerticalAlignment="Center"
Margin="5"
IsEnabled="{Binding IsEnabled, ElementName=bubbleTemplateTextBlock, Converter={StaticResource InverseBoolConverter}}" />
<!--Third Column-->
<TextBlock Grid.Column="4"
Grid.Row="0"
Text="Show Ticks: "
VerticalAlignment="Center"
Margin="10,0,0,0" />
<CheckBox Grid.Column="5"
Grid.Row="0"
IsChecked="{Binding ShowTicks, ElementName=materialSlider}"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Grid.Column="4"
Grid.Row="1"
Text="Orientation: "
VerticalAlignment="Center"
Margin="10,0,0,0" />
<ComboBox Grid.Column="5"
Grid.Row="1"
ItemsSource="{Binding Source={StaticResource SliderOrientationEnumData}}"
SelectedItem="{Binding Orientation, ElementName=materialSlider}"
VerticalAlignment="Center"
Width="90"
Margin="5" />
<TextBlock Grid.Column="4"
Grid.Row="2"
Text="Material Accent Brush: "
VerticalAlignment="Center"
Margin="10,0,0,0" />
<ComboBox Grid.Column="5"
Grid.Row="2"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding MaterialAccentBrush, ElementName=materialSlider}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<xctk:MaterialSlider x:Name="materialSlider"
Maximum="10"
Minimum="0"
Value="2"
Margin="20"
ShowTicks="True"
Mode="WithBubble"
BubbleTemplate="{x:Null}"
ThumbStyle="{x:Null}"
Orientation="Horizontal">
<xctk:MaterialSlider.Resources>
<Style TargetType="xctk:MaterialSlider">
<Style.Triggers>
<Trigger Property="Orientation"
Value="Horizontal">
<Setter Property="Width"
Value="500" />
</Trigger>
<Trigger Property="Orientation"
Value="Vertical">
<Setter Property="Height"
Value="300" />
</Trigger>
</Style.Triggers>
</Style>
</xctk:MaterialSlider.Resources>
</xctk:MaterialSlider>
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialSlider.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialSlider.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

101
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialSwitchView.xaml.txt

@ -25,7 +25,6 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
<Run>A ToggleSwitch from the Xceed WPF Toolkit with thumb animations when Checked state is changed and that is using the Material Brushes.</Run> <Run>A ToggleSwitch from the Xceed WPF Toolkit with thumb animations when Checked state is changed and that is using 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>
@ -33,99 +32,17 @@
<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>
<Path x:Key="UnPinPath"
Data="M537.76,0L767,237.883 699.552,307.874 654.177,260.828 449.89,472.781 460.135,483.414 447.983,639.291 336.562,523.67 0,767 265.122,449.537 154.528,334.849 304.815,322.276 311.431,329.066 336,303.562 336,300 339.432,300 515.648,117.076 470.311,69.9921z"
Stretch="Uniform"
Margin="6"
Fill="White" />
<Path x:Key="PinPath"
Data="M537.76,0L767,237.883 699.552,307.874 654.177,260.828 449.89,472.781 460.135,483.414 447.983,639.291 336.562,523.67 0,767 265.122,449.537 154.528,334.849 304.815,322.276 311.431,329.066 336,303.562 336,300 339.432,300 515.648,117.076 470.311,69.9921z"
Stretch="Uniform"
Margin="6"
Fill="White"
RenderTransformOrigin="0.5,0.5">
<Path.RenderTransform>
<RotateTransform Angle="-45" />
</Path.RenderTransform>
</Path>
</ResourceDictionary>
</local:DemoView.Resources>
<Grid>
<StackPanel Margin="10">
<GroupBox Header="Features"
Margin="0,5,0,5">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="95" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="95" />
</Grid.ColumnDefinitions>
<!-- 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=materialSwitch}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
<!-- Second Column-->
<TextBlock Grid.Column="2"
Grid.Row="0"
Text="Thumb Checked Background: "
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 ThumbCheckedBackground, ElementName=materialSwitch}"
ItemTemplate="{StaticResource ColorItemTemplate}"
ToolTip="Background used when MaterialSwitch is checked. ThumbBackground property will be used when unchecked."
Margin="5"/>
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<xctk:MaterialSwitch x:Name="materialSwitch"
Margin="20"
HorizontalAlignment="Center"
Width="60"
MinHeight="18"
ThumbBackground="Gray"
ThumbLeftContent="{StaticResource UnPinPath}"
ThumbRightContent="{StaticResource PinPath}"/>
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialSwitch.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialSwitch.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

229
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialTabsView.xaml.txt

@ -27,7 +27,6 @@
<Run>MaterialTabControl is a a TabControl with animated transitions when the current selection is changed. Is is using the Material Brushes and contains MaterialTabItems.</Run> <Run>MaterialTabControl is a a TabControl with animated transitions when the current selection is changed. Is is using the Material Brushes and contains MaterialTabItems.</Run>
<LineBreak /> <LineBreak />
<Run>MaterialTabItems are TabItems that are using the Material Brushes and who contains customizable ink animations on mouse press.</Run> <Run>MaterialTabItems are TabItems that are using the Material Brushes and who contains customizable ink animations on mouse press.</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>
@ -35,220 +34,24 @@
<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>
</ResourceDictionary>
</local:DemoView.Resources>
<Grid>
<StackPanel Margin="10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<GroupBox Header="MaterialTabControl Features"
Margin="0,5,0,5">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="95" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.Column="0"
Grid.Row="0"
Text="Is Ink Bar Active: "
VerticalAlignment="Center" />
<CheckBox x:Name="inkBarActiveCheckBox"
Grid.Column="1"
Grid.Row="0"
IsChecked="{Binding IsInkBarActive, ElementName=materialTabControl}"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Grid.Column="0"
Grid.Row="1"
Text="Ink Bar Brush: "
VerticalAlignment="Center"
IsEnabled="{Binding IsChecked, ElementName=inkBarActiveCheckBox}"
Style="{StaticResource DisableGrayText}" />
<ComboBox Grid.Column="1"
Grid.Row="1"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding InkBarBrush, ElementName=materialTabControl}"
ItemTemplate="{StaticResource ColorItemTemplate}"
IsEnabled="{Binding IsChecked, ElementName=inkBarActiveCheckBox}"
Margin="5" />
<TextBlock Grid.Column="0"
Grid.Row="2"
Text="Is Sliding Animation Active: "
VerticalAlignment="Center" />
<CheckBox Grid.Column="1"
Grid.Row="2"
IsChecked="{Binding IsSlidingAnimationActive, ElementName=materialTabControl}"
VerticalAlignment="Center"
Margin="5" />
</Grid>
</GroupBox>
<GroupBox Header="MaterialTabItem Features"
Grid.Column="1"
Margin="10,5,0,5">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="95" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<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=materialTabControl}"
VerticalAlignment="Center"
Margin="5"
ToolTip="Can be set on a MaterialTabControl control or individually on each MaterialTabItem." />
<TextBlock Grid.Column="0"
Grid.Row="1"
Text="Ink Effect Brush: "
VerticalAlignment="Center"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
Style="{StaticResource DisableGrayText}" />
<ComboBox Grid.Column="1"
Grid.Row="1"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding InkEffectBrush, ElementName=materialTabControl}"
ItemTemplate="{StaticResource ColorItemTemplate}"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
Margin="5"
ToolTip="Can be set on a MaterialTabControl control or individually on each MaterialTabItem." />
<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=materialTabControl}"
Minimum="0"
Maximum="1"
Increment="0.05"
FormatString="N2"
VerticalAlignment="Center"
Margin="5"
IsEnabled="{Binding IsChecked, ElementName=inkEffectActiveCheckBox}"
ToolTip="Can be set on a MaterialTabControl control or individually on each MaterialTabItem." />
<TextBlock Grid.Column="0"
Grid.Row="3"
Text="Selected Foreground: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
Grid.Row="3"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding SelectedForeground, ElementName=materialTabControl}"
ItemTemplate="{StaticResource ColorItemTemplate}"
Margin="5"
ToolTip="Can be set on a MaterialTabControl control or individually on each MaterialTabItem." />
</Grid>
</GroupBox>
</Grid>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<StackPanel Orientation="Horizontal">
<TextBlock Text="TabStripPlacement is Top:"
Margin="20" />
<xctk:MaterialTabControl x:Name="materialTabControl"
TabStripPlacement="Top"
IsInkEffectActive="True"
IsInkBarActive="True"
IsSlidingAnimationActive="True">
<xctk:MaterialTabItem Header="First"
HorizontalContentAlignment="Center"
Content="MaterialTabItem #1" />
<xctk:MaterialTabItem Header="Second"
HorizontalContentAlignment="Center"
Content="MaterialTabItem #2" />
<xctk:MaterialTabItem Header="Third"
HorizontalContentAlignment="Center"
Content="MaterialTabItem #3" />
<xctk:MaterialTabItem Header="Fourth"
HorizontalContentAlignment="Center"
Content="MaterialTabItem #4" />
<xctk:MaterialTabItem Header="Fifth"
HorizontalContentAlignment="Center"
Content="MaterialTabItem #5" />
</xctk:MaterialTabControl>
</StackPanel>
<StackPanel Orientation="Horizontal"
Margin="0,40,0,0">
<TextBlock Text="TabStripPlacement is Left:"
Margin="20" />
<xctk:MaterialTabControl x:Name="leftMaterialTabs"
TabStripPlacement="Left"
IsInkEffectActive="{Binding IsInkEffectActive, ElementName=materialTabControl}"
InkEffectBrush="{Binding InkEffectBrush, ElementName=materialTabControl}"
InkEffectOpacity="{Binding InkEffectOpacity, ElementName=materialTabControl}"
InkBarBrush="{Binding InkBarBrush, ElementName=materialTabControl}"
SelectedForeground="{Binding SelectedForeground, ElementName=materialTabControl}"
IsInkBarActive="{Binding IsInkBarActive, ElementName=materialTabControl}"
IsSlidingAnimationActive="{Binding IsSlidingAnimationActive, ElementName=materialTabControl}">
<xctk:MaterialTabItem Header="First"
VerticalContentAlignment="Center"
Content="MaterialTabItem #1" />
<xctk:MaterialTabItem Header="Second"
VerticalContentAlignment="Center"
Content="MaterialTabItem #2" />
<xctk:MaterialTabItem Header="Third"
VerticalContentAlignment="Center"
Content="MaterialTabItem #3" />
<xctk:MaterialTabItem Header="Fourth"
VerticalContentAlignment="Center"
Content="MaterialTabItem #4" />
<xctk:MaterialTabItem Header="Fifth"
VerticalContentAlignment="Center"
Content="MaterialTabItem #5" />
</xctk:MaterialTabControl>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialTabs.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialTabs.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

216
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialTextFieldView.xaml.txt

@ -26,7 +26,6 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
<Run>A TextBox containing a customizable animated watermark that remains active when text is entered. It uses the Material Brushes.</Run> <Run>A TextBox containing a customizable animated watermark that remains active when text is entered. 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>
@ -34,207 +33,24 @@
<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="TextFieldEnumData"
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="xctk:MaterialTextFieldModeEnum" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<DataTemplate x:Key="TextFieldTemplate1">
<Border Background="#FF49A9F5">
<TextBlock Text="{Binding}"
Foreground="White" />
</Border>
</DataTemplate>
<DataTemplate x:Key="TextFieldTemplate2">
<StackPanel Orientation="Horizontal">
<Image Source="..\Resources\building16.png"
Stretch="None" />
<TextBlock Text="{Binding}"
Foreground="Black"
Margin="4,0,0,0" />
</StackPanel>
</DataTemplate>
</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="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="100" />
</Grid.ColumnDefinitions>
<!-- First Column-->
<TextBlock Grid.Column="0"
Text="Watermark: "
VerticalAlignment="Center" />
<TextBox Grid.Column="1"
Text="{Binding Watermark, ElementName=materialTextField, UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Center"
Width="250"
Margin="5" />
<TextBlock Grid.Column="0"
Grid.Row="1"
Text="Watermark Mode: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
Grid.Row="1"
ItemsSource="{Binding Source={StaticResource TextFieldEnumData}}"
SelectedItem="{Binding WatermarkMode, ElementName=materialTextField}"
Width="95"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Grid.Column="0"
Grid.Row="2"
Text="Watermark Template: "
VerticalAlignment="Center" />
<ComboBox Grid.Column="1"
Grid.Row="2"
SelectedValue="{Binding WatermarkTemplate, ElementName=materialTextField}"
SelectedValuePath="Tag"
Width="95"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Margin="5">
<ComboBoxItem Content="None"
Tag="{x:Null}" />
<ComboBoxItem Content="Template1"
Tag="{StaticResource TextFieldTemplate1}" />
<ComboBoxItem Content="Template2"
Tag="{StaticResource TextFieldTemplate2}" />
</ComboBox>
<TextBlock Grid.Column="0"
Grid.Row="3"
Text="Watermark Scale Factor: "
VerticalAlignment="Center" />
<xctk:DoubleUpDown Grid.Column="1"
Grid.Row="3"
Value="{Binding WatermarkScaleFactor, ElementName=materialTextField}"
Minimum="0"
Maximum="5"
Increment="0.1"
FormatString="N1"
Width="70"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Margin="5" />
<!-- Second Column-->
<TextBlock Grid.Column="2"
Grid.Row="0"
Text="Watermark Foreground: "
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 WatermarkForeground, ElementName=materialTextField}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Grid.Column="2"
Grid.Row="1"
Text="Watermark Focus Brush: "
VerticalAlignment="Center"
Margin="10,0,0,0" />
<ComboBox Grid.Column="3"
Grid.Row="1"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding WatermarkFocusBrush, ElementName=materialTextField}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Grid.Column="2"
Grid.Row="2"
Text="Line Brush: "
VerticalAlignment="Center"
Margin="10,0,0,0" />
<ComboBox Grid.Column="3"
Grid.Row="2"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding LineBrush, ElementName=materialTextField}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
<TextBlock Grid.Column="2"
Grid.Row="3"
Text="Line Focus Brush: "
VerticalAlignment="Center"
Margin="10,0,0,0" />
<ComboBox Grid.Column="3"
Grid.Row="3"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding LineFocusBrush, ElementName=materialTextField}"
ItemTemplate="{StaticResource ColorItemTemplate}"
VerticalAlignment="Center"
Margin="5" />
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<xctk:MaterialTextField x:Name="materialTextField"
Watermark="Company"
Width="250"
Margin="100"
WatermarkForeground="{Binding MaterialBrushes[17], RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
WatermarkScaleFactor="0.7"
WatermarkMode="OnFocus"
LineBrush="{Binding MaterialBrushes[17], RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}">
<xctk:MaterialTextField.Text>
<Binding Path="Text"
ElementName="testTextBox"
UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<sample:RequiredRule />
</Binding.ValidationRules>
</Binding>
</xctk:MaterialTextField.Text>
</xctk:MaterialTextField>
<TextBox x:Name="testTextBox"
Visibility="Collapsed" />
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialTextField.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialTextField.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

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

@ -30,21 +30,5 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views
InitializeComponent(); InitializeComponent();
} }
#if !OPEN_SOURCE
private void ToastButton_Click( object sender, RoutedEventArgs e )
{
var materialToast = new MaterialToast( ( ( ComboBoxItem )toastOwnerComboBox.SelectedItem ).Tag as FrameworkElement );
materialToast.MaterialAccentBrush = (SolidColorBrush)toastMaterialAccentBrushComboBox.SelectedItem;
materialToast.Location = ( MaterialToastLocationEnum )toastLocationComboBox.SelectedItem;
materialToast.SlidingDirection = ( Orientation )toastSlidingDirectionComboBox.SelectedItem;
materialToast.Content = "Simple Toast";
materialToast.DisplayTime = System.TimeSpan.FromMilliseconds( toastDisplayTimeIntegerUpDown.Value.Value );
materialToast.HideOnClick = toastHideOnclickCheckBox.IsChecked.Value;
materialToast.IsCloseButtonVisible = toastIsCloseButtonVisibleCheckBox.IsChecked.Value;
materialToast.CloseButtonStyle = ( ( ComboBoxItem )toastClosebuttonStyleComboBox.SelectedItem ).Tag as Style;
materialToast.CornerRadius = new CornerRadius( toastCornerRadiusIntegerUpDown.Value.Value );
materialToast.ShowToast();
}
#endif
} }
} }

273
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialToastView.xaml.txt

@ -25,7 +25,6 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
<Run>A ContentControl that can be customized to display a content in any corner of any window or FrameworkElement. It is using the Material Brushes.</Run> <Run>A ContentControl that can be customized to display a content in any corner of any window or FrameworkElement. It is using 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>
@ -33,296 +32,26 @@
<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="ToastLocationEnumData"
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="xctk:MaterialToastLocationEnum" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ObjectDataProvider x:Key="ToastSlidingDirectionEnumData"
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="Orientation" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<Style x:Key="MaterialToastCloseButtonStyle1"
TargetType="{x:Type Button}">
<Setter Property="Margin"
Value="2" />
<Setter Property="Content"
Value="OK" />
<Setter Property="Foreground"
Value="Yellow" />
<Setter Property="Background"
Value="Transparent" />
<Setter Property="BorderBrush"
Value="Transparent" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Background"
Value="Green" />
</Trigger>
</Style.Triggers>
</Style>
</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="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!--First Column-->
<TextBlock Grid.Column="0"
Text="Owner: "
VerticalAlignment="Center" />
<ComboBox x:Name="toastOwnerComboBox"
Grid.Column="1"
SelectedIndex="0"
Width="125"
Margin="5"
VerticalContentAlignment="Center"
HorizontalAlignment="Left">
<ComboBoxItem Content="LightBlue Border"
Tag="{Binding ElementName=lightBlueBorder}" />
<ComboBoxItem Content="LightGreen Border"
Tag="{Binding ElementName=greenBlueBorder}" />
<ComboBoxItem Content="Sample Window"
Tag="{x:Null}" />
</ComboBox>
<TextBlock Grid.Column="0"
Grid.Row="1"
Text="Location: "
VerticalAlignment="Center" />
<ComboBox x:Name="toastLocationComboBox"
Grid.Column="1"
Grid.Row="1"
ItemsSource="{Binding Source={StaticResource ToastLocationEnumData}}"
SelectedIndex="0"
Margin="5"
VerticalContentAlignment="Center" />
<TextBlock Grid.Column="0"
Grid.Row="2"
Text="Sliding Direction: "
VerticalAlignment="Center" />
<ComboBox x:Name="toastSlidingDirectionComboBox"
Grid.Column="1"
Grid.Row="2"
ItemsSource="{Binding Source={StaticResource ToastSlidingDirectionEnumData}}"
Tag="{Binding SelectedItem, ElementName=toastLocationComboBox}"
Margin="5"
VerticalContentAlignment="Center">
<ComboBox.Style>
<Style TargetType="{x:Type ComboBox}">
<Setter Property="SelectedIndex"
Value="1" />
<Setter Property="IsEnabled"
Value="True" />
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Tag, RelativeSource={RelativeSource Self}}"
Value="{x:Static xctk:MaterialToastLocationEnum.Right}">
<Setter Property="SelectedIndex"
Value="0" />
<Setter Property="IsEnabled"
Value="False" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=Tag, RelativeSource={RelativeSource Self}}"
Value="{x:Static xctk:MaterialToastLocationEnum.Left}">
<Setter Property="SelectedIndex"
Value="0" />
<Setter Property="IsEnabled"
Value="False" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=Tag, RelativeSource={RelativeSource Self}}"
Value="{x:Static xctk:MaterialToastLocationEnum.Top}">
<Setter Property="SelectedIndex"
Value="1" />
<Setter Property="IsEnabled"
Value="False" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=Tag, RelativeSource={RelativeSource Self}}"
Value="{x:Static xctk:MaterialToastLocationEnum.Bottom}">
<Setter Property="SelectedIndex"
Value="1" />
<Setter Property="IsEnabled"
Value="False" />
</DataTrigger>
</Style.Triggers>
</Style>
</ComboBox.Style>
</ComboBox>
<TextBlock Grid.Column="0"
Grid.Row="3"
Text="Corner Radius: "
VerticalAlignment="Center" />
<xctk:IntegerUpDown x:Name="toastCornerRadiusIntegerUpDown"
Grid.Column="1"
Grid.Row="3"
Value="2"
Minimum="0"
Maximum="30"
Increment="1"
Margin="5"
VerticalContentAlignment="Center" />
<!-- Second Column -->
<TextBlock Grid.Column="2"
Text="Display Time: "
VerticalAlignment="Center"
Margin="7,0,0,0" />
<xctk:IntegerUpDown x:Name="toastDisplayTimeIntegerUpDown"
Grid.Column="3"
Value="3000"
Minimum="0"
Maximum="10000"
Increment="500"
Margin="5"
VerticalContentAlignment="Center"
ToolTip="Duration in milliseconds for displaying a toast after it's completely popped in and before it starts popping out. 0 will keep the toast popped in." />
<TextBlock Grid.Column="2"
Grid.Row="1"
Text="Hide On Click: "
VerticalAlignment="Center"
Margin="7,0,0,0" />
<CheckBox x:Name="toastHideOnclickCheckBox"
Grid.Column="3"
Grid.Row="1"
IsChecked="False"
Margin="5"
VerticalContentAlignment="Center"
ToolTip="When true, clicking anywhere on a toast will close it." />
<TextBlock Grid.Column="2"
Grid.Row="2"
Text="Material Accent Brush: "
VerticalAlignment="Center"
Margin="7,0,0,0"/>
<ComboBox x:Name="toastMaterialAccentBrushComboBox"
Grid.Column="3"
Grid.Row="2"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding MaterialBrushes[6], RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
Width="95"
ItemTemplate="{StaticResource ColorItemTemplate}"
Margin="5"/>
<!-- Third Column-->
<TextBlock Grid.Column="4"
Grid.Row="0"
Text="Is Close Button Visible: "
VerticalAlignment="Center"
Margin="7,0,0,0" />
<CheckBox x:Name="toastIsCloseButtonVisibleCheckBox"
Grid.Column="5"
Grid.Row="0"
IsChecked="False"
Margin="5"
VerticalContentAlignment="Center" />
<TextBlock Grid.Column="4"
Grid.Row="1"
Text="Close Button Style: "
VerticalAlignment="Center"
Margin="7,0,0,0"
IsEnabled="{Binding IsChecked, ElementName=toastIsCloseButtonVisibleCheckBox}"
Style="{StaticResource DisableGrayText}" />
<ComboBox x:Name="toastClosebuttonStyleComboBox"
Grid.Column="5"
Grid.Row="1"
Width="85"
Margin="5"
SelectedIndex="0"
HorizontalAlignment="Left"
VerticalContentAlignment="Center"
IsEnabled="{Binding IsChecked, ElementName=toastIsCloseButtonVisibleCheckBox}"
Style="{StaticResource DisableGrayComboBox}">
<ComboBoxItem Content="Default"
Tag="{x:Null}" />
<ComboBoxItem Content="OK Button"
Tag="{StaticResource MaterialToastCloseButtonStyle1}" />
</ComboBox>
<Button Grid.Row="2"
Grid.Column="4"
Grid.ColumnSpan="2"
Content="Pop Toast!"
Margin="7,0,0,0"
Padding="5"
Click="ToastButton_Click" />
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<Border x:Name="lightBlueBorder"
Background="LightBlue"
Width="300"
Height="280"
Margin="20" />
<Border x:Name="greenBlueBorder"
Background="LightGreen"
Width="300"
Height="280"
Margin="20" />
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialToast.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialToast.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

66
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MaterialToolTipView.xaml.txt

@ -25,7 +25,6 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
<Run>A ToolTip with animations when opening. It is using the Material Brushes.</Run> <Run>A ToolTip with animations when opening. It is using 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>
@ -33,10 +32,9 @@
<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>
<local:DemoView.Resources> <local:DemoView.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
@ -45,70 +43,10 @@
</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="Auto" />
</Grid.ColumnDefinitions>
<!--First Column-->
<TextBlock Grid.Column="0"
Grid.Row="0"
Text="Material Accent Brush: "
VerticalAlignment="Center" />
<ComboBox x:Name="materialAccentBrushComboBox"
Grid.Column="1"
Grid.Row="0"
ItemsSource="{Binding MaterialBrushes, RelativeSource={RelativeSource AncestorType={x:Type local:MaterialDemoView}}}"
SelectedItem="{Binding MaterialAccentBrush, ElementName=materialButton}"
ItemTemplate="{StaticResource ColorItemTemplate}"
Width="95"
VerticalAlignment="Center"
Margin="5" />
</Grid>
</GroupBox>
<StackPanel>
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<xctk:MaterialButton x:Name="materialButton"
Content="MaterialButton using MaterialToolTip"
Margin="20"
Padding="5"
HorizontalAlignment="Center">
<xctk:MaterialButton.ToolTip>
<xctk:MaterialToolTip Placement="Mouse"
DataContext="{Binding Path=PlacementTarget, RelativeSource={RelativeSource Self}}"
MaterialAccentBrush="{Binding MaterialAccentBrush}">
<StackPanel Orientation="Horizontal">
<ContentControl>
<ContentControl.Content>
<Path 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="{Binding MaterialAccentBrush}"
Width="15"
Height="15" />
</ContentControl.Content>
</ContentControl>
<TextBlock Text="Press to increment volume."
Margin="5,0,0,0"/>
</StackPanel>
</xctk:MaterialToolTip>
</xctk:MaterialButton.ToolTip>
</xctk:MaterialButton>
</StackPanel>
</StackPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MaterialToolTip.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MaterialToolTip.png" Width="600" Height="400"/>
##END-->
</local:MaterialDemoView> </local:MaterialDemoView>

96
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiCalendarView.xaml.cs.txt

@ -28,100 +28,18 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MultiCalendar.Views
{ {
public MultiCalendarView() public MultiCalendarView()
{ {
#if !OPEN_SOURCE
this.Initialized += new EventHandler( this.MultiCalendarView_Initialized );
#endif
InitializeComponent(); InitializeComponent();
} }
#if !OPEN_SOURCE
private void MultiCalendarView_Initialized( object sender, EventArgs e )
{
int year = System.DateTime.Now.Year;
int month = System.DateTime.Now.Month;
_multiCalendar.DisplayDateStart = new System.DateTime( year - 1, 1, 1 );
_multiCalendar.DisplayDateEnd = new System.DateTime( year + 3, 12, 31 );
_multiCalendar2.DisplayDateStart = new System.DateTime( year, month, 1 );
var endYear = (month <= 9) ? year : year + 1;
var endMonth = (month + 3) % 12;
var endDay = System.DateTime.DaysInMonth( endYear, endMonth );
var endDate = new System.DateTime( endYear, endMonth, endDay );
_multiCalendar2.DisplayDateEnd = endDate;
_multiCalendar2.HighlightedDates.Add( new System.DateTime( year, month, 12 ) );
_multiCalendar2.HighlightedDates.Add( new System.DateTime( year, month, 20 ) );
_multiCalendar2.SelectedDates.Add( new System.DateTime( year, month, 21 ) );
_multiCalendar2.SelectedDates.Add( new System.DateTime( year, month, 22 ) );
_multiCalendar2.SelectedDates.Add( new System.DateTime( year, month, 23 ) );
var blackoutStart = _multiCalendar2.DisplayDateStart.AddMonths( 1 );
blackoutStart.AddDays( 10 );
_multiCalendar2.BlackoutDates.Add( new CalendarDateRange( blackoutStart.AddDays( 10 ), blackoutStart.AddDays( 15 ) ) );
}
private void BlackoutDates_Click( object sender, RoutedEventArgs e )
{
var cb = sender as CheckBox;
_multiCalendar.BlackoutDates.Clear();
if( cb.IsChecked.HasValue && cb.IsChecked.Value )
{
//We don't want to blackout selected dates
_multiCalendar.SelectedDates.Clear();
var firstDate = _multiCalendar.FirstDisplayedDate;
// Current Month
var startDate = new System.DateTime( firstDate.Year, firstDate.Month, 8 );
var endDate = new System.DateTime( firstDate.Year, firstDate.Month, 14 );
_multiCalendar.BlackoutDates.Add( new CalendarDateRange( startDate, endDate ) );
// Next Month
startDate = startDate.AddMonths( 1 );
endDate = endDate.AddMonths( 1 );
_multiCalendar.BlackoutDates.Add( new CalendarDateRange( startDate, endDate ) );
}
}
private void HighlightedDates_Click( object sender, RoutedEventArgs e )
{
var cb = sender as CheckBox;
_multiCalendar.HighlightedDates.Clear();
if( cb.IsChecked.HasValue && cb.IsChecked.Value )
{
for( int i = 0; i < 3; i++ )
{
System.DateTime date = _multiCalendar.FirstDisplayedDate.AddMonths( i );
for( int j = 1; j < 5; j++ )
{
_multiCalendar.HighlightedDates.Add( new System.DateTime( date.Year, date.Month, j * 5 ) );
}
}
}
}
private void MonthlyBackgrounds_Click( object sender, RoutedEventArgs e )
{
var cb = sender as CheckBox;
_multiCalendar2.MonthlyBackgrounds.Clear();
if( cb.IsChecked.HasValue && cb.IsChecked.Value )
{
// TODO : Replace these test images with our own custom examples
_multiCalendar2.MonthlyBackgrounds.Add( new MonthlyBackgroundData( 1, new SolidColorBrush( System.Windows.Media.Color.FromArgb(128, 0, 0, 255 ) ) ) );
_multiCalendar2.MonthlyBackgrounds.Add( new MonthlyBackgroundData( 2, new Uri( "pack://application:,,,/Xceed.Wpf.Toolkit.LiveExplorer;component/Samples/MultiCalendar/Resources/February.jpg", UriKind.RelativeOrAbsolute ), 0.2 ) );
_multiCalendar2.MonthlyBackgrounds.Add( new MonthlyBackgroundData( 3, new Uri( "pack://application:,,,/Xceed.Wpf.Toolkit.LiveExplorer;component/Samples/MultiCalendar/Resources/March.jpg", UriKind.RelativeOrAbsolute ), 0.5 ) );
_multiCalendar2.MonthlyBackgrounds.Add( new MonthlyBackgroundData( 4, new Uri( "pack://application:,,,/Xceed.Wpf.Toolkit.LiveExplorer;component/Samples/MultiCalendar/Resources/April.jpg", UriKind.RelativeOrAbsolute ), 0.2 ) );
_multiCalendar2.MonthlyBackgrounds.Add( new MonthlyBackgroundData( 5, new SolidColorBrush( System.Windows.Media.Color.FromArgb( 128, 0, 255, 0 ) ) ) );
_multiCalendar2.MonthlyBackgrounds.Add( new MonthlyBackgroundData( 6, new Uri( "pack://application:,,,/Xceed.Wpf.Toolkit.LiveExplorer;component/Samples/MultiCalendar/Resources/June.jpg", UriKind.RelativeOrAbsolute ), 0.5 ) );
_multiCalendar2.MonthlyBackgrounds.Add( new MonthlyBackgroundData( 7, new Uri( "pack://application:,,,/Xceed.Wpf.Toolkit.LiveExplorer;component/Samples/MultiCalendar/Resources/July.jpg", UriKind.RelativeOrAbsolute ), 0.2 ) );
_multiCalendar2.MonthlyBackgrounds.Add( new MonthlyBackgroundData( 8, new SolidColorBrush( System.Windows.Media.Color.FromArgb( 128, 255, 0, 0 ) ) ) );
_multiCalendar2.MonthlyBackgrounds.Add( new MonthlyBackgroundData( 9, new Uri( "pack://application:,,,/Xceed.Wpf.Toolkit.LiveExplorer;component/Samples/MultiCalendar/Resources/September.jpg", UriKind.RelativeOrAbsolute ), 0.5 ) );
_multiCalendar2.MonthlyBackgrounds.Add( new MonthlyBackgroundData( 10, new Uri( "pack://application:,,,/Xceed.Wpf.Toolkit.LiveExplorer;component/Samples/MultiCalendar/Resources/October.jpg", UriKind.RelativeOrAbsolute ), 0.2 ) );
_multiCalendar2.MonthlyBackgrounds.Add( new MonthlyBackgroundData( 11, new SolidColorBrush( System.Windows.Media.Color.FromArgb( 128, 255, 255, 255 ) ) ) );
_multiCalendar2.MonthlyBackgrounds.Add( new MonthlyBackgroundData( 12, new Uri( "pack://application:,,,/Xceed.Wpf.Toolkit.LiveExplorer;component/Samples/MultiCalendar/Resources/December.jpg", UriKind.RelativeOrAbsolute ), 0.5 ) );
}
}
#endif
} }
} }

785
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiCalendarView.xaml.txt

@ -30,7 +30,6 @@
<LineBreak /> <LineBreak />
<LineBreak /> <LineBreak />
<Run>The Background/Foreground of any CalendarDayButton can be easily customized based on its state(selected/highlighted/blackout/mouseOver/focused/today) and the background of any Calendar can be customized with an image or a brush.</Run> <Run>The Background/Foreground of any CalendarDayButton can be easily customized based on its state(selected/highlighted/blackout/mouseOver/focused/today) and the background of any Calendar can be customized with an image or a brush.</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>
@ -38,728 +37,72 @@
<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:SolidColorBrushToColorConverter x:Key="SolidColorBrushToColorConverter"/>
<conv:ThicknessToDoubleConverter x:Key="ThicknessToDoubleConverter"/>
<ObjectDataProvider x:Key="SelectModes"
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="CalendarSelectionMode" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ObjectDataProvider x:Key="OrientationModes"
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="Orientation" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<Style x:Key="ButtonStyle1Base"
TargetType="Button">
<Setter Property="Background"
Value="Green" />
<Setter Property="Foreground"
Value="White" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Cursor="Hand"
Background="{TemplateBinding Background}"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<ContentPresenter Margin="2" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Opacity"
Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Background"
Value="LightGreen" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="NextButtonStyle1"
TargetType="Button"
BasedOn="{StaticResource ButtonStyle1Base}">
<Setter Property="Content"
Value="Next"/>
</Style>
<Style x:Key="PreviousButtonStyle1"
TargetType="Button"
BasedOn="{StaticResource ButtonStyle1Base}">
<Setter Property="Content"
Value="Prev" />
</Style>
<Style x:Key="ButtonStyle2Base"
TargetType="Button"
BasedOn="{StaticResource ButtonStyle1Base}">
<Setter Property="Background"
Value="Blue" />
<Style.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Background"
Value="LightBlue" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="NextButtonStyle2"
TargetType="Button"
BasedOn="{StaticResource ButtonStyle2Base}">
<Setter Property="Content">
<Setter.Value>
<Path Stroke="White"
Data="M 3 10 L 8 5 L 3 0"
Stretch="Uniform"
Margin="3"/>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="PreviousButtonStyle2"
TargetType="Button"
BasedOn="{StaticResource ButtonStyle2Base}">
<Setter Property="Content">
<Setter.Value>
<Path Stroke="White"
Data="M 3 10 L -2 5 L 3 0"
Stretch="Uniform"
Margin="3" />
</Setter.Value>
</Setter>
</Style>
<Style x:Key="HeaderButtonStyle1"
TargetType="Button">
<Setter Property="FontWeight"
Value="Bold" />
<Setter Property="Focusable"
Value="False" />
<Setter Property="FontSize"
Value="15" />
<Setter Property="Background"
Value="Green" />
<Setter Property="Foreground"
Value="White" />
<Setter Property="Margin"
Value="1" />
<Setter Property="HorizontalContentAlignment"
Value="Center" />
<Setter Property="VerticalContentAlignment"
Value="Center" />
<Setter Property="HorizontalAlignment"
Value="Center" />
<Setter Property="VerticalAlignment"
Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Cursor="Hand"
BorderBrush="Yellow"
BorderThickness="2"
CornerRadius="3"
Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="1"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Background"
Value="Gray" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="HeaderButtonStyle2"
TargetType="Button">
<Setter Property="Focusable"
Value="False" />
<Setter Property="Background"
Value="Transparent"/>
<Setter Property="BorderThickness"
Value="0"/>
<Setter Property="FontStyle"
Value="Italic"/>
<Setter Property="Foreground"
Value="Blue" />
<Setter Property="Margin"
Value="1" />
</Style>
<DataTemplate x:Key="DayTitleTemplate1">
<TextBlock Foreground="#FF333333"
FontWeight="Bold"
FontSize="9.5"
FontFamily="Verdana"
Margin="0,6,0,6"
Text="{Binding}"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</DataTemplate>
<DataTemplate x:Key="DayTitleTemplate2">
<TextBlock Foreground="Green"
FontWeight="Bold"
FontSize="15"
FontStyle="Italic"
Text="{Binding}"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</DataTemplate>
<DataTemplate x:Key="BlackoutTemplate1">
<Border Background="Red"
Margin="5,4" />
</DataTemplate>
<DataTemplate x:Key="BlackoutTemplate2">
<Path Margin="3"
Fill="Red"
Stretch="Fill"
Data="M8.1772461,11.029181 L10.433105,11.029181 L11.700684,12.801641 L12.973633,11.029181 L15.191895,11.029181 L12.844727,13.999395 L15.21875,17.060919 L12.962891,17.060919 L11.673828,15.256231 L10.352539,17.060919 L8.1396484,17.060919 L10.519043,14.042364 z" />
</DataTemplate>
<DataTemplate x:Key="BlackoutDefaultTemplate">
<Path Opacity="0.2"
Margin="3"
Fill="#FF000000"
Stretch="Fill"
Data="M8.1772461,11.029181 L10.433105,11.029181 L11.700684,12.801641 L12.973633,11.029181 L15.191895,11.029181 L12.844727,13.999395 L15.21875,17.060919 L12.962891,17.060919 L11.673828,15.256231 L10.352539,17.060919 L8.1396484,17.060919 L10.519043,14.042364 z" />
</DataTemplate>
</local:DemoView.Resources>
<TabControl>
<TabItem Header="Main">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<GroupBox Header="Features"
Margin="5">
<GroupBox.Resources>
<Style x:Key="TextBlockStyle"
TargetType="TextBlock">
<Setter Property="Width"
Value="130" />
<Setter Property="Margin"
Value="0,10,0,0" />
<Setter Property="VerticalAlignment"
Value="Center" />
</Style>
</GroupBox.Resources>
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!--first Column-->
<StackPanel Grid.Column="0">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Selection Mode:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<ComboBox Width="110"
ItemsSource="{Binding Source={StaticResource SelectModes}}"
SelectedItem="{Binding SelectionMode, ElementName=_multiCalendar}"
ToolTip="Gets/Sets the Selection mode used for the control."
Margin="0,10,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Orientation:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<ComboBox VerticalAlignment="Center"
Width="110"
Margin="0,10,0,0"
ToolTip="Gets/Sets the Orientation used for the control."
ItemsSource="{Binding Source={StaticResource OrientationModes}}"
SelectedItem="{Binding Orientation, ElementName=_multiCalendar}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Month Count:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<xctk:IntegerUpDown Minimum="1"
Maximum="36"
VerticalAlignment="Center"
Margin="0,10,0,0"
ToolTip="Gets/Sets how many calendars are displayed."
Value="{Binding MonthCount, ElementName=_multiCalendar}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Row Count:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<xctk:IntegerUpDown Minimum="1"
Maximum="18"
VerticalAlignment="Center"
Margin="0,10,0,0"
ToolTip="Gets/Sets how many rows are used to display the calendars."
Value="{Binding RowCount, ElementName=_multiCalendar}" />
<TextBlock Text=" *"
Style="{StaticResource TextBlockStyle}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Column Count:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<xctk:IntegerUpDown Minimum="1"
Maximum="18"
VerticalAlignment="Center"
Margin="0,10,0,0"
ToolTip="Gets/Sets how many columns are used to display the calendars."
Value="{Binding ColumnCount, ElementName=_multiCalendar}" />
<TextBlock Text=" *"
Style="{StaticResource TextBlockStyle}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Display Date Start:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<DatePicker Width="110"
Margin="0,10,0,0"
HorizontalContentAlignment="Left"
ToolTip="Gets/Sets the first Calendar of the MultiCalendar control."
SelectedDate="{Binding DisplayDateStart, ElementName=_multiCalendar}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Display Date End:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<DatePicker Width="110"
Margin="0,10,0,0"
HorizontalContentAlignment="Left"
ToolTip="Gets/Sets the last Calendar of the MultiCalendar control."
SelectedDate="{Binding DisplayDateEnd, ElementName=_multiCalendar}" />
</StackPanel>
</StackPanel>
<!--Second Column-->
<StackPanel Grid.Column="1">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Selected Date:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<TextBlock Style="{StaticResource TextBlockStyle}"
ToolTip="Gets/Sets the selected date of the MultiCalendar control."
Text="{Binding SelectedDate, ElementName=_multiCalendar, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Selected Dates:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<ListBox Height="100"
Width="150"
Margin="0,10,0,0"
ToolTip="Gets/Sets the Selected dates collection of the MultiCalendar control."
ItemsSource="{Binding SelectedDates, ElementName=_multiCalendar, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="BlackoutDates:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<CheckBox Width="80"
Margin="0,10,0,0"
ToolTip="Gets/Sets the blackout dates collection of the MultiCalendar control."
Click="BlackoutDates_Click" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="HighlightedDates:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<CheckBox Width="80"
Margin="0,10,0,0"
ToolTip="Gets/Sets the highlighted dates collection of the MultiCalendar control."
Click="HighlightedDates_Click" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Hide Inactive Dates:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<CheckBox Width="80"
Margin="0,10,0,0"
ToolTip="Gets/Sets if inactive dates are hidden."
IsChecked="{Binding HideInactiveDates, ElementName=_multiCalendar}" />
</StackPanel>
</StackPanel>
<!-- //# TODODOC-->
<TextBlock Grid.Row="1"
Grid.ColumnSpan="2"
Margin="0,10,0,0"
TextWrapping="WrapWithOverflow"
Text="* The value is adjusted automatically when MonthCount changes. However, as soon as a custom value is assigned manually, this custom value will remain and no longer be adjusted automatically." />
</Grid>
</GroupBox>
<StackPanel Grid.Row="1"
Margin="10">
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<ScrollViewer HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
MaxHeight="400">
<xctk:MultiCalendar x:Name="_multiCalendar"
MonthCount="3"
Orientation="Horizontal"
SelectionMode="SingleRange" />
</ScrollViewer>
</StackPanel>
</Grid>
</TabItem>
<TabItem Header="Customization">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<GroupBox Header="Features"
Margin="5">
<GroupBox.Resources>
<Style x:Key="TextBlockStyle"
TargetType="TextBlock">
<Setter Property="Width"
Value="180" />
<Setter Property="Margin"
Value="0,5,0,0" />
<Setter Property="VerticalAlignment"
Value="Center" />
</Style>
<Style x:Key="TextBlockStyle2"
TargetType="TextBlock"
BasedOn="{StaticResource TextBlockStyle}">
<Setter Property="Width"
Value="230" />
</Style>
</GroupBox.Resources>
<Grid Margin="5,0,5,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- first Column-->
<StackPanel Grid.Column="0">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendars Background:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<xctk:ColorPicker Width="85"
ToolTip="Gets/Sets the Background used for each individual calendar of the MultiCalendar control. MonthlyBackgrounds property should not be set in order to use this property."
SelectedColor="{Binding CalendarsBackground, ElementName=_multiCalendar2, Converter={StaticResource SolidColorBrushToColorConverter}}"
Margin="0,5,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendars BorderBrush:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<xctk:ColorPicker Width="85"
ToolTip="Gets/Sets the BorderBrush used for each individual calendar of the MultiCalendar control."
SelectedColor="{Binding CalendarsBorderBrush, ElementName=_multiCalendar2, Converter={StaticResource SolidColorBrushToColorConverter}}"
Margin="0,5,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendars BorderThickness:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<xctk:DoubleUpDown Width="85"
ToolTip="Gets/Sets the BorderThickness used for each individual calendar of the MultiCalendar control."
Value="{Binding CalendarsBorderThickness, ElementName=_multiCalendar2, Converter={StaticResource ThicknessToDoubleConverter}}"
Maximum="5"
Minimum="0"
Margin="0,5,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendar Header Button Style:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<ComboBox Width="85"
Margin="0,5,0,0"
ToolTip="Gets/Sets the Header Button style used for each individual calendar of the MultiCalendar control."
SelectedValue="{Binding CalendarHeaderButtonStyle, ElementName=_multiCalendar2}"
SelectedValuePath="Tag">
<ComboBoxItem Tag="{StaticResource HeaderButtonStyle1}"
Content="Style1" />
<ComboBoxItem Tag="{StaticResource HeaderButtonStyle2}"
Content="Style2" />
<ComboBoxItem Tag="{x:Null}"
Content="Default" />
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendar Day Title DataTemplate:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<ComboBox Width="85"
Margin="0,5,0,0"
ToolTip="Gets/Sets the day dataTemplate used in each individual calendar of the MultiCalendar control."
SelectedValue="{Binding CalendarDayTitleDataTemplate, ElementName=_multiCalendar2}"
SelectedValuePath="Tag">
<ComboBoxItem Tag="{StaticResource DayTitleTemplate1}"
Content="Default" />
<ComboBoxItem Tag="{StaticResource DayTitleTemplate2}"
Content="Template1" />
<ComboBoxItem Tag="{x:Null}"
Content="Null" />
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Next Button Style:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<ComboBox Width="85"
Margin="0,5,0,0"
ToolTip="Gets/Sets the Next Button style of the MultiCalendar control."
SelectedValue="{Binding NextButtonStyle, ElementName=_multiCalendar2}"
SelectedValuePath="Tag">
<ComboBoxItem Tag="{StaticResource NextButtonStyle1}"
Content="Style1"/>
<ComboBoxItem Tag="{StaticResource NextButtonStyle2}"
Content="Style2" />
<ComboBoxItem Tag="{x:Null}"
Content="Default" />
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Previous Button Style:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<ComboBox Width="85"
Margin="0,5,0,0"
ToolTip="Gets/Sets the Previous Button style of the MultiCalendar control."
SelectedValue="{Binding PreviousButtonStyle, ElementName=_multiCalendar2}"
SelectedValuePath="Tag">
<ComboBoxItem Tag="{StaticResource PreviousButtonStyle1}"
Content="Style1" />
<ComboBoxItem Tag="{StaticResource PreviousButtonStyle2}"
Content="Style2" />
<ComboBoxItem Tag="{x:Null}"
Content="Default" />
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Monthly Backgrounds:"
Style="{StaticResource TextBlockStyle}" />
<!-- //# TODODOC-->
<CheckBox Width="85"
Margin="0,5,0,0"
ToolTip="Gets/Sets the monthly backgrounds collection of the MultiCalendar control."
Click="MonthlyBackgrounds_Click" />
</StackPanel>
</StackPanel>
<!--second column-->
<StackPanel Grid.Column="1">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendar Button Hightlighted Background:"
Style="{StaticResource TextBlockStyle2}" />
<!-- //# TODODOC-->
<xctk:ColorPicker Width="85"
ToolTip="Gets/Sets the Background used for highlighted dates in the MultiCalendar control."
SelectedColor="{Binding CalendarButtonHighlightedBackground, ElementName=_multiCalendar2, Converter={StaticResource SolidColorBrushToColorConverter}}"
Margin="0,5,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendar Button Hightlighted Foreground:"
Style="{StaticResource TextBlockStyle2}" />
<!-- //# TODODOC-->
<xctk:ColorPicker Width="85"
ToolTip="Gets/Sets the Foreground used for highlighted dates in the MultiCalendar control."
SelectedColor="{Binding CalendarButtonHighlightedForeground, ElementName=_multiCalendar2, Converter={StaticResource SolidColorBrushToColorConverter}}"
Margin="0,5,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendar Button Selected Background:"
Style="{StaticResource TextBlockStyle2}" />
<!-- //# TODODOC-->
<xctk:ColorPicker Width="85"
ToolTip="Gets/Sets the Background used for selected dates in the MultiCalendar control."
SelectedColor="{Binding CalendarButtonSelectedBackground, ElementName=_multiCalendar2, Converter={StaticResource SolidColorBrushToColorConverter}}"
Margin="0,5,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendar Button Selected Foreground:"
Style="{StaticResource TextBlockStyle2}" />
<!-- //# TODODOC-->
<xctk:ColorPicker Width="85"
ToolTip="Gets/Sets the Foreground used for selected dates in the MultiCalendar control."
SelectedColor="{Binding CalendarButtonSelectedForeground, ElementName=_multiCalendar2, Converter={StaticResource SolidColorBrushToColorConverter}}"
Margin="0,5,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendar Button Today Background:"
Style="{StaticResource TextBlockStyle2}" />
<!-- //# TODODOC-->
<xctk:ColorPicker Width="85"
ToolTip="Gets/Sets the Background used for today date in the MultiCalendar control."
SelectedColor="{Binding CalendarButtonTodayBackground, ElementName=_multiCalendar2, Converter={StaticResource SolidColorBrushToColorConverter}}"
Margin="0,5,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendar Button Today Foreground:"
Style="{StaticResource TextBlockStyle2}" />
<!-- //# TODODOC-->
<xctk:ColorPicker Width="85"
ToolTip="Gets/Sets the Foreground used for today date in the MultiCalendar control."
SelectedColor="{Binding CalendarButtonTodayForeground, ElementName=_multiCalendar2, Converter={StaticResource SolidColorBrushToColorConverter}}"
Margin="0,5,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendar Button MouseOver Background:"
Style="{StaticResource TextBlockStyle2}" />
<!-- //# TODODOC-->
<xctk:ColorPicker Width="85"
ToolTip="Gets/Sets the Background used for the date under the mouse in the MultiCalendar control."
SelectedColor="{Binding CalendarButtonMouseOverBackground, ElementName=_multiCalendar2, Converter={StaticResource SolidColorBrushToColorConverter}}"
Margin="0,5,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendar Button MouseOver Foreground:"
Style="{StaticResource TextBlockStyle2}" />
<!-- //# TODODOC-->
<xctk:ColorPicker Width="85"
ToolTip="Gets/Sets the Foreground used for the date under the mouse in the MultiCalendar control."
SelectedColor="{Binding CalendarButtonMouseOverForeground, ElementName=_multiCalendar2, Converter={StaticResource SolidColorBrushToColorConverter}}"
Margin="0,5,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendar Button CurrentDate BorderBrush:"
Style="{StaticResource TextBlockStyle2}" />
<!-- //# TODODOC-->
<xctk:ColorPicker Width="85"
ToolTip="Gets/Sets the BorderBrush used for the current date in the MultiCalendar control."
SelectedColor="{Binding CalendarButtonCurrentDateBorderBrush, ElementName=_multiCalendar2, Converter={StaticResource SolidColorBrushToColorConverter}}"
Margin="0,5,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Calendar Button Blackout DataTemplate:"
Style="{StaticResource TextBlockStyle2}" />
<!-- //# TODODOC-->
<ComboBox Width="85"
Margin="0,5,0,0"
ToolTip="Gets/Sets the Blackout DataTemplate used for the Blackout dates in the MultiCalendar control."
SelectedValue="{Binding CalendarButtonBlackoutDataTemplate, ElementName=_multiCalendar2}"
SelectedValuePath="Tag">
<ComboBoxItem Tag="{StaticResource BlackoutTemplate1}"
Content="Template1" />
<ComboBoxItem Tag="{StaticResource BlackoutTemplate2}"
Content="Template2" />
<ComboBoxItem Tag="{StaticResource BlackoutDefaultTemplate}"
Content="Default" />
</ComboBox>
</StackPanel>
</StackPanel>
</Grid>
</GroupBox>
<StackPanel Grid.Row="1"
Margin="10">
<TextBlock Text="Usage:"
Style="{StaticResource Header}" />
<ScrollViewer HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
MaxHeight="400">
<xctk:MultiCalendar x:Name="_multiCalendar2"
SelectionMode="SingleRange"
MonthCount="3"
CalendarsBackground="White"
CalendarsBorderBrush="Blue"
CalendarsBorderThickness="0"
NextButtonStyle="{x:Null}"
PreviousButtonStyle="{x:Null}"
CalendarHeaderButtonStyle="{x:Null}"
CalendarDayTitleDataTemplate="{StaticResource DayTitleTemplate1}"
CalendarButtonHighlightedBackground="Yellow"
CalendarButtonHighlightedForeground="Black"
CalendarButtonSelectedBackground="Blue"
CalendarButtonSelectedForeground="White"
CalendarButtonTodayBackground="Gray"
CalendarButtonTodayForeground="White"
CalendarButtonMouseOverBackground="LightBlue"
CalendarButtonMouseOverForeground="Black"
CalendarButtonCurrentDateBorderBrush="DarkOrange"
CalendarButtonBlackoutDataTemplate="{StaticResource BlackoutDefaultTemplate}"/>
</ScrollViewer>
</StackPanel>
</Grid>
</TabItem>
</TabControl>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MultiCalendar.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\MultiCalendar.png" Width="600" Height="400"/>
##END-->
</local:DemoView> </local:DemoView>

25
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiColumnComboBoxView.xaml.cs.txt

@ -30,32 +30,9 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.DataGrid.Views
{ {
public MultiColumnComboBoxView() public MultiColumnComboBoxView()
{ {
#if !OPEN_SOURCE
this.DataContext = SampleDataProvider.GetOrders();
#endif
InitializeComponent(); InitializeComponent();
} }
#if !OPEN_SOURCE
private void OnGroupCheck( object sender, System.Windows.RoutedEventArgs e )
{
DataGridCollectionView collectionView = ( DataGridCollectionView )_combo.ItemsSource;
bool isChecked = ( ( CheckBox )sender ).IsChecked.GetValueOrDefault( false );
bool isGrouped = ( collectionView.GroupDescriptions.Count > 0 );
if( isGrouped != isChecked )
{
if( isChecked )
{
collectionView.GroupDescriptions.Add( new PropertyGroupDescription( "ShipCountry" ) );
collectionView.GroupDescriptions.Add( new PropertyGroupDescription( "ShipCity" ) );
}
else
{
collectionView.GroupDescriptions.Clear();
}
}
}
#endif
} }
} }

136
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/MultiColumnComboBoxView.xaml.txt

@ -24,137 +24,25 @@
<local:DemoView.Description> <local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe"> <Paragraph FontSize="14" FontFamily="Segoe">
<Run>The multi-column combo box uses the power of Xceed's datagrid control to create an advanced ComboBox.</Run> <Run>The multi-column combo box uses the power of Xceed's datagrid control to create an advanced ComboBox.</Run>
<!--##INCLUDE_OPEN_SOURCE
<LineBreak /> <LineBreak />
<Run>This Control is only available in the "Plus" version.</Run> <Run>This Control 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>
<xcdg:DataGridCollectionViewSource x:Key="cvsOrder"
Source="{Binding}" >
<xcdg:DataGridCollectionViewSource.GroupDescriptions>
<PropertyGroupDescription PropertyName="ShipCountry" />
<PropertyGroupDescription PropertyName="ShipCity" />
</xcdg:DataGridCollectionViewSource.GroupDescriptions>
</xcdg:DataGridCollectionViewSource>
<!--Important! Base the style on the predefined default style for the DataGrid-->
<Style x:Key="baseStyle" TargetType="{x:Type xcdg:DataGridControl}"
BasedOn="{StaticResource {x:Static xcdg:MultiColumnComboBox.DefaultDataGridStyleResourceKey}}">
<Setter Property="View">
<Setter.Value>
<!-- Setting a view to allow group drop-down navigation. -->
<!-- Because it declare a new view, this style can only -->
<!-- be used by one MultiColumnComboBox instance -->
<xcdg:TableflowView />
</Setter.Value>
</Setter>
</Style>
<Style x:Key="coloredDataGridStyle" TargetType="{x:Type xcdg:DataGridControl}" BasedOn="{StaticResource baseStyle}" >
<Style.Resources>
<Style TargetType="{x:Type xcdg:DataRow}">
<Setter Property="Background" Value="LemonChiffon" />
</Style>
</Style.Resources>
</Style>
<conv:FlagPathConverter x:Key="flagPathConverter" />
<!-- DataTemplate to display a Country -->
<DataTemplate x:Key="countryDataTemplate">
<StackPanel Orientation="Horizontal"
VerticalAlignment="Center"
Margin="5,0,0,0">
<!--The flagPathConverter resource changes the value of a
group (e.g., "Canada") to an image. -->
<Image MaxHeight="15"
Margin="0, 0, 5, 0"
Source="{Binding Converter={StaticResource flagPathConverter}}" />
<TextBlock Text="{Binding}"
TextTrimming="WordEllipsis"
VerticalAlignment="Center" />
</StackPanel>
</DataTemplate>
</local:DemoView.Resources>
<StackPanel>
<GroupBox Header="Features" Grid.Row="0" Margin="5">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<!-- Show headers option -->
<TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"
Text="ShowColumnHeaders: "/>
<CheckBox Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Margin="5"
IsChecked="{Binding ShowColumnHeaders, ElementName=_combo}" />
<!-- Show GroupBy control option -->
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center"
Text="ShowGroupByControl: " />
<CheckBox Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="5"
IsChecked="{Binding ShowGroupByControl, ElementName=_combo}" />
<!-- Group source option -->
<TextBlock Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" Margin="10,0,0,0"
Text="Grouped: " />
<CheckBox Grid.Row="0" Grid.Column="3" VerticalAlignment="Center" Margin="5"
IsChecked="True"
Click="OnGroupCheck"/>
<!-- DataGrid Styling -->
<TextBlock Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" Margin="10,0,0,0"
Text="Applied DataGrid Style: "/>
<ComboBox x:Name="styles" Grid.Row="1" Grid.Column="3" SelectedIndex="0" Width="225" VerticalAlignment="Center" Margin="5">
<ComboBoxItem Content="No Style" Tag="{StaticResource baseStyle}" />
<ComboBoxItem Content="Styled with yellow row background" Tag="{StaticResource coloredDataGridStyle}" />
</ComboBox>
</Grid>
</GroupBox>
<TextBlock Text="Usage:" Style="{StaticResource Header}" />
<xcdg:MultiColumnComboBox x:Name="_combo"
Width="200"
HorizontalAlignment="Left"
AutoCreateColumns="False"
ItemsSource="{Binding Source={StaticResource cvsOrder}}"
DataGridStyle="{Binding ElementName=styles, Path=SelectedItem.Tag}">
<xcdg:MultiColumnComboBox.Columns>
<xcdg:Column FieldName="OrderID" Title="Order ID" />
<xcdg:Column FieldName="CustomerID" Title="Customer ID" />
<xcdg:Column FieldName="ShipCountry" Title="Ship Country" CellContentTemplate="{StaticResource countryDataTemplate}"/>
<xcdg:Column FieldName="ShipCity" Title="Ship City" />
</xcdg:MultiColumnComboBox.Columns>
<xcdg:MultiColumnComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding OrderID}" />
<TextBlock Margin="10,0,0,0"
Text="{Binding CustomerID, StringFormat= ({0})}"/>
</StackPanel>
</DataTemplate>
</xcdg:MultiColumnComboBox.ItemTemplate>
</xcdg:MultiColumnComboBox>
</StackPanel>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MultiColumnsComboBox.png" Width="500" Height="300"/> <Image Source="..\OpenSourceImages\MultiColumnsComboBox.png" Width="500" Height="300"/>
##END-->
</local:DemoView> </local:DemoView>

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

@ -26,7 +26,7 @@
The MultiLineTextEditor is a TextBox that allows you to edit text that is too long to display in a regular TextBox. The popup is resizable to accommodate any text. The MultiLineTextEditor is a TextBox that allows you to edit text that is too long to display in a regular TextBox. The popup is resizable to accommodate any text.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<local:DemoView.Resources> <local:DemoView.Resources>
<DataTemplate x:Key="multiLineTextEditorStyle" > <DataTemplate x:Key="multiLineTextEditorStyle" >
<xctk:MultiLineTextEditor <xctk:MultiLineTextEditor
@ -38,7 +38,7 @@
Height="24" /> Height="24" />
</DataTemplate> </DataTemplate>
</local:DemoView.Resources> </local:DemoView.Resources>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />

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

@ -35,7 +35,7 @@
<Run>All these numeric types support the following properties.</Run> <Run>All these numeric types support the following properties.</Run>
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<local:DemoView.Resources> <local:DemoView.Resources>
<x:Array x:Key="FormatStringComboBox" Type="numeric:FormatObject"> <x:Array x:Key="FormatStringComboBox" Type="numeric:FormatObject">
<numeric:FormatObject Value="C2" DisplayValue="Currency" /> <numeric:FormatObject Value="C2" DisplayValue="Currency" />
@ -57,7 +57,7 @@
<x:Type TypeName="xctk:AllowedSpecialValues" /> <x:Type TypeName="xctk:AllowedSpecialValues" />
</ObjectDataProvider.MethodParameters> </ObjectDataProvider.MethodParameters>
</ObjectDataProvider> </ObjectDataProvider>
<ObjectDataProvider x:Key="ButtonSpinnerLocationComboBox" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> <ObjectDataProvider x:Key="ButtonSpinnerLocationComboBox" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters> <ObjectDataProvider.MethodParameters>
<x:Type TypeName="xctk:Location" /> <x:Type TypeName="xctk:Location" />
@ -78,12 +78,12 @@
</Trigger> </Trigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
<sys:String x:Key="allowInputSpecialValuesTooltip">Infinity and -Infinity input will not be accepted if Maximum and/or Minimum values does not allow them.</sys:String> <sys:String x:Key="allowInputSpecialValuesTooltip">Infinity and -Infinity input will not be accepted if Maximum and/or Minimum values does not allow them.</sys:String>
<sys:String x:Key="parsingNumberStyleTooltip">HexNumber is not a valid choice when used with a DoubleUpDown (current control used in this sample). It will work with the following controls: IntegerUpDown, ByteUpDown, LongUpDown, and ShortUpDown.</sys:String> <sys:String x:Key="parsingNumberStyleTooltip">HexNumber is not a valid choice when used with a DoubleUpDown (current control used in this sample). It will work with the following controls: IntegerUpDown, ByteUpDown, LongUpDown, and ShortUpDown.</sys:String>
</local:DemoView.Resources> </local:DemoView.Resources>
<StackPanel> <StackPanel>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
@ -115,7 +115,7 @@
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="125" /> <ColumnDefinition Width="125" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- 1st column --> <!-- 1st column -->
<TextBlock Text="Mouse Wheel:" Grid.Row="0" VerticalAlignment="Center" /> <TextBlock Text="Mouse Wheel:" Grid.Row="0" VerticalAlignment="Center" />
<ComboBox Grid.Row="0" Grid.Column="1" SelectedItem="{Binding MouseWheelActiveTrigger, ElementName=_doubleUpDown}" Margin="5" VerticalAlignment="Center" > <ComboBox Grid.Row="0" Grid.Column="1" SelectedItem="{Binding MouseWheelActiveTrigger, ElementName=_doubleUpDown}" Margin="5" VerticalAlignment="Center" >
@ -127,21 +127,21 @@
<TextBlock Text="Show Button Spinner:" Grid.Row="1" VerticalAlignment="Center" /> <TextBlock Text="Show Button Spinner:" Grid.Row="1" VerticalAlignment="Center" />
<CheckBox Grid.Row="1" Grid.Column="1" IsChecked="{Binding ShowButtonSpinner, ElementName=_doubleUpDown}" ClickMode="Press" Margin="5" VerticalAlignment="Center" /> <CheckBox Grid.Row="1" Grid.Column="1" IsChecked="{Binding ShowButtonSpinner, ElementName=_doubleUpDown}" ClickMode="Press" Margin="5" VerticalAlignment="Center" />
<TextBlock Text="Is Read Only:" Grid.Row="2" VerticalAlignment="Center" ToolTip="Prevent from using button spinners or editing text." /> <TextBlock Text="Is Read Only:" Grid.Row="2" VerticalAlignment="Center" ToolTip="Prevent from using button spinners or editing text." />
<CheckBox Grid.Row="2" Grid.Column="1" IsChecked="{Binding IsReadOnly, ElementName=_doubleUpDown}" ClickMode="Press" Margin="5" VerticalAlignment="Center" /> <CheckBox Grid.Row="2" Grid.Column="1" IsChecked="{Binding IsReadOnly, ElementName=_doubleUpDown}" ClickMode="Press" Margin="5" VerticalAlignment="Center" />
<TextBlock Text="Allow Spin:" Grid.Row="3" VerticalAlignment="Center" /> <TextBlock Text="Allow Spin:" Grid.Row="3" VerticalAlignment="Center" />
<CheckBox Grid.Row="3" Grid.Column="1" IsChecked="{Binding AllowSpin, ElementName=_doubleUpDown}" ClickMode="Press" Margin="5" VerticalAlignment="Center" <CheckBox Grid.Row="3" Grid.Column="1" IsChecked="{Binding AllowSpin, ElementName=_doubleUpDown}" ClickMode="Press" Margin="5" VerticalAlignment="Center"
IsEnabled="{Binding IsReadOnly, ElementName=_doubleUpDown, Converter={StaticResource InverseBoolConverter}}" /> IsEnabled="{Binding IsReadOnly, ElementName=_doubleUpDown, Converter={StaticResource InverseBoolConverter}}" />
<TextBlock Text="Allow TextInput:" Grid.Row="4" VerticalAlignment="Center" /> <TextBlock Text="Allow TextInput:" Grid.Row="4" VerticalAlignment="Center" />
<CheckBox Grid.Row="4" Grid.Column="1" IsChecked="{Binding AllowTextInput, ElementName=_doubleUpDown}" ClickMode="Press" Margin="5" VerticalAlignment="Center" <CheckBox Grid.Row="4" Grid.Column="1" IsChecked="{Binding AllowTextInput, ElementName=_doubleUpDown}" ClickMode="Press" Margin="5" VerticalAlignment="Center"
IsEnabled="{Binding IsReadOnly, ElementName=_doubleUpDown, Converter={StaticResource InverseBoolConverter}}"/> IsEnabled="{Binding IsReadOnly, ElementName=_doubleUpDown, Converter={StaticResource InverseBoolConverter}}"/>
<TextBlock Text="Clip Value to Min Max:" Grid.Row="5" VerticalAlignment="Center" /> <TextBlock Text="Clip Value to Min Max:" Grid.Row="5" VerticalAlignment="Center" />
<CheckBox Grid.Row="5" Grid.Column="1" IsChecked="{Binding ClipValueToMinMax, ElementName=_doubleUpDown, Mode=TwoWay}" ClickMode="Press" Margin="5" VerticalAlignment="Center"/> <CheckBox Grid.Row="5" Grid.Column="1" IsChecked="{Binding ClipValueToMinMax, ElementName=_doubleUpDown, Mode=TwoWay}" ClickMode="Press" Margin="5" VerticalAlignment="Center"/>
<TextBlock Text="DisplayDefaultValueOnEmptyText:" Grid.Row="6" VerticalAlignment="Center" /> <TextBlock Text="DisplayDefaultValueOnEmptyText:" Grid.Row="6" VerticalAlignment="Center" />
<CheckBox Grid.Row="6" Grid.Column="1" IsChecked="{Binding DisplayDefaultValueOnEmptyText, ElementName=_doubleUpDown}" ClickMode="Press" Margin="5" VerticalAlignment="Center" /> <CheckBox Grid.Row="6" Grid.Column="1" IsChecked="{Binding DisplayDefaultValueOnEmptyText, ElementName=_doubleUpDown}" ClickMode="Press" Margin="5" VerticalAlignment="Center" />
@ -160,11 +160,11 @@
<TextBlock Grid.Column="2" Grid.Row="4" Text="Maximum" VerticalAlignment="Center" Margin="10,0,0,0"/> <TextBlock Grid.Column="2" Grid.Row="4" Text="Maximum" VerticalAlignment="Center" Margin="10,0,0,0"/>
<xctk:DoubleUpDown Grid.Column="3" Grid.Row="4" Value="{Binding Maximum, ElementName=_doubleUpDown}" AllowInputSpecialValues="PositiveInfinity" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="5" /> <xctk:DoubleUpDown Grid.Column="3" Grid.Row="4" Value="{Binding Maximum, ElementName=_doubleUpDown}" AllowInputSpecialValues="PositiveInfinity" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="5" />
<!-- 3rd column --> <!-- 3rd column -->
<TextBlock Grid.Column="4" Text="ButtonSpinnerLocation:" VerticalAlignment="Center" Margin="10,0,0,0"/> <TextBlock Grid.Column="4" Text="ButtonSpinnerLocation:" VerticalAlignment="Center" Margin="10,0,0,0"/>
<ComboBox Grid.Column="5" ItemsSource="{Binding Source={StaticResource ButtonSpinnerLocationComboBox}}" SelectedValue="{Binding ButtonSpinnerLocation, ElementName=_doubleUpDown}" HorizontalAlignment="Stretch" Margin="5" /> <ComboBox Grid.Column="5" ItemsSource="{Binding Source={StaticResource ButtonSpinnerLocationComboBox}}" SelectedValue="{Binding ButtonSpinnerLocation, ElementName=_doubleUpDown}" HorizontalAlignment="Stretch" Margin="5" />
<TextBlock Grid.Column="4" Grid.Row="1" Text="ParsingNumberStyle:" VerticalAlignment="Center" Margin="10,0,0,0"/> <TextBlock Grid.Column="4" Grid.Row="1" Text="ParsingNumberStyle:" VerticalAlignment="Center" Margin="10,0,0,0"/>
<ComboBox Grid.Column="5" Grid.Row="1" ItemsSource="{Binding Source={StaticResource ParsingNumberStyleComboBox}}" SelectedValue="{Binding ParsingNumberStyle, ElementName=_doubleUpDown}" ToolTip="{StaticResource parsingNumberStyleTooltip}" HorizontalAlignment="Stretch" Margin="5" /> <ComboBox Grid.Column="5" Grid.Row="1" ItemsSource="{Binding Source={StaticResource ParsingNumberStyleComboBox}}" SelectedValue="{Binding ParsingNumberStyle, ElementName=_doubleUpDown}" ToolTip="{StaticResource parsingNumberStyleTooltip}" HorizontalAlignment="Stretch" Margin="5" />
@ -179,7 +179,7 @@
<TextBlock Text="Text:" Grid.Column="4" Grid.Row="5" VerticalAlignment="Center" Margin="10,0,0,0"/> <TextBlock Text="Text:" Grid.Column="4" Grid.Row="5" VerticalAlignment="Center" Margin="10,0,0,0"/>
<TextBox Grid.Column="5" Grid.Row="5" Text="{Binding Text, ElementName=_doubleUpDown}" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="5" /> <TextBox Grid.Column="5" Grid.Row="5" Text="{Binding Text, ElementName=_doubleUpDown}" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="5" />
<!-- last rows --> <!-- last rows -->
<TextBlock Text="(DoubleUpDown and SingleUpDown support the AllowInputSpecialValues property)" Grid.Row="7" Grid.ColumnSpan="6" VerticalAlignment="Center" Margin="0,5,0,0"/> <TextBlock Text="(DoubleUpDown and SingleUpDown support the AllowInputSpecialValues property)" Grid.Row="7" Grid.ColumnSpan="6" VerticalAlignment="Center" Margin="0,5,0,0"/>
<TextBlock Text="Allow Input Special Values:" VerticalAlignment="Center" Grid.Row="8" Grid.ColumnSpan="2"/> <TextBlock Text="Allow Input Special Values:" VerticalAlignment="Center" Grid.Row="8" Grid.ColumnSpan="2"/>
@ -210,11 +210,11 @@
DefaultValue="10" DefaultValue="10"
Value="25" /> Value="25" />
</StackPanel> </StackPanel>
<TextBlock Grid.Row="2" Margin="10,15,0,0" <TextBlock Grid.Row="2" Margin="10,15,0,0"
Text="CalculatorUpDown is a DecimalUpDown with all the properties from a NumericUpDown. It provides a Calculator dropdown which allows you to perform mathematical calculations." Text="CalculatorUpDown is a DecimalUpDown with all the properties from a NumericUpDown. It provides a Calculator dropdown which allows you to perform mathematical calculations."
TextWrapping="Wrap" /> TextWrapping="Wrap" />
<GroupBox Header="CalculatorUpDown Features" Grid.Row="3" Margin="5,15,0,0"> <GroupBox Header="CalculatorUpDown Features" Grid.Row="3" Margin="5,15,0,0">
<StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Left"> <StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Left">
<TextBlock Text="Enter closes calculator:" VerticalAlignment="Center" /> <TextBlock Text="Enter closes calculator:" VerticalAlignment="Center" />
@ -223,7 +223,7 @@
<xctk:IntegerUpDown Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" Minimum="0" Value="{Binding Precision, ElementName=_calculatorUpDown}" ToolTip="Gets/Sets the maximum number of digits displayed to the right of the decimal point." /> <xctk:IntegerUpDown Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" Minimum="0" Value="{Binding Precision, ElementName=_calculatorUpDown}" ToolTip="Gets/Sets the maximum number of digits displayed to the right of the decimal point." />
</StackPanel> </StackPanel>
</GroupBox> </GroupBox>
<StackPanel Grid.Row="4" Orientation="Horizontal" Margin="10" HorizontalAlignment="Left"> <StackPanel Grid.Row="4" Orientation="Horizontal" Margin="10" HorizontalAlignment="Left">
<TextBlock Text="CalculatorUpDown Usage:" Style="{StaticResource Header}" /> <TextBlock Text="CalculatorUpDown Usage:" Style="{StaticResource Header}" />
<xctk:CalculatorUpDown x:Name="_calculatorUpDown" <xctk:CalculatorUpDown x:Name="_calculatorUpDown"

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

@ -25,8 +25,8 @@
Obviously, the Pie control can be used to create a pie chart. Obviously, the Pie control can be used to create a pie chart.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<local:DemoView.Resources> <local:DemoView.Resources>
<XmlDataProvider x:Key="XMLData"> <XmlDataProvider x:Key="XMLData">
<x:XData> <x:XData>

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

@ -24,7 +24,7 @@
The Pie control properties can be animated to create various effects and controls like this circular progress bar. The Pie control properties can be animated to create various effects and controls like this circular progress bar.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<local:DemoView.Resources> <local:DemoView.Resources>
<ControlTemplate x:Key="PieProgressTemplate" <ControlTemplate x:Key="PieProgressTemplate"
TargetType="{x:Type ProgressBar}"> TargetType="{x:Type ProgressBar}">
@ -69,7 +69,7 @@
</DoubleAnimationUsingKeyFrames> </DoubleAnimationUsingKeyFrames>
</Storyboard> </Storyboard>
</local:DemoView.Resources> </local:DemoView.Resources>
<local:DemoView.Triggers> <local:DemoView.Triggers>
<EventTrigger RoutedEvent="ButtonBase.Click" <EventTrigger RoutedEvent="ButtonBase.Click"
SourceName="SimulateProgressButton"> SourceName="SimulateProgressButton">

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

@ -25,7 +25,7 @@
The Pie shape is a WPF shape that represents a portion of an ellipse. It is in the same shape as a slice of pie (hence the name). More precisely, the Pie shape is represented as either a full ellipse (Slice = 1.0), nothing (Slice = 0.0), or an arc of an ellipse joined to its center by two line segments. The Pie shape is a WPF shape that represents a portion of an ellipse. It is in the same shape as a slice of pie (hence the name). More precisely, the Pie shape is represented as either a full ellipse (Slice = 1.0), nothing (Slice = 0.0), or an arc of an ellipse joined to its center by two line segments.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<local:DemoView.Resources> <local:DemoView.Resources>
<xctk:ColorToSolidColorBrushConverter x:Key="colorConverter" /> <xctk:ColorToSolidColorBrushConverter x:Key="colorConverter" />
</local:DemoView.Resources> </local:DemoView.Resources>

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

@ -37,140 +37,30 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PileFlowPanel.Views
public PileFlowPanelView() public PileFlowPanelView()
{ {
#if !OPEN_SOURCE
this.DataContext = SampleDataProvider.SharedEmployees;
#endif
InitializeComponent(); InitializeComponent();
#if !OPEN_SOURCE
_pileFlowPanel.PileFlowItemActivated += new Xceed.Wpf.Toolkit.PileFlowPanel.PileFlowItemActivatedHandler( this.PileFlowItemActivated );
_pileFlowPanel.PileFlowItemDeactivated += new Xceed.Wpf.Toolkit.PileFlowPanel.PileFlowItemDeactivatedHandler( this.PileFlowItemDeactivated );
ObservableCollection<Product> products = SampleDataProvider.GetProducts();
foreach( Product product in products )
{
this.AddImage( product );
}
#endif
} }
#endregion #endregion
#if !OPEN_SOURCE
#region Event Handlers
private void PileFlowItemActivated( object sender, Xceed.Wpf.Toolkit.PileFlowPanel.PileFlowActivationEventArgs e )
{
//# Modify the text label.
_pileFlowPanel.ContentLabel.Visibility = Visibility.Visible;
_pileFlowLabel.Text = e.Item.Element.Tag as string;
//# Enable the first PileFlowItem.
if( object.Equals( ( ( PileFlowItem )sender ).Element, _employeesPileFlowCard ) )
{
_employeeListBox.IsEnabled = true;
}
}
private void PileFlowItemDeactivated( object sender, EventArgs e )
{
//# Hide the text Label.
_pileFlowPanel.ContentLabel.Visibility = Visibility.Collapsed;
_pileFlowLabel.Text = null;
//# Enable the first PileFlowItem.
if( object.Equals( ( ( PileFlowItem )sender ).Element, _employeesPileFlowCard ) )
{
_employeeListBox.IsEnabled = false;
}
}
private void OnEmployeeButtonPress( object sender, EventArgs e )
{
Xceed.Wpf.Toolkit.MessageBox.Show( "Employee data has been saved.", "Employee", MessageBoxButton.OK, MessageBoxImage.Asterisk);
}
private void OnShowReflectionsClick( object sender, RoutedEventArgs e )
{
CheckBox checkBox = ( CheckBox )sender;
foreach( UIElement item in _pileFlowPanel.Children )
{
if( item is PileFlowCard )
{
(( PileFlowCard )item).ShowReflection = ( bool )checkBox.IsChecked;
}
}
}
private void OnBeginReflectionOpacityChanged( object sender, RoutedPropertyChangedEventArgs<object> e )
{
this.ModifyReflection( sender, true );
}
private void OnEndReflectionOpacityChanged( object sender, RoutedPropertyChangedEventArgs<object> e )
{
this.ModifyReflection( sender, false );
}
#endregion
#endif
#region Implementation #region Implementation
#if !OPEN_SOURCE
private void ModifyReflection( object sender, bool isBeginReflectionOpacity )
{
if( _pileFlowPanel != null )
{
DoubleUpDown opacity = ( DoubleUpDown )sender;
foreach( UIElement item in _pileFlowPanel.Children )
{
if( item is PileFlowCard )
{
PileFlowCard card = ( PileFlowCard )item;
double opacityValue = ( opacity.Value != null ) ? ( double )opacity.Value : 0d;
if( isBeginReflectionOpacity )
{
card.BeginReflectionOpacity = opacityValue;
}
else
{
card.EndReflectionOpacity = opacityValue;
}
}
}
}
}
private void AddImage( Product product )
{
BitmapImage imageSource = null;
byte[] imageBytes = product.Photo;
if( imageBytes != null )
{
Stream imageStream = new MemoryStream( imageBytes );
imageSource = new BitmapImage();
imageSource.BeginInit();
imageSource.CacheOption = BitmapCacheOption.OnLoad;
imageSource.StreamSource = imageStream;
imageSource.EndInit();
//# Use a border to delimit the photos
Border border = new Border();
border.BorderBrush = new SolidColorBrush( Colors.Black );
border.BorderThickness = new Thickness( 2 );
border.Background = new ImageBrush( imageSource );
//# Use a PileFlowCard to use Reflection.
PileFlowCard card = new PileFlowCard();
card.Child = border;
card.Tag = product.ProductName;
_pileFlowPanel.Children.Add( card );
}
}
#endif
#endregion #endregion
} }

320
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PileFlowPanelView.xaml.txt

@ -31,308 +31,40 @@
<LineBreak /> <LineBreak />
<Run> <Run>
The PileFlowPanel class also contains a label that can be configured to display the PileFlowItem data via the property ContentLabel. When the PileFlowPanel has focus, this sample lets the arrow buttons or the mouse wheel modify the selection.</Run> The PileFlowPanel class also contains a label that can be configured to display the PileFlowItem data via the property ContentLabel. When the PileFlowPanel has focus, this sample lets the arrow buttons or the mouse wheel modify the selection.</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>
<Style TargetType="{x:Type Border}" x:Key="BorderStyle">
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="5"/>
<Setter Property="BorderBrush">
<Setter.Value>
<SolidColorBrush Color="Black"/>
</Setter.Value>
</Setter>
</Style>
<conv:SizeToIntegerConverter x:Key="SizeToIntegerConverter" />
<conv:FullNameStringConverter x:Key="FullNameStringConverter" />
<SolidColorBrush x:Key="mouseOverBrush" Color="Blue" />
<SolidColorBrush x:Key="mouseOverLabelBrush" Color="LightBlue" />
<SolidColorBrush x:Key="normalLabelBrush" Color="Snow" />
<DataTemplate x:Key="seriesTemplate">
<Canvas Width="{Binding Path=W}" Height="{Binding Path=H}">
<Rectangle x:Name="rect" RadiusX="5" RadiusY="5" Width="{Binding Path=W}" Height="{Binding Path=H}" Fill="{Binding Path=Interior}">
<Rectangle.Triggers>
<EventTrigger RoutedEvent="Mouse.MouseEnter">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="rect" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource mouseOverBrush}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
<EventTrigger RoutedEvent="Mouse.MouseLeave">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="rect" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{Binding Path=Interior}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Rectangle.Triggers>
</Rectangle>
</Canvas>
</DataTemplate>
<DataTemplate x:Key="LabelTemplate">
<Border x:Name="border" DockPanel.Dock="Top" BorderThickness="1" CornerRadius ="4" Background="{StaticResource normalLabelBrush}">
<Border.BorderBrush>
<SolidColorBrush Color="Black"/>
</Border.BorderBrush>
<TextBlock FontFamily="Sans Serif" FontSize="12" Margin="2,2,2,1"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Path=Text}">
<TextBlock.Foreground>
<SolidColorBrush Color="Navy"/>
</TextBlock.Foreground>
</TextBlock>
<Border.Triggers>
<EventTrigger RoutedEvent="Mouse.MouseEnter">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="border" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource mouseOverLabelBrush}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
<EventTrigger RoutedEvent="Mouse.MouseLeave">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="border" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource normalLabelBrush}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Border.Triggers>
</Border>
</DataTemplate>
</local:DemoView.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<GroupBox Header="PileFlowPanel Features" Grid.Row="0" Margin="0,5,0,5">
<Grid Margin="0,5,5,5" HorizontalAlignment="Left">
<Grid.RowDefinitions>
<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="*" />
</Grid.ColumnDefinitions>
<!-- 1st column -->
<TextBlock Text="Content Label Offset Y: " VerticalAlignment="Center" />
<xctk:IntegerUpDown Grid.Column="1" Minimum="-150" Maximum="170" Value="{Binding ContentLabelOffsetY, ElementName=_pileFlowPanel}" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<TextBlock Text="Content Label Size X: " Grid.Row="1" VerticalAlignment="Center" />
<xctk:IntegerUpDown Grid.Row="1" Grid.Column="1" Minimum="0" Maximum="500" Value="{Binding ContentLabelSize, ElementName=_pileFlowPanel, Converter={StaticResource SizeToIntegerConverter}, ConverterParameter=width}" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<TextBlock Text="Content Label Size Y: " Grid.Row="2" VerticalAlignment="Center" />
<xctk:IntegerUpDown Grid.Row="2" Grid.Column="1" Minimum="0" Maximum="500" Value="{Binding ContentLabelSize, ElementName=_pileFlowPanel, Converter={StaticResource SizeToIntegerConverter}, ConverterParameter=height}" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<TextBlock Text="Animation Duration: " Grid.Row="3" VerticalAlignment="Center" />
<xctk:IntegerUpDown Grid.Row="3" Grid.Column="1" Minimum="0" Maximum="3000" Increment="10" Value="{Binding AnimationDuration, ElementName=_pileFlowPanel}" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<TextBlock Text="Last Move decelarion Ratio: " Grid.Row="4" VerticalAlignment="Center" />
<xctk:DoubleUpDown Grid.Row="4" Grid.Column="1" FormatString="N1" Minimum="0" Maximum="1" Increment="0.1" Value="{Binding LastMoveDecelerationRatio, ElementName=_pileFlowPanel}" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<TextBlock Text="Center Offset X " Grid.Row="5" VerticalAlignment="Center" />
<xctk:IntegerUpDown Grid.Row="5" Grid.Column="1" Minimum="0" Maximum="300" Increment="2" Value="{Binding CenterOffsetX, ElementName=_pileFlowPanel}" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<!-- 2nd column -->
<TextBlock Text="Flow Items Count: " Grid.Column="2" VerticalAlignment="Center" Margin="5,0,0,0"/>
<xctk:IntegerUpDown Grid.Column="3" Minimum="1" Value="{Binding FlowItemsCount, ElementName=_pileFlowPanel}" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<TextBlock Text="Flow Items Ratio: " Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" Margin="5,0,0,0"/>
<xctk:IntegerUpDown Grid.Row="1" Grid.Column="3" Minimum="0" Maximum="100" Value="{Binding FlowItemRatio, ElementName=_pileFlowPanel}" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<TextBlock Text="Item Width: " Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" Margin="5,0,0,0"/>
<xctk:IntegerUpDown Grid.Row="2" Grid.Column="3" Minimum="0" Maximum="300" Value="{Binding ItemWidth, ElementName=_pileFlowPanel}" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<TextBlock Text="Item Height: " Grid.Row="3" Grid.Column="2" VerticalAlignment="Center" Margin="5,0,0,0"/>
<xctk:IntegerUpDown Grid.Row="3" Grid.Column="3" Minimum="0" Maximum="300" Value="{Binding ItemHeight, ElementName=_pileFlowPanel}" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<TextBlock Text="Flow Offset X " Grid.Row="4" Grid.Column="2" VerticalAlignment="Center" Margin="5,0,0,0"/>
<xctk:IntegerUpDown Grid.Row="4" Grid.Column="3" Minimum="0" Maximum="300" Value="{Binding FlowOffsetX, ElementName=_pileFlowPanel}" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
<TextBlock Text="Flow Offset Y " Grid.Row="5" Grid.Column="2" VerticalAlignment="Center" Margin="5,0,0,0"/>
<xctk:IntegerUpDown Grid.Row="5" Grid.Column="3" Minimum="0" Maximum="300" Value="{Binding FlowOffsetY, ElementName=_pileFlowPanel}" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" />
</Grid>
</GroupBox>
<GroupBox Header="PileFlowCard Features" Grid.Row="0" Grid.Column="1" Margin="0,5,2,5">
<Grid Margin="0,5,2,5" HorizontalAlignment="Left">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="Show Reflection: " VerticalAlignment="Center" />
<CheckBox x:Name="_showReflection" Grid.Column="1" IsChecked="True" Click="OnShowReflectionsClick" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5,5,2,5" />
<TextBlock Text="Begin Reflection Opacity: " Grid.Row="1" VerticalAlignment="Center" IsEnabled="{Binding IsChecked, ElementName=_showReflection}" Style="{StaticResource DisableGrayText}"/>
<xctk:DoubleUpDown Grid.Row="1" Grid.Column="1" Minimum="0" Maximum="1" Increment="0.02" AllowInputSpecialValues="None" Value="0.58" ValueChanged="OnBeginReflectionOpacityChanged" IsEnabled="{Binding IsChecked, ElementName=_showReflection}" Width="50" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5,5,2,5" />
<TextBlock Text="End Reflection Opacity: " Grid.Row="2" VerticalAlignment="Center" IsEnabled="{Binding IsChecked, ElementName=_showReflection}" Style="{StaticResource DisableGrayText}"/>
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Minimum="0" Maximum="1" Increment="0.02" AllowInputSpecialValues="None" Value="0" ValueChanged="OnEndReflectionOpacityChanged" IsEnabled="{Binding IsChecked, ElementName=_showReflection}" Width="50" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5,5,2,5" />
</Grid>
</GroupBox>
<TextBlock Grid.Row="1" Text="Usage:" Style="{StaticResource Header}" />
<ScrollViewer Grid.Row="2" Grid.ColumnSpan="2" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Visible" CanContentScroll="true">
<!-- For MVVM : An ItemsControl can be used :
<ItemsControl ItemsSource="{Binding TheItems}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<xctk:PileFlowPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>-->
<xctk:PileFlowPanel x:Name="_pileFlowPanel"
MinHeight="175"
ContentLabelOffsetY="100"
ContentLabelSize="200,28"
AnimationDuration="1000"
LastMoveDecelerationRatio="0.6"
FlowItemsCount="6"
FlowItemRatio="70"
ItemWidth="200"
ItemHeight="200"
FlowOffsetX="20"
FlowOffsetY="20"
CenterOffsetX="30">
<xctk:PileFlowPanel.ContentLabel>
<Border Background="#ffff50" DockPanel.Dock="Left" Style="{StaticResource BorderStyle}">
<TextBlock x:Name="_pileFlowLabel" Margin="0,5,0,0" TextAlignment="Center" />
<Border.BitmapEffect>
<DropShadowBitmapEffect />
</Border.BitmapEffect>
</Border>
</xctk:PileFlowPanel.ContentLabel>
<xctk:PileFlowCard x:Name="_employeesPileFlowCard" Tag="Employees">
<StackPanel>
<TextBlock Text="List of Employees" TextAlignment="Center" />
<xctk:CheckListBox x:Name="_employeeListBox" ItemsSource="{Binding}" DisplayMemberPath="LastName" />
</StackPanel>
</xctk:PileFlowCard>
<xctk:PileFlowCard>
<xctk:PileFlowCard.Tag>
<MultiBinding Converter="{StaticResource FullNameStringConverter}">
<Binding Path="[0].FirstName" />
<Binding Path="[0].LastName" />
</MultiBinding>
</xctk:PileFlowCard.Tag>
<Border Background="Beige">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<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>
<Image Grid.RowSpan="5" Source="{Binding Path=[0].Photo}" VerticalAlignment="Center" />
<TextBlock Grid.Column="1" Text="{Binding Path=[0].FirstName}" />
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Path=[0].LastName}" />
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding Path=[0].Title}" />
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding Path=[0].Title}" />
<TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding Path=[0].HomePhone}" />
<TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding Path=[0].Address}" />
<TextBlock Grid.Row="5" Grid.ColumnSpan="2" Text="This employee has been working at IBM since March 10, 1999." TextWrapping="Wrap" />
<Button Grid.Row="6" Grid.ColumnSpan="2" Content="Save" Width="75" Click="OnEmployeeButtonPress" />
</Grid>
</Border>
</xctk:PileFlowCard>
<xctk:PileFlowCard Tag="sale's price relative to distance">
<Border Background="LightGray">
<xctk:Chart>
<xctk:Chart.Legend>
<xctk:Legend Visibility="Collapsed" />
</xctk:Chart.Legend>
<xctk:Chart.Areas>
<xctk:Area>
<xctk:Area.XAxis>
<xctk:Axis AxisLabelsLayout="ShowToFit" ShowAxisLabel="False" LabelTemplate="{StaticResource LabelTemplate}"/>
</xctk:Area.XAxis>
<xctk:Area.YAxis>
<xctk:Axis AxisLabelsLayout="ShowToFit" ShowAxisLabel="False" LabelTemplate="{StaticResource LabelTemplate}"/>
</xctk:Area.YAxis>
<xctk:Area.Series>
<xctk:Series DefaultInterior="Red" Template="{StaticResource seriesTemplate}">
<xctk:Series.DataPoints>
<xctk:DataPoint X="125" Y="6" />
<xctk:DataPoint X="150" Y="7" />
<xctk:DataPoint X="50" Y="4" />
<xctk:DataPoint X="25" Y="2" />
</xctk:Series.DataPoints>
<xctk:Series.Layout>
<xctk:ColumnLayout />
</xctk:Series.Layout>
</xctk:Series>
</xctk:Area.Series>
</xctk:Area>
</xctk:Chart.Areas>
</xctk:Chart>
</Border>
</xctk:PileFlowCard>
</xctk:PileFlowPanel>
</ScrollViewer>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\PileFlowPanel.png" Width="600" Height="400"/> <Image Source="..\OpenSourceImages\PileFlowPanel.png" Width="600" Height="400"/>
##END-->
</local:DemoView> </local:DemoView>

30
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridAttributesView.xaml.cs.txt

@ -34,7 +34,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
public PropertyGridAttributesView() public PropertyGridAttributesView()
{ {
InitializeComponent(); InitializeComponent();
var person = new Man(); var person = new Man();
person.FirstName = "John"; person.FirstName = "John";
person.LastName = "Doe"; person.LastName = "Doe";
@ -53,9 +53,6 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
[CategoryOrder("Information", 0)] [CategoryOrder("Information", 0)]
[CategoryOrder( "Conections", 1 )] [CategoryOrder( "Conections", 1 )]
[CategoryOrder( "Other", 2 )] [CategoryOrder( "Other", 2 )]
#if !OPEN_SOURCE
[ExpandedCategory( "Conections", false )]
#endif
public abstract class Person : INotifyPropertyChanged public abstract class Person : INotifyPropertyChanged
{ {
// All properties have their own "[Category(...)]" attribute to specify which category they // All properties have their own "[Category(...)]" attribute to specify which category they
@ -69,9 +66,6 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
[Category( "Information" )] [Category( "Information" )]
[Description( "This property uses the [Editor(..)] attribute to provide a custom editor using the 'FirstNameEditor' class. In the Plus version, it also depends on the IsMale property to change its foreground and source." )] [Description( "This property uses the [Editor(..)] attribute to provide a custom editor using the 'FirstNameEditor' class. In the Plus version, it also depends on the IsMale property to change its foreground and source." )]
[Editor( typeof( FirstNameEditor ), typeof( FirstNameEditor ) )] [Editor( typeof( FirstNameEditor ), typeof( FirstNameEditor ) )]
#if !OPEN_SOURCE
[DependsOn( "IsMale" )]
#endif
public string FirstName public string FirstName
{ {
get{ return _firstName; } get{ return _firstName; }
@ -122,7 +116,6 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
public string NameInParentheses { get; set; } public string NameInParentheses { get; set; }
[Category( "Other" )] [Category( "Other" )]
//# TODODOC
[Description( "This property uses the [Browsable(false)] attribute to not display the property" )] [Description( "This property uses the [Browsable(false)] attribute to not display the property" )]
[BrowsableAttribute( false )] [BrowsableAttribute( false )]
public string InvisibleProperty public string InvisibleProperty
@ -134,7 +127,6 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
[Range(0d, 10d)] [Range(0d, 10d)]
[Category( "Other" )] [Category( "Other" )]
[DefaultValue(5d)] [DefaultValue(5d)]
//# TODODOC
[Description( "This property uses the [Range(0,10)] and DefaultValue attributes to set the Minimum, Maximum and default properties." )] [Description( "This property uses the [Range(0,10)] and DefaultValue attributes to set the Minimum, Maximum and default properties." )]
public double RangeDouble public double RangeDouble
{ {
@ -191,36 +183,16 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
{ {
public FrameworkElement ResolveEditor( Xceed.Wpf.Toolkit.PropertyGrid.PropertyItem propertyItem ) public FrameworkElement ResolveEditor( Xceed.Wpf.Toolkit.PropertyGrid.PropertyItem propertyItem )
{ {
#if !OPEN_SOURCE
ComboBox comboBox = new ComboBox();
if( ( ( Person )propertyItem.Instance ).IsMale )
{
comboBox.Foreground = new SolidColorBrush( Colors.Green );
comboBox.ItemsSource = new List<string>() {"Tom", "Mark", "Bryan"};
}
else
{
comboBox.Foreground = new SolidColorBrush( Colors.Red );
comboBox.ItemsSource = new List<string>() { "Jane", "Christine", "Kathy" };
}
comboBox.SelectedIndex = 0;
#else
TextBox textBox = new TextBox(); TextBox textBox = new TextBox();
textBox.Background = new SolidColorBrush( Colors.Red ); textBox.Background = new SolidColorBrush( Colors.Red );
#endif
//create the binding from the bound property item to the editor //create the binding from the bound property item to the editor
var _binding = new Binding( "Value" ); //bind to the Value property of the PropertyItem var _binding = new Binding( "Value" ); //bind to the Value property of the PropertyItem
_binding.Source = propertyItem; _binding.Source = propertyItem;
_binding.ValidatesOnExceptions = true; _binding.ValidatesOnExceptions = true;
_binding.ValidatesOnDataErrors = true; _binding.ValidatesOnDataErrors = true;
_binding.Mode = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay; _binding.Mode = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay;
#if !OPEN_SOURCE
BindingOperations.SetBinding( comboBox, ComboBox.SelectedItemProperty, _binding );
return comboBox;
#else
BindingOperations.SetBinding( textBox, TextBox.TextProperty, _binding ); BindingOperations.SetBinding( textBox, TextBox.TextProperty, _binding );
return textBox; return textBox;
#endif
} }
} }

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

@ -71,7 +71,7 @@
LocalizedDescriptionAttribute LocalizedDescriptionAttribute
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -89,11 +89,11 @@
FontStyle="Italic" FontStyle="Italic"
Margin="0,10,0,0"/> Margin="0,10,0,0"/>
</StackPanel> </StackPanel>
<xctk:PropertyGrid Grid.Row="1" x:Name="_propertyGrid" Width="450" MaxHeight="650" Margin="10" <xctk:PropertyGrid Grid.Row="1" x:Name="_propertyGrid" Width="450" MaxHeight="650" Margin="10"
SelectedObject="{Binding}" SelectedObject="{Binding}"
ShowDescriptionByTooltip="True"> ShowDescriptionByTooltip="True">
</xctk:PropertyGrid> </xctk:PropertyGrid>
</Grid> </Grid>
</local:DemoView> </local:DemoView>

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

@ -31,13 +31,13 @@
<local:DemoView.Resources> <local:DemoView.Resources>
<conv:DimensionsConverter x:Key="DimensionsConverter" /> <conv:DimensionsConverter x:Key="DimensionsConverter" />
</local:DemoView.Resources> </local:DemoView.Resources>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="The solution to this problem is to create a custom editor and provide an IValueConverter to handle the proper conversion of the Struct values." TextWrapping="Wrap" /> <TextBlock Text="The solution to this problem is to create a custom editor and provide an IValueConverter to handle the proper conversion of the Struct values." TextWrapping="Wrap" />
<xctk:PropertyGrid x:Name="_propertyGrid" Grid.Row="1" Width="450" MaxHeight="250" Margin="10"> <xctk:PropertyGrid x:Name="_propertyGrid" Grid.Row="1" Width="450" MaxHeight="250" Margin="10">
<xctk:PropertyGrid.EditorDefinitions> <xctk:PropertyGrid.EditorDefinitions>

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

@ -31,7 +31,7 @@
<Run>The PropertyGrid on the right uses the CategoryOrder attribute to order the categories in the desired order.</Run> <Run>The PropertyGrid on the right uses the CategoryOrder attribute to order the categories in the desired order.</Run>
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
@ -43,7 +43,7 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="Non-Ordered Categories:" FontSize="16" FontWeight="Bold" HorizontalAlignment="Stretch" Margin="10"/> <TextBlock Text="Non-Ordered Categories:" FontSize="16" FontWeight="Bold" HorizontalAlignment="Stretch" Margin="10"/>
<xctk:PropertyGrid x:Name="_propertyGrid1" Grid.Row="1" Width="290" MaxHeight="350" VerticalAlignment="Top" Margin="10"/> <xctk:PropertyGrid x:Name="_propertyGrid1" Grid.Row="1" Width="290" MaxHeight="350" VerticalAlignment="Top" Margin="10"/>
</Grid> </Grid>
@ -53,7 +53,7 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Grid.Column="1" Text="Ordered Categories:" FontSize="16" FontWeight="Bold" Margin="10"/> <TextBlock Grid.Column="1" Text="Ordered Categories:" FontSize="16" FontWeight="Bold" Margin="10"/>
<xctk:PropertyGrid x:Name="_propertyGrid2" Grid.Row="1" Grid.Column="1" Width="290" MaxHeight="350" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10"/> <xctk:PropertyGrid x:Name="_propertyGrid2" Grid.Row="1" Grid.Column="1" Width="290" MaxHeight="350" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10"/>
</Grid> </Grid>

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

@ -27,7 +27,7 @@
This example demonstrates the various methods of assigning custom editors to the properties. You can supply your own editor DataTemplate based on a Type, a property name, or both. To supply your own editor for a property, you must create an EditorDefinition for the PropertyGrid. This example demonstrates the various methods of assigning custom editors to the properties. You can supply your own editor DataTemplate based on a Type, a property name, or both. To supply your own editor for a property, you must create an EditorDefinition for the PropertyGrid.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -56,7 +56,7 @@
<TextBox Background="Green" Text="{Binding Value}" /> <TextBox Background="Green" Text="{Binding Value}" />
<!-- <!--
When using SelectedObject[s] bind to the "Value" property When using SelectedObject[s] bind to the "Value" property
When using PropertiesSource or Properties to specify your items, When using PropertiesSource or Properties to specify your items,
your DataContext will be the item itself, so bind directly to the your DataContext will be the item itself, so bind directly to the
property of your underlying item, hence, probably the same path as property of your underlying item, hence, probably the same path as

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

@ -35,16 +35,5 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
} }
} }
#if !OPEN_SOURCE
public struct Coords
{
public int X { get; set; }
public int Y { get; set; }
public override string ToString()
{
return string.Format( "{0}, {1}", X, Y );
}
}
#endif
} }

63
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridCustomPropertyView.xaml.txt

@ -25,7 +25,6 @@
<local:DemoView.Description> <local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe"> <Paragraph FontSize="14" FontFamily="Segoe">
Using the CustomPropertyItems class, you can flexibly modify the display of each of your properties. Using the CustomPropertyItems class, you can flexibly modify the display of each of your properties.
<!--##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,10 +32,9 @@
<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>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -45,13 +43,7 @@
<StackPanel Grid.Row="0" Margin="10"> <StackPanel Grid.Row="0" Margin="10">
<TextBlock Text="This sample adds 'CustomPropertyItem' to the 'Properties' collection and directly controls the display of each item." <TextBlock Text="This sample adds 'CustomPropertyItem' to the 'Properties' collection and directly controls the display of each item."
TextWrapping="Wrap"/> TextWrapping="Wrap"/>
<!--##EXCLUDE_OPEN_SOURCE-->
<TextBlock Text="(Click the XAML and Code tabs to see details.)"
FontStyle="Italic"
Margin="0,10,0,0"/>
<!--##END-->
</StackPanel> </StackPanel>
<!--##INCLUDE_OPEN_SOURCE
<ScrollViewer Grid.Row="1" <ScrollViewer Grid.Row="1"
VerticalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"> HorizontalScrollBarVisibility="Auto">
@ -60,57 +52,10 @@
<local:XamlBox CodeSource="/Samples/PropertyGrid/OpenSourceImages/CustomProperty.xaml.txt" /> <local:XamlBox CodeSource="/Samples/PropertyGrid/OpenSourceImages/CustomProperty.xaml.txt" />
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
##END-->
<!--##EXCLUDE_OPEN_SOURCE-->
<!--
No assignement of either PropertyNameBinding or PropertyValueBinding. CustomProperties
will each have all the values directly set.
-->
<xctk:PropertyGrid x:Name="_propertyGrid" Grid.Row="1" Width="350" MaxHeight="280">
<xctk:PropertyGrid.EditorDefinitions>
<xctk:EditorTextDefinition TargetProperties="firstName,lastName"
FontWeight="Bold"
FontStyle="Italic"/>
</xctk:PropertyGrid.EditorDefinitions>
<xctk:PropertyGrid.Properties>
<!--Use CustomPropertyItem to control each of their characteristics. -->
<!--Here we specify a DefinitionKey to assign a specific CUSTOM editor. -->
<xctk:CustomPropertyItem DisplayName="First Name" Value="Nancy" Category="Name"
DefinitionKey="firstName" />
<xctk:CustomPropertyItem DisplayName="Last Name" Value="Davolio" Category="Name"
DefinitionKey="lastName"/>
<!-- Here we specify a DefinitionKey to assign a specific DEFAULT editor. -->
<!-- Since the XAML parser will parse "29" as a string, the TypeConverter defined
on Int32 struct will automatically make the conversion. -->
<xctk:CustomPropertyItem DisplayName="Age" Value="29" Category="Other"
DefinitionKey="{x:Type s:Int32}" />
<!-- For thoses values where no TypeConverter supporting strings is defined, you must
use property element syntax to define the value. -->
<xctk:CustomPropertyItem DisplayName="Coordinates" Category="Other"
Description="Location on the state map">
<xctk:CustomPropertyItem.Value>
<v:Coords X="12" Y="15"/>
</xctk:CustomPropertyItem.Value>
</xctk:CustomPropertyItem>
<!--Here we define a specific editor directly. No value -->
<xctk:CustomPropertyItem DisplayName="Picture" Category="Other">
<xctk:CustomPropertyItem.Editor>
<Image Source="/Samples/PropertyGrid/Resources/woman.png"
Stretch="None"
HorizontalAlignment="Left"/>
</xctk:CustomPropertyItem.Editor>
</xctk:CustomPropertyItem>
</xctk:PropertyGrid.Properties>
<!-- You must specify that the grouping is based on the value of "Category" property. -->
<xctk:PropertyGrid.CategoryGroupDescription>
<PropertyGroupDescription PropertyName="Category"/>
</xctk:PropertyGrid.CategoryGroupDescription>
</xctk:PropertyGrid>
<!--##END-->
</Grid> </Grid>
</local:DemoView> </local:DemoView>

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

@ -64,9 +64,6 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
selectedObject.UInt16 = (ushort)9; selectedObject.UInt16 = (ushort)9;
selectedObject.UInt32 = (uint)10; selectedObject.UInt32 = (uint)10;
selectedObject.UInt64 = (ulong)11; selectedObject.UInt64 = (ulong)11;
#if !OPEN_SOURCE
selectedObject.File = new FileInfo( "c:\\MyFile.txt" );
#endif
this.DataContext = selectedObject; this.DataContext = selectedObject;
} }
@ -146,11 +143,6 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
[Category( "Non-Numeric Editors" )] [Category( "Non-Numeric Editors" )]
[Description( "This property uses a Char as the default editor." )] [Description( "This property uses a Char as the default editor." )]
public Char Char { get; set; } public Char Char { get; set; }
#if !OPEN_SOURCE
[Category( "Non-Numeric Editors" )]
[Description( "This property uses a FilePicker as the default editor." )]
public FileInfo File { get; set; }
#endif
[Category( "Non-Numeric Editors" )] [Category( "Non-Numeric Editors" )]
[Description( "This property uses a PrimitiveTypeCollectionEditor as the default editor." )] [Description( "This property uses a PrimitiveTypeCollectionEditor as the default editor." )]
public List<string> ListOfStrings { get; set; } public List<string> ListOfStrings { get; set; }

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

@ -28,7 +28,7 @@
IList&lt;T&gt; (primtive type), IList&lt;T&gt; (custom type), IList&lt;T&gt; (primtive type), IList&lt;T&gt; (custom type),
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<DockPanel> <DockPanel>
<TextBlock DockPanel.Dock="Top" <TextBlock DockPanel.Dock="Top"
Text="Click on each property and see the description for details on the underlying editor." Text="Click on each property and see the description for details on the underlying editor."
@ -36,5 +36,5 @@
<xctk:PropertyGrid x:Name="_propertyGrid" SelectedObject="{Binding}" Width="450" Margin="10,30,0,0" /> <xctk:PropertyGrid x:Name="_propertyGrid" SelectedObject="{Binding}" Width="450" Margin="10,30,0,0" />
</DockPanel> </DockPanel>
</local:DemoView> </local:DemoView>

20
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridDefinitionKeyView.xaml.cs.txt

@ -28,26 +28,8 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
public PropertyGridDefinitionKeyView() public PropertyGridDefinitionKeyView()
{ {
InitializeComponent(); InitializeComponent();
#if !OPEN_SOURCE
var person = new Person();
person.FirstName = "John";
person.LastName = "Smith";
person.ReferenceNo = 252521;
this.DataContext = person;
#endif
}
#if !OPEN_SOURCE
private class Person
{
[DefinitionKey( "nameType" )]
public string FirstName { get; set; }
[DefinitionKey( "nameType" )]
public string LastName { get; set; }
[DefinitionKey( typeof( int? ) )]
public object ReferenceNo { get; set; }
} }
#endif
} }
} }

18
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridDefinitionKeyView.xaml.txt

@ -32,7 +32,6 @@
<LineBreak/> <LineBreak/>
<LineBreak/> <LineBreak/>
It can also be used to specify a specific default editor when a property type does not resolve to a valid editor (e.g., Object). It can also be used to specify a specific default editor when a property type does not resolve to a valid editor (e.g., Object).
<!--##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>
@ -40,7 +39,6 @@
<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>
@ -56,13 +54,7 @@
<TextBlock Text="The ReferenceNo property, declare a DefinitionKey to 'int?' to displayed the content with a IntegerUpDown dispite it's type is 'object'" <TextBlock Text="The ReferenceNo property, declare a DefinitionKey to 'int?' to displayed the content with a IntegerUpDown dispite it's type is 'object'"
TextWrapping="Wrap" TextWrapping="Wrap"
Margin="0,0,0,10"/> Margin="0,0,0,10"/>
<!--##EXCLUDE_OPEN_SOURCE-->
<TextBlock Text="(Click XAML and Code tabs to see details)"
FontStyle="Italic"
Margin="0,10,0,0"/>
<!--##END-->
</StackPanel> </StackPanel>
<!--##INCLUDE_OPEN_SOURCE
<ScrollViewer Grid.Row="1" <ScrollViewer Grid.Row="1"
VerticalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"> HorizontalScrollBarVisibility="Auto">
@ -73,15 +65,5 @@
<local:XamlBox CodeSource="/Samples/PropertyGrid/OpenSourceImages/DefinitionKey.xaml.txt" /> <local:XamlBox CodeSource="/Samples/PropertyGrid/OpenSourceImages/DefinitionKey.xaml.txt" />
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
##END-->
<!--##EXCLUDE_OPEN_SOURCE-->
<xctk:PropertyGrid x:Name="_propertyGrid" Grid.Row="1" HorizontalAlignment="Stretch" Width="350" MaxHeight="200"
SelectedObject="{Binding}">
<xctk:PropertyGrid.EditorDefinitions>
<!-- This EditorDefinition will be used for FirstName and LastName -->
<xctk:EditorTextDefinition TargetProperties="nameType" FontStyle="Italic" FontWeight="Bold" />
</xctk:PropertyGrid.EditorDefinitions>
</xctk:PropertyGrid>
<!--##END-->
</Grid> </Grid>
</local:DemoView> </local:DemoView>

93
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridDisplayLocalizationView.xaml.cs.txt

@ -20,9 +20,6 @@ using System.ComponentModel;
using System.Windows; using System.Windows;
using System.Windows.Media; using System.Windows.Media;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes; using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
#if !OPEN_SOURCE
using Xceed.Wpf.Toolkit.Core.Attributes;
#endif
using Xceed.Wpf.Toolkit.Core; using Xceed.Wpf.Toolkit.Core;
using System.Windows.Controls; using System.Windows.Controls;
using System.Globalization; using System.Globalization;
@ -41,90 +38,16 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
public PropertyGridDisplayLocalizationView() public PropertyGridDisplayLocalizationView()
{ {
InitializeComponent(); InitializeComponent();
#if !OPEN_SOURCE
var person = new Person();
person.FirstName = "John";
person.LastName = "Doe";
person.FavoriteActor1 = ActorNoDisplayName.billcosby;
person.FavoriteActor2 = ActorWithDisplayName.bradpitt;
person.FavoriteActor3 = ActorWithDisplayName.NotInThisList;
_propertyGrid.SelectedObject = person;
#endif
}
#if !OPEN_SOURCE
private void ComboBox_SelectionChanged( object sender, System.Windows.Controls.SelectionChangedEventArgs e )
{
DisplayLocalizationRes.Culture = object.Equals(( ( ComboBox )sender ).SelectedItem,"French" )
? new CultureInfo( "fr" )
: CultureInfo.InvariantCulture;
// This will refresh the PropertyGrid.
if( _propertyGrid != null )
{
var selected = _propertyGrid.SelectedObject;
_propertyGrid.SelectedObject = null;
_propertyGrid.SelectedObject = selected;
}
} }
public enum ActorNoDisplayName
{
alpacino,
arnoldschwarzenegger,
benaffleck,
billcosby,
bradpitt,
NotInThisList
};
[TypeConverter(typeof(EnumDisplayNameConverter))]
public enum ActorWithDisplayName
{
[ExtendedDisplayName( "Al Pacino" )]
alpacino,
[ExtendedDisplayName( "Arnold Schwarzenegger" )]
arnoldschwarzenegger,
[ExtendedDisplayName( "Ben Affleck" )]
benaffleck,
[ExtendedDisplayName( "Bill Cosby" )]
billcosby,
[ExtendedDisplayName( "Brad Pitt" )]
bradpitt,
[LocalizedDisplayName( "NotListed", typeof(DisplayLocalizationRes) )]
NotInThisList
};
[CategoryOrder( "InfoCategory", 1 )]
[CategoryOrder( "DetailsCategory", 2 )]
public class Person
{
[LocalizedDisplayName( "FirstName", typeof( DisplayLocalizationRes ) )]
[LocalizedDescription( "FirstNameDesc", typeof( DisplayLocalizationRes ) )]
[LocalizedCategory( "InfoCategory", typeof( DisplayLocalizationRes ) )]
public string FirstName { get; set; }
[LocalizedDisplayName( "LastName", typeof( DisplayLocalizationRes ) )]
[LocalizedDescription( "LastNameDesc", typeof( DisplayLocalizationRes ) )]
[LocalizedCategory( "InfoCategory", typeof( DisplayLocalizationRes ) )]
public string LastName { get; set; }
[LocalizedDisplayName( "FavoriteActor1", typeof( DisplayLocalizationRes ) )]
[LocalizedDescription( "FavoriteActor1Desc", typeof( DisplayLocalizationRes ) )]
[LocalizedCategory( "DetailsCategory", typeof( DisplayLocalizationRes ) )]
public ActorNoDisplayName FavoriteActor1 { get; set; }
[LocalizedDisplayName( "FavoriteActor2", typeof( DisplayLocalizationRes ) )]
[LocalizedDescription( "FavoriteActor2Desc", typeof( DisplayLocalizationRes ) )]
[LocalizedCategory( "DetailsCategory", typeof( DisplayLocalizationRes ) )]
public ActorWithDisplayName FavoriteActor2 { get; set; }
[LocalizedDisplayName( "FavoriteActor3", typeof( DisplayLocalizationRes ) )]
[LocalizedDescription( "FavoriteActor3Desc", typeof( DisplayLocalizationRes ) )]
[LocalizedCategory( "DetailsCategory", typeof( DisplayLocalizationRes ) )]
public ActorWithDisplayName FavoriteActor3 { get; set; }
}
#endif
} }
} }

37
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridDisplayLocalizationView.xaml.txt

@ -31,46 +31,17 @@
<Run>LocalizedDisplayName, LocalizedDescription, LocalizedCategory:</Run> <Run>LocalizedDisplayName, LocalizedDescription, LocalizedCategory:</Run>
<LineBreak/> <LineBreak/>
<Run>Theses attributes allow to easily localize the DisplayName, Description, and Category attributes values using standard Resx resource files.</Run> <Run>Theses attributes allow to easily localize the DisplayName, Description, and Category attributes values using standard Resx resource files.</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-->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Text="In this sample, the properties names and descriptions where localized.&#x0a;Select 'Favorite Actor' properties and see description:" />
<Grid Grid.Row="1" VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Margin="30" Width="450" Height="22">
<TextBlock Text="Language:" Margin="0,0,5,30" />
<ComboBox SelectionChanged="ComboBox_SelectionChanged" SelectedIndex="0" Width="150">
<ComboBox.Items>
<s:String>English (Default)</s:String>
<s:String>French</s:String>
</ComboBox.Items>
</ComboBox>
</StackPanel>
<xctk:PropertyGrid x:Name="_propertyGrid" Grid.Row="1" NameColumnWidth="250" Width="450" MaxHeight="280" />
</Grid>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\Localization.png" Width="400" Height="300"/> <Image Source="..\OpenSourceImages\Localization.png" Width="400" Height="300"/>
##END-->
</local:DemoView> </local:DemoView>

48
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridEditorDefinitionsView.xaml.cs.txt

@ -32,58 +32,10 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
public PropertyGridEditorDefinitionsView() public PropertyGridEditorDefinitionsView()
{ {
InitializeComponent(); InitializeComponent();
#if !OPEN_SOURCE
var selectedObject = new EditorDefinitionsSampleObject();
selectedObject.Boolean = true;
selectedObject.Color = Colors.Red;
selectedObject.ColorCombo = Colors.Blue;
selectedObject.DateTime = System.DateTime.Now;
selectedObject.Int32 = 42;
selectedObject.PersonTemplate = new Person() { FirstName = "John", LastName = "Smith" };
selectedObject.String = "This is a string";
selectedObject.StringCombo = "String Value 1";
selectedObject.File = new FileInfo("MyFile.txt");
this.DataContext = selectedObject;
#endif
} }
#if !OPEN_SOURCE
public class EditorDefinitionsSampleObject
{
[PropertyOrder( 0 )]
public string String { get; set; }
[PropertyOrder( 1 )]
public bool Boolean { get; set; }
[PropertyOrder( 2 )]
public int Int32 { get; set; }
[PropertyOrder( 3 )]
public System.DateTime DateTime { get; set; }
[PropertyOrder( 4 )]
public System.Windows.Media.Color? Color { get; set; }
[PropertyOrder( 5 )]
public string StringCombo { get; set; }
[PropertyOrder( 6 )]
public System.Windows.Media.Color? ColorCombo { get; set; }
[PropertyOrder( 7 )]
public Person PersonTemplate { get; set; }
[PropertyOrder( 8 )]
public FileInfo File { get; set; }
}
public class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
#endif
}
#if !OPEN_SOURCE
public class ColorSampleItem
{
public System.Windows.Media.Color? Color { get; set; }
public string DisplayString { get; set; }
} }
#endif
} }

107
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridEditorDefinitionsView.xaml.txt

@ -24,28 +24,10 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
VerticalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled"
Title="Ready-to-use EditorDefinitions"> Title="Ready-to-use EditorDefinitions">
<!--##EXCLUDE_OPEN_SOURCE-->
<local:DemoView.Resources>
<x:Array x:Key="comboSource1" Type="s:String" >
<s:String>String Value 1</s:String>
<s:String>String Value 2</s:String>
<s:String>String Value 3</s:String>
</x:Array>
<x:Array x:Key="comboSource2" Type="s:Object" >
<v:ColorSampleItem Color="{x:Null}" DisplayString="(No color selected)"/>
<v:ColorSampleItem Color="{x:Static sm:Colors.Red}" DisplayString="Red Color"/>
<v:ColorSampleItem Color="{x:Static sm:Colors.Green}" DisplayString="Green Color"/>
<v:ColorSampleItem Color="{x:Static sm:Colors.Blue}" DisplayString="Blue Color"/>
</x:Array>
<Style x:Key="textBoxStyle" TargetType="TextBox">
<Setter Property="Background" Value="LightBlue"/>
</Style>
</local:DemoView.Resources>
<!--##END-->
<local:DemoView.Description> <local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe"> <Paragraph FontSize="14" FontFamily="Segoe">
Using the various EditorDefinitions provided with the PropertyGrid, you can easily customize and reuse the existing default editor to suit your needs. Style the editing element or use one of the common properties directly provided on the editor definition class. The provided editor definitions are the following: Using the various EditorDefinitions provided with the PropertyGrid, you can easily customize and reuse the existing default editor to suit your needs. Style the editing element or use one of the common properties directly provided on the editor definition class. The provided editor definitions are the following:
@ -72,7 +54,6 @@
EditorIntegerUpDownDefinition EditorIntegerUpDownDefinition
<LineBreak /> <LineBreak />
EditorDoubleUpDownDefinition EditorDoubleUpDownDefinition
<!--##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>
@ -80,7 +61,6 @@
<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 Toolkit Plus for WPF. Click here for more details about Toolkit Plus for WPF.
</Hyperlink> </Hyperlink>
##END-->
etc. etc.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
@ -89,13 +69,7 @@
<StackPanel DockPanel.Dock="Top"> <StackPanel DockPanel.Dock="Top">
<TextBlock Text="Each of the displayed properties has their display or behavior affected by an different EditorDefinition " <TextBlock Text="Each of the displayed properties has their display or behavior affected by an different EditorDefinition "
TextWrapping="Wrap"/> TextWrapping="Wrap"/>
<!--##EXCLUDE_OPEN_SOURCE-->
<TextBlock Text="(Click XAML and Code tabs to see details)"
FontStyle="Italic"
Margin="0,10,0,0"/>
<!--##END-->
</StackPanel> </StackPanel>
<!--##INCLUDE_OPEN_SOURCE
<ScrollViewer VerticalScrollBarVisibility="Auto" <ScrollViewer VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"> HorizontalScrollBarVisibility="Auto">
<StackPanel> <StackPanel>
@ -103,72 +77,13 @@
<local:XamlBox CodeSource="/Samples/PropertyGrid/OpenSourceImages/EditorDefinitions.xaml.txt" /> <local:XamlBox CodeSource="/Samples/PropertyGrid/OpenSourceImages/EditorDefinitions.xaml.txt" />
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
##END-->
<!--##EXCLUDE_OPEN_SOURCE-->
<xctk:PropertyGrid x:Name="_propertyGrid" SelectedObject="{Binding}" Width="450" MaxHeight="320" Margin="10" >
<xctk:PropertyGrid.EditorDefinitions>
<!--
Only the "integer" is demonstrated here.
But all other numeric types are also supported (eg. EditorDoubleUpDownDefinition, etc.)
-->
<xctk:EditorIntegerUpDownDefinition TargetProperties="{x:Type s:Int32}"
TextAlignment="Right" />
<!-- CheckBox -->
<xctk:EditorCheckBoxDefinition TargetProperties="{x:Type s:Boolean}"
IsThreeState="True" />
<!-- ColorPicker -->
<xctk:EditorColorPickerDefinition TargetProperties="{x:Type sm:Color}"
DisplayColorAndName="False"
ShowDropDownButton="False"/>
<!-- FilePicker -->
<xctk:EditorFilePickerDefinition TargetProperties="{x:Type sys:FileInfo}"
Filter="Text file | *.txt"
Title="Select your file"/>
<!-- DateTimeUpDown -->
<xctk:EditorDateTimeUpDownDefinition TargetProperties="{x:Type s:DateTime}"
Format="Custom"
FormatString="yyyy-MM" />
<!-- TextBox -->
<!-- On any EditorDefintion, you can use the "EditingElementStyle" to have a more complete customization
of the underlying editor -->
<xctk:EditorTextDefinition TargetProperties="{x:Type s:String}"
FontStyle="Italic"
FontWeight="Bold"
EditingElementStyle="{StaticResource textBoxStyle}" />
<!-- ComboBox (simple) -->
<!-- When using SelectedObject[s], the DataContext will be the PropertyItem. Bind to the "Value" property. -->
<xctk:EditorComboBoxDefinition TargetProperties="StringCombo"
ItemsSource="{StaticResource comboSource1}"
SelectedItemBinding="{Binding Value}" />
<!-- ComboBox (complex) -->
<xctk:EditorComboBoxDefinition TargetProperties="ColorCombo"
ItemsSource="{StaticResource comboSource2}"
DisplayMemberPath="DisplayString"
SelectedValuePath="Color"
SelectedValueBinding="{Binding Value}" />
<!-- Custom DataTemplate -->
<xctk:EditorTemplateDefinition TargetProperties="PersonTemplate">
<xctk:EditorTemplateDefinition.EditingTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<!-- When using SelectedObject[s], the DataContext will be the PropertyItem. Bind to the "Value" property. -->
<TextBlock Text="{Binding Value.LastName}" FontWeight="Bold" />
<TextBlock Text=", " />
<TextBlock Text="{Binding Value.FirstName}" />
</StackPanel>
</DataTemplate>
</xctk:EditorTemplateDefinition.EditingTemplate>
</xctk:EditorTemplateDefinition>
</xctk:PropertyGrid.EditorDefinitions>
</xctk:PropertyGrid>
<!--##END-->
</DockPanel> </DockPanel>

165
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridExpandingNonPrimitivesView.xaml.cs.txt

@ -13,7 +13,7 @@
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
************************************************************************************/ ************************************************************************************/
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
@ -28,185 +28,24 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
{ {
InitializeComponent(); InitializeComponent();
#if !OPEN_SOURCE
var supervisor = new Supervisor()
{
Name = "Micheal Jones",
Department = DepartmentEnum.Production,
Managers = new List<Manager>()
{
new Manager()
{
Name = "Ken Clark",
Skills = "Negociation",
Workers = new ObservableCollection<Worker>()
{
new Worker()
{
Name = "Martina Kanes",
YearExperience = 5
},
new Worker()
{
Name = "Kelly Stewart",
YearExperience = 3
},
new Worker()
{
Name = "Mark Applebum",
YearExperience = 7
}
}
},
new Manager()
{
Name = "Julia Benetton",
Skills = "Creative",
Workers = new ObservableCollection<Worker>()
{
new Worker()
{
Name = "John Quick",
YearExperience = 1
},
new Worker()
{
Name = "Martha Adrian",
YearExperience = 2
},
new Worker()
{
Name = "Kevin Stevens",
YearExperience = 5
}
}
}
},
Info = new Info()
{
Address = "64 Main Street",
City = "New York",
Country = "USA",
Phone = "1-800-555-9636"
}
};
this.DataContext = supervisor;
#endif
} }
} }
#if !OPEN_SOURCE
public enum DepartmentEnum
{
Production,
Marketing,
Sales,
Accounting
}
public class Supervisor
{
public string Name
{
get;
set;
}
public DepartmentEnum Department
{
get;
set;
}
public List<Manager> Managers
{
get;
set;
}
public Info Info
{
get;
set;
}
}
public class Manager
{
public string Name
{
get;
set;
}
public string Skills
{
get;
set;
}
public ObservableCollection<Worker> Workers
{
get;
set;
}
public override string ToString()
{
return this.Name;
}
}
public class Worker
{
public string Name
{
get;
set;
}
public int YearExperience
{
get;
set;
}
public override string ToString()
{
return this.Name;
}
}
public class Info
{
public string Address
{
get;
set;
}
public string Phone
{
get;
set;
}
public string City
{
get;
set;
}
public string Country
{
get; set;
}
public override string ToString()
{
return "Info";
}
}
#endif
} }

51
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridExpandingNonPrimitivesView.xaml.txt

@ -26,68 +26,21 @@
<Paragraph FontSize="14" <Paragraph FontSize="14"
FontFamily="Segoe"> FontFamily="Segoe">
The PropertyGrid allows you to expand non-primitive type properties from the SelectedObject to view or edit their sub-properties. It also allows you to expand collections or lists properties to view their items and drill down on these items properties, directly from the propertyGrid, instead of passing by the CollectionEditor. The PropertyGrid allows you to expand non-primitive type properties from the SelectedObject to view or edit their sub-properties. It also allows you to expand collections or lists properties to view their items and drill down on these items properties, directly from the propertyGrid, instead of passing by the CollectionEditor.
<!--##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-->
<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" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- 1st column-->
<TextBlock Text="Is Expanding Non Primitive Types:"
VerticalAlignment="Center" />
<!-- //# TODODOC -->
<CheckBox Grid.Column="1"
IsChecked="{Binding IsExpandingNonPrimitiveTypes, ElementName=_propertyGrid}"
VerticalAlignment="Center"
Margin="5"
ToolTip="Expand the the non-primitive type properties on the SelectedObject." />
</Grid>
</GroupBox>
<DockPanel Grid.Row="1"
Margin="10">
<TextBlock DockPanel.Dock="Top"
Text="Usage:"
Style="{StaticResource Header}" />
<Grid Margin="10">
<xctk:PropertyGrid x:Name="_propertyGrid"
SelectedObject="{Binding}"
IsExpandingNonPrimitiveTypes="True"
Width="500"
MaxHeight="650" />
</Grid>
</DockPanel>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\ExpandingNonPrimitives.png" Width="660" Height="430"/> <Image Source="..\OpenSourceImages\ExpandingNonPrimitives.png" Width="660" Height="430"/>
##END-->
</local:DemoView> </local:DemoView>

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

@ -39,9 +39,6 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
public PropertyGridMultiSelectedObjectsView() public PropertyGridMultiSelectedObjectsView()
{ {
InitializeComponent(); InitializeComponent();
#if !OPEN_SOURCE
_propertyGrid.SelectedObjectsOverride = new List<object>() { _textBox, _button, _comboBox };
#endif
} }
} }
} }

37
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridMultiSelectedObjectsView.xaml.txt

@ -24,51 +24,18 @@
<local:DemoView.Description> <local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe"> <Paragraph FontSize="14" FontFamily="Segoe">
<Run>When many objects are assigned to a PropertyGrid, the PpropertyGrid will show all the common properties so that they can be changed simultaneously on each object.</Run> <Run>When many objects are assigned to a PropertyGrid, the PpropertyGrid will show all the common properties so that they can be changed simultaneously on each object.</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>
<x:Array Type="sys:String" x:Key="_comboBoxSource" >
<sys:String>Green</sys:String>
<sys:String>Red</sys:String>
<sys:String>Blue</sys:String>
</x:Array>
</local:DemoView.Resources>
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<StackPanel >
<TextBlock Text="Selected Object 1 : a TextBox" />
<TextBox x:Name="_textBox" Text="This is my TextBox" Margin="10" Width="150" Foreground="Red"/>
<TextBlock Text="Selected Object 2 : a Button"/>
<Button x:Name="_button" Content="My Button" Margin="10" Width="150" Foreground="Red"/>
<TextBlock Text="Selected Object 3 : a ComboBox" />
<ComboBox x:Name="_comboBox" ItemsSource="{StaticResource _comboBoxSource}" SelectedIndex="0" Margin="10" Width="150" Foreground="Red"/>
</StackPanel>
<xctk:PropertyGrid Grid.Column="1" x:Name="_propertyGrid" ShowAdvancedOptions="True" AutoGenerateProperties="False" MaxHeight="350" VerticalAlignment="Top">
<xctk:PropertyGrid.PropertyDefinitions>
<xctk:PropertyDefinition
TargetProperties="FontSize,FontWeight,Foreground,Background,HorizontalContentAlignment,Width,Margin,ToolTip" />
</xctk:PropertyGrid.PropertyDefinitions>
</xctk:PropertyGrid>
</Grid>
<!--##END-->
<!--##INCLUDE_OPEN_SOURCE
<Image Source="..\OpenSourceImages\MultiSelectedObjects.png" Width="660" Height="430"/> <Image Source="..\OpenSourceImages\MultiSelectedObjects.png" Width="660" Height="430"/>
##END-->
</local:DemoView> </local:DemoView>

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

@ -32,59 +32,10 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
public PropertyGridPropertiesSourceView() public PropertyGridPropertiesSourceView()
{ {
InitializeComponent(); InitializeComponent();
#if !OPEN_SOURCE
var list = new ObservableCollection<object>();
list.Add( new MyData( "string", "First text" ) );
list.Add( new MyData( "Second string", "Second text" ) );
list.Add( new MyData( "Color", Colors.Blue ) );
list.Add( new MyData( "DateTime", System.DateTime.Now ) );
list.Add( new MyData( "TimeSpan", System.TimeSpan.FromMinutes( 120 ) ) );
list.Add( new MyData( "HorizontalAlignment", System.Windows.HorizontalAlignment.Center ) );
list.Add( new MyData( "bool", true ) );
list.Add( new MyData( "decimal", ( decimal )1 ) );
list.Add( new MyData( "int", ( int )2 ) );
list.Add( new MyData( "Second int", ( int )2 ) );
list.Add( new MyData( "short", ( short )3 ) );
list.Add( new MyData( "long", ( long )4 ) );
list.Add( new MyData( "float", ( float )5 ) );
list.Add( new MyData( "byte", ( byte )6 ) );
list.Add( new MyData( "sbyte", ( sbyte )7 ) );
list.Add( new MyData( "uint", ( uint )8 ) );
list.Add( new MyData( "ulong", ( ulong )8 ) );
list.Add( new MyData( "ushort", ( ushort )10 ) );
list.Add( new MyData( "FontFamily", Fonts.SystemFontFamilies.First() ) );
list.Add( new MyData( "FontStyle", FontStyles.Italic ) );
list.Add( new MyData( "FontStretch", FontStretches.ExtraExpanded ) );
// PropertyGrid PropertiesSource property is bound to the DataContext
this.DataContext = list;
#endif
}
#if !OPEN_SOURCE
private void InsertProperty( object sender, RoutedEventArgs e )
{
( ( IList<object> )this.DataContext ).Insert( 0, new MyData( "New string", "new data" ) );
} }
private void RemoveProperty( object sender, RoutedEventArgs e )
{
if( _propertyGrid.SelectedProperty != null )
{
( ( IList<object> )this.DataContext ).Remove( _propertyGrid.SelectedProperty );
}
}
private class MyData
{
public MyData( string name, object value )
{
this.MyName = name;
this.MyValue = value;
}
public string MyName { get; set; }
public object MyValue { get; set; }
}
#endif
} }
} }

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

@ -24,7 +24,6 @@
<local:DemoView.Description> <local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe"> <Paragraph FontSize="14" FontFamily="Segoe">
When setting the PropertiesSource or Properties property, you can provide your own data to be displayed in the PropertyGrid. This allows you to easily insert and remove properties at runtime. The usage scheme is similar to the one used for the standard ItemsControl. When setting the PropertiesSource or Properties property, you can provide your own data to be displayed in the PropertyGrid. This allows you to easily insert and remove properties at runtime. The usage scheme is similar to the one used for the standard ItemsControl.
<!--##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,10 +31,9 @@
<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>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -45,13 +43,7 @@
<StackPanel Grid.Row="0" Margin="10"> <StackPanel Grid.Row="0" Margin="10">
<TextBlock Text="This sample uses the 'PropertiesSource', 'PropertyNameBinding', and 'PropertyValueBinding', as well as collection of generic objects to display its properties." <TextBlock Text="This sample uses the 'PropertiesSource', 'PropertyNameBinding', and 'PropertyValueBinding', as well as collection of generic objects to display its properties."
TextWrapping="Wrap"/> TextWrapping="Wrap"/>
<!--##EXCLUDE_OPEN_SOURCE-->
<TextBlock Text="(Click the XAML and Code tabs to see details.)"
FontStyle="Italic"
Margin="0,10,0,0"/>
<!--##END-->
</StackPanel> </StackPanel>
<!--##INCLUDE_OPEN_SOURCE
<ScrollViewer Grid.Row="2" <ScrollViewer Grid.Row="2"
VerticalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"> HorizontalScrollBarVisibility="Auto">
@ -62,52 +54,11 @@
<local:XamlBox CodeSource="/Samples/PropertyGrid/OpenSourceImages/PropertiesSource.xaml.txt" /> <local:XamlBox CodeSource="/Samples/PropertyGrid/OpenSourceImages/PropertiesSource.xaml.txt" />
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
##END-->
<!--##EXCLUDE_OPEN_SOURCE-->
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Content="Insert new property" Click="InsertProperty" Margin="20" Padding="5"/>
<Button Content="Remove selected property" Click="RemoveProperty" Margin="20" Padding="5"/>
</StackPanel>
<!--
The PropertyNameBinding and PropertyValueBinding properties provide the bindings that will be used
on each item of the properties' source in order to provide the Name and Value of each property.
-->
<xctk:PropertyGrid x:Name="_propertyGrid" Grid.Row="2" Width="350" MaxHeight="600"
IsCategorized="False"
ShowSortOptions="False"
PropertiesSource="{Binding}"
PropertyNameBinding="{Binding MyName}"
PropertyValueBinding="{Binding MyValue}" >
<xctk:PropertyGrid.Resources>
<xctk:EditorTimeSpanConverter x:Key="timeSpanConv"/>
</xctk:PropertyGrid.Resources>
<xctk:PropertyGrid.EditorDefinitions>
<!-- The property with the name "Second string" will have this special editor. -->
<xctk:EditorTextDefinition TargetProperties="Second string"
FontStyle="Italic"
FontWeight="Bold" >
<xctk:EditorTextDefinition.EditingElementStyle>
<Style TargetType="{x:Type TextBox}"
BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="Background" Value="LightBlue"/>
</Style>
</xctk:EditorTextDefinition.EditingElementStyle>
</xctk:EditorTextDefinition>
<!-- All properties whose value type is TimeSpan will use this special editor. -->
<!--Here we use a DateTimeUpDown editor in conjunction with a built-in converter to
create a TimeSpanEditor-->
<xctk:EditorDateTimeUpDownDefinition TargetProperties="{x:Type s:TimeSpan}"
Format="Custom"
FormatString="HH:mm"
Binding="{Binding MyValue, Converter={StaticResource timeSpanConv}}" />
</xctk:PropertyGrid.EditorDefinitions>
</xctk:PropertyGrid>
<!--##END-->
</Grid> </Grid>
</local:DemoView> </local:DemoView>

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

@ -34,17 +34,5 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
InitializeComponent(); InitializeComponent();
} }
} }
#if !OPEN_SOURCE
public class Employee
{
public string Name { get; set; }
public bool IsConfirmed { get; set; }
public string Department { get; set; }
}
public class Representent : Employee
{
public string Details { get; set; }
}
#endif
} }

73
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridPropertiesView.xaml.txt

@ -28,7 +28,6 @@
<LineBreak/> <LineBreak/>
<LineBreak/> <LineBreak/>
The sample also demonstrate the usage of CategoryGroupDescription to control the categorization of the elements. The sample also demonstrate the usage of CategoryGroupDescription to control the categorization of the elements.
<!--##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>
@ -36,10 +35,9 @@
<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>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -48,13 +46,7 @@
<StackPanel Grid.Row="0" Margin="10"> <StackPanel Grid.Row="0" Margin="10">
<TextBlock Text="This sample adds Employee items directly under the Properties property and defines the editor through the DefaultEditorDefinition property." <TextBlock Text="This sample adds Employee items directly under the Properties property and defines the editor through the DefaultEditorDefinition property."
TextWrapping="Wrap"/> TextWrapping="Wrap"/>
<!--##EXCLUDE_OPEN_SOURCE-->
<TextBlock Text="(Click the XAML and Code tabs to see details.)"
FontStyle="Italic"
Margin="0,10,0,0"/>
<!--##END-->
</StackPanel> </StackPanel>
<!--##INCLUDE_OPEN_SOURCE
<ScrollViewer Grid.Row="1" <ScrollViewer Grid.Row="1"
VerticalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"> HorizontalScrollBarVisibility="Auto">
@ -65,72 +57,11 @@
<local:XamlBox CodeSource="/Samples/PropertyGrid/OpenSourceImages/Properties.xaml.txt" /> <local:XamlBox CodeSource="/Samples/PropertyGrid/OpenSourceImages/Properties.xaml.txt" />
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
##END-->
<!--##EXCLUDE_OPEN_SOURCE-->
<!--
PropertyNameBinding will be used to determine the property name's display text.
Value will be specified through DefaultEditorDefinition.
-->
<DockPanel Grid.Row="1">
<StackPanel DockPanel.Dock="Top" Margin="20"
Orientation="Horizontal">
<TextBlock Margin="0,0,10,0" VerticalAlignment="Center"
Text="Category GroupDescription Property:" />
<ComboBox x:Name="categoryGroupCombo" Width="150"
IsEnabled="{Binding IsCategorized, ElementName=_propertyGrid}"
DisplayMemberPath="PropertyName"
SelectedIndex="0">
<PropertyGroupDescription PropertyName="Department"/>
<PropertyGroupDescription PropertyName="IsConfirmed"/>
</ComboBox>
</StackPanel>
<xctk:PropertyGrid x:Name="_propertyGrid" Width="350" MaxHeight="275" VerticalAlignment="Top"
PropertyNameBinding="{Binding Name}"
CategoryGroupDescription="{Binding SelectedItem, ElementName=categoryGroupCombo}"
SelectedObjectName="Meeting" >
<xctk:PropertyGrid.Properties>
<!--Here we define the items to be displayed in the property grid (a list of Employees). -->
<v:Employee Name="Tom" IsConfirmed="True" Department="Sales"/>
<v:Employee Name="John" IsConfirmed="false" Department="Management"/>
<v:Representent Name="Brad" IsConfirmed="True"
Department="Sales"
Details="On the phone"/>
<v:Employee Name="Kevin" IsConfirmed="false" Department="Management"/>
<v:Employee Name="Jane" IsConfirmed="True" Department="Management"/>
<v:Employee Name="Sean" IsConfirmed="True" Department="Sales"/>
</xctk:PropertyGrid.Properties>
<xctk:PropertyGrid.DefaultEditorDefinition>
<!-- This editor will be the default editor for items of the property grid. -->
<xctk:EditorCheckBoxDefinition Binding="{Binding IsConfirmed}"/>
</xctk:PropertyGrid.DefaultEditorDefinition>
<xctk:PropertyGrid.EditorDefinitions>
<!--
Define a specific editor for the Representent with a "details" field.
Since no PropertyValueBinding is defined, the type of the item itself
will be used as a key to detect the possible defined editor.
-->
<xctk:EditorTemplateDefinition TargetProperties="{x:Type v:Representent}">
<xctk:EditorTemplateDefinition.EditingTemplate>
<DataTemplate >
<StackPanel HorizontalAlignment="Stretch">
<CheckBox IsChecked="{Binding IsConfirmed}" Margin="5,0,0,0" />
<DockPanel HorizontalAlignment="Stretch">
<TextBlock DockPanel.Dock="Left" Text="Details: " VerticalAlignment="Center"/>
<TextBox Text="{Binding Details}" FontStyle="Italic" HorizontalAlignment="Stretch" />
</DockPanel>
</StackPanel>
</DataTemplate>
</xctk:EditorTemplateDefinition.EditingTemplate>
</xctk:EditorTemplateDefinition>
</xctk:PropertyGrid.EditorDefinitions>
</xctk:PropertyGrid>
</DockPanel>
<!--##END-->
</Grid> </Grid>
</local:DemoView> </local:DemoView>

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

@ -37,7 +37,7 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
var selObject = new Person(); var selObject = new Person();
selObject.Friend = new Person(); selObject.Friend = new Person();
this.DataContext = selObject; this.DataContext = selObject;
} }

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

@ -29,7 +29,7 @@
<Bold>PreparePropertyItem</Bold> event to customize the display of the PropertyGrid content. <Bold>PreparePropertyItem</Bold> event to customize the display of the PropertyGrid content.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />

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

@ -87,8 +87,6 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views
set; set;
} }
//# TODODOC
//# Those attribute will be overrien in xaml
[Category( "Information" )] [Category( "Information" )]
[DisplayName( "Favorite Color" )] [DisplayName( "Favorite Color" )]
[Description( "This property uses the ColorPicker as the default editor." )] [Description( "This property uses the ColorPicker as the default editor." )]

18
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/CodeFiles/PropertyGridSpecifyingPropertiesView.xaml.txt

@ -26,26 +26,14 @@
By default the propertyGrid will autogenerate all the properties for a given object. You can override this behavior by setting the AutoGenerateProperties property to False, and then provide a collection of PropertyDefinitions of the properties you would like to show. By default the propertyGrid will autogenerate all the properties for a given object. You can override this behavior by setting the AutoGenerateProperties property to False, and then provide a collection of PropertyDefinitions of the properties you would like to show.
</Paragraph> </Paragraph>
</local:DemoView.Description> </local:DemoView.Description>
<Grid> <Grid>
<xctk:PropertyGrid x:Name="_propertyGrid" <xctk:PropertyGrid x:Name="_propertyGrid"
Width="450" Width="450"
MaxHeight="245" MaxHeight="245"
Margin="10" Margin="10"
AutoGenerateProperties="False"> AutoGenerateProperties="False">
<!--##EXCLUDE_OPEN_SOURCE-->
<!-- //# TODODOC
The following categories DisplayOrder will be overriden -->
<xctk:PropertyGrid.CategoryDefinitions>
<xctk:CategoryDefinition Name="Information"
DisplayOrder="0" />
<xctk:CategoryDefinition Name="Connections"
DisplayOrder="2" />
<xctk:CategoryDefinition Name="Clothes"
DisplayOrder="1" />
</xctk:PropertyGrid.CategoryDefinitions>
<!--##END-->
<xctk:PropertyGrid.PropertyDefinitions> <xctk:PropertyGrid.PropertyDefinitions>
<!-- //# TODODOC <!-- //# TODODOC
The following properties will be displayed in the PropertyGrid The following properties will be displayed in the PropertyGrid
@ -63,7 +51,7 @@
</xctk:PropertyDefinition> </xctk:PropertyDefinition>
<!-- And all properties of type Boolean will be displayed in the PropertyGrid--> <!-- And all properties of type Boolean will be displayed in the PropertyGrid-->
<xctk:PropertyDefinition TargetProperties="{x:Type s:Boolean}" DisplayOrder="1"/> <xctk:PropertyDefinition TargetProperties="{x:Type s:Boolean}" DisplayOrder="1"/>
<!-- //# TODODOC <!-- //# TODODOC
This Property won't be displayed --> This Property won't be displayed -->
<xctk:PropertyDefinition TargetProperties="WritingHand" IsBrowsable="False"/> <xctk:PropertyDefinition TargetProperties="WritingHand" IsBrowsable="False"/>

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

@ -32,32 +32,9 @@ namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Gauge.Views
InitializeComponent(); InitializeComponent();
} }
#if !OPEN_SOURCE
private void BackgroundPortionsButton_Click( object sender, RoutedEventArgs e )
{
CollectionControlDialog diag = new CollectionControlDialog();
diag.ItemsSource = _gauge.BGPortions;
diag.NewItemTypes = new List<System.Type>() { typeof( GaugePortion ) };
diag.ShowDialog();
}
private void BorderPortionsButton_Click( object sender, RoutedEventArgs e )
{
CollectionControlDialog diag = new CollectionControlDialog();
diag.ItemsSource = _gauge.BorderPortions;
diag.NewItemTypes = new List<System.Type>() { typeof( BorderGaugePortion ) };
diag.ShowDialog();
}
private void MarkersButton_Click( object sender, RoutedEventArgs e )
{
CollectionControlDialog diag = new CollectionControlDialog();
diag.ItemsSource = _gauge.Markers;
diag.NewItemTypes = new List<System.Type>() { typeof( Marker ) };
diag.ShowDialog();
}
#endif
} }
} }

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

File diff suppressed because it is too large

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

Loading…
Cancel
Save