442 changed files with 33741 additions and 4698 deletions
@ -0,0 +1,2 @@ |
|||
The file Xceed.Wpf.Samples.SampleData.dll has been created from Xceed.Silverlight.Samples.SampleData.dll of the Silverlight ListBox. |
|||
Only the Silverlight has been changed to Wpf. |
|||
@ -1,159 +1,177 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 1.3 |
|||
|
|||
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">1.3</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1">this is my long string</data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
[base64 mime encoded serialized .NET Framework object] |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
[base64 mime encoded string representing a byte array form of the .NET Framework object] |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
|
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>1.3</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<data name="Anchorable_AutoHide" xml:space="preserve"> |
|||
<value>Cacher Automatiquement</value> |
|||
</data> |
|||
<data name="Anchorable_BtnAutoHide_Hint" xml:space="preserve"> |
|||
<value>Cacher Automatiquement</value> |
|||
</data> |
|||
<data name="Anchorable_BtnClose_Hint" xml:space="preserve"> |
|||
<value>Cacher</value> |
|||
</data> |
|||
<data name="Anchorable_CxMenu_Hint" xml:space="preserve"> |
|||
<value>Position de la Fenêtre</value> |
|||
</data> |
|||
<data name="Anchorable_Dock" xml:space="preserve"> |
|||
<value>Ancrer</value> |
|||
</data> |
|||
<data name="Anchorable_DockAsDocument" xml:space="preserve"> |
|||
<value>Ancrer comme Onglet de Document</value> |
|||
</data> |
|||
<data name="Anchorable_Float" xml:space="preserve"> |
|||
<value>Flottante</value> |
|||
</data> |
|||
<data name="Anchorable_Hide" xml:space="preserve"> |
|||
<value>Fermer</value> |
|||
</data> |
|||
<data name="Document_Close" xml:space="preserve"> |
|||
<value>Fermer</value> |
|||
</data> |
|||
<data name="Document_CloseAllButThis" xml:space="preserve"> |
|||
<value>Fermer Tout Sauf Ceci</value> |
|||
</data> |
|||
<data name="Document_CxMenu_Hint" xml:space="preserve"> |
|||
<value>Position de la Fenêtre</value> |
|||
</data> |
|||
<data name="Document_DockAsDocument" xml:space="preserve"> |
|||
<value>Ancrer Comme Onglet de Document</value> |
|||
</data> |
|||
<data name="Document_Float" xml:space="preserve"> |
|||
<value>Flottante</value> |
|||
</data> |
|||
<data name="Document_MoveToNextTabGroup" xml:space="preserve"> |
|||
<value>Déplacer Vers Le Groupe d'Onglets Suivant</value> |
|||
</data> |
|||
<data name="Document_MoveToPreviousTabGroup" xml:space="preserve"> |
|||
<value>Déplacer Vers Le Groupe d'Onglets Précédent</value> |
|||
</data> |
|||
<data name="Document_NewHorizontalTabGroup" xml:space="preserve"> |
|||
<value>Nouveau Groupe d'Onglets Horizontal</value> |
|||
</data> |
|||
<data name="Document_NewVerticalTabGroup" xml:space="preserve"> |
|||
<value>Nouveau Groupe d'Onglets Vertical</value> |
|||
</data> |
|||
<data name="Window_Maximize" xml:space="preserve"> |
|||
<value>Plein Écran</value> |
|||
</data> |
|||
<data name="Window_Restore" xml:space="preserve"> |
|||
<value>Restaurer</value> |
|||
</data> |
|||
<!-- |
|||
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="Anchorable_AutoHide" xml:space="preserve"> |
|||
<value>Cacher Automatiquement</value> |
|||
</data> |
|||
<data name="Anchorable_BtnAutoHide_Hint" xml:space="preserve"> |
|||
<value>Cacher Automatiquement</value> |
|||
</data> |
|||
<data name="Anchorable_BtnClose_Hint" xml:space="preserve"> |
|||
<value>Cacher</value> |
|||
</data> |
|||
<data name="Anchorable_CxMenu_Hint" xml:space="preserve"> |
|||
<value>Position de la Fenêtre</value> |
|||
</data> |
|||
<data name="Anchorable_Dock" xml:space="preserve"> |
|||
<value>Ancrer</value> |
|||
</data> |
|||
<data name="Anchorable_DockAsDocument" xml:space="preserve"> |
|||
<value>Ancrer comme Onglet de Document</value> |
|||
</data> |
|||
<data name="Anchorable_Float" xml:space="preserve"> |
|||
<value>Flottante</value> |
|||
</data> |
|||
<data name="Anchorable_Hide" xml:space="preserve"> |
|||
<value>Cacher</value> |
|||
</data> |
|||
<data name="Document_Close" xml:space="preserve"> |
|||
<value>Fermer</value> |
|||
</data> |
|||
<data name="Document_CloseAllButThis" xml:space="preserve"> |
|||
<value>Fermer Tout Sauf Ceci</value> |
|||
</data> |
|||
<data name="Document_CxMenu_Hint" xml:space="preserve"> |
|||
<value>Position de la Fenêtre</value> |
|||
</data> |
|||
<data name="Document_DockAsDocument" xml:space="preserve"> |
|||
<value>Ancrer Comme Onglet de Document</value> |
|||
</data> |
|||
<data name="Document_Float" xml:space="preserve"> |
|||
<value>Flottante</value> |
|||
</data> |
|||
<data name="Document_MoveToNextTabGroup" xml:space="preserve"> |
|||
<value>Déplacer Vers Le Groupe d'Onglets Suivant</value> |
|||
</data> |
|||
<data name="Document_MoveToPreviousTabGroup" xml:space="preserve"> |
|||
<value>Déplacer Vers Le Groupe d'Onglets Précédent</value> |
|||
</data> |
|||
<data name="Document_NewHorizontalTabGroup" xml:space="preserve"> |
|||
<value>Nouveau Groupe d'Onglets Horizontal</value> |
|||
</data> |
|||
<data name="Document_NewVerticalTabGroup" xml:space="preserve"> |
|||
<value>Nouveau Groupe d'Onglets Vertical</value> |
|||
</data> |
|||
<data name="Window_Maximize" xml:space="preserve"> |
|||
<value>Plein Écran</value> |
|||
</data> |
|||
<data name="Window_Restore" xml:space="preserve"> |
|||
<value>Restaurer</value> |
|||
</data> |
|||
</root> |
|||
@ -0,0 +1,29 @@ |
|||
/************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Text.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for AutoSelectTextboxView.xaml |
|||
/// </summary> |
|||
public partial class AutoSelectTextboxView : DemoView |
|||
{ |
|||
public AutoSelectTextboxView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,120 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Text.Views.AutoSelectTextboxView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
Title="AutoSelectTextBox"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
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> |
|||
</local:DemoView.Description> |
|||
|
|||
<StackPanel> |
|||
<StackPanel.Resources> |
|||
<Style TargetType="{x:Type xctk:AutoSelectTextBox}"> |
|||
<Setter Property="Margin" Value="5"/> |
|||
<Setter Property="AutoSelectBehavior" Value="{Binding SelectedItem, ElementName=_autoSelectBehavior}"/> |
|||
<Setter Property="AutoMoveFocus" Value="{Binding IsChecked, ElementName=_autoMoveFocus}"/> |
|||
</Style> |
|||
</StackPanel.Resources> |
|||
|
|||
<!-- FEATURES GROUP BOX --> |
|||
<GroupBox Header="Features" > |
|||
<Grid Margin="5"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
</Grid.ColumnDefinitions> |
|||
<StackPanel Orientation="Horizontal" Grid.Column="0"> |
|||
<TextBlock Grid.Row="0" Grid.Column="0" Text="AutoSelectBehavior: " VerticalAlignment="Center" /> |
|||
<ComboBox Grid.Row="0" Grid.Column="1" x:Name="_autoSelectBehavior" SelectedIndex="1" Width="100" VerticalAlignment="Center"> |
|||
<x:StaticExtension Member="xctk:AutoSelectBehavior.Never" /> |
|||
<x:StaticExtension Member="xctk:AutoSelectBehavior.OnFocus" /> |
|||
</ComboBox> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Grid.Column="1" Margin="10,0,0,0"> |
|||
<TextBlock Grid.Row="0" Grid.Column="2" Text="AutoMoveFocus: " VerticalAlignment="Center" /> |
|||
<CheckBox Grid.Row="0" Grid.Column="3" x:Name="_autoMoveFocus" IsChecked="True" VerticalAlignment="Center"/> |
|||
</StackPanel> |
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<StackPanel> |
|||
<TextBlock Text="Usage:" Style="{StaticResource Header}"/> |
|||
<RichTextBox IsReadOnly="True" BorderThickness="0"> |
|||
<FlowDocument> |
|||
<Paragraph> |
|||
<Bold>AutoSelectBehavior:</Bold> |
|||
<LineBreak/> |
|||
The value of the "AutoSelectBehavior" property determines whether the content of the AutoSelectTextBox will be selected or not when the control gets the focus. |
|||
<LineBreak/> |
|||
<LineBreak/> |
|||
<Bold>AutoMoveFocus:</Bold> |
|||
<LineBreak/> |
|||
<Italic>Effect with "MaxLength" property:</Italic> |
|||
<LineBreak/> |
|||
<LineBreak/> |
|||
Setting the "MaxLength" of the text box allows the focus to move from the AutoSelectTextBox once the max length has been reached. |
|||
In the following "Telephone Number" fields, the "MaxLength" properties of the controls have been set to 3, 3, and 4. |
|||
</Paragraph> |
|||
</FlowDocument> |
|||
</RichTextBox> |
|||
|
|||
<!-- PHONE NUMBER FIELDS --> |
|||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> |
|||
<TextBlock Text="(" VerticalAlignment="Center"/> |
|||
<xctk:AutoSelectTextBox MaxLength="3" Width="30" Text="555"/> |
|||
<TextBlock Text=")" VerticalAlignment="Center"/> |
|||
<xctk:AutoSelectTextBox MaxLength="3" Width="30" Text="555"/> |
|||
<TextBlock Text="-" VerticalAlignment="Center"/> |
|||
<xctk:AutoSelectTextBox MaxLength="4" Width="40" Text="5555"/> |
|||
</StackPanel> |
|||
<RichTextBox IsReadOnly="True" BorderThickness="0"> |
|||
<FlowDocument> |
|||
<Paragraph> |
|||
<Italic>Effect with Arrow keys</Italic> |
|||
<LineBreak/> |
|||
<LineBreak/> |
|||
Setting "AutoMoveFocus" to true also allows navigating the focus through the controls using the arrow keys to move the focus up, down, left, or right. |
|||
You are no longer limited to the "left-right" navigation of the "Tab, Shift-Tab" keys. |
|||
</Paragraph> |
|||
</FlowDocument> |
|||
</RichTextBox> |
|||
|
|||
<!-- TEXTBOX MATRIX --> |
|||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<xctk:AutoSelectTextBox Text="Text1" Width="100" /> |
|||
<xctk:AutoSelectTextBox Text="Text2" Width="100"/> |
|||
<xctk:AutoSelectTextBox Text="Text3" Width="100"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<xctk:AutoSelectTextBox Text="Text4" Width="100"/> |
|||
<xctk:AutoSelectTextBox Text="Text5" Width="100"/> |
|||
<xctk:AutoSelectTextBox Text="Text6" Width="100"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<xctk:AutoSelectTextBox Text="Text7" Width="100"/> |
|||
<xctk:AutoSelectTextBox Text="Text8" Width="100"/> |
|||
<xctk:AutoSelectTextBox Text="Text9" Width="100"/> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</local:DemoView> |
|||
@ -0,0 +1,35 @@ |
|||
/************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************/ |
|||
|
|||
using System; |
|||
using System.Windows.Controls; |
|||
using Xceed.Wpf.Toolkit; |
|||
using System.Windows.Media; |
|||
using System.Windows; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for AvalonDockView.xaml |
|||
/// </summary> |
|||
public partial class AvalonDockView : DemoView |
|||
{ |
|||
public AvalonDockView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,120 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views.AvalonDockView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock" |
|||
xmlns:s="clr-namespace:System;assembly=mscorlib" |
|||
Title="AvalonDock"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
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> |
|||
</local:DemoView.Description> |
|||
|
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<TextBlock Grid.Row="1" Text="Usage:" Style="{StaticResource Header}" /> |
|||
|
|||
<xcad:DockingManager Grid.Row="2" MaxHeight="395" |
|||
AllowMixedOrientation="True" |
|||
BorderBrush="Black" |
|||
BorderThickness="1"> |
|||
<xcad:DockingManager.DocumentHeaderTemplate> |
|||
<DataTemplate> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<Image Source="{Binding IconSource}" Margin="0,0,4,0"/> |
|||
<TextBlock Text="{Binding Title}" /> |
|||
</StackPanel> |
|||
</DataTemplate> |
|||
</xcad:DockingManager.DocumentHeaderTemplate> |
|||
<xcad:LayoutRoot x:Name="_layoutRoot"> |
|||
<xcad:LayoutPanel Orientation="Horizontal"> |
|||
<xcad:LayoutAnchorablePane DockWidth="200"> |
|||
<xcad:LayoutAnchorable ContentId="properties" Title="Properties" CanHide="False" CanClose="False" |
|||
AutoHideWidth="240" |
|||
IconSource="../Images/property-blue.png"> |
|||
<xctk:PropertyGrid NameColumnWidth="110" SelectedObject="{Binding ElementName=_layoutRoot, Path=LastFocusedDocument.Content}" AutoGenerateProperties="False"> |
|||
<xctk:PropertyGrid.PropertyDefinitions> |
|||
<xctk:PropertyDefinition TargetProperties="Background" /> |
|||
<xctk:PropertyDefinition TargetProperties="BorderBrush" /> |
|||
<xctk:PropertyDefinition TargetProperties="BorderThickness" /> |
|||
<xctk:PropertyDefinition TargetProperties="FontSize" /> |
|||
<xctk:PropertyDefinition TargetProperties="FontStyle" /> |
|||
<xctk:PropertyDefinition TargetProperties="Width" /> |
|||
<xctk:PropertyDefinition TargetProperties="Height" /> |
|||
</xctk:PropertyGrid.PropertyDefinitions> |
|||
</xctk:PropertyGrid> |
|||
</xcad:LayoutAnchorable> |
|||
</xcad:LayoutAnchorablePane> |
|||
<xcad:LayoutDocumentPaneGroup > |
|||
<xcad:LayoutDocumentPane> |
|||
<xcad:LayoutDocument ContentId="document1" Title="Document 1" IconSource="../Images/document.png" > |
|||
<Button Content="Document 1 Content" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</xcad:LayoutDocument> |
|||
<xcad:LayoutDocument ContentId="document2" Title="Document 2" IconSource="../Images/document.png"> |
|||
<TextBox Text="Document 2 Content" AcceptsReturn="True"/> |
|||
</xcad:LayoutDocument> |
|||
</xcad:LayoutDocumentPane> |
|||
</xcad:LayoutDocumentPaneGroup > |
|||
<xcad:LayoutAnchorablePaneGroup DockWidth="125"> |
|||
<xcad:LayoutAnchorablePane> |
|||
<xcad:LayoutAnchorable ContentId="alarms" Title="Alarms" IconSource="../Images/alarm-clock-blue.png" > |
|||
<ListBox> |
|||
<s:String>Alarm 1</s:String> |
|||
<s:String>Alarm 2</s:String> |
|||
<s:String>Alarm 3</s:String> |
|||
</ListBox> |
|||
</xcad:LayoutAnchorable> |
|||
<xcad:LayoutAnchorable ContentId="journal" Title="Journal" > |
|||
<RichTextBox> |
|||
<FlowDocument> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
This is the content of the Journal Pane. |
|||
<LineBreak/> |
|||
A |
|||
<Bold>RichTextBox</Bold> has been added here |
|||
</Paragraph> |
|||
</FlowDocument> |
|||
</RichTextBox> |
|||
</xcad:LayoutAnchorable> |
|||
</xcad:LayoutAnchorablePane> |
|||
</xcad:LayoutAnchorablePaneGroup> |
|||
</xcad:LayoutPanel> |
|||
|
|||
<xcad:LayoutRoot.LeftSide> |
|||
<xcad:LayoutAnchorSide> |
|||
<xcad:LayoutAnchorGroup> |
|||
<xcad:LayoutAnchorable Title="Agenda" ContentId="agenda" IconSource="../Images/address-book-open.png"> |
|||
<TextBlock Text="Agenda Content" Margin="10" FontSize="18" FontWeight="Black" TextWrapping="Wrap"/> |
|||
</xcad:LayoutAnchorable> |
|||
<xcad:LayoutAnchorable Title="Contacts" ContentId="contacts" IconSource="../Images/address-book--pencil.png" > |
|||
<TextBlock Text="Contacts Content" Margin="10" FontSize="18" FontWeight="Black" TextWrapping="Wrap"/> |
|||
</xcad:LayoutAnchorable> |
|||
</xcad:LayoutAnchorGroup> |
|||
</xcad:LayoutAnchorSide> |
|||
</xcad:LayoutRoot.LeftSide> |
|||
</xcad:LayoutRoot> |
|||
</xcad:DockingManager> |
|||
</Grid> |
|||
</local:DemoView> |
|||
@ -0,0 +1,29 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.BusyIndicator.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for BusyIndicatorCustomContentTemplateView.xaml |
|||
/// </summary> |
|||
public partial class BusyIndicatorCustomContentTemplateView : DemoView |
|||
{ |
|||
public BusyIndicatorCustomContentTemplateView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,73 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.BusyIndicator.Views.BusyIndicatorCustomContentTemplateView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
Title="BusyIndicator Custom Content Template"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
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> |
|||
</local:DemoView.Description> |
|||
|
|||
<local:DemoView.Resources> |
|||
<ResourceDictionary> |
|||
<ResourceDictionary.MergedDictionaries> |
|||
<ResourceDictionary Source="../Resources/Common.xaml" /> |
|||
</ResourceDictionary.MergedDictionaries> |
|||
</ResourceDictionary> |
|||
</local:DemoView.Resources> |
|||
|
|||
<StackPanel Grid.Row="1" Margin="10"> |
|||
<TextBlock Grid.Row="2" Text="Custom Content Template:" Style="{StaticResource Header}" /> |
|||
<xctk:BusyIndicator IsBusy="True"> |
|||
<xctk:BusyIndicator.BusyContentTemplate> |
|||
<DataTemplate> |
|||
<StackPanel Margin="4"> |
|||
<TextBlock Text="Downloading Email" FontWeight="Bold" HorizontalAlignment="Center" /> |
|||
<StackPanel Margin="4"> |
|||
<TextBlock Text="Downloading message 4/10..." /> |
|||
<ProgressBar Value="40" Height="15" /> |
|||
</StackPanel> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<Button Grid.Column="0" Content="Pause" HorizontalAlignment="Right" Margin="0 0 2 0" /> |
|||
<Button Grid.Column="1" Content="Cancel" HorizontalAlignment="Left" Margin="2 0 0 0" /> |
|||
</Grid> |
|||
</StackPanel> |
|||
</DataTemplate> |
|||
</xctk:BusyIndicator.BusyContentTemplate> |
|||
<xctk:BusyIndicator.OverlayStyle> |
|||
<Style TargetType="Rectangle"> |
|||
<Setter Property="Fill" Value="#B1EB1D1D" /> |
|||
</Style> |
|||
</xctk:BusyIndicator.OverlayStyle> |
|||
<xctk:BusyIndicator.ProgressBarStyle> |
|||
<Style TargetType="ProgressBar"> |
|||
<Setter Property="Visibility" Value="Collapsed" /> |
|||
</Style> |
|||
</xctk:BusyIndicator.ProgressBarStyle> |
|||
|
|||
<ContentControl ContentTemplate="{StaticResource SampleContent}" /> |
|||
</xctk:BusyIndicator> |
|||
</StackPanel> |
|||
</local:DemoView> |
|||
|
|||
@ -0,0 +1,29 @@ |
|||
/************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.BusyIndicator.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for BusyIndicatorCustomContentView.xaml |
|||
/// </summary> |
|||
public partial class BusyIndicatorCustomContentView : DemoView |
|||
{ |
|||
public BusyIndicatorCustomContentView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,51 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.BusyIndicator.Views.BusyIndicatorCustomContentView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
Title="BusyIndicator Custom Content"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
This example demonstrates how to define your own custom content. This is done by setting the BusyContent property. |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<local:DemoView.Resources> |
|||
<ResourceDictionary> |
|||
<ResourceDictionary.MergedDictionaries> |
|||
<ResourceDictionary Source="../Resources/Common.xaml" /> |
|||
</ResourceDictionary.MergedDictionaries> |
|||
</ResourceDictionary> |
|||
</local:DemoView.Resources> |
|||
|
|||
<StackPanel Margin="10"> |
|||
<TextBlock Text="Custom Content:" Style="{StaticResource Header}" /> |
|||
<xctk:BusyIndicator IsBusy="True"> |
|||
<xctk:BusyIndicator.BusyContent> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<Image Source="../Images/CdBurning32.png" /> |
|||
<StackPanel Margin="5,0"> |
|||
<TextBlock Text="Burning CD..." VerticalAlignment="Center" /> |
|||
<TextBlock Text="Madonna - Like a Virgin" VerticalAlignment="Center" Margin="8,0" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</xctk:BusyIndicator.BusyContent> |
|||
<ContentControl ContentTemplate="{StaticResource SampleContent}" /> |
|||
</xctk:BusyIndicator> |
|||
</StackPanel> |
|||
</local:DemoView> |
|||
@ -0,0 +1,29 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.BusyIndicator.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for BusyIndicatorView.xaml |
|||
/// </summary> |
|||
public partial class BusyIndicatorView: DemoView |
|||
{ |
|||
public BusyIndicatorView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,75 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.BusyIndicator.Views.BusyIndicatorView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.BusyIndicator.Converters" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
Title="BusyIndicator"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
BusyIndicator makes it easy to let the user know when an application is busy. Simply wrap the relevant content in an instance of the BusyIndicator control and toggle its IsBusy property to True during any long-running process. |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<local:DemoView.Resources> |
|||
<ResourceDictionary> |
|||
<ResourceDictionary.MergedDictionaries> |
|||
<ResourceDictionary Source="../Resources/Common.xaml" /> |
|||
</ResourceDictionary.MergedDictionaries> |
|||
<conv:IntegerToTimespanConverter x:Key="TimeSpanConverter" /> |
|||
</ResourceDictionary> |
|||
</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" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Text="IsBusy:" VerticalAlignment="Center" Margin="2" /> |
|||
<CheckBox x:Name="_isBusy" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5" ToolTip="When true shows the BusyIndicator" /> |
|||
|
|||
<TextBlock Text="DisplayAfter:" Grid.Row="1" VerticalAlignment="Center" Margin="2" /> |
|||
<StackPanel Grid.Row="1" Grid.Column="1" Margin="5" HorizontalAlignment="Left" Orientation="Horizontal"> |
|||
<xctk:IntegerUpDown x:Name="_displayAfter" Width="65" VerticalAlignment="Center" Minimum="0" Increment="100" Text="0" DefaultValue="0" ToolTip="Sets the TimeSpan to wait until the BusyIndicator is displayed." /> |
|||
<TextBlock Text="milliseconds" Margin="5,0" VerticalAlignment="Center" /> |
|||
</StackPanel> |
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<StackPanel Grid.Row="1" Margin="10"> |
|||
<TextBlock Text="Usage:" Style="{StaticResource Header}" /> |
|||
<xctk:BusyIndicator IsBusy="{Binding IsChecked, ElementName=_isBusy}" DisplayAfter="{Binding Value, ElementName=_displayAfter, Converter={StaticResource TimeSpanConverter}}"> |
|||
<ContentControl ContentTemplate="{StaticResource SampleContent}" /> |
|||
</xctk:BusyIndicator> |
|||
</StackPanel> |
|||
</Grid> |
|||
</local:DemoView> |
|||
@ -0,0 +1,54 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
using System; |
|||
using System.Windows.Controls; |
|||
using Xceed.Wpf.Toolkit; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Button.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for ButtonSpinnerView.xaml |
|||
/// </summary> |
|||
public partial class ButtonSpinnerView : DemoView |
|||
{ |
|||
public ButtonSpinnerView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void ButtonSpinner_Spin( object sender, SpinEventArgs e ) |
|||
{ |
|||
String[] names = (String[])this.Resources[ "names" ]; |
|||
|
|||
ButtonSpinner spinner = ( ButtonSpinner )sender; |
|||
TextBox txtBox = ( TextBox )spinner.Content; |
|||
|
|||
int value = Array.IndexOf( names, txtBox.Text ); |
|||
if( e.Direction == SpinDirection.Increase ) |
|||
value++; |
|||
else |
|||
value--; |
|||
|
|||
if( value < 0 ) |
|||
value = names.Length - 1; |
|||
else if( value >= names.Length ) |
|||
value = 0; |
|||
|
|||
txtBox.Text = names[ value ]; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,84 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Button.Views.ButtonSpinnerView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:s="clr-namespace:System;assembly=mscorlib" |
|||
Title="ButtonSpinner"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
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> |
|||
</local:DemoView.Description> |
|||
|
|||
<local:DemoView.Resources> |
|||
|
|||
<x:Array x:Key="names" Type="s:String"> |
|||
<s:String>John Smith</s:String> |
|||
<s:String>Janel Leverling</s:String> |
|||
<s:String>Laura Callahan</s:String> |
|||
<s:String>Robert King</s:String> |
|||
<s:String>Margaret Peacock</s:String> |
|||
<s:String>Andrew Fuller</s:String> |
|||
<s:String>Anne Dodsworth</s:String> |
|||
<s:String>Nancy Davolio</s:String> |
|||
<s:String>Naomi Suyama</s:String> |
|||
</x:Array> |
|||
</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" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Text="AllowSpin:" VerticalAlignment="Center" /> |
|||
<CheckBox x:Name="_allowSpin" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5" ToolTip="When true allows the ButtonSpinner to perform increment/decrement operations." /> |
|||
|
|||
<TextBlock Text="ShowButtonSpinner:" VerticalAlignment="Center" Grid.Row="1" /> |
|||
<CheckBox x:Name="_showButtonSpinner" Grid.Row="1" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5" ToolTip="Gets/Sets the visibility of the button spinners." /> |
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<StackPanel Grid.Row="1" Margin="10"> |
|||
<TextBlock Text="Usage:" Style="{StaticResource Header}" /> |
|||
<TextBlock Text="You can wrap any element by placing it inside the content area of the ButtonSpinner control." |
|||
TextWrapping="Wrap" /> |
|||
|
|||
<xctk:ButtonSpinner Margin="10" |
|||
Width="150" |
|||
HorizontalAlignment="Left" |
|||
AllowSpin="{Binding IsChecked, ElementName=_allowSpin}" |
|||
ShowButtonSpinner="{Binding IsChecked, ElementName=_showButtonSpinner}" |
|||
Spin="ButtonSpinner_Spin"> |
|||
<TextBox Text="John Smith" IsReadOnly="True" BorderThickness="0" HorizontalContentAlignment="Right" /> |
|||
</xctk:ButtonSpinner> |
|||
</StackPanel> |
|||
</Grid> |
|||
</local:DemoView> |
|||
@ -0,0 +1,29 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************/ |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Calculator.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for CalculatorView.xaml |
|||
/// </summary> |
|||
public partial class CalculatorView : DemoView |
|||
{ |
|||
public CalculatorView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,57 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Calculator.Views.CalculatorView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
Title="Calculator"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
The Calculator is a control used for performing mathematical calculations. |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<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" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Text="Precision(decimal places): " VerticalAlignment="Center" /> |
|||
<xctk:IntegerUpDown x:Name="_precision" Grid.Column="1" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" Minimum="0" Value="2" ToolTip="Gets/Sets the maximum number of digits displayed to the right of the decimal point." /> |
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<StackPanel Grid.Row="1" Margin="10"> |
|||
<TextBlock Text="Usage:" Style="{StaticResource Header}" /> |
|||
<TextBlock Text="When the Calculator has focus, you can use the keyboard to interact with the key pad. Click the Calculator to give focus." Margin="10,0" /> |
|||
<xctk:Calculator Margin="10" Width="250" Precision="{Binding Value, ElementName=_precision}" /> |
|||
</StackPanel> |
|||
</Grid> |
|||
</local:DemoView> |
|||
@ -0,0 +1,147 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************/ |
|||
|
|||
#if !OPEN_SOURCE |
|||
using Xceed.Wpf.Toolkit.Chart; |
|||
#endif |
|||
using System.Windows.Media; |
|||
using System.Windows.Controls; |
|||
using System; |
|||
using System.Diagnostics; |
|||
using System.Windows; |
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for ChartAxisView.xaml |
|||
/// </summary> |
|||
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 |
|||
|
|||
public ChartAxisView() |
|||
{ |
|||
InitializeComponent(); |
|||
#if !OPEN_SOURCE |
|||
_axisComboBox.SelectedIndex = 0; |
|||
_xAxis.DateTimeFormat = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern; |
|||
#endif |
|||
} |
|||
|
|||
#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 |
|||
|
|||
#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 |
|||
} |
|||
} |
|||
@ -0,0 +1,220 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views.ChartAxisView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Converters" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
x:Name="_demo" |
|||
Title="Chart Axis"> |
|||
<local:DemoView.Description> |
|||
<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> |
|||
<!--##INCLUDE_OPEN_SOURCE |
|||
<LineBreak /> |
|||
<Run>This feature is only available in the "Plus" version.</Run> |
|||
<LineBreak /> |
|||
<Hyperlink NavigateUri="http://www.xceed.com/Extended_WPF_Toolkit_Intro.html" RequestNavigate="Hyperlink_RequestNavigate"> |
|||
Click here for more details about Xceed Extended WPF Toolkit Plus. |
|||
</Hyperlink> |
|||
##END--> |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<!--##EXCLUDE_OPEN_SOURCE--> |
|||
<local:DemoView.Resources> |
|||
<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="5"> |
|||
<Grid Margin="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="*" /> |
|||
<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="5"/> |
|||
<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="5" /> |
|||
<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}}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5"> |
|||
<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="5" /> |
|||
<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="5" /> |
|||
<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="5" /> |
|||
|
|||
<!-- 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="5" /> |
|||
<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="5" /> |
|||
<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="5" /> |
|||
<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="5" /> |
|||
<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="5" /> |
|||
|
|||
<!-- 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="5" /> |
|||
<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="5" /> |
|||
<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="5" /> |
|||
<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="5" /> |
|||
<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="5" /> |
|||
<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="5" /> |
|||
</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"/> |
|||
</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"/> |
|||
</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"/> |
|||
##END--> |
|||
</local:DemoView> |
|||
@ -0,0 +1,34 @@ |
|||
/************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
**************************************************************************************/ |
|||
|
|||
#if !OPEN_SOURCE |
|||
using Xceed.Wpf.Toolkit.Chart; |
|||
#endif |
|||
using System.Windows.Media; |
|||
using System.Diagnostics; |
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for ChartLegendView.xaml |
|||
/// </summary> |
|||
public partial class ChartLegendView : DemoView |
|||
{ |
|||
public ChartLegendView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,162 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views.ChartLegendView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:xctkconv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters;assembly=Xceed.Wpf.Toolkit" |
|||
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Converters" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
Title="Chart Legend"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
<Run>The chart control contains a collection of areas which each contain a collection of series. A single legend will combine all the series from all the areas in one place. Here, 2 areas are used to display 2 series.</Run> |
|||
<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> |
|||
<!--##INCLUDE_OPEN_SOURCE |
|||
<LineBreak /> |
|||
<Run>This feature is only available in the "Plus" version.</Run> |
|||
<LineBreak /> |
|||
<Hyperlink NavigateUri="http://www.xceed.com/Extended_WPF_Toolkit_Intro.html" RequestNavigate="Hyperlink_RequestNavigate"> |
|||
Click here for more details about Xceed Extended WPF Toolkit Plus. |
|||
</Hyperlink> |
|||
##END--> |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<!--##EXCLUDE_OPEN_SOURCE--> |
|||
<local:DemoView.Resources> |
|||
<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"/> |
|||
##END--> |
|||
</local:DemoView> |
|||
@ -0,0 +1,175 @@ |
|||
/************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
#if !OPEN_SOURCE |
|||
using Xceed.Wpf.Toolkit.Chart; |
|||
#endif |
|||
using System.Windows.Media; |
|||
using System.Windows; |
|||
using Xceed.Wpf.Toolkit.Panels; |
|||
using System; |
|||
using System.Diagnostics; |
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for ChartSeriesBasicTypesView.xaml |
|||
/// </summary> |
|||
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 |
|||
|
|||
public ChartSeriesBasicTypesView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
#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 |
|||
|
|||
#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 |
|||
} |
|||
} |
|||
@ -0,0 +1,163 @@ |
|||
<!--************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views.ChartSeriesBasicTypesView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:xctkconv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters;assembly=Xceed.Wpf.Toolkit" |
|||
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Converters" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
Title="Chart Series Basic Types"> |
|||
<local:DemoView.Description> |
|||
<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> |
|||
<!--##INCLUDE_OPEN_SOURCE |
|||
<LineBreak /> |
|||
<Run>This feature is only available in the "Plus" version.</Run> |
|||
<LineBreak /> |
|||
<Hyperlink NavigateUri="http://www.xceed.com/Extended_WPF_Toolkit_Intro.html" RequestNavigate="Hyperlink_RequestNavigate"> |
|||
Click here for more details about Xceed Extended WPF Toolkit Plus. |
|||
</Hyperlink> |
|||
##END--> |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<!--##EXCLUDE_OPEN_SOURCE--> |
|||
<local:DemoView.Resources> |
|||
<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"/> |
|||
##END--> |
|||
</local:DemoView> |
|||
@ -0,0 +1,37 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************/ |
|||
|
|||
#if !OPEN_SOURCE |
|||
using Xceed.Wpf.Toolkit.Chart; |
|||
#endif |
|||
using System.Windows.Media; |
|||
using System; |
|||
using System.Collections.ObjectModel; |
|||
using System.Collections.Generic; |
|||
using System.Diagnostics; |
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for ChartSeriesDataPointsBindingView.xaml |
|||
/// </summary> |
|||
public partial class ChartSeriesDataPointsBindingView : DemoView |
|||
{ |
|||
public ChartSeriesDataPointsBindingView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,82 @@ |
|||
<!--************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views.ChartSeriesDataPointsBindingView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:xctkconv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters;assembly=Xceed.Wpf.Toolkit" |
|||
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Converters" |
|||
xmlns:sample="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
Title="Chart Series DataPoints Binding"> |
|||
<local:DemoView.Description> |
|||
<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> |
|||
<!--##INCLUDE_OPEN_SOURCE |
|||
<LineBreak /> |
|||
<Run>This feature is only available in the "Plus" version.</Run> |
|||
<LineBreak /> |
|||
<Hyperlink NavigateUri="http://www.xceed.com/Extended_WPF_Toolkit_Intro.html" RequestNavigate="Hyperlink_RequestNavigate"> |
|||
Click here for more details about Xced Extended WPF Toolkit Plus. |
|||
</Hyperlink> |
|||
##END--> |
|||
</Paragraph> |
|||
</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"/> |
|||
##END--> |
|||
</local:DemoView> |
|||
@ -0,0 +1,37 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************/ |
|||
|
|||
#if !OPEN_SOURCE |
|||
using Xceed.Wpf.Toolkit.Chart; |
|||
#endif |
|||
using System.Windows.Media; |
|||
using System.Windows.Controls; |
|||
using System; |
|||
using System.Windows; |
|||
using System.Diagnostics; |
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for ChartStylingAxesGridView.xaml |
|||
/// </summary> |
|||
public partial class ChartStylingAxesGridView : DemoView |
|||
{ |
|||
public ChartStylingAxesGridView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,201 @@ |
|||
<!--************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views.ChartStylingAxesGridView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Converters" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
Title="Chart Styling Axes Grid"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
<Run>This sample shows how AxesGrid elements can be styled using a DataTemplate.</Run> |
|||
<!--##INCLUDE_OPEN_SOURCE |
|||
<LineBreak /> |
|||
<Run>This feature is only available in the "Plus" version.</Run> |
|||
<LineBreak /> |
|||
<Hyperlink NavigateUri="http://www.xceed.com/Extended_WPF_Toolkit_Intro.html" RequestNavigate="Hyperlink_RequestNavigate"> |
|||
Click here for more details about Xceed Extended WPF Toolkit Plus. |
|||
</Hyperlink> |
|||
##END--> |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<!--##EXCLUDE_OPEN_SOURCE--> |
|||
<local:DemoView.Resources> |
|||
<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"/> |
|||
##END--> |
|||
</local:DemoView> |
|||
@ -0,0 +1,35 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
#if !OPEN_SOURCE |
|||
using Xceed.Wpf.Toolkit.Chart; |
|||
#endif |
|||
using System.Windows.Media; |
|||
using System.Windows.Controls; |
|||
using System.Diagnostics; |
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for ChartStylingColumnSeriesView.xaml |
|||
/// </summary> |
|||
public partial class ChartStylingColumnSeriesView : DemoView |
|||
{ |
|||
public ChartStylingColumnSeriesView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,199 @@ |
|||
<!--*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views.ChartStylingColumnSeriesView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Converters" |
|||
xmlns:sample="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
Title="Chart Styling Column Series"> |
|||
<local:DemoView.Description> |
|||
<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> |
|||
<!--##EXCLUDE_OPEN_SOURCE--> |
|||
<Run>Please move mouse on line and markers to see simple effects.</Run> |
|||
<!--##END--> |
|||
|
|||
<!--##INCLUDE_OPEN_SOURCE |
|||
<LineBreak /> |
|||
<Run>This feature is only available in the "Plus" version.</Run> |
|||
<LineBreak /> |
|||
<Hyperlink NavigateUri="http://www.xceed.com/Extended_WPF_Toolkit_Intro.html" RequestNavigate="Hyperlink_RequestNavigate"> |
|||
Click here for more details about Xceed Extended WPF Toolkit Plus. |
|||
</Hyperlink> |
|||
##END--> |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<!--##EXCLUDE_OPEN_SOURCE--> |
|||
<local:DemoView.Resources> |
|||
<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"/> |
|||
##END--> |
|||
</local:DemoView> |
|||
@ -0,0 +1,49 @@ |
|||
/************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
#if !OPEN_SOURCE |
|||
using Xceed.Wpf.Toolkit.Chart; |
|||
#endif |
|||
using System.Windows.Media; |
|||
using System.Windows.Controls; |
|||
using System.Windows; |
|||
using System; |
|||
using System.Diagnostics; |
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for ChartStylingLineSeriesView.xaml |
|||
/// </summary> |
|||
public partial class ChartStylingLineSeriesView : DemoView |
|||
{ |
|||
public ChartStylingLineSeriesView() |
|||
{ |
|||
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 |
|||
} |
|||
} |
|||
@ -0,0 +1,167 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views.ChartStylingLineSeriesView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Converters" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
Title="Chart Styling Line Series"> |
|||
<local:DemoView.Description> |
|||
<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> |
|||
<!--##EXCLUDE_OPEN_SOURCE--> |
|||
<Run>Please move mouse along the line and over the markers to see simple effects.</Run> |
|||
<!--##END--> |
|||
|
|||
<!--##INCLUDE_OPEN_SOURCE |
|||
<LineBreak /> |
|||
<Run>This feature is only available in the "Plus" version.</Run> |
|||
<LineBreak /> |
|||
<Hyperlink NavigateUri="http://www.xceed.com/Extended_WPF_Toolkit_Intro.html" RequestNavigate="Hyperlink_RequestNavigate"> |
|||
Click here for more details about Xceed Extended WPF Toolkit Plus. |
|||
</Hyperlink> |
|||
##END--> |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<!--##EXCLUDE_OPEN_SOURCE--> |
|||
<local:DemoView.Resources> |
|||
<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"/> |
|||
##END--> |
|||
</local:DemoView> |
|||
@ -0,0 +1,39 @@ |
|||
/************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
#if !OPEN_SOURCE |
|||
using Xceed.Wpf.Toolkit.Chart; |
|||
#endif |
|||
using System.Windows.Media; |
|||
using System.Windows.Controls; |
|||
using System; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows; |
|||
using System.Diagnostics; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for ChartStylingPieSeriesView.xaml |
|||
/// </summary> |
|||
public partial class ChartStylingPieSeriesView : DemoView |
|||
{ |
|||
public ChartStylingPieSeriesView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,198 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views.ChartStylingPieSeriesView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Converters" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
Title="Chart Styling Pie Series"> |
|||
<local:DemoView.Description> |
|||
<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> |
|||
<!--##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 /> |
|||
<Run>This feature is only available in the "Plus" version.</Run> |
|||
<LineBreak /> |
|||
<Hyperlink NavigateUri="http://www.xceed.com/Extended_WPF_Toolkit_Intro.html" RequestNavigate="Hyperlink_RequestNavigate"> |
|||
Click here for more details about Xceed Extended WPF Toolkit Plus. |
|||
</Hyperlink> |
|||
##END--> |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<!--##EXCLUDE_OPEN_SOURCE--> |
|||
<local:DemoView.Resources> |
|||
<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"/> |
|||
##END--> |
|||
</local:DemoView> |
|||
@ -0,0 +1,129 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.ComponentModel; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.CheckLists.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for CheckListsView.xaml |
|||
/// </summary> |
|||
public partial class CheckListsView : DemoView |
|||
{ |
|||
public CheckListsView() |
|||
{ |
|||
InitializeComponent(); |
|||
this.DataContext = new List<Person>() |
|||
{ |
|||
new Person(){ID=101, FirstName="John", LastName="Smith"}, |
|||
new Person(){ID=102, FirstName="Janel", LastName="Leverling"}, |
|||
new Person(){ID=103, FirstName="Laura", LastName="Callahan"}, |
|||
new Person(){ID=104, FirstName="Robert", LastName="King"}, |
|||
new Person(){ID=105, FirstName="Margaret", LastName="Peacock"}, |
|||
new Person(){ID=106, FirstName="Andrew", LastName="Fuller"}, |
|||
new Person(){ID=107, FirstName="Anne", LastName="Dodsworth"}, |
|||
new Person(){ID=108, FirstName="Nancy", LastName="Davolio"}, |
|||
new Person(){ID=109, FirstName="Naomi", LastName="Suyama"}, |
|||
}; |
|||
} |
|||
|
|||
} |
|||
|
|||
public class Person : INotifyPropertyChanged |
|||
{ |
|||
private bool _isSelected; |
|||
private int _ID; |
|||
private string _firstName; |
|||
private string _lastName; |
|||
|
|||
public bool IsSelected |
|||
{ |
|||
get |
|||
{ |
|||
return _isSelected; |
|||
} |
|||
set |
|||
{ |
|||
_isSelected = value; |
|||
OnPropertyChanged( "IsSelected" ); |
|||
} |
|||
} |
|||
|
|||
public int ID |
|||
{ |
|||
get |
|||
{ |
|||
return _ID; |
|||
} |
|||
set |
|||
{ |
|||
_ID = value; |
|||
OnPropertyChanged( "ID" ); |
|||
} |
|||
} |
|||
|
|||
public string FirstName |
|||
{ |
|||
get |
|||
{ |
|||
return _firstName; |
|||
} |
|||
set |
|||
{ |
|||
_firstName = value; |
|||
OnPropertyChanged( "FirstName" ); |
|||
} |
|||
} |
|||
|
|||
public string LastName |
|||
{ |
|||
get |
|||
{ |
|||
return _lastName; |
|||
} |
|||
set |
|||
{ |
|||
_lastName = value; |
|||
OnPropertyChanged( "LastName" ); |
|||
} |
|||
} |
|||
|
|||
public string ModelDisplay |
|||
{ |
|||
get |
|||
{ |
|||
string completeName = string.Format("{0} {1}", FirstName, LastName).PadRight(20); |
|||
return string.Format( |
|||
"ID={0}: Name= {1}, IsSelected= {2}", |
|||
ID, |
|||
completeName, |
|||
IsSelected ); |
|||
} |
|||
} |
|||
|
|||
public event PropertyChangedEventHandler PropertyChanged; |
|||
protected void OnPropertyChanged( string propertyName ) |
|||
{ |
|||
if( PropertyChanged != null ) |
|||
{ |
|||
PropertyChanged( this, new PropertyChangedEventArgs( propertyName ) ); |
|||
PropertyChanged( this, new PropertyChangedEventArgs( "ModelDisplay" ) ); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,183 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.CheckLists.Views.CheckListsView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:s="clr-namespace:System;assembly=mscorlib" |
|||
x:Name="demo" |
|||
Title="Check lists"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
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> |
|||
</local:DemoView.Description> |
|||
|
|||
<local:DemoView.Resources> |
|||
<x:Array x:Key="personProperties" Type="s:String"> |
|||
<s:String>ID</s:String> |
|||
<s:String>FirstName</s:String> |
|||
<s:String>LastName</s:String> |
|||
</x:Array> |
|||
</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> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition /> |
|||
<RowDefinition /> |
|||
<RowDefinition /> |
|||
<RowDefinition /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Grid.Row="0" Grid.Column="0" |
|||
Text="Delimiter:" |
|||
Margin="2,5,5,5"/> |
|||
<TextBox x:Name="_delimiter" |
|||
Grid.Row="0" Grid.Column="1" |
|||
Width="200" |
|||
Margin="5" |
|||
HorizontalAlignment="Left" |
|||
Text="," /> |
|||
|
|||
<TextBlock Grid.Row="1" Grid.Column="0" |
|||
Text="ValueMemberPath:" |
|||
Margin="2,5,5,5"/> |
|||
<ComboBox x:Name="_valueMemberPath" |
|||
Grid.Row="1" Grid.Column="1" |
|||
HorizontalAlignment="Left" |
|||
Width="100" |
|||
Margin="5" |
|||
ItemsSource="{StaticResource personProperties}" |
|||
SelectedIndex="0"/> |
|||
|
|||
<TextBlock Grid.Row="2" Grid.Column="0" |
|||
Text="SelectedValue:" |
|||
Margin="2,5,5,5"/> |
|||
<TextBox x:Name="_selectedValue" |
|||
Grid.Row="2" Grid.Column="1" |
|||
Width="200" |
|||
Margin="5" |
|||
HorizontalAlignment="Left" |
|||
Text="{Binding ElementName=_checkListBox, Path=SelectedValue, Mode=TwoWay}"/> |
|||
|
|||
<TextBlock Grid.Row="0" Grid.Column="2" |
|||
Text="SelectedMemberPath:" |
|||
Margin="2,5,5,5"/> |
|||
<TextBox x:Name="_selectedMemberPath" |
|||
Grid.Row="0" Grid.Column="3" |
|||
Margin="5" |
|||
Width="125" |
|||
HorizontalAlignment="Left" |
|||
IsEnabled="False" |
|||
Text="IsSelected" /> |
|||
|
|||
<TextBlock Grid.Row="1" Grid.Column="2" |
|||
Text="DisplayMemberPath:" |
|||
Margin="5"/> |
|||
<ComboBox x:Name="_displayMemberPath" |
|||
Grid.Row="1" Grid.Column="3" |
|||
Width="125" |
|||
Margin="5" |
|||
HorizontalAlignment="Left" |
|||
ItemsSource="{StaticResource personProperties}" |
|||
SelectedIndex="1"/> |
|||
<TextBlock Grid.Row="2" Grid.Column="2" |
|||
Text="IsDropDownOpen:" |
|||
Margin="5"/> |
|||
<CheckBox x:Name="_isDropDownOpen" |
|||
Grid.Row="2" Grid.Column="3" |
|||
Margin="5" |
|||
HorizontalAlignment="Left" |
|||
Content="(CheckComboBox only)" |
|||
ClickMode="Press" |
|||
IsChecked="{Binding IsDropDownOpen, ElementName=_checkComboBox}" /> |
|||
<TextBlock Grid.Row="3" Grid.Column="2" |
|||
Text="MaxDropDownHeight:" |
|||
Margin="5"/> |
|||
<StackPanel Orientation="Horizontal" |
|||
Grid.Row="3" Grid.Column="3" |
|||
HorizontalAlignment="Left" |
|||
Margin="5"> |
|||
<xctk:DoubleUpDown x:Name="_maxDropDownHeight" |
|||
Width="45" |
|||
Value="{Binding MaxDropDownHeight, ElementName=_checkComboBox}" |
|||
DefaultValue="150" |
|||
AllowInputSpecialValues="PositiveInfinity" |
|||
Minimum="0"/> |
|||
<TextBlock Text="(CheckComboBox only)" |
|||
Margin="4"/> |
|||
</StackPanel> |
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<GroupBox Header="Item Models" Grid.Row="1" Margin="5"> |
|||
<ListBox DisplayMemberPath="ModelDisplay" FontFamily="Global Monospace" |
|||
ItemsSource="{Binding}"/> |
|||
</GroupBox> |
|||
|
|||
<Grid Grid.Row="2"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="*" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Text="CheckListBox Usage:" Margin="5" Style="{StaticResource Header}" /> |
|||
<xctk:CheckListBox x:Name="_checkListBox" |
|||
Grid.Column="0" |
|||
Grid.Row="1" |
|||
Margin="5" |
|||
VerticalAlignment="Stretch" |
|||
ItemsSource="{Binding}" |
|||
Delimiter="{Binding ElementName=_delimiter, Path=Text}" |
|||
ValueMemberPath="{Binding ElementName=_valueMemberPath, Path=SelectedItem}" |
|||
SelectedMemberPath="{Binding ElementName=_selectedMemberPath, Path=Text}" |
|||
DisplayMemberPath="{Binding ElementName=_displayMemberPath, Path=SelectedItem}" /> |
|||
|
|||
<TextBlock Text="CheckComboBox Usage:" Grid.Column="1" Margin="5" Style="{StaticResource Header}"/> |
|||
<xctk:CheckComboBox Grid.Column="1" |
|||
x:Name="_checkComboBox" |
|||
Grid.Row="1" |
|||
Margin="5" |
|||
VerticalAlignment="Top" |
|||
ItemsSource="{Binding}" |
|||
Delimiter="{Binding ElementName=_delimiter, Path=Text}" |
|||
ValueMemberPath="{Binding ElementName=_valueMemberPath, Path=SelectedItem}" |
|||
SelectedMemberPath="{Binding ElementName=_selectedMemberPath, Path=Text}" |
|||
DisplayMemberPath="{Binding ElementName=_displayMemberPath, Path=SelectedItem}" |
|||
IsDropDownOpen="false" |
|||
MaxDropDownHeight="100"/> |
|||
</Grid> |
|||
</Grid> |
|||
</local:DemoView> |
|||
@ -0,0 +1,33 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
using System.Windows.Controls; |
|||
using Xceed.Wpf.Toolkit; |
|||
using System.Diagnostics; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Window.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for ChildWindowView.xaml |
|||
/// </summary> |
|||
public partial class ChildWindowView : DemoView |
|||
{ |
|||
public ChildWindowView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,148 @@ |
|||
<!--**************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Window.Views.ChildWindowView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Window.Converters" |
|||
xmlns:xctkconv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters;assembly=Xceed.Wpf.Toolkit" |
|||
Title="ChildWindow"> |
|||
<local:DemoView.Description> |
|||
<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> |
|||
<!--##INCLUDE_OPEN_SOURCE |
|||
<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> |
|||
<LineBreak /> |
|||
<Hyperlink NavigateUri="http://www.xceed.com/Extended_WPF_Toolkit_Intro.html" RequestNavigate="Hyperlink_RequestNavigate"> |
|||
Click here for more details about Xceed Extended WPF Toolkit Plus. |
|||
</Hyperlink> |
|||
##END--> |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<local:DemoView.Resources> |
|||
<conv:IntToBoolConverter x:Key="IntToBoolConverter" /> |
|||
<xctkconv:VisibilityToBoolConverter x:Key="VisibilityToBoolConverter" Inverted="True"/> |
|||
|
|||
<ObjectDataProvider x:Key="WindowStates" MethodName="GetValues" |
|||
ObjectType="{x:Type sys:Enum}"> |
|||
<ObjectDataProvider.MethodParameters> |
|||
<x:Type TypeName="xctk:WindowState" /> |
|||
</ObjectDataProvider.MethodParameters> |
|||
</ObjectDataProvider> |
|||
<ObjectDataProvider x:Key="WindowStartupLocations" MethodName="GetValues" |
|||
ObjectType="{x:Type sys:Enum}"> |
|||
<ObjectDataProvider.MethodParameters> |
|||
<x:Type TypeName="xctk:WindowStartupLocation" /> |
|||
</ObjectDataProvider.MethodParameters> |
|||
</ObjectDataProvider> |
|||
</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" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Text="Caption:" Margin="2" VerticalAlignment="Center" /> |
|||
<TextBox Name="_txtCaption" Grid.Column="1" Margin="5" Text="ChildWindow" Width="150" VerticalAlignment="Center" /> |
|||
|
|||
<TextBlock Grid.Row="1" Name="textBlock2" Text="Left:" Margin="2" VerticalAlignment="Center" IsEnabled="{Binding IsEnabled, ElementName=_txtLeft}" Style="{StaticResource DisableGrayText}"/> |
|||
<xctk:DoubleUpDown x:Name="_txtLeft" Grid.Column="1" Grid.Row="1" Value="0" Minimum="0" VerticalAlignment="Center" Margin="5" IsEnabled="{Binding SelectedIndex, ElementName=_cboWindowStartupLocations}"/> |
|||
|
|||
<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}"/> |
|||
|
|||
<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" /> |
|||
|
|||
<TextBlock Grid.Row="1" Text="WindowStartupLocation:" VerticalAlignment="Center" Margin="10,2,2,2" Grid.Column="2" IsEnabled="{Binding IsEnabled, ElementName=_cboWindowStartupLocations}" Style="{StaticResource DisableGrayText}"/> |
|||
<ComboBox Grid.Column="3" Grid.Row="1" Name="_cboWindowStartupLocations" ItemsSource="{Binding Source={StaticResource WindowStartupLocations}}" SelectedIndex="1" VerticalAlignment="Center" Width="70" Margin="5" IsEnabled="{Binding SelectedIndex, ElementName=_cboWindowState, Converter={StaticResource IntToBoolConverter}}"/> |
|||
|
|||
<TextBlock Grid.Row="2" Text="WindowState:" VerticalAlignment="Center" Margin="10,2,2,2" Grid.Column="2" /> |
|||
<ComboBox Grid.Column="3" Grid.Row="2" Name="_cboWindowState" ItemsSource="{Binding Source={StaticResource WindowStates}}" SelectedIndex="1" VerticalAlignment="Center" Margin="5" /> |
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<Grid Grid.Row="1" Margin="10"> |
|||
<xctk:WindowContainer ModalBackgroundBrush="LightGray"> |
|||
<xctk:ChildWindow x:Name="_childWindow" |
|||
Width="350" |
|||
Height="220" |
|||
Caption="{Binding Text, ElementName=_txtCaption}" |
|||
IsModal="{Binding IsChecked, ElementName=_chkIsModal}" |
|||
Left="{Binding Value, ElementName=_txtLeft, Mode=TwoWay}" |
|||
Top="{Binding Value, ElementName=_txtTop, Mode=TwoWay}" |
|||
WindowStartupLocation="{Binding SelectedItem, ElementName=_cboWindowStartupLocations}" |
|||
WindowState="{Binding SelectedItem, ElementName=_cboWindowState}"> |
|||
<Grid Margin="10" > |
|||
<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="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Grid.Row="0" Text="First Name:" Margin="2" VerticalAlignment="Center" /> |
|||
<xctk:WatermarkTextBox Grid.Row="0" Grid.Column="1" Margin="2" VerticalAlignment="Center" Watermark="Enter First Name" /> |
|||
|
|||
<TextBlock Grid.Row="1" Text="Last Name:" Margin="2" VerticalAlignment="Center" /> |
|||
<xctk:WatermarkTextBox Grid.Row="1" Grid.Column="1" Margin="2" VerticalAlignment="Center" Watermark="Enter Last Name" /> |
|||
|
|||
<TextBlock Grid.Row="2" Text="Date of Birth:" Margin="2" VerticalAlignment="Center" /> |
|||
<xctk:DateTimeUpDown Grid.Row="2" Grid.Column="1" Format="ShortDate" Margin="2" VerticalAlignment="Center" Watermark="Enter Date of Birth" /> |
|||
|
|||
<TextBlock Grid.Row="3" Text="Salary:" Margin="2" VerticalAlignment="Center" /> |
|||
<xctk:IntegerUpDown Grid.Row="3" Grid.Column="1" FormatString="C2" Margin="2" VerticalAlignment="Center" Watermark="Enter Salary" /> |
|||
|
|||
<TextBlock Grid.Row="4" Text="Favorite Color:" Margin="2" VerticalAlignment="Center" /> |
|||
<xctk:ColorPicker Grid.Row="4" Grid.Column="1" Margin="2" VerticalAlignment="Center" /> |
|||
|
|||
<StackPanel Grid.Row="5" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,10,0,0"> |
|||
<Button Width="65" Margin="2">OK</Button> |
|||
<Button Width="65" Margin="2">Cancel</Button> |
|||
</StackPanel> |
|||
</Grid> |
|||
</xctk:ChildWindow> |
|||
</xctk:WindowContainer> |
|||
</Grid> |
|||
</Grid> |
|||
</local:DemoView> |
|||
@ -0,0 +1,34 @@ |
|||
/************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************/ |
|||
|
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.ComponentModel; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Color.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for ColorView.xaml |
|||
/// </summary> |
|||
public partial class ColorView : DemoView |
|||
{ |
|||
public ColorView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,297 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Color.Views.ColorView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
Title="Color"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" |
|||
FontFamily="Segoe"> |
|||
The ColorCanvas and ColorPicker controls allow the user to input a color. Not shown in the sample are the ColorPicker's Available, Standard and Recent color lists, which are entirely customizable. |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<local:DemoView.Resources> |
|||
<Style x:Key="controlInError" |
|||
TargetType="xctk:IntegerUpDown"> |
|||
<Style.Triggers> |
|||
<Trigger Property="Validation.HasError" |
|||
Value="true"> |
|||
<Setter Property="ToolTip" |
|||
Value="{Binding RelativeSource={x:Static RelativeSource.Self}, |
|||
Path=(Validation.Errors).CurrentItem.ErrorContent}" /> |
|||
</Trigger> |
|||
</Style.Triggers> |
|||
</Style> |
|||
|
|||
<ObjectDataProvider x:Key="ColorModeOptions" MethodName="GetValues" |
|||
ObjectType="{x:Type sys:Enum}"> |
|||
<ObjectDataProvider.MethodParameters> |
|||
<x:Type TypeName="xctk:ColorMode" /> |
|||
</ObjectDataProvider.MethodParameters> |
|||
</ObjectDataProvider> |
|||
</local:DemoView.Resources> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="*" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<Grid Grid.Column="0" |
|||
Margin="5"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<GroupBox Grid.Column="0" |
|||
Grid.Row="0" |
|||
Header="ColorCanvas Features" |
|||
HorizontalAlignment="Stretch"> |
|||
<Grid> |
|||
<Grid.Resources> |
|||
<Style x:Key="alignStyle" |
|||
TargetType="{x:Type FrameworkElement}"> |
|||
<Setter Property="Margin" |
|||
Value="5" /> |
|||
</Style> |
|||
|
|||
<Style TargetType="{x:Type TextBlock}" |
|||
BasedOn="{StaticResource alignStyle}" /> |
|||
<Style TargetType="{x:Type TextBox}" |
|||
BasedOn="{StaticResource alignStyle}" /> |
|||
<Style TargetType="{x:Type CheckBox}" |
|||
BasedOn="{StaticResource alignStyle}" /> |
|||
<Style TargetType="{x:Type xctk:IntegerUpDown}" |
|||
BasedOn="{StaticResource alignStyle}"> |
|||
<Setter Property="Width" |
|||
Value="45" /> |
|||
<Setter Property="Minimum" |
|||
Value="0" /> |
|||
<Setter Property="Maximum" |
|||
Value="255" /> |
|||
</Style> |
|||
</Grid.Resources> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<StackPanel Grid.Row="0" |
|||
Grid.Column="0" |
|||
Grid.ColumnSpan="2" |
|||
HorizontalAlignment="Stretch" |
|||
Orientation="Horizontal"> |
|||
<TextBlock Text="R:" /> |
|||
<xctk:IntegerUpDown x:Name="_R" |
|||
Value="{Binding ElementName=_colorCanvas, Path=R, Mode=TwoWay}" |
|||
Minimum="0" |
|||
Maximum="255" |
|||
Style="{StaticResource controlInError}" /> |
|||
<TextBlock Text="G:" |
|||
Margin="5" /> |
|||
<xctk:IntegerUpDown x:Name="_G" |
|||
Value="{Binding ElementName=_colorCanvas, Path=G, Mode=TwoWay}" |
|||
Minimum="0" |
|||
Maximum="255" |
|||
Style="{StaticResource controlInError}" /> |
|||
<TextBlock Text="B:" |
|||
Margin="5" /> |
|||
<xctk:IntegerUpDown x:Name="_B" |
|||
Value="{Binding ElementName=_colorCanvas, Path=B, Mode=TwoWay}" |
|||
Minimum="0" |
|||
Maximum="255" |
|||
Style="{StaticResource controlInError}" /> |
|||
<TextBlock Text="A:" |
|||
Margin="5" /> |
|||
<xctk:IntegerUpDown x:Name="_A" |
|||
Value="{Binding ElementName=_colorCanvas, Path=A, Mode=TwoWay}" |
|||
Minimum="0" |
|||
Maximum="255" |
|||
Style="{StaticResource controlInError}" /> |
|||
</StackPanel> |
|||
|
|||
<TextBlock Grid.Column="0" |
|||
Grid.Row="1" |
|||
Text="UsingAlphaChannel: " /> |
|||
<CheckBox Grid.Column="1" |
|||
Grid.Row="1" |
|||
x:Name="_usingAlphaChannel" |
|||
IsChecked="{Binding ElementName=_colorCanvas, Path=UsingAlphaChannel, Mode=TwoWay}" /> |
|||
<TextBlock Grid.Column="0" |
|||
Grid.Row="2" |
|||
Text="HexadecimalString: " /> |
|||
<TextBox Grid.Column="1" |
|||
Grid.Row="2" |
|||
IsEnabled="False" |
|||
Text="{Binding ElementName=_colorCanvas, Path=HexadecimalString}" /> |
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<TextBlock Text="ColorCanvas Usage: " |
|||
Grid.Row="1" |
|||
Margin="0,10,0,0" |
|||
Style="{StaticResource Header}" /> |
|||
<xctk:ColorCanvas x:Name="_colorCanvas" |
|||
Grid.Row="2" |
|||
VerticalAlignment="Top" |
|||
HorizontalAlignment="Stretch" /> |
|||
|
|||
</Grid> |
|||
|
|||
<Grid Grid.Column="1" |
|||
Margin="5"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<GroupBox Grid.Column="0" |
|||
Grid.Row="0" |
|||
Header="ColorPicker Features" |
|||
HorizontalAlignment="Stretch" |
|||
Margin="10"> |
|||
<Grid> |
|||
<Grid.Resources> |
|||
<Style TargetType="{x:Type TextBlock}"> |
|||
<Setter Property="Margin" |
|||
Value="3" /> |
|||
<Setter Property="VerticalAlignment" |
|||
Value="Center" /> |
|||
</Style> |
|||
<Style TargetType="{x:Type TextBox}"> |
|||
<Setter Property="Margin" |
|||
Value="3" /> |
|||
</Style> |
|||
<Style TargetType="{x:Type CheckBox}"> |
|||
<Setter Property="Margin" |
|||
Value="3" /> |
|||
</Style> |
|||
<Style TargetType="{x:Type ComboBox}"> |
|||
<Setter Property="Margin" |
|||
Value="3" /> |
|||
</Style> |
|||
</Grid.Resources> |
|||
<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" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Grid.Column="0" |
|||
Grid.Row="0" |
|||
Text="ColorMode:" /> |
|||
<ComboBox Grid.Column="1" |
|||
Grid.Row="0" |
|||
ItemsSource="{Binding Source={StaticResource ColorModeOptions}}" |
|||
SelectedItem="{Binding ElementName=_colorPicker, Path=ColorMode, Mode=TwoWay}" |
|||
Height="22"/> |
|||
<TextBlock Grid.Column="0" |
|||
Grid.Row="1" |
|||
Text="AvailableColorsHeader:" /> |
|||
<TextBox Grid.Column="1" |
|||
Grid.Row="1" |
|||
Text="{Binding ElementName=_colorPicker, Path=AvailableColorsHeader, Mode=TwoWay}" /> |
|||
<TextBlock Grid.Column="0" |
|||
Grid.Row="2" |
|||
Text="RecentColorsHeader:" /> |
|||
<TextBox Grid.Column="1" |
|||
Grid.Row="2" |
|||
Text="{Binding ElementName=_colorPicker, Path=RecentColorsHeader, Mode=TwoWay}" /> |
|||
<TextBlock Grid.Column="0" |
|||
Grid.Row="3" |
|||
Text="StandardColorsHeader:" /> |
|||
<TextBox Grid.Column="1" |
|||
Grid.Row="3" |
|||
Text="{Binding ElementName=_colorPicker, Path=StandardColorsHeader, Mode=TwoWay}" /> |
|||
|
|||
<CheckBox Grid.Column="0" |
|||
Grid.Row="4" |
|||
Grid.ColumnSpan="2" |
|||
Content="DisplayColorAndName" |
|||
IsChecked="{Binding ElementName=_colorPicker, Path=DisplayColorAndName, Mode=TwoWay}" /> |
|||
<CheckBox Grid.Column="0" |
|||
Grid.Row="5" |
|||
Grid.ColumnSpan="2" |
|||
Content="ShowAdvancedButton" |
|||
IsChecked="{Binding ElementName=_colorPicker, Path=ShowAdvancedButton, Mode=TwoWay}" /> |
|||
<CheckBox Grid.Column="0" |
|||
Grid.Row="6" |
|||
Grid.ColumnSpan="2" |
|||
Content="ShowAvailableColors" |
|||
IsChecked="{Binding ElementName=_colorPicker, Path=ShowAvailableColors, Mode=TwoWay}" /> |
|||
<CheckBox Grid.Column="0" |
|||
Grid.Row="7" |
|||
Grid.ColumnSpan="2" |
|||
Content="ShowDropDownButton" |
|||
IsChecked="{Binding ElementName=_colorPicker, Path=ShowDropDownButton, Mode=TwoWay}" /> |
|||
<CheckBox Grid.Column="0" |
|||
Grid.Row="8" |
|||
Grid.ColumnSpan="2" |
|||
Content="ShowRecentColors" |
|||
IsChecked="{Binding ElementName=_colorPicker, Path=ShowRecentColors, Mode=TwoWay}" /> |
|||
<CheckBox Grid.Column="0" |
|||
Grid.Row="9" |
|||
Grid.ColumnSpan="2" |
|||
Content="ShowStandardColors" |
|||
IsChecked="{Binding ElementName=_colorPicker, Path=ShowStandardColors, Mode=TwoWay}" /> |
|||
<CheckBox Grid.Column="0" |
|||
Grid.Row="10" |
|||
Grid.ColumnSpan="2" |
|||
Content="UsingAlphaChannel" |
|||
IsChecked="{Binding ElementName=_colorPicker, Path=UsingAlphaChannel, Mode=TwoWay}" /> |
|||
<TextBlock Grid.Column="0" |
|||
Grid.Row="11" |
|||
Text="SelectedColorText:" /> |
|||
<TextBox Grid.Column="1" |
|||
Grid.Row="11" |
|||
IsEnabled="False" |
|||
Text="{Binding ElementName=_colorPicker, Path=SelectedColorText}" /> |
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<TextBlock Text="ColorPicker Usage: " |
|||
Grid.Row="1" |
|||
Style="{StaticResource Header}" /> |
|||
<xctk:ColorPicker x:Name="_colorPicker" |
|||
Grid.Row="2" |
|||
VerticalAlignment="Top" /> |
|||
</Grid> |
|||
</Grid> |
|||
</local:DemoView> |
|||
@ -0,0 +1,36 @@ |
|||
/************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************/ |
|||
|
|||
using System.Data; |
|||
using Xceed.Wpf.DataGrid; |
|||
using System.Diagnostics; |
|||
using Xceed.Wpf.Samples.SampleData; |
|||
using System.Collections.ObjectModel; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.DataGrid.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for DataGridView.xaml |
|||
/// </summary> |
|||
public partial class DataGridView : DemoView |
|||
{ |
|||
public DataGridView() |
|||
{ |
|||
this.DataContext = SampleDataProvider.GetOrders(); |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,183 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.DataGrid.Views.DataGridView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid" |
|||
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.DataGrid.Converters" |
|||
xmlns:compModel="clr-namespace:System.ComponentModel;assembly=WindowsBase" |
|||
xmlns:datagrid="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.DataGrid" |
|||
VerticalScrollBarVisibility="Disabled" |
|||
Title="DataGrid" |
|||
x:Name="_demo"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
<Run>Extended WPF Toolkit includes a powerful and fast datagrid control with many improvements over the stock WPF datagrid. In addition to providing a modern experience with the smooth scrolling and fully animated Tableflow view (can be turned off), it also provides zero-lag background data virtualization. Try a basic sample here. There are too many features and options to showcase in this sample. An even more feature-rich edition of this datagrid is available </Run> |
|||
<Hyperlink NavigateUri="http://xceed.com/Grid_WPF_Intro.html?adtype=154" RequestNavigate="Hyperlink_RequestNavigate"> |
|||
here. |
|||
</Hyperlink> |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<local:DemoView.Resources> |
|||
<xcdg:ImageConverter x:Key="imageConverter" /> |
|||
<!-- Converter used to return a BitmapImage from a Country name --> |
|||
<conv:FlagPathConverter x:Key="flagPathConverter" /> |
|||
|
|||
<!-- DataTemplate to display an Employee object --> |
|||
<DataTemplate x:Key="employeeDataTemplate"> |
|||
<Grid MaxHeight="30" |
|||
VerticalAlignment="Center"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition /> |
|||
</Grid.ColumnDefinitions> |
|||
<Image Margin="0, 0, 5, 0" |
|||
Source="{Binding Photo, Converter={StaticResource imageConverter}, NotifyOnValidationError=False, ValidatesOnDataErrors=False}" /> |
|||
|
|||
<StackPanel Grid.Column="1" |
|||
Orientation="Horizontal" |
|||
VerticalAlignment="Center"> |
|||
<TextBlock Text="{Binding FirstName, NotifyOnValidationError=False, ValidatesOnDataErrors=False}" /> |
|||
<TextBlock Text=" " /> |
|||
<TextBlock Text="{Binding LastName, NotifyOnValidationError=False, ValidatesOnDataErrors=False}" /> |
|||
</StackPanel> |
|||
</Grid> |
|||
</DataTemplate> |
|||
|
|||
<!-- DataTemplate to display the $ in Freight column --> |
|||
<DataTemplate x:Key="freightDataTemplate"> |
|||
<TextBlock Text="{Binding StringFormat=\{0:C\}}" |
|||
VerticalAlignment="Center" /> |
|||
</DataTemplate> |
|||
|
|||
<!-- 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> |
|||
|
|||
<Grid> |
|||
<Grid.Resources> |
|||
<xcdg:DataGridCollectionViewSource x:Key="cvsOrders" |
|||
Source="{Binding}"> |
|||
<xcdg:DataGridCollectionViewSource.GroupDescriptions> |
|||
<PropertyGroupDescription PropertyName="ShipCountry" /> |
|||
<PropertyGroupDescription PropertyName="ShipCity" /> |
|||
</xcdg:DataGridCollectionViewSource.GroupDescriptions> |
|||
</xcdg:DataGridCollectionViewSource> |
|||
</Grid.Resources> |
|||
|
|||
<xcdg:DataGridControl x:Name="_dataGrid" |
|||
ItemsSource="{Binding Source={StaticResource cvsOrders}}" > |
|||
<xcdg:DataGridControl.View> |
|||
<xcdg:TableflowView FixedColumnCount="2" /> |
|||
</xcdg:DataGridControl.View> |
|||
|
|||
<xcdg:DataGridControl.Columns> |
|||
<xcdg:Column FieldName="OrderID" |
|||
Title="Order" |
|||
Width="100" |
|||
IsMainColumn="True"> |
|||
</xcdg:Column> |
|||
|
|||
<xcdg:Column FieldName="Employee" |
|||
Title="Employee" |
|||
Width="160" |
|||
CellContentTemplate="{StaticResource employeeDataTemplate}" |
|||
GroupValueTemplate="{StaticResource employeeDataTemplate}"/> |
|||
|
|||
<xcdg:Column FieldName="Customer.CompanyName" |
|||
Title="Customer" |
|||
Width="185"/> |
|||
|
|||
<xcdg:Column FieldName="OrderDate" |
|||
Title="Order Date" |
|||
Width="120" /> |
|||
|
|||
<xcdg:Column FieldName="Shipper.CompanyName" |
|||
Title="Ship Via" /> |
|||
|
|||
<xcdg:Column FieldName="Freight" |
|||
Width="100" |
|||
CellContentTemplate="{StaticResource freightDataTemplate}" |
|||
GroupValueTemplate="{StaticResource freightDataTemplate}"/> |
|||
|
|||
<xcdg:Column FieldName="ShipCity" |
|||
Title="City" |
|||
Width="80" /> |
|||
|
|||
<xcdg:Column FieldName="ShipCountry" |
|||
Title="Country" |
|||
CellContentTemplate="{StaticResource countryDataTemplate}" |
|||
GroupValueTemplate="{StaticResource countryDataTemplate}"/> |
|||
|
|||
<xcdg:Column FieldName="ShipAddress" |
|||
Title="Address" |
|||
Width="200" /> |
|||
|
|||
<xcdg:Column FieldName="ShipPostalCode" |
|||
Title="Postal Code" |
|||
Width="120" /> |
|||
|
|||
<xcdg:Column FieldName="RequiredDate" |
|||
Title="Required Date" |
|||
Width="140" /> |
|||
|
|||
<xcdg:Column FieldName="ShippedDate" |
|||
Title="Shipped Date" |
|||
Width="140" /> |
|||
|
|||
<xcdg:Column FieldName="ShipName" |
|||
Visible="False" /> |
|||
|
|||
<xcdg:Column FieldName="ShipRegion" |
|||
Visible="False" /> |
|||
|
|||
<xcdg:Column FieldName="EmployeeID" |
|||
Visible="False" /> |
|||
|
|||
<xcdg:Column FieldName="CustomerID" |
|||
Visible="False" /> |
|||
|
|||
<xcdg:Column FieldName="Customer" |
|||
Visible="False" /> |
|||
|
|||
<xcdg:Column FieldName="ShipVia" |
|||
Visible="False" /> |
|||
|
|||
<xcdg:Column FieldName="Shipper" |
|||
Visible="False" /> |
|||
</xcdg:DataGridControl.Columns> |
|||
</xcdg:DataGridControl> |
|||
</Grid> |
|||
|
|||
</local:DemoView> |
|||
@ -0,0 +1,29 @@ |
|||
/************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************/ |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.DateTime.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for DateTimeView.xaml |
|||
/// </summary> |
|||
public partial class DateTimeView : DemoView |
|||
{ |
|||
public DateTimeView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,152 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
|
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.DateTime.Views.DateTimeView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.DateTime.Converters" |
|||
Title="DateTime"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
The DateTimePicker and TimePicker controls let you select the date and the time in several ways. The TimePicker is used in the DateTimePicker. |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<local:DemoView.Resources> |
|||
<conv:DateTimeToTimeSpanConverter x:Key="dateTimeToTimeSpanConverter" /> |
|||
<conv:CustomFormatToBoolConverter x:Key="CustomFormatToBoolConverter" /> |
|||
|
|||
<ObjectDataProvider x:Key="enumTimeFormatData" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> |
|||
<ObjectDataProvider.MethodParameters> |
|||
<x:Type TypeName="xctk:TimeFormat"/> |
|||
</ObjectDataProvider.MethodParameters> |
|||
</ObjectDataProvider> |
|||
<ObjectDataProvider x:Key="enumDateFormatData" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> |
|||
<ObjectDataProvider.MethodParameters> |
|||
<x:Type TypeName="xctk:DateTimeFormat"/> |
|||
</ObjectDataProvider.MethodParameters> |
|||
</ObjectDataProvider> |
|||
</local:DemoView.Resources> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="*"/> |
|||
<ColumnDefinition Width="*"/> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<GroupBox Header="Features" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" > |
|||
<Grid> |
|||
<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="Auto"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Text="Format:" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" /> |
|||
<ComboBox x:Name="_format" Grid.Row="0" Grid.Column="1" SelectedIndex="1" ItemsSource="{Binding Source={StaticResource enumDateFormatData}}" Width="190" Margin="5,5,25,5"/> |
|||
<TextBlock Text="FormatString:" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" IsEnabled="{Binding IsEnabled, ElementName=_formatString}" Style="{StaticResource DisableGrayText}" /> |
|||
<TextBox x:Name="_formatString" Grid.Row="1" Grid.Column="1" Text="yy MMM dd" Width="190" IsEnabled="{Binding Source={x:Reference _format}, Path=SelectedItem, Converter={StaticResource CustomFormatToBoolConverter}}" Margin="5,5,25,5"/> |
|||
<TextBlock Text="Watermark:" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center"/> |
|||
<TextBox x:Name="_watermark" Grid.Row="2" Grid.Column="1" Text="Enter Text" Width="190" VerticalAlignment="Center" Margin="5,5,25,5"/> |
|||
<TextBlock Text="AutoCloseCalendar:" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center"/> |
|||
<CheckBox x:Name="_autoCloseCalendar" Grid.Row="3" Grid.Column="1" IsChecked="False" VerticalAlignment="Center" Margin="5,5,25,5"/> |
|||
<TextBlock Text="ClipValueToMinMax:" Grid.Row="4" Grid.Column="0" VerticalAlignment="Center"/> |
|||
<CheckBox x:Name="_clipValueToMinMax" Grid.Row="4" Grid.Column="1" IsChecked="False" VerticalAlignment="Center" Margin="5,5,25,5"/> |
|||
|
|||
<TextBlock Text="TimeFormat:" Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" /> |
|||
<ComboBox x:Name="_timeFormat" Grid.Row="0" Grid.Column="3" SelectedIndex="1" ItemsSource="{Binding Source={StaticResource enumTimeFormatData}}" Width="190" Margin="5"/> |
|||
<TextBlock Text="Time FormatString:" Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" IsEnabled="{Binding IsEnabled, ElementName=_timeFormatString}" Style="{StaticResource DisableGrayText}"/> |
|||
<TextBox x:Name="_timeFormatString" Grid.Row="1" Grid.Column="3" Text="H:mm" Width="190" IsEnabled="{Binding Source={x:Reference _timeFormat}, Path=SelectedItem, Converter={StaticResource CustomFormatToBoolConverter}}" Margin="5"/> |
|||
<TextBlock Text="TimeWatermark:" Grid.Row="2" Grid.Column="2" VerticalAlignment="Center"/> |
|||
<TextBox x:Name="_timeWatermark" Grid.Row="2" Grid.Column="3" Text="Enter Text" Width="190" VerticalAlignment="Center" Margin="5"/> |
|||
<TextBlock Text="Minimum:" Grid.Row="3" Grid.Column="2" VerticalAlignment="Center"/> |
|||
<xctk:DateTimeUpDown x:Name="_minimum" Grid.Row="3" Grid.Column="3" Format="Custom" FormatString="yyyy/MM/dd HH:mm" Value="2010/01/01T12:00" Width="190" VerticalAlignment="Center" Margin="5"/> |
|||
<TextBlock Text="Maximum:" Grid.Row="4" Grid.Column="2" VerticalAlignment="Center"/> |
|||
<xctk:DateTimeUpDown x:Name="_maximum" Grid.Row="4" Grid.Column="3" Format="Custom" FormatString="yyyy/MM/dd HH:mm" Value="2015/12/31T12:00" Width="190" VerticalAlignment="Center" Margin="5"/> |
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<StackPanel Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left"> |
|||
<TextBlock Text="DateTimePicker Usage: " Margin="0,10,0,0" Style="{StaticResource Header}" /> |
|||
<xctk:DateTimePicker x:Name="_datetimePicker" |
|||
Width="300" |
|||
VerticalAlignment="Top" |
|||
IsReadOnly="False" |
|||
Format="{Binding Source={x:Reference _format}, Path=SelectedItem}" |
|||
FormatString="{Binding Text, ElementName=_formatString}" |
|||
Watermark="{Binding Source={x:Reference _watermark}, Path=Text}" |
|||
TimeFormat="{Binding Source={x:Reference _timeFormat}, Path=SelectedItem}" |
|||
TimeFormatString="{Binding Text, ElementName=_timeFormatString}" |
|||
TimeWatermark="{Binding Source={x:Reference _timeWatermark}, Path=Text}" |
|||
AutoCloseCalendar="{Binding IsChecked, ElementName=_autoCloseCalendar}" |
|||
ClipValueToMinMax="{Binding IsChecked, ElementName=_clipValueToMinMax}" |
|||
Minimum="{Binding Value, ElementName=_minimum}" |
|||
Maximum="{Binding Value, ElementName=_maximum}"/> |
|||
</StackPanel> |
|||
|
|||
<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Stretch"> |
|||
<GroupBox Header="TimePicker Features" Margin="0,15,0,0"> |
|||
<Grid> |
|||
<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="StartTime:" VerticalAlignment="Center" /> |
|||
<xctk:DateTimeUpDown x:Name="_startTime" Grid.Column="1" Format="ShortTime" Value="9:00" Width="100" Margin="5"/> |
|||
<TextBlock Text="EndTime:" Grid.Row="1" VerticalAlignment="Center" /> |
|||
<xctk:DateTimeUpDown x:Name="_endTime" Grid.Row="1" Grid.Column="1" Format="ShortTime" Value="17:00" Width="100" Margin="5"/> |
|||
<TextBlock Text="TimeInterval:" Grid.Row="2" VerticalAlignment="Center" /> |
|||
<xctk:DateTimeUpDown x:Name="_timeInterval" Grid.Row="2" Grid.Column="1" Format="Custom" FormatString="H:mm" Value="0:30" Width="100" Margin="5"/> |
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<StackPanel> |
|||
<TextBlock Text="TimePicker Usage: " Style="{StaticResource Header}" /> |
|||
<xctk:TimePicker x:Name="_timePicker" |
|||
VerticalAlignment="Top" |
|||
Format="{Binding Source={x:Reference _timeFormat}, Path=SelectedItem}" |
|||
FormatString="{Binding Text, ElementName=_timeFormatString}" |
|||
Watermark="{Binding Source={x:Reference _timeWatermark}, Path=Text}" |
|||
StartTime="{Binding Source={x:Reference _startTime}, Path=Value, Converter={StaticResource dateTimeToTimeSpanConverter}}" |
|||
EndTime="{Binding Source={x:Reference _endTime}, Path=Value, Converter={StaticResource dateTimeToTimeSpanConverter}}" |
|||
TimeInterval="{Binding Source={x:Reference _timeInterval}, Path=Value, Converter={StaticResource dateTimeToTimeSpanConverter}}" |
|||
ClipValueToMinMax="{Binding IsChecked, ElementName=_clipValueToMinMax}" |
|||
Minimum="{Binding Value, ElementName=_minimum}" |
|||
Maximum="{Binding Value, ElementName=_maximum}"/> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</Grid> |
|||
</local:DemoView> |
|||
@ -0,0 +1,180 @@ |
|||
//------------------------------------------------------------------------------ |
|||
// <auto-generated> |
|||
// This code was generated by a tool. |
|||
// Runtime Version:4.0.30319.296 |
|||
// |
|||
// Changes to this file may cause incorrect behavior and will be lost if |
|||
// the code is regenerated. |
|||
// </auto-generated> |
|||
//------------------------------------------------------------------------------ |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views { |
|||
using System; |
|||
|
|||
|
|||
/// <summary> |
|||
/// A strongly-typed resource class, for looking up localized strings, etc. |
|||
/// </summary> |
|||
// This class was auto-generated by the StronglyTypedResourceBuilder |
|||
// class via a tool like ResGen or Visual Studio. |
|||
// To add or remove a member, edit your .ResX file then rerun ResGen |
|||
// with the /str option, or rebuild your VS project. |
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
internal class DisplayLocalizationRes { |
|||
|
|||
private static global::System.Resources.ResourceManager resourceMan; |
|||
|
|||
private static global::System.Globalization.CultureInfo resourceCulture; |
|||
|
|||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] |
|||
internal DisplayLocalizationRes() { |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Returns the cached ResourceManager instance used by this class. |
|||
/// </summary> |
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Resources.ResourceManager ResourceManager { |
|||
get { |
|||
if (object.ReferenceEquals(resourceMan, null)) { |
|||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views.DisplayLocalizationRes", typeof(DisplayLocalizationRes).Assembly); |
|||
resourceMan = temp; |
|||
} |
|||
return resourceMan; |
|||
} |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Overrides the current thread's CurrentUICulture property for all |
|||
/// resource lookups using this strongly typed resource class. |
|||
/// </summary> |
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Globalization.CultureInfo Culture { |
|||
get { |
|||
return resourceCulture; |
|||
} |
|||
set { |
|||
resourceCulture = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Looks up a localized string similar to Details. |
|||
/// </summary> |
|||
internal static string DetailsCategory { |
|||
get { |
|||
return ResourceManager.GetString("DetailsCategory", resourceCulture); |
|||
} |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Looks up a localized string similar to Favorite actor 1 (no DisplayName). |
|||
/// </summary> |
|||
internal static string FavoriteActor1 { |
|||
get { |
|||
return ResourceManager.GetString("FavoriteActor1", resourceCulture); |
|||
} |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Looks up a localized string similar to This property's type is an enum whose values have no DisplayName attributes. These values displayed are provided by the ToString() method.. |
|||
/// </summary> |
|||
internal static string FavoriteActor1Desc { |
|||
get { |
|||
return ResourceManager.GetString("FavoriteActor1Desc", resourceCulture); |
|||
} |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Looks up a localized string similar to Favorite actor 2 (with DisplayName). |
|||
/// </summary> |
|||
internal static string FavoriteActor2 { |
|||
get { |
|||
return ResourceManager.GetString("FavoriteActor2", resourceCulture); |
|||
} |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Looks up a localized string similar to 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.. |
|||
/// </summary> |
|||
internal static string FavoriteActor2Desc { |
|||
get { |
|||
return ResourceManager.GetString("FavoriteActor2Desc", resourceCulture); |
|||
} |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Looks up a localized string similar to Favorite actor 3. |
|||
/// </summary> |
|||
internal static string FavoriteActor3 { |
|||
get { |
|||
return ResourceManager.GetString("FavoriteActor3", resourceCulture); |
|||
} |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Looks up a localized string similar to "(Not listed)" enum value shows that enum values can also be localized.. |
|||
/// </summary> |
|||
internal static string FavoriteActor3Desc { |
|||
get { |
|||
return ResourceManager.GetString("FavoriteActor3Desc", resourceCulture); |
|||
} |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Looks up a localized string similar to First name. |
|||
/// </summary> |
|||
internal static string FirstName { |
|||
get { |
|||
return ResourceManager.GetString("FirstName", resourceCulture); |
|||
} |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Looks up a localized string similar to First name of that person. |
|||
/// </summary> |
|||
internal static string FirstNameDesc { |
|||
get { |
|||
return ResourceManager.GetString("FirstNameDesc", resourceCulture); |
|||
} |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Looks up a localized string similar to Information. |
|||
/// </summary> |
|||
internal static string InfoCategory { |
|||
get { |
|||
return ResourceManager.GetString("InfoCategory", resourceCulture); |
|||
} |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Looks up a localized string similar to Last name. |
|||
/// </summary> |
|||
internal static string LastName { |
|||
get { |
|||
return ResourceManager.GetString("LastName", resourceCulture); |
|||
} |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Looks up a localized string similar to Usually the familly name of the person. |
|||
/// </summary> |
|||
internal static string LastNameDesc { |
|||
get { |
|||
return ResourceManager.GetString("LastNameDesc", resourceCulture); |
|||
} |
|||
} |
|||
|
|||
/// <summary> |
|||
/// Looks up a localized string similar to (Not listed). |
|||
/// </summary> |
|||
internal static string NotListed { |
|||
get { |
|||
return ResourceManager.GetString("NotListed", resourceCulture); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Button.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for DropDownSplitButtonView.xaml |
|||
/// </summary> |
|||
public partial class DropDownSplitButtonView : DemoView |
|||
{ |
|||
public DropDownSplitButtonView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void DropDownButton_Click( object sender, System.Windows.RoutedEventArgs e ) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void Button_Click( object sender, System.Windows.RoutedEventArgs e ) |
|||
{ |
|||
_dropDownButton.IsOpen = false; |
|||
_splitButton.IsOpen = false; |
|||
} |
|||
|
|||
private void SplitButton_Click( object sender, System.Windows.RoutedEventArgs e ) |
|||
{ |
|||
Xceed.Wpf.Toolkit.MessageBox.Show( "Thanks for clicking me!", "SplitButton Click" ); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,74 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Button.Views.DropDownSplitButtonView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
Title="DropDown and Split Buttons"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
<Run>The DropDownButton control is a button that when clicked displays a drop down in which you can place any custom content within.</Run> |
|||
<LineBreak /> |
|||
<LineBreak /> |
|||
<Run>The SplitButton control is a button that can be clicked and also provides a drop down in which you can place any custom content within.</Run> |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition /> |
|||
<ColumnDefinition /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Text="DropDownButton Usage:" Style="{StaticResource Header}" /> |
|||
<xctk:DropDownButton x:Name="_dropDownButton" |
|||
Grid.Row="1" |
|||
Margin="10" |
|||
Width="150" |
|||
HorizontalAlignment="Left" |
|||
Content="Click Me" |
|||
Click="DropDownButton_Click"> |
|||
<xctk:DropDownButton.DropDownContent> |
|||
<StackPanel> |
|||
<xctk:ColorCanvas /> |
|||
<Button Click="Button_Click" Margin="10">OK</Button> |
|||
</StackPanel> |
|||
</xctk:DropDownButton.DropDownContent> |
|||
</xctk:DropDownButton> |
|||
|
|||
<TextBlock Text="SplitButton Usage:" Grid.Column="1" Style="{StaticResource Header}" /> |
|||
<xctk:SplitButton x:Name="_splitButton" |
|||
Grid.Row="1" |
|||
Grid.Column="1" |
|||
Margin="10" |
|||
Width="150" |
|||
HorizontalAlignment="Left" |
|||
Content="Click Me" |
|||
Click="SplitButton_Click"> |
|||
<xctk:SplitButton.DropDownContent> |
|||
<StackPanel> |
|||
<xctk:ColorCanvas /> |
|||
<Button Click="Button_Click" Margin="10">OK</Button> |
|||
</StackPanel> |
|||
</xctk:SplitButton.DropDownContent> |
|||
</xctk:SplitButton> |
|||
</Grid> |
|||
</local:DemoView> |
|||
@ -0,0 +1,50 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************/ |
|||
|
|||
using System; |
|||
using System.IO; |
|||
using System.Windows; |
|||
using System.Windows.Resources; |
|||
using Xceed.Wpf.Samples.SampleData; |
|||
using System.ComponentModel; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.ListBox.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for ListBoxView.xaml |
|||
/// </summary> |
|||
public partial class ListBoxView : DemoView |
|||
{ |
|||
#region Initialization |
|||
|
|||
public ListBoxView() |
|||
{ |
|||
#if !OPEN_SOURCE |
|||
this.DataContext = SampleDataProvider.GetOrders(); |
|||
#endif |
|||
|
|||
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 |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,43 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************/ |
|||
|
|||
using System; |
|||
using System.IO; |
|||
using System.Windows; |
|||
using System.Windows.Resources; |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Magnifier.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for MagnifierView.xaml |
|||
/// </summary> |
|||
public partial class MagnifierView : DemoView |
|||
{ |
|||
public MagnifierView() |
|||
{ |
|||
InitializeComponent(); |
|||
|
|||
// Load and display the RTF file. |
|||
Uri uri = new Uri( "pack://application:,,,/Xceed.Wpf.Toolkit.LiveExplorer;component/Samples/Magnifier/Resources/SampleText.rtf" ); |
|||
StreamResourceInfo info = Application.GetResourceStream( uri ); |
|||
using( StreamReader txtReader = new StreamReader( info.Stream ) ) |
|||
{ |
|||
_txtContent.Text = txtReader.ReadToEnd(); |
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,99 @@ |
|||
<!--************************************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
***********************************************************************************--> |
|||
|
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Magnifier.Views.MagnifierView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Magnifier.Converters" |
|||
Title="Magnifier"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
The Magnifier control allows the user to magnify parts of an application. |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<local:DemoView.Resources> |
|||
<conv:ColorConverter x:Key="colorConverter" /> |
|||
<conv:VisibilityConverter x:Key="visibilityConverter" /> |
|||
<xctk:RtfFormatter x:Key="rtfFormatter" /> |
|||
|
|||
<ObjectDataProvider x:Key="enumData" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> |
|||
<ObjectDataProvider.MethodParameters> |
|||
<x:Type TypeName="xctk:FrameType"/> |
|||
</ObjectDataProvider.MethodParameters> |
|||
</ObjectDataProvider> |
|||
</local:DemoView.Resources> |
|||
|
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<GroupBox Header="Features" Grid.Row="0" Margin="5"> |
|||
<Grid Margin="5" HorizontalAlignment="Left"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="*" /> |
|||
<ColumnDefinition Width="*" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="Zoom Factor:" VerticalAlignment="Center" Margin="5" /> |
|||
<xctk:DoubleUpDown x:Name="_zoomFactor" Grid.Column="1" Value="0.4" Minimum="0" Increment="0.1" Maximum="3" FormatString="N1" Width="150" Margin="5" /> |
|||
<TextBlock Text="Border Thickness:" Grid.Row="1" VerticalAlignment="Center" Margin="5" /> |
|||
<xctk:IntegerUpDown x:Name="_borderThickness" Grid.Row="1" Grid.Column="1" Value="2" Minimum="0" Maximum="20" Width="150" Margin="5" /> |
|||
<TextBlock Text="Border Brush:" Grid.Row="2" VerticalAlignment="Center" Margin="5"/> |
|||
<xctk:ColorPicker x:Name="_colorPicker" Grid.Row="2" Grid.Column="1" Width="150" Margin="5" SelectedColor="#FFEFAC27"/> |
|||
<TextBlock Grid.Column="2" Text="Frame Type:" VerticalAlignment="Center" Margin="10,0,0,0"/> |
|||
<ComboBox x:Name="_frameType" SelectedIndex="0" ItemsSource="{Binding Source={StaticResource enumData}}" Grid.Column="3" Width="150" Margin="5" /> |
|||
<TextBlock Text="Radius:" Grid.Row="1" Grid.Column="2" Visibility="{Binding ElementName=_frameType, Path=SelectedItem, Converter={StaticResource visibilityConverter}, ConverterParameter=0}" VerticalAlignment="Center" Margin="10,0,0,0"/> |
|||
<xctk:DoubleUpDown x:Name="_radius" Visibility="{Binding ElementName=_frameType, Path=SelectedItem, Converter={StaticResource visibilityConverter}, ConverterParameter=0}" Grid.Row="1" Grid.Column="3" Value="80" Minimum="0" Maximum="150" Width="150" Margin="5" /> |
|||
<TextBlock Text="RectangleWidth:" Grid.Row="1" Grid.Column="2" Visibility="{Binding ElementName=_frameType, Path=SelectedItem, Converter={StaticResource visibilityConverter}, ConverterParameter=1}" VerticalAlignment="Center" Margin="10,0,0,0"/> |
|||
<xctk:DoubleUpDown x:Name="_width" Grid.Row="1" Grid.Column="3" Value="160" Minimum="0" Maximum="300" Visibility="{Binding ElementName=_frameType, Path=SelectedItem, Converter={StaticResource visibilityConverter}, ConverterParameter=1}" Width="150" Margin="5" /> |
|||
<TextBlock Text="RectangleHeight:" Grid.Row="2" Grid.Column="2" Visibility="{Binding ElementName=_frameType, Path=SelectedItem, Converter={StaticResource visibilityConverter}, ConverterParameter=1}" VerticalAlignment="Center" Margin="10,0,0,0"/> |
|||
<xctk:DoubleUpDown x:Name="_height" Grid.Row="2" Grid.Column="3" Value="160" Minimum="0" Maximum="300" Visibility="{Binding ElementName=_frameType, Path=SelectedItem, Converter={StaticResource visibilityConverter}, ConverterParameter=1}" Width="150" Margin="5" /> |
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<StackPanel Grid.Row="1" Margin="10" HorizontalAlignment="Left" > |
|||
<TextBlock Text="Usage:" Style="{StaticResource Header}"/> |
|||
<xctk:RichTextBox x:Name="_txtContent" |
|||
IsReadOnly="True" |
|||
TextFormatter="{StaticResource rtfFormatter}" |
|||
FontSize="10" > |
|||
<xctk:MagnifierManager.Magnifier> |
|||
<xctk:Magnifier x:Name="_magnifier" |
|||
Background="White" |
|||
Radius="{Binding Source={x:Reference _radius}, Path=Value}" |
|||
ZoomFactor="{Binding Source={x:Reference _zoomFactor}, Path=Value}" |
|||
FrameType="{Binding Source={x:Reference _frameType}, Path=SelectedItem}" |
|||
BorderBrush="{Binding Source={x:Reference _colorPicker}, Path=SelectedColor, Converter={StaticResource colorConverter}}" |
|||
BorderThickness="{Binding Source={x:Reference _borderThickness}, Path=Value}" |
|||
Width="{Binding Source={x:Reference _width}, Path=Value, Mode=TwoWay}" |
|||
Height="{Binding Source={x:Reference _height}, Path=Value, Mode=TwoWay}" /> |
|||
</xctk:MagnifierManager.Magnifier> |
|||
</xctk:RichTextBox> |
|||
</StackPanel> |
|||
</Grid> |
|||
</local:DemoView> |
|||
@ -0,0 +1,35 @@ |
|||
/*************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
*************************************************************************************/ |
|||
|
|||
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Text.Views |
|||
{ |
|||
/// <summary> |
|||
/// Interaction logic for MaskedTextboxView.xaml |
|||
/// </summary> |
|||
public partial class MaskedTextboxView : DemoView |
|||
{ |
|||
public MaskedTextboxView() |
|||
{ |
|||
InitializeComponent(); |
|||
_mask.TextChanged += new System.Windows.Controls.TextChangedEventHandler( _mask_TextChanged ); |
|||
} |
|||
|
|||
void _mask_TextChanged( object sender, System.Windows.Controls.TextChangedEventArgs e ) |
|||
{ |
|||
_maskedTextBox.Value = null; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,90 @@ |
|||
<!--************************************************************************************** |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2007-2013 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
For more features, controls, and fast professional support, |
|||
pick up the Plus Edition at http://xceed.com/wpf_toolkit |
|||
|
|||
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids |
|||
|
|||
************************************************************************************--> |
|||
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Text.Views.MaskedTextboxView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:s="clr-namespace:System;assembly=mscorlib" |
|||
Title="MaskedTextBox"> |
|||
<local:DemoView.Description> |
|||
<Paragraph FontSize="14" FontFamily="Segoe"> |
|||
The MaskedTextBox control lets you display and edit values based on a mask. |
|||
</Paragraph> |
|||
</local:DemoView.Description> |
|||
|
|||
<Grid> |
|||
|
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<GroupBox Header="Features" Grid.Row="0" Margin="5"> |
|||
<StackPanel Margin="5"> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Text="Include literals:" VerticalAlignment="Center" Margin="2" /> |
|||
<CheckBox x:Name="_literals" Grid.Column="1" VerticalAlignment="Center" Margin="5" |
|||
IsChecked="{Binding IncludeLiteralsInValue, ElementName=_maskedTextBox, Mode=TwoWay}"/> |
|||
|
|||
<TextBlock Text="Include prompt:" Grid.Row="1" VerticalAlignment="Center" Margin="2" /> |
|||
<CheckBox x:Name="_prompt" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="5" |
|||
IsChecked="{Binding IncludePromptInValue, ElementName=_maskedTextBox, Mode=TwoWay}"/> |
|||
</Grid> |
|||
<Grid Margin="0,5,0,0"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<TextBlock Text="Mask:" VerticalAlignment="Center" Margin="2" /> |
|||
<TextBox x:Name="_mask" Grid.Column="1" VerticalAlignment="Center" Margin="5" |
|||
Text="{Binding Mask, ElementName=_maskedTextBox, ValidatesOnExceptions=True}" /> |
|||
|
|||
<TextBlock Text="Value:" Grid.Row="1" VerticalAlignment="Center" Margin="2" /> |
|||
<TextBox x:Name="_value" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="5" |
|||
Text="{Binding Value, ElementName=_maskedTextBox, ValidatesOnExceptions=True}" /> |
|||
|
|||
<TextBlock Text="Text:" Grid.Row="2" VerticalAlignment="Center" Margin="2" /> |
|||
<TextBox x:Name="_text" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" Margin="5" |
|||
Text="{Binding Text, ElementName=_maskedTextBox, ValidatesOnExceptions=True}"/> |
|||
</Grid> |
|||
</StackPanel> |
|||
</GroupBox> |
|||
|
|||
<StackPanel Grid.Row="1" Margin="10"> |
|||
<TextBlock Text="Usage:" Style="{StaticResource Header}" /> |
|||
<xctk:MaskedTextBox x:Name="_maskedTextBox" |
|||
Mask="(000) 000-0000" |
|||
ValueDataType="{x:Type s:String}" /> |
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
</local:DemoView> |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue