<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DevComponents Knowledge Base</title>
	<atom:link href="http://www.devcomponents.com/kb2/index.php?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.devcomponents.com/kb2</link>
	<description>Help and How To articles for our fantastic products</description>
	<lastBuildDate>Tue, 08 May 2012 19:51:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to change the width of columns in AdvPropertyGrid &#8211; WinForms</title>
		<link>http://www.devcomponents.com/kb2/?p=1317</link>
		<comments>http://www.devcomponents.com/kb2/?p=1317#comments</comments>
		<pubDate>Fri, 04 May 2012 17:06:53 +0000</pubDate>
		<dc:creator>Maintainer</dc:creator>
				<category><![CDATA[DotNetBar for Windows Forms]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1317</guid>
		<description><![CDATA[To programatically change the widths of the AdvPropertyGrid columns in DotNetBar for WinForms use SetPropertyColumnWidth method. For example to set width of the property name column to 100 pixels you can use following code: advPropertyGrid1.SetPropertyColumnWidth(0, 100) Related posts:How to add custom panels to AdvPropertyGrid How to create virtual properties with AdvPropertyGrid for WinForms How to [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=145' rel='bookmark' title='Permanent Link: How to add custom panels to AdvPropertyGrid'>How to add custom panels to AdvPropertyGrid</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=1072' rel='bookmark' title='Permanent Link: How to create virtual properties with AdvPropertyGrid for WinForms'>How to create virtual properties with AdvPropertyGrid for WinForms</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=141' rel='bookmark' title='Permanent Link: How to change global text rendering properties'>How to change global text rendering properties</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>To programatically change the widths of the AdvPropertyGrid columns in DotNetBar for WinForms use <strong>SetPropertyColumnWidth</strong> method.</p>
<p>For example to set width of the property name column to 100 pixels you can use following code:</p>
<p>advPropertyGrid1.SetPropertyColumnWidth(0, 100)</p>


<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=145' rel='bookmark' title='Permanent Link: How to add custom panels to AdvPropertyGrid'>How to add custom panels to AdvPropertyGrid</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=1072' rel='bookmark' title='Permanent Link: How to create virtual properties with AdvPropertyGrid for WinForms'>How to create virtual properties with AdvPropertyGrid for WinForms</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=141' rel='bookmark' title='Permanent Link: How to change global text rendering properties'>How to change global text rendering properties</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1317</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WPF AdvGrid Quick Start Guide</title>
		<link>http://www.devcomponents.com/kb2/?p=1299</link>
		<comments>http://www.devcomponents.com/kb2/?p=1299#comments</comments>
		<pubDate>Fri, 23 Mar 2012 06:58:45 +0000</pubDate>
		<dc:creator>donwingate</dc:creator>
				<category><![CDATA[DotNetBar for WPF]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1299</guid>
		<description><![CDATA[AdvGrid is based on the abstract class AdvTabularControl (which also serves as the base class for AdvTree.) AdvTabularControl itself is derived on System.Windows.Controls.Control. It is NOT based on ItemsControl. However, because ItemsControl provides a familiar programming model, we have as much as seemed reasonable made AdvTabularControl (and therefore AdvGrid) work and behave like ItemsControl. Generally [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=1130' rel='bookmark' title='Permanent Link: WPF Color Control Quick Start Guide'>WPF Color Control Quick Start Guide</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=1133' rel='bookmark' title='Permanent Link: Brush Control Quick Start Guide'>Brush Control Quick Start Guide</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=1015' rel='bookmark' title='Permanent Link: WPF AdvTree Quick Start Guide'>WPF AdvTree Quick Start Guide</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>AdvGrid is based on the abstract class AdvTabularControl (which also serves as the base class for AdvTree.) AdvTabularControl itself is derived on System.Windows.Controls.Control. It is NOT based on ItemsControl. However, because ItemsControl provides a familiar programming model, we have as much as seemed reasonable made AdvTabularControl (and therefore AdvGrid) work and behave like ItemsControl. Generally speaking, if you understand ItemsControl you will understand the essentials of AdvGrid.</p>
<p>The minimum requirement for adding an AdvGrid to your application is a data source for the rows which implements IEnumerable. Simply bind your data source to the grid’s ItemsSource property. Each object in the enumeration becomes the DataContext for a row in the grid. The object’s properties are the source for the content of the row’s cells. The mapping between the object’s properties and the grid’s columns can be made automatically or you can define the mapping yourself if you require more control that what is provided by default.</p>
<p>Beyond setting up a data source, some of the more common settings to explore are:</p>
<ul>
<li>Set property <em>VirtualizationMode</em> = <em>Recycling</em> to enable both row and cell virtualization. </li>
<li>Set <em>IsByRowEditingEnabled</em> = true to put the grid into by-row editing mode. </li>
<li>Set CanUserAddRow = true to cause a “placeholder” row to be added to the bottom of the grid which the user can use to add a new row. </li>
<li>Provide a DataTemplate as value for <em>RowDetailsTemplate</em> to create a details section for your rows. </li>
<li>Use property <em>RowDetailsShowMode</em> to specify&#160; when row details are made visible. </li>
<li>Set <em>AutoGenerateColumns</em> = true to have columns automatically generated. Handle the routed event AutoGeneratingColumns to customize a column when it is being automatically generated. </li>
<li>Set <em>ScrollMode</em> = <em>ByItem</em> to enable scroll-by-item. </li>
<li>Use <em>SelectionMode</em> to specify whether <em>Single</em>, <em>Multiple</em> or <em>Extented</em> selection mode is active. </li>
<li>Use <em>SelectionUnit</em> to specify whether cells, rows or cells and rows via the row headers are selectable by user. </li>
<li><em>ColumnHeaderClickBehavior</em> specifies what happens when the user cicks on a column header. </li>
<li>Set <em>AllowColumnReorder</em> = true to allow the user to re-order the columns using drag and drop. </li>
<li>Set <em>IsContextMenuEnabled</em> = true to enable a built-in context menu that allows the user to (optionally) sort, group, pin and hide/show individual columns. </li>
<li><em>RowHeaderWidth</em> specifies the width of the row headers. </li>
<li>Filter the items that are displayed with a Predicate&lt;object&gt; set as value for the grid’s <em>Filter</em> property. </li>
<li>Display your items in groups based on column values by setting the <em>GroupByLevel</em> of the appropriate column definition. </li>
<li>Set <em>ShowColumnGroupingPanel</em> = true to display a panel into which the user can drag column headers to cause the grid to group the items by that column’s data. </li>
<li>Set <em>CanUserDeleteItem</em> to allow the user to delete rows using the delete key. </li>
<li>And many more… </li>
</ul>
<p>A good place to start exploring AdvGrid, other than this document, is the AdvGridSample application which is included in the DotNetBar installation. Here is a screen shot:</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2012/05/AdvGrid-Sample-App.png"><img title="AdvGrid Sample App" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="AdvGrid Sample App" src="http://www.devcomponents.com/kb2/wp-content/uploads/2012/05/AdvGrid-Sample-App_thumb.png" width="882" height="599" /></a></p>
<h1>AdvGrid, AdvGridRow and AdvGridCell</h1>
<p>AdvGridRow is the native container type for items placed into the grid. New containers are obtained from the grid’s GetContainerFromItemOverride method. It is possible to override this method and supply your own row control type, but it must derive from AdvGridRow. Similiarly, <em>AdvGridCell</em> is the native container for cell data. When a new cell is required, it is obtained via the parent row’s CreateCell method. This too can be overridden to provide your own cell control.</p>
<p>Both AdvGridRow and AdvGridCell have Connect and Disconnect methods. The first is called by the system to prepare the row or cell for the data item that it is being used to display. The latter is called when the row is being virtualized and is used to release the control from the data object and make it available to connect to another. Inheritors of either AdvGridRow or AdvGridCell may need to override these methods if they define new dependency properties of their own, for example, or require some other custom connection logic.</p>
<p>AdvGrid is designed to look and act as much like ItemsControl as possible, but it does not have an ItemContainerGenerator. Instead, it has an ItemContainerManager (specifically, AdvGridItemContainerManager) the purpose of which is to manage row creation and the placement of the rows into the visual tree, and virtualization.</p>
<p>Following are lists of the common events, properties and methods available on <em>AdvGrid</em>, <em>AdvGridRow </em>and <em>AdvGridCell </em>controls.</p>
<h2>AdvGrid Interface</h2>
<h3>AdvGrid Events:</h3>
<p><em>AutoGeneratingColumn</em> – A routed event raised when a new column is being auto generated. The new column can be customized in a handler for this event.</p>
<p><em>DeletingSelectedItems</em> – A routed event raised before selected items are deleted as a result of user action. Handle this event to prevent the deletion.</p>
<p><em>SortByColumnRequested</em> – A routed event raised when the user clicks a column header to sort (<em>ColumnHeaderClickBehavior</em> is <em>SortByColumn</em>.) Handle this event to stop default sorting and provide custom sorting.</p>
<p><em>SelectionChanged</em> – A routed event raised when the selection changes.</p>
<p><em>ItemsChanged</em> – A routed event raised when the content of the Items collection changes.</p>
<h3>AdvGrid Methods</h3>
<p><em>BeginEdit</em> – Puts the currently active cell in the currently active row into edit mode.</p>
<p><em>BringIntoView</em> – There are four overrides of <em>BringIntoView</em> which can be used to bring into view a specific row, a specific item, a specific index, and finally one for bringing into view a specific column.</p>
<p><em>ClearSelection</em> – Clears current selection.</p>
<p><em>CancelEdit</em> – Clears all pending changes and takes the current row and/or cell out of edit mode. See section on editing for more information.</p>
<p><em>ClearGroupByColumn</em> – Clears grouping by the specified column.</p>
<p><em>CommitEdit</em> – Pending changes are committed to underlying data source. See section on editing for more information.</p>
<p><em>ContainerFromIndex</em> – Get the row at the specified index, with option to create the row if it doesn’t exist (applies when virtualization is enabled.)</p>
<p><em>ContainerFromItem</em> – Returns the row given an item with optional parameter to specify whether or not to create the row if it does not exist.</p>
<p><em>DeleteSelected</em> – Deletes the current selection. Before deleting items, the event DeletingSelectedItems is raised and if handled the delete does not happen.</p>
<p><em>IndexFromContainer</em> – Get the index of the node within the flattened hierarchy of the tree.</p>
<p><em>IndexFromItem</em> – Get the index of the item within the flattened hierarchy of the tree.</p>
<p><em>IsItemSelected</em> – Use to determine if a particular item is part of the current selection.</p>
<p><em>GetActiveRow</em> – Gets the row control which is container for the current <em>ActiveItem</em>.</p>
<p><em>GroupByColumn</em> – Groups items based on values in the specified column.</p>
<p><em>MoveDown</em> – Selects and makes active the row below the currently active row.</p>
<p><em>MoveLeft</em> – Moves one cell to the left of the current cell.</p>
<p><em>MoveRight</em> – Moves one cell to the right of the current cell.</p>
<p><em>MoveUp</em> – Selects and makes active the row immeditely above the currently active row.</p>
<p><em>PinItem</em> – Pins the row containing the specified item to either the top or bottom of the viewport.</p>
<p><em>Remove</em> – Removes (deletes) the specified item from the Items collection. This is the same as calling Items.Remove().</p>
<p><em>SelectAll</em> – If columns are being displayed, then all columns are selected.</p>
<p><em>SortByColumn</em> – Causes child nodes to be sorted by the values of a specific column, in a specified direction.</p>
<h3>AdvTree properties:</h3>
<p><strong>CLR Properties</strong></p>
<p><em>AllSelected</em> – Will return true if all columns are selected.</p>
<p><em>Items</em> – Gets a reference to the underlying <em>ItemsCollection</em>. This is a read-only property.</p>
<p><em>ItemContainerManager</em> – Gets a reference to the object responsible for container (row) creation and virtualization. This is the counterpart to ItemsControl’s ItemContainerGenerator.</p>
<p><em>LogicalExtent</em> – This is the number of rows in the grid.</p>
<p><em>FirstVisibleNodeIndex</em> – Gets the index of the first visible node (index is flattened, i.e. inclusive of all nodes regardless of hierarchy level.)</p>
<p><em>LastVisibleNodeIndex</em> – Gets the index of the last visible node in the tree.</p>
<p><em>ScrollViewer</em> – Gets a reference to the grid’s ScrollViewer, if there is one.</p>
<p><em>SelectedColumns</em> – An enumeration of the ColumnDefinitions which are currently selected. Column selection is enabled by setting <em>ColumnHeaderClickBehavior</em> to <em>SelectColumn</em>.</p>
<p><em>SupressCellVirtualization</em> – When <em>VirtualizationMode</em> is <em>Recycling</em> both nodes and cells are subject to virtualization. Set this property to prevent the virtualization of cells.</p>
<p><strong>Dependency Properties</strong></p>
<p><em>ActiveItem</em> – This is the data item of the row which currently has keyboard focus. Read-only.</p>
<p><em>AllowColumnReorder</em> – Specifies whether the user can reorder the columns using drag and drop.</p>
<p><em>AlternationCount</em> – Performs same function as ItemsControl.AlternationCount. Setting to a value greater than 1 will result in the grid’s rows’ AlternationIndex values alternate between 0 and AlternationCount &#8211; 1. This value can be used in a Style trigger to modify properties of the nodes based on their alternation index. An example of this is provided in the sample AdvGridSample.</p>
<p><em>AutoGenerateColumns</em> – Specifies whether column definitions should be automatically generated from available data when they are not provided.</p>
<p><em>CanUserAddRow</em> – When true, a placeholder row is added to bottom of the grid. If the user edits a cell in the placeholder row, a new row is created.</p>
<p><em>CanUserDeleteItem</em> – When true, the user can delete rows by hitting the delete key. Default is false.</p>
<p><em>ColumnAlternationCount</em> – Alternation count for columns. Works the same as alternation count for rows.</p>
<p><em>ColumnDefinitions</em> – Defines columns for the Grid. More on columns is provided below.</p>
<p><em>ColumnHeaderClickBehavior</em> – Determines what happens when a column header is clicked. Possible values are <em>SortByColumn</em>: The <em>r</em>ows are sorted by the column’s value. <em>SelectColumn:</em> The column is selected. <em>Custom: </em>No action is taken by the grid. Handle ColumnHeader.Clicked routed event to perform custom action. The column header is highlighted on mouse over and press.) And <em>Nothing:</em> Nothing is done and <em>ColumnHeader.Clicked</em> is not raised.</p>
<p><em>ColumnHeaderClickMode</em> – Determines whether the click event of a column header is raised on mouse down or mouse up.</p>
<p><em>ErrorNotification</em> – Applies only when <em>IsByRowEditingEnabled</em> = true. Specifies whether the user is notified of row level errors by a message box, by an Adorner (defined by Validation.ErrorTemplate) or not at all.</p>
<p><em>ErrorNotificationDialogBoxStyle</em> – This Style is applied to the <em>DialogWindow</em> (DevComponents.WPF.Controls) which is opened to display row level error message.</p>
<p><em>Filter</em> – A Predicate&lt;object&gt; which is applied to the grid’s Items collection.</p>
<p><em>FirstRowNumber</em> – Specifies the starting index for the rows, and which are displayed by the row headers.</p>
<p><em>HighlightSelectedCellColumnHeader</em> – Determines whether the column headers of selected cells are highlighted.</p>
<p><em>HighlightSelectedCellRowHeader</em> – Determines whether row headers are highlighted cells are selected.</p>
<p><em>HorizontalGridLineBrush</em> – Brush for horizontal grid lines when <em>ShowHorizontalGridLines</em> is set.</p>
<p><em>HorizontalGridLineHeight</em>- Height of the horizontal grid line when <em>ShowHorizontalGridLines</em> is set.</p>
<p><em>HotTrack</em> – When true, the cell with mouse over is highlighted.</p>
<p><em>IsByRowEditingEnabled</em> – When true, by-row editing is enabled. See section on editing for more. The default value is false.</p>
<p><em>IsContextMenuEnabled</em> – Determines whether the column header’s built-in context menu should be enabled.</p>
<p><em>IsDragDropEnabled</em> – When set, the grid is set up to be both source and target of drag/drop. Is the same as setting both DragDrop.IsDropTarget and DragDrop.IsDragSource to true.</p>
<p><em>IsGrouping</em> – A read-only property which is set to indicate that the items are being grouped.</p>
<p><em>IsSelectionFocusAware</em> – When true, the selection box which highlights a selected item is grayed when the Grid does not contain the input focus.</p>
<p><em>ItemsSource</em> – An IEnumerable which serves as source for the items which populate the Items collection. This property is equivalent to <em>ItemsControl.ItemsSource</em>.</p>
<p><em>ItemContainerStyle</em> – Style for the item containers. Note that containers for <em>AdvGrid </em>are always instances of <em>AdvGridRow</em>.</p>
<p><em>ItemContainerStyleSelector</em> – <em>StyleSelector</em> for selecting the Style for the container for a particular item.</p>
<p><em>LockRowHeaderWidth</em> – Specifies whether the user is enabled to resize the width of the row headers. Default is true.</p>
<p><em>LockRowHeigths</em> – Specifies whether the user is enabled to change row heights. By default will be false unless either virtualization or scroll by item are enabled, in which case <em>LockRowHeight</em> is set to true. The default behavior is overriden when <em>LockRowHeight</em> is explicitly set.</p>
<p><em>RowKeepsKeyboardFocusOnError</em> – Applies when <em>IsByRowEditingEnabled</em> = true. If there is an error when attempting to commit changes, the user is prevented from navigating away from the row.</p>
<p><em>RowDetailsShowMode</em> – Determines whether row details are displayed when a toggle button is checked, when the row is selected, always or none (manual.)</p>
<p><em>RowDetailsTemplate</em> – A DataTemplate which if set both shows how to render the details section and causes the rows to have a details section. </p>
<p><em>RowHeaderWidth</em> – Specifies the width of the row headers. Default value is NaN, which results in auto-sizing.</p>
<p><em>ScrollMode</em> – Determines whether scroll-by-item is enabled and, if so, how the last item is positioned. Possible values are <em>Normal</em>, <em>ByItem</em> and <em>ByItemBottomFlush</em>. Default is <em>Normal</em>.</p>
<p><em>SelectedCell</em> – When <em>SelectionMode</em> is Single and <em>CellSelect</em> is True, this property will identify the currently selected cell. When multiple selection is enabled, <em>SelectedCell</em> will be set to the first cell selected of the collection of selected cells.</p>
<p><em>SelectedCells</em> – When <em>SelectionMode</em> is Multiple or Extended and <em>CellSelect</em> is True, this property will return an ObservableCollection containing the currently selected cells.</p>
<p><em>SelectedItem</em> – Will identify the currently selected item when <em>SelectionMode</em> is Single. When multiple selection is enabled, <em>SelectedItem</em> will be set to the first item selected of the collection of selected items.</p>
<p><em>SelectedItems</em> – When <em>SelectionMode</em> is Extended or Muliple, will return an ObservableCollection containing references to the currently selected items.</p>
<p><em>SelectionMode</em> – Possible values are Single, Multiple and Extended. More on selection modes is provided below.</p>
<p><em>SelectionUnit</em> – Determines whether cells, rows or both are selectable by user. This is an enumeration of type AdvGridSelectionUnit with possible values <em>None</em>, <em>Cell</em>, <em>Row</em> and <em>CellOrRowHeader</em>.</p>
<p><em>ShowColumnGroupingPanel</em> – If true, a panel is shown into which the user can drag column headers for columns to group by.</p>
<p><em>ShowColumnHeader</em> – Determines whether the column headers are shown.</p>
<p><em>ShowHorizontalGridLines</em> – Determines whether horizontal grid lines are shown.</p>
<p><em>ShowRowDetailsRootLine</em> – Applies when <em>RowDetailsTemplate</em> is set. </p>
<p><em>ShowRowHeaders</em> – Determines whether the row headers are shown.</p>
<p><em>ShowVerticalGridLines</em> – Determines whether the vertical grid lines are shown.</p>
<p><em>VerticalGridLineBrush</em> – The Brush used for vertical grid lines.</p>
<p><em>VirtualizingMode</em> – Sets the virtualization mode for the tree. Possible values are <em>None</em> and <em>Recycling</em>. Default value is <em>None</em>. More about virtualization is provided below.</p>
<p><em>VisualStyle</em> – 5 built-in visual styles are included with AdvGrid the default, an emulation of Windows Explorer, and the three color schemes of Office 2010: Blue, Silver and Black. Setting this property is the same as setting a value for the <em>VisualStyleManager.VisualStyle </em>attached property on the grid. Note: to ensure consistent visual style through the entire application, set <em>VisualStyleManager.VisualStyle</em> on an element at the top of the visual tree.)</p>
<h2>AdvGridRow Interface</h2>
<h3>AdvGridRow Events</h3>
<p><em>BeforeSelected</em> – A bubbling routed event raised before the value of <em>IsSelected</em> changes from false to true. Setting the event argument&#8217;s <em>Handled</em> property to true will cancel the selection.</p>
<p><em>Connecting</em> – Routed event raised when the row is being connected to its data item and fitted into the visual tree. This event occurs as part of the virtualization/realization process.</p>
<p><em>Disconnecting</em> – Routed event raised when a row is in the process of formally disconnecting itself from its data item. Will not be raised if virtualization is not enabled.</p>
<p><em>InitializingNewItemPlaceholder</em> – Routed event raised when the item for the new item placeholder is being created. Will not be raised unless the grid’s <em>CanUserAddItem</em> property is true. Handle this event to set default values for the placeholder item, or to create a new item to serve as placeholder.</p>
<p><em>IsCellSelectedWithinChanged</em> – Bubbling routed event raised when th value of <em>IsCellSelectedWithin</em> changes.</p>
<p><em>IsDetailsSectionOpenChanged</em> – Routed event raised when the value of <em>IsDetailsSectionOpen </em>changes.</p>
<p><em>IsDirtyChanged</em> – Routed event raised when the value of<em>&#160; IsDirty</em> changes.</p>
<p><em>PinChanged</em> – Routed event raised when the value of <em>Pin</em> changes.</p>
<p><em>Selected</em> – A bubbling routed event raised when the value of <em>IsSelected</em> changes from false to true.</p>
<p><em>Unselected</em> – Routed event raised when the value of <em>IsSelected</em> changes to false.</p>
<h3>AdvGridRow Methods</h3>
<p><em>BeginEdit</em> – Puts the current cell into edit mode. If <em>IsByRowEditingEnabled</em> = true, then the row is also placed into edit mode.</p>
<p><em>CancelEdit</em> – Rolls back any pending changes and takes the row and current cell out of edit mode.</p>
<p><em>CommitEdit</em> – Commits pending changes to underlying data source and optionally takes the row and/or active cell out of edit mode. See section on Editing for more.</p>
<p><em>GetCell</em> – Use to get an AdvTreeCell contained by the node that corresponds to a specific <em>ColumnDefinition</em>.</p>
<p><em>GetChildNodes</em> – Use to obtain an enumeration of all of the node’s child nodes. Optionally include all the descendants of the child nodes as well. Option to include nodes which are unrealized.</p>
<p><em>NavigateLeft</em> – Moves focus to and selects the cell immediately to the left of the currently active cell.</p>
<p><em>NavigateRight</em> – Moves focus to and selects the cell immediately to right of currently active cell.</p>
<p><em>NavigateDown</em> – Moves focus to and selects the row below.</p>
<p><em>NavigateUp</em> – Moves focus to row above.</p>
<p><em>SortByColumn</em> – Causes the node to sort children by a specified column, in a specified direction.</p>
<h3>AdvGridRow Properties</h3>
<p><strong>CLR Properties</strong></p>
<p><em>CellDefinitions</em> – This is the <em>ColumnDefinitionCollection</em> which defines the columns which present the node’s data (not the node’s children.) By default, a node inherites this value from its parent node. If the parent node has a value for ColumnDefinitions, this becomes the child’s <em>CellDefinitions</em>.</p>
<p><em>Cells</em> – Gets an enumeration of the AdvTreeCells which are children of the node. If <em>HasCells</em> is false, this property will return an empty enumerable.</p>
<p><em>HasCells</em> – Gets whether this node has cells defined.</p>
<p><em>HeaderControl</em> – Provides access to the control which renders the row’s Header.</p>
<p><em>IsEditing</em> – Returns true if the node is currently in edit mode.</p>
<p><em>IsCellEditingWithin</em> – Returns true if a Cell contained by the node is currently in edit mode.</p>
<p><em>IsConnected</em> – Returns true if the node is currently connected – that is, it is in a valid state for rendering.</p>
<p><em>Items</em> – An ItemsCollection which contains and manages the child items of the node.</p>
<p><em>ParentGrid – </em>Gets the parent <em>AdvGrid</em>.</p>
<p><em>ValidationErrors</em> – If ByRowEditingIsEnabled = true, this ReadOnlyObservableCollection will contain any validation errors that currently exist for the row.</p>
<p><strong>Dependency Properties</strong></p>
<p><em>AlternationIndex</em> – This is a readonly property which is set by the framework when a parent’s AlternationCount is greater than 1. This property can be used in Style trigger to modify appearance of the node.</p>
<p><em>DetailsTemplate</em> – A data template which defines how to display the details. If set, the row will have a details section, otherwise the row will not have a details section. By default, this value is inherited from the parent grid’s <em>RowDetailsTemplate </em>property.</p>
<p><em>DetailsToggleButtonStyle</em> – Style for the toggle button which is </p>
<p><em>ErrorNotification</em> &#8211; Applies only when <em>IsByRowEditingEnabled</em> = true. Specifies whether the user is notified of row level errors by a message box, by an Adorner (defined by Validation.ErrorTemplate) or not at all. By default this value is inherited from the parent grid’s property of the same name.</p>
<p><em>HasError</em> – A readonly property which is set when there are validation errors associated with the row. </p>
<p><em>HeaderBackground</em> – The Brush used to paint the background of the row’s header.</p>
<p><em>Header</em> – The content displayed by the row’s header.</p>
<p><em>HeaderPadding</em> – Padding for the header.</p>
<p><em>HeaderTemplate</em> – A DataTemplate which shows how to render <em>Header</em>.</p>
<p><em>HorizontalGridLineBrush</em> – Get or set the Brush used for the horizontal grid line. By default, this property is inherited from the parent grid.</p>
<p><em>HorizontalGridLineHeight</em> – Determines the height of the horizontal grid line. By default, this property is inherited from the parent grid.</p>
<p><em>IsByRowEditingEnabled</em> – Determines whether the the row is in by-row editing mode. By default, this value is inherited from the parent grid’s property of the same name.</p>
<p><em>IsCellSelectedWithin</em> – Will be true if one of more cells within the row are selected. Readonly.</p>
<p><em>IsDetailsSectionOpen</em> – Determines whether the details section is open. Ignored if there is no value for <em>DetailsTemplate</em>.</p>
<p><em>IsDirty</em> – If by-row editing is enabled, this property is set when the user edits a cell and remains set until either the changes have been committed or the edit is cancelled (for example, the user hits the escape key.) See section on editing for more information.</p>
<p><em>IsEditing</em> – This read-only property is set when the row goes into edit mode. Will never be set unless <em>IsByRowEditingEnabled</em> = true.</p>
<p><em>IsSelected</em> – Gets or sets whether or not the row is selected. If <em>IsSelectable</em> is false, this property is ignored.</p>
<p><em>IsSelectable</em> – Determines whether the row can be selected. The default value is true.</p>
<p><em>KeepKeyboardFocusWhenHasError</em> – If by-row editing is enabled, setting this property make it so the user is prevented from leaving the current row if <em>HasErrors</em> = true. By default, this value is inherited from the parent grid’s <em>RowKeepsKeyboardFocusWhenHasError</em> property.</p>
<p><em>LockHeight</em> – Determines whether the user can change the row’s height. By default, this value is inherited from the parent grid’s <em>LockRowHeight </em>property.</p>
<p><em>Pin</em> – Determines whether the row is pinned to the top or bottom of the viewport, or not pinned at all (the default is not pinned.)</p>
<p><em>ShowHorizontalGridLines</em> – Determines whether the horizontal grid lines are visible.</p>
<p><em>ValidationRules</em> – Gets or sets a collection of ValidationRule objects used for row-level validation. Ignored if <em>IsByRowEditingEnabled</em> does not equal true. For more information, see section on editing below.</p>
<h2>AdvGridCell Interface</h2>
<h3>AdvGridCell Events</h3>
<p><em>BeforeSelected</em> – A bubbling routed event raised before the value of <em>IsSelected</em> changes from false to true. Setting the event argument&#8217;s <em>Handled</em> property to true will cancel the selection.</p>
<p><em>EditBeginning</em> – A bubbling routed event raised before the cell enters edit mode. Setting the event argument&#8217;s <em>Handled</em> property to true will cancel the edit.</p>
<p><em>EditCommitted</em> – A bubbling routed event raised when changes are committed to the underlying data source.</p>
<p><em>IsDirtyChanged</em> – A routed event raised when the value of <em>IsDirty </em>changes.</p>
<p><em>IsEditingChanged</em> – A routed event raised when the value of <em>IsEditing </em>changes.</p>
<p><em>Selected</em> – A bubbling routed event raised when the value of <em>IsSelected</em> changes from false to true.</p>
<p><em>Unselected</em> – A bubbling routed event raised when the value of <em>IsSelected </em>changes from true to false.</p>
<h3>AdvGridCell Methods</h3>
<p><em>BeginEdit</em> – Manually puts the cell into edit mode.</p>
<p><em>CancelEdit </em>– Clears pending changes to the cell’s content and takes the cell out of edit mode.</p>
<p><em>CommitEdit</em> – Commits pending changes with option to exit edit mode. If by-row editing mode is enabled, then the changes are only committed to row level. It is up to the parent row to perform the final commitment of changes to the underlying data source.</p>
<h3>AdvGridCell Properties</h3>
<p><strong>CLR Properties</strong></p>
<p><em>IndexInRow</em> – Gets the zero based index of this cell within the row or node.</p>
<p><em>IsConnected</em> – Gets whether this cell is fully connected to its data source and column definition, and is ready to be displayed in the UI.</p>
<p><em>IsEditing</em> – Returns true if the cell is currently in edit mode.</p>
<p><strong>Dependency Properties</strong></p>
<p><em>BeginEditTriggerMode</em> – provides a means for defining what conditions are required for the cell to enter Edit mode. (Only applies when <em>IsEditable</em> is true.) More on node and cell editing is provided below.</p>
<p><em>CellDefinition</em> – Provides access to the ColumnDefinition instance which defines the cell. This is a read only dependency property.</p>
<p><em>EditorStyle</em> – Specifies a style which is applied to the embedded EditingContentControl which both displays and edits the cell’s content. Note that the editing control’s style can also be specified in the column definition via property <em>CellEditorStyle</em>. In either case, a value is not required. More on editing below.</p>
<p><em>EditTemplate</em> – Optionally specifies a ControlTemplate to be applied to the ContentEditingControl which both displays and edits the cells content. More below.</p>
<p><em>IsDirty</em> – When true, it means the user has made changes to the cell content which have not been committed to the underlying data source.</p>
<p><em>IsEditable</em> – When true, the cell’s content can be edited in place. See more about editing below.</p>
<p><em>IsEditing</em> – Set when the cell enters edit mode.</p>
<p><em>IsHighlighted</em> – Get or set whether the cell should be highlighted. Normally, this value is set when the mouse is over the cell.</p>
<p><em>IsSelectable</em> – Determines whether the cell can be selected. The default value is true.</p>
<p><em>IsSelected</em> – Gets or Sets whether the cell is currently selected. If <em>IsSelectable</em> is false, this property is ignored.</p>
<h1>Columns</h1>
<p>The grid’s columns are defined by a collection of <em>ColumnDefinition</em> objects. The collection is set and/or accessed through the grid’s <em>ColumnDefinitions</em> property. <em>ColumnDefinitions</em> is a dependency property so it can participate in data binding. Also, both <em>ColumnDefinitions</em> and <em>ColumnDefinition</em> are derived from System.Windows.FrameworkContentElement which allows them to inherit the drid’s data context and use bindings which refer to named elements in the visual tree.</p>
<p>The column definitions can be automatically generated from the data object set as the value of <em>ItemsSource</em>. If the object is an instance of System.Data.DataView then the columns are generated from the Columns in its Table. If the object is an enumeration of objects, then the columns are generated using the first object in the list. The public properties of this object are discovered using reflection. By default, a column is created for each public property. The column header will be the property’s Name, unless the propert definition is decorated with a DisplayName attribute (System.ComponentModel.DisplayNameAttribute.) To prevent a column from being created for a public property, decorate it with a DisplayName attribute and set the value to null.</p>
<p>By default columns will be auto generated if the column definitions are not otherwise provided for at the time the grid loads. To disable auto generation of columns, set property <em>AutoGenerateColumns</em> = false.</p>
<p>While auto column generation can be convienent if you are satisfied with the defaults, far more control is available if you define the columns explicitly. Columns can be defined in Xaml or code. Here is an example in Xaml (taken from the AdvGridSample application):</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinitionCollection</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;CustomersGridColumnDefinitions&quot;</span> <span style="color: #000066;">Padding</span>=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000066;">HorizontalContentAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinition</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;Name&quot;</span> <span style="color: #000066;">BindingMemberPath</span>=<span style="color: #ff0000;">&quot;Name&quot;</span> <span style="color: #000066;">CellIsEditable</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000066;">AutoSizeToFitContent</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000066;">CellHorizontalContentAlignment</span>=<span style="color: #ff0000;">&quot;Left&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinition</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;Age&quot;</span> <span style="color: #000066;">BindingMemberPath</span>=<span style="color: #ff0000;">&quot;Age&quot;</span> <span style="color: #000066;">CellIsEditable</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000066;">AutoSizePadding</span>=<span style="color: #ff0000;">&quot;25&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinition.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:NumericEditorSettings</span> <span style="color: #000066;">IsButtonHighlightedOnMouseOver</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000066;">MinValue</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">MaxValue</span>=<span style="color: #ff0000;">&quot;120&quot;</span> <span style="color: #000066;">IsInCellEditingEnabled</span>=<span style="color: #ff0000;">&quot;False&quot;</span> <span style="color: #000066;">EnforceMinMax</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:ColumnDefinition.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:ColumnDefinition<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinition</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;Gender&quot;</span> <span style="color: #000066;">BindingMemberPath</span>=<span style="color: #ff0000;">&quot;Gender&quot;</span> <span style="color: #000066;">CellIsEditable</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000066;">AutoSizePadding</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinition.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:EnumEditorSettings</span> <span style="color: #000066;">IsButtonHighlightedOnMouseOver</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000066;">IsInCellEditingEnabled</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:ColumnDefinition.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:ColumnDefinition<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinition</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;Income&quot;</span> <span style="color: #000066;">BindingMemberPath</span>=<span style="color: #ff0000;">&quot;Income&quot;</span> <span style="color: #000066;">CellIsEditable</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000066;">AutoSizePadding</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinition.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:NumericEditorSettings</span> <span style="color: #000066;">IsButtonHighlightedOnMouseOver</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000066;">MinValue</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">StringFormat</span>=<span style="color: #ff0000;">&quot;C&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:ColumnDefinition.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:ColumnDefinition<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinition</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;Is Married&quot;</span> <span style="color: #000066;">BindingMemberPath</span>=<span style="color: #ff0000;">&quot;IsMarried&quot;</span> <span style="color: #000066;">CellIsEditable</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinition</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;Can Contact&quot;</span> <span style="color: #000066;">BindingMemberPath</span>=<span style="color: #ff0000;">&quot;CanContact&quot;</span> <span style="color: #000066;">CellIsEditable</span>=<span style="color: #ff0000;">&quot;True&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinition.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:BooleanEditorSettings</span> <span style="color: #000066;">Type</span>=<span style="color: #ff0000;">&quot;DropDown&quot;</span> <span style="color: #000066;">DisplayNameFalse</span>=<span style="color: #ff0000;">&quot;Never&quot;</span> <span style="color: #000066;">DisplayNameTrue</span>=<span style="color: #ff0000;">&quot;Any Time&quot;</span> <span style="color: #000066;">IsButtonHighlightedOnMouseOver</span>=<span style="color: #ff0000;">&quot;False&quot;</span> <span style="color: #000066;">IsInCellEditingEnabled</span>=<span style="color: #ff0000;">&quot;False&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:ColumnDefinition.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:ColumnDefinition<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinition</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;Best Time&quot;</span> <span style="color: #000066;">BindingMemberPath</span>=<span style="color: #ff0000;">&quot;BestTime&quot;</span> <span style="color: #000066;">CellIsEditable</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000066;">StringFormat</span>=<span style="color: #ff0000;">&quot;T&quot;</span> <span style="color: #000066;">AutoSizePadding</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinition.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:TimeOfDayEditorSettings</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:ColumnDefinition.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:ColumnDefinition<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinition</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;Credit Card&quot;</span> <span style="color: #000066;">BindingMemberPath</span>=<span style="color: #ff0000;">&quot;CreditCard&quot;</span> <span style="color: #000066;">CellIsEditable</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000066;">BeginEditTriggerMode</span>=<span style="color: #ff0000;">&quot;ClickSelected&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnDefinition.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:DataFormEditorSettings</span> <span style="color: #000066;">PropertyType</span>=<span style="color: #ff0000;">&quot;{x:Type local:CreditCard}&quot;</span> <span style="color: #000066;">DialogWindowTitle</span>=<span style="color: #ff0000;">&quot;Credit Card Properties&quot;</span> <span style="color: #000066;">DisplayMemberPath</span>=<span style="color: #ff0000;">&quot;Issuer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:DataFormEditorSettings.FieldDescriptors<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:DataFormFieldDescriptor</span> <span style="color: #000066;">DisplayName</span>=<span style="color: #ff0000;">&quot;Name:&quot;</span> <span style="color: #000066;">PropertyName</span>=<span style="color: #ff0000;">&quot;NameOnCard&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:DataFormFieldDescriptor</span> <span style="color: #000066;">DisplayName</span>=<span style="color: #ff0000;">&quot;Card Issuer:&quot;</span> <span style="color: #000066;">PropertyName</span>=<span style="color: #ff0000;">&quot;Issuer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:DataFormFieldDescriptor.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:EnumEditorSettings</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:DataFormFieldDescriptor.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:DataFormFieldDescriptor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:DataFormFieldDescriptor</span> <span style="color: #000066;">DisplayName</span>=<span style="color: #ff0000;">&quot;Expiration Date:&quot;</span> <span style="color: #000066;">PropertyName</span>=<span style="color: #ff0000;">&quot;ExpirationDate&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:DataFormFieldDescriptor.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:EditorSettings</span> <span style="color: #000066;">StringFormat</span>=<span style="color: #ff0000;">&quot;MMM, yyyy&quot;</span> <span style="color: #000066;">Mask</span>=<span style="color: #ff0000;">&quot;LLL, 0000&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:DataFormFieldDescriptor.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:DataFormFieldDescriptor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:DataFormFieldDescriptor</span> <span style="color: #000066;">DisplayName</span>=<span style="color: #ff0000;">&quot;Number:&quot;</span> <span style="color: #000066;">PropertyName</span>=<span style="color: #ff0000;">&quot;CardNumber&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:DataFormFieldDescriptor.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:EditorSettings</span> <span style="color: #000066;">Mask</span>=<span style="color: #ff0000;">&quot;0000-0000-0000-0000&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:DataFormFieldDescriptor.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:DataFormFieldDescriptor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:DataFormEditorSettings.FieldDescriptors<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:DataFormEditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:ColumnDefinition.EditorSettings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:ColumnDefinition<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:ColumnDefinitionCollection<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h2>ColumnDefinitionCollection</h2>
<p>Following is a list of the properties of <em>ColumnDefinitionCollection</em>. Note that several properties of ColumnDefinitionCollection have been mapped to AdvGrid for convienence. All of these properties are dependency properties and hence can be data bound.</p>
<ul>
<li><em>AllowColumnReorder</em> &#8211; </li>
<li><em>AllowColumnResize</em> &#8211; </li>
<li><em>AlternationCount</em> &#8211; </li>
<li><em>BorderBrush</em> &#8211; </li>
<li><em>BorderThickness</em> &#8211; </li>
<li><em>CellPadding &#8211; </em></li>
<li><em>CellStyle &#8211; </em></li>
<li><em>ColumnStyle</em> &#8211; </li>
<li><em>ColumnsPresenterStyle</em> &#8211; </li>
<li><em>GridLineBrush</em> &#8211; </li>
<li><em>GridLineWidth</em> &#8211; </li>
<li><em>HeaderBackground</em> – </li>
<li><em>HeaderClickBehavior</em> &#8211; </li>
<li><em>HeaderClickMode</em> &#8211; </li>
<li><em>HorizontalAlignment</em> &#8211; </li>
<li><em>HorizontalContentAlignment</em> &#8211; </li>
<li><em>IsContextMenuEnabled</em> &#8211; </li>
<li><em>Padding</em> – This sets the padding aplied to all the column headers. </li>
<li><em>ShowGridLines -</em> </li>
<li><em>ShowHeader</em> &#8211; </li>
<li><em>VerticalContentAlignment</em> &#8211; </li>
</ul>
<h2>ColumnDefinition</h2>
<p><em>ColumnDefinition</em> exports a single event: <em>PropertyChanged</em>. The handler type for <em>PropertyChanged</em> is DependencyPropertyChangedEventHandler.</p>
<p>The following CLR properties are exposed on <em>ColumnDefinition:</em></p>
<ul>
<li><em>AutoSizePadding</em> – A double which is added to a cell’s desired size when performing auto size for the column. </li>
<li><em>AutoSizeToFitContent</em> – When true, the column’s width will automatically be increased as needed so that cells’ content is fully visible. Ignored if the column’s <em>Width</em> is not Auto. </li>
<li><em>Binding</em> – Defines the binding used for a cell’s content property. By default this value is set at runtime based on the value of <em>BindingMemberPath</em>. </li>
<li>Id – A string. Not used. Provided for client use only. </li>
<li><em>IndexInParent</em> – Gets the index of the column within the parent ColumnDefinitionCollection. </li>
<li><em>ParentCollection</em> – Access a reference to the <em>ColumnDefinitionCollection</em> which contains the column definition. </li>
</ul>
<p>Here is the list of dependency properties available on <em>ColumnDefinition</em>:</p>
<ul>
<li><em>AllowColumnResize</em> &#8211; </li>
<li><em>Background</em> &#8211; </li>
<li><em>BeginEditTriggerMode</em> &#8211; </li>
<li><em>BindingMemberPath</em> &#8211; </li>
<li><em>CellContentTemplate -</em> </li>
<li><em>CellEditorStyle</em> &#8211; </li>
<li><em>CellEditTemplate</em> &#8211; </li>
<li><em>CellForeground</em> &#8211; </li>
<li><em>CellHorizontalContentAlignment</em> &#8211; </li>
<li><em>CellIsEditable</em> &#8211; </li>
<li><em>CellIsSelectable</em> &#8211; </li>
<li><em>CellPadding</em> &#8211; </li>
<li><em>CellStyle</em> &#8211; </li>
<li><em>CellVerticalContentAlignment</em> &#8211; </li>
<li><em>ColumnSort</em> &#8211; </li>
<li><em>EditorSettings</em> &#8211; </li>
<li><em>GridLineBrush</em> &#8211; </li>
<li><em>GridLineWidth</em> &#8211; </li>
<li><em>Header</em> &#8211; </li>
<li><em>HeaderTemplate</em> &#8211; </li>
<li><em>HeaderBackground</em> &#8211; </li>
<li><em>HeaderBorderThickness</em> &#8211; </li>
<li><em>HeaderClickBehavior</em> &#8211; </li>
<li><em>HeaderClickMode</em> &#8211; </li>
<li><em>HorizontalContentAlignment</em> &#8211; </li>
<li><em>IsCellSelectedWithin</em> &#8211; </li>
<li><em>IsLocked</em> &#8211; </li>
<li><em>IsSelectable</em> &#8211; </li>
<li><em>IsSelected</em> &#8211; </li>
<li><em>Pin</em> &#8211; </li>
<li><em>Padding</em> &#8211; </li>
<li><em>PresenterStyle</em> &#8211; </li>
<li><em>ShowHeader</em> &#8211; </li>
<li><em>SortPriorityLevel</em> &#8211; </li>
<li><em>StringFormat</em> &#8211; </li>
<li><em>Width</em> &#8211; </li>
<li><em>VerticalContentAlignment</em> &#8211; </li>
<li><em>Visibility</em> &#8211; </li>
</ul>
<h1>Editing</h1>
<p>To enable in cell editing, set <em>CellIsEditable</em> = true on the coresponding column definition. Alternately, property <em>IsEditable</em> on AdvGridCell can be set, through a style setter or directly. Nothing else is required to enable editing with the default editor, which is basically a text box. (Except for booleans and enumerations. The default editor for bool values is a check box. For enums it is a combo box.)</p>
<p>Actual editing is performed by a <em>ContentEditingControl</em> which is embedded in the default Template for <em>AdvGridCell</em>. The content editing control is also responsible for displaying the cell’s content when not being edited.</p>
<p>There are several built-in editors, in addition to the default editor, each of which targets a specific data types. Assigning one of these editors to a column or cell is simply a matter of setting property <em>EditorSettings</em> to an instance of the class, derived from DevComponents.WPF.Controls.EditorSettings, which maps to the desired editor.</p>
<p>All built-in editors, including the default editor, have a set of options which are exposed as properties of the coresponding EditorSettings class.</p>
<p>For examples in Xaml, see the Xaml example for ColumnDefinitionCollection above.</p>
<p>If none of the built-in editors satisfies your requirements, a custom editor can be created by defining a new Style for the <em>EditingContentControl</em>. The style can be applied by setting it as the value of the property <em>CellEditorStyle</em> of the column definition, or as the value of property <em>EditorStyle</em> of the AdvCellControl. The <em>EditorSettings</em> class also has a property <em>EditorStyle</em>. More information about <em>EditingContentControl</em> is provided below.</p>
<h2>EditorSettings</h2>
<p>EditorSettings is based on System.Attribute, making it possible to define and customize a property’s editor directly on the property definition itself.</p>
<p>Following are the properties defined on the base class <em>EditorSettings</em>. Each of these properties represents an option common to all or most of the built-in editors. An important thing to note is that the control which does the editing (an instance of <em>EditingContentControl</em>) is also responsible for presenting the cell’s content when it is not in edit mode. For this reason, some of these properties affect the cell’s content when not in edit mode.</p>
<ul>
<li><em>AlwaysShowTextBox</em> – Primarily used when the editor has a button, determies whether the button is sized to occupy the entire cell or only a portion of it, leaving room for a text box containing the value text. </li>
<li><em>AutoComplete</em> – An enumeration of type <em>AutoCompleteOptions</em> which defines auto complete options for text based editing. <em>AutoCompleteOptions</em> has the Flags attribute set. Possible values are:
<ul>
<li>Off – Auto complete is not enabled. This is the default. </li>
<li><em>ReadOnly</em> – Auto complete is enabled. Only values in the auto complete list are allowed. </li>
<li><em>FreeText</em> – Auto complete is enabled. The user is allowed to enter any text. </li>
<li><em>DontConvertCase</em> – When auto complete is enabled, suggestions are case sensitive. </li>
</ul>
</li>
<li><em>AutoCompleteList</em> – Provides a list of possible values for auto complete. Required if auto complete is enabled. </li>
<li><em>DisplayMemberPath</em> – If a cell’s data object is a complex object (i.e. it has properties of its own) then this property can be used to identify the path to the property which defines the text to display for the cell. </li>
<li><em>EditorStyle</em> – A Style which, if set, is applied to the <em>EditingContentControl</em>. </li>
<li><em>EditorStyleResourceKey</em> – A string which is the key of a discoverable resource defining a Style which is applied to the <em>EditingContentControl</em>. This property is specifically intended for when the EditorSettings are being applied as an Attribute to the property which serves as the data source for the cell/column. </li>
<li><em>IsInCellEditingEnabled</em> – Determies whether the user can edit the cell’s value directly in the text box. </li>
<li><em>IsButtonHighlightedOnMouseOver</em> – When true, buttons are highlighted when the mouse is over them. </li>
<li><em>Mask</em> – A string which defines a mask to use on the cell’s string value. For more information see <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.maskedtextprovider.aspx">MaskedTextProvider</a> documentation on MSDN. </li>
<li><em>NullValueDisplayValue</em> – Specifies string to display for the null value. </li>
<li><em>PropertyType</em> – The Type of the property being edited. By default, this value is obtained at run-time using reflection. </li>
<li><em>StringFormat</em> – A format string applied to the cell’s string value. </li>
<li><em>TypeConverter</em> – A System.ComponentModel.TypeConverter which if set is used to convert between the object being edited and the string representation of the object. </li>
<li><em>ValidationRules</em> – A list of System.Windows.Controls.ValidationRule objects. Rules added to this list are added to the Binding which binds the cell’s content property. </li>
</ul>
<p>Following are the editor settings classes for the built-in editors that are available at this time. They are all derived from <em>EditorSettings</em>.</p>
<h3>BooleanEditorSettings</h3>
<p>Used with the built-in boolean editor. Defines the following properties:</p>
<li><em>DisplayNameTrue</em> – The display string for the true value. </li>
<li><em>DisplayNameFalse</em> – The display string for the false value. </li>
<li><em>IsNullable</em> – Specifies whether null is a valid value. (The underlying property type must be Nullable&lt;bool&gt;) </li>
<li><em>Type</em> – An enumeration specifying whether the editor is an inline check box or a drop down (combo box.) Possible values are <em>InLineCheckBox</em> and <em>DropDown</em>.<br />
<h3>DataFormEditorSettings</h3>
<p>Used with the built-in data form editor. It is a specialized version of <em>DialogWindowEditorSettings</em> which makes use of the DevComponents <em>DataForm</em> control. The properties defined by <em>DataFormEditorSettings</em> are:</p>
<ul>
<li><em>FieldDescriptors</em> – Gets a reference to a list of <em>DataFormFieldDescriptor</em> objects. You add the field descriptors for each property on the cell’s data source which you want to be editable. See Xaml example above. </li>
</ul>
<h3>DateEditorSettings</h3>
<p>Used with the built-in date editor. The date editor is meant to edit the date portion of DateTime values. This editor makes use of the control System.Windows.Controls.Calendar. No additional properties are defined.</p>
<h3>DialogWindowEditorSettings</h3>
<p>Editor settings used by the built-in dialog window based editor. This editor allows you to define a Window type which is created and opened as a dialog window when the editor’s button is pressed. The window’s DataContext is set equal to the cell’s content. Additionally, if the window’s content property is null, it is also set equal to the cell’s content.&#160; <em>DialogWindowEditorSettings</em> Defines the following properties:</p>
<ul>
<li><em>CreateNewIfNull</em> – When true, and the cell’s value is null, the editor will attempt to create a new instance of the data type before opening the dialog window. Requires that the data type has a parameterless constructor. </li>
<li><em>DialogWindowContentTemplate</em> – A DataTemplate which if not null is set as value of the window’s ContentTemplate property. </li>
<li><em>DialogWindowStyle</em> – A Style which if not null is set as the value of the window’s Style property. </li>
<li><em>DialogWindowTitle</em> – A string which is used for the window’s Title. </li>
<li><em>DialogWindowType</em> – A Type specifying the Window type to create and open. By default, this value is set to the type DevComponents.WPF.Controls.DialogWindow. <em>DialogWindow</em> is a window which defines a property Ok (boolean) and has a command binding defined for the command ApplicationCommands.Close. The default template for this window has Ok and Cancel buttons. </li>
</ul>
<h3>EnumEditorSettings</h3>
<p>Used with the built-in enum editor, which is based on the DevComponents <em>EnumEditor</em> control.<em> EnumEditorSettings</em> defines the following properties:</p>
<ul>
<li><em>DisplayNames</em> – A list of strings which are mapped, in order, to the enum values for display. </li>
<li><em>SeparatorToken</em> – A string to use for separating a list of values when the enum type has the Flags attribute set. </li>
<li><em>Type</em> – An enumeration with possible values <em>DropDown</em> and <em>InLine</em>. </li>
</ul>
<h3>NumericEditorSettings</h3>
<p>Used with the built-in numeric editor. This editor can be used for numbers of any type. It makes use of the DevComponents control <em>NumericSpinner</em> which has repeat buttons for increasing and decreasing the value. <em>NumericEditorSettings</em> defines the following properties:</p>
<ul>
<li><em>EnforceMinMax</em> – When true, a rule is added to the ValidationRules list which enforces a value between <em>MinValue</em> and <em>MaxValue</em>. </li>
<li><em>Increment</em> – The value that is added or subtracted from current value when a repeat button is clicked. </li>
<li><em>MaxValue</em> – The value at which the increase repeat button becomes disabled. </li>
<li><em>MinValue</em> – The value at which the decrease repeat button becomes disabled. </li>
<li><em>Precision</em> – The precision with which to display floating point numbers. </li>
<li><em>RepeatDelay</em> – The delay in milliseconds from when a repeat button is first pressed to when auto increment or decrement begins. </li>
<li><em>RepeatInterval</em> – Specifies the milliseconds between click events of the repeat buttons when held down. </li>
</ul>
<h3>SelectorEditorSettings</h3>
<p>Used with the built-in selector editor. The selector editor allows you to specify a list of possible values from which the user can select. <em>SelectorEditorSettings</em> defines the following properties:</p>
<ul>
<li><em>PossibleValues</em> – A list of objects from which the user can select. Note that you can customize the display by defining a DataTemplate targeting the data type of objects in this list. </li>
<li><em>Type</em> – An enumeration which specifies whether the editor is a drop down or if the possible options are presented directly in the cell as radio buttons. Possible values are <em>DropDown</em> (the default) or <em>InLine</em>. </li>
</ul>
<h3>TimeOfDayEditorSettings</h3>
<p>Used with the built-in editor for selecting a time of day. Makes use of the control <em>DevComponents.WPF.Controls.TimeOfDaySpinner</em>. This editor can edit properties of type System.DateTime and System.TimeSpan. Only the TimeOfDay portion of a DateTime is changed. <em>TimeOfDayEditorSettings</em> does not define any additional properties.</p>
<h2>EditingContentControl</h2>
<p>The way to create totally custom editors is to define a custom style for the <em>EditingContentControl </em>which does the actual editing. Each cell has an <em>EditingContentControl</em> embedded within it (assuming the default Template is in use for the cell.) The editing content control is also responsible for presenting the cell’s content when it is not being edited. When a cell goes into edit mode the editor’s IsEditing property is set to true, triggering whatever changes in the UI which are needed to support editing.</p>
<p><em>EditingContentControl</em> is derived from System.Windows.Controls.ContentControl. By default, it’s Content property is bound to the containing cell’s Content property in a two way binding with the binding’s UpdateSourceTrigger set to Explicit, which enables control of when changes are actually committed to the underlying data source.</p>
<h3>EditingContentControl Events</h3>
<ul>
<li><em>ChangeCommitted</em> – A routed event raised after changes made by the user are committed to the underlying data source. </li>
<li><em>IsEditingChanging</em> – A routed event raised when the value of <em>IsEditing</em> is changing. Setting the event arg’s Handled property to true prevents the value from changing. </li>
</ul>
<h3>EditingContentControl Methods</h3>
<ul>
<li><em>ClearPendingChanges</em> – Reverses any changes made by the user which have not been committed to the underlying data source. </li>
<li><em>CommitPendingChanges</em> – Causes all pending changes to be committed to the underlying data source. </li>
</ul>
<p>EditingContentControl Properties</p>
</li>
<li><em>AlwaysShowTextBox</em> – When true, the text box based editor is always shown. Is mapped to the EditorSettings property of the same name. The default value is false. </li>
<li><em>CommitOnContentChanged</em> – When true all changes made by the user are immediately committed to the underlying data source. </li>
<li><em>ContentString</em> – The actual value which is displayed by default by the editor. This property is bound directly to the Content property. The binding’s Converter property is set equal to the value of the editor settings <em>ToStringValueConverter</em> and the binding’s ConverterParameter is the editor settings itself. This design allows the editor to display and manipulate what is essentially two versions of the content being edited. </li>
<li><em>DialogWindowType</em> – The Type of the window which is created and opened when <em>IsDialogWindowOpen</em> is set to true. </li>
<li><em>DropDownTemplate</em> – Setting a value for this property automatically triggers the editor to include a toggle button that when checked opens a Popup. When set, the property specifies a ControlTemplate which is applied to a ContentControl that is a child of the Popup. The content of the ContentControl is bound to the Content property of the editor. </li>
<li><em>DropDownClosesOnClick</em> – Determines whether the drop down closes automatically when a click event fires from within the drop down content. Applies when a value for <em>DropDownTemplate </em>is specified. </li>
<li><em>EditingTemplate</em> – This is a ControlTemplate which is set as the editors Template when property <em>IsEditing</em> is true. This changes is performed via a trigger that is defined in the default <em>EditingContentControl</em> Style. The Template defined by the default style contains only a ContentPresenter when IsEditing is false. The EditingTemplate contains a TextBox. </li>
<li><em>EditingBackground</em> – A Brush used as the background of the editor when <em>IsEditing </em>is true. </li>
<li><em>EditingBorderBrush</em> – A Brush used for the control’s border when <em>IsEditing</em> is true. </li>
<li><em>EditingBorderThickness</em> – A Thickness for the control’s border when <em>IsEditing</em> is true. </li>
<li><em>EditorSettings</em> – Editor settings for the editor. By default, this value is bound to the EditorSettings property of the ColumnDefinition which defines the cell. </li>
<li><em>IsButtonHighlightedOnMouseOver</em> – Determines whether the editor’s button, if it has one, is highlighted when the mouse is over it. </li>
<li><em>IsDialogWindowOpen</em> – A boolean which, when set to true, causes the dialog window to be created and opened. When the dialog window closes this property is reset to false. Ignored if DialogWindowType is null. </li>
<li><em>IsEditing</em> – A boolean which determines whether the editor is in edit mode. Normally this value will be set by the containing cell control. </li>
<li><em>IsInCellEditingEnabled</em> – A boolean which determines whether the content can be edited directly in the cell, using a text box.<br />
<h1>Virtualization</h1>
<p><em>AdvGrid</em> supports recycling virtualization. When virtualization is active and a row goes out of view, either by scrolling or by making the viewport smaller, the row itself is disconnected or disassociated from the data item for which it is the container. When a container has been disconnected from its data item in this manner it is said to have been “virtualized.” If scrolling, and a new item is coming into view, the container is then connected to the new item and displayed. When a container has been connected to a data item in this manner it is said to have been “recycled.” In the case where there are no disconnected containers to recycle, a new container is instanciated. In this case the container is said to have been “realized.”</p>
<p>Note: This “recycling” of the containers results in significantly better performance than so-called “standard” virtualization, where virtualized containers are left for the garbage collector and new container is instanciated for each item that comes into view. Because of this, we can see no reason to implement standard virtualization in <em>AdvGrid</em>. If you have a scenerio where standard virtualization would be preferable to recycling, please let us know.</p>
<p>Virtualization offers two performance benefits: faster loading and reduced memory usage.</p>
<p>Virtualization is off by default. To turn it on, set property <em>VirtualizingMode</em> to <em>Recycling</em>.</p>
<h3>Notification</h3>
<p>The attached routed event <em>ItemContainerManager.ContainerVirtualizing</em> is raised by a container prior to being virtualized. If this event is handled (its Handled property set to true) then the container will not be virtualized.</p>
<p>Similiarly, a container will raise the attached routed event <em>ItemContainerManager.ContainerRealized</em> after a new container is instanciated and has been connected to its data item and added to the visual tree. The event <em>ItemContainerManager.ContainerRecycled</em> is raised by a container when it is recycled.</p>
<h3>Cell Virtualization</h3>
<p>By default, when <em>VirtualizingMode</em> = <em>Recycling</em> cells are virtualized as well as rows. Cell virtualization works the same as row virtualization, using recycling as columns are horizontally scrolled into and out of view. However, there might be certain situations where you want node virtualization but don’t want cell virtualization. For this scenerio set property <em>SupressCellVirtualization</em> to true.</p>
<h1>Selection</h1>
<p>Use property <em>SelectionUnit</em> to specify whether rows, cells or both are selected. <em>SelectionUnit</em> is an enumeration of type <em>AdvGridSelectionUnit</em> with the following possible values:</p>
<ul>
<li><em>None</em> – Selection is disabled. </li>
<li><em>Cell</em> – Cells are selected. </li>
<li><em>Row</em> – Rows are selected. </li>
<li><em>CellOrRowHeader</em> – Cells are selected when clicked. A row is selected when its header is clicked. </li>
</ul>
<p>To make it so an entire column is selected when the user clicks on the column’s header, set <em>ColumnHeaderClickMode</em> = <em>SelectColumn</em>. This setting also makes it so if the user clicks on top left corner then all columns are selected. When a column is selected, the column definition’s <em>IsSelected</em> property is set to true.</p>
<p>Use the <em>SelectionMode</em> property to select between Single, Multiple and Extended selection modes:</p>
<ul>
<li><em>Single</em> – Only a single item (row, cell or column) can be selected. When an item is selected the previously selected item is unselected. </li>
<li><em>Multiple</em> – More than one item (row, cell or column) can be selected at a time. Clicking on an item causes it to be selected and added to the current collection of selected rows, cells or columns. </li>
<li><em>Extended </em>– More than one item (row, cell or column) can be selected at a time. In this mode, to select multiple items, either the Control key or the Shift key must be pressed while the item is clicked on. If the Control key is pressed the item’s selection status is toggled and it is either added or removed from the collection of selected rows, cells or columns. If the Shift key is pressed, then an entire range is selected, beginning with the first item in the list of currently selected items and ending with the item which received the click. </li>
</ul>
<p>The property <em>SelectedItem </em>references the data item of the selected row. When selection mode is multiple or extended, <em>SelectedItems</em> contains the collection of selected rows and <em>SelectedItem</em> will reference the first row selected. The property <em>SelectedCell </em>references the selected cell, or to be more specific, it references an instance of <em>AdvCellSelectionData</em> which has properties <em>RowItem</em>, <em>Definition</em>, and <em>CellContent</em>. When selection mode is multiple or extended, <em>SelectedCells</em> contains the collection of selected cells and <em>SelectedCell</em> will reference the first cell that was selected. Use property <em>SelectedColumns</em> to obtain an enumeration of type <em>ColumnDefinition</em> with all the columns who’s <em>IsSelected </em>property is true.</p>
<p>When the selection changes, the <em>SelectionChanged</em> routed event is raised.</p>
<p>It is important to note that row, cell and column selection are mutually exclusive. That is, when a row or rows are selected, there will not be any cells or columns that are also selected. The same holds true for cells and columns.</p>
<h1>Row and Column Pinning</h1>
<h1>Data Virtualization</h1>
<h1>Control Templates</h1>
<h2>AdvGrid Control Template</h2>
<p>Here are the default control templates for AdvGrid and AdvGridHeaderCorner. You can use them as a starting place for customizing your own.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;{x:Type dc:AdvGrid}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Padding</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Padding}&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderBrush}&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderThickness}&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Background}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;MainGrid&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.ColumnDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ColumnDefinition</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ColumnDefinition</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.ColumnDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;{Binding ElementName=ColumnsPresenter, Path=HeaderHeight}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:AdvGridHeaderCorner</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;HeaderCorner&quot;</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RowHeaderWidth, Mode=TwoWay}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ColumnsPresenter</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;ColumnsPresenter&quot;</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Grid.RowSpan</span>=<span style="color: #ff0000;">&quot;2&quot;</span></span>
<span style="color: #009900;">                                <span style="color: #000066;">ItemsSource</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ColumnDefinitions}&quot;</span></span>
<span style="color: #009900;">                                <span style="color: #000066;">dc:DragDrop.DragAdornerTemplate</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGrid.ColumnHeaderDragAdornerTemplateKey}}&quot;</span></span>
<span style="color: #009900;">                                <span style="color: #000066;">dc:DragDrop.DropAdornerTemplate</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGrid.ColumnHeaderDropAdornerTemplateKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ScrollViewer</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;ScrollViewer&quot;</span> <span style="color: #000066;">Grid.ColumnSpan</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">Grid.Row</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Padding</span>=<span style="color: #ff0000;">&quot;0,-1,0,0&quot;</span> <span style="color: #000066;">Focusable</span>=<span style="color: #ff0000;">&quot;False&quot;</span> <span style="color: #000066;">CanContentScroll</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000066;">ClipToBounds</span>=<span style="color: #ff0000;">&quot;False&quot;</span></span>
<span style="color: #009900;">                            <span style="color: #000066;">IsDeferredScrollingEnabled</span>=<span style="color: #ff0000;">&quot;{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:AdvGridPanel</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;ItemsHost&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;0,1,0,0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ScrollViewer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextBlock</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;InitializingMessage&quot;</span> <span style="color: #000066;">Grid.Row</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span></span>
<span style="color: #009900;">                        <span style="color: #000066;">Text</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGrid.DataInitializingMessageStringKey}}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:PinnedColumnsSeparator</span> <span style="color: #000066;">Pin</span>=<span style="color: #ff0000;">&quot;Left&quot;</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Grid.RowSpan</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;Collapsed&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Left&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:PinnedColumnsSeparator</span> <span style="color: #000066;">Pin</span>=<span style="color: #ff0000;">&quot;Right&quot;</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Grid.RowSpan</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;Collapsed&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Left&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;VirtualizingDataStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;DataInitialized&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;DataInitializing&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;InitializingMessage&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Border<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate.Triggers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Trigger</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;ShowRowHeaders&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;False&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">TargetName</span>=<span style="color: #ff0000;">&quot;HeaderCorner&quot;</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Visibility&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Collapsed&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Trigger<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate.Triggers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;dc:AdvGridHeaderCorner&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Background}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderThickness}&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderBrush}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Polygon</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Glyph&quot;</span> <span style="color: #000066;">Points</span>=<span style="color: #ff0000;">&quot;10,0 10,10 0,10&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;5&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Right&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Bottom&quot;</span> <span style="color: #000066;">Stretch</span>=<span style="color: #ff0000;">&quot;Uniform&quot;</span> <span style="color: #000066;">RenderTransformOrigin</span>=<span style="color: #ff0000;">&quot;0.5,0.5&quot;</span></span>
<span style="color: #009900;">                    <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGrid.HeaderCornerGlyphBrushKey}}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Polygon.RenderTransform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RotateTransform</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;GlyphTransform&quot;</span> <span style="color: #000066;">Angle</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Polygon.RenderTransform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Polygon<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Thumb</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;Transparent&quot;</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;4&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Right&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Stretch&quot;</span> <span style="color: #000066;">Cursor</span>=<span style="color: #ff0000;">&quot;SizeWE&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;Transparent&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource AncestorType=dc:AdvGrid}, Path=LockRowHeaderWidth, Converter={StaticResource boolToVisibilityConverter}, ConverterParameter=Inverse}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Thumb.Template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;Transparent&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Thumb.Template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Thumb<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CheckedStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Unchecked&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Checked&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;GlyphTransform&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Angle&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;180&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;Glyph&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;HorizontalAlignment&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{x:Static HorizontalAlignment.Left}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;Glyph&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;VerticalAlignment&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{x:Static VerticalAlignment.Top}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h2>AdvGridRow Control Template</h2>
<p>Here are the default control templates for AdvGridRow and AdvGridRowHeader. You can use them as a starting place for customizing your own.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;dc:AdvGridRow&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;Transparent&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.ColumnDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ColumnDefinition</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ColumnDefinition</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.ColumnDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:AdvGridRowHeader</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;RowHeader&quot;</span> <span style="color: #000066;">Content</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Header}&quot;</span> <span style="color: #000066;">ContentTemplate</span>=<span style="color: #ff0000;">&quot;{TemplateBinding HeaderTemplate}&quot;</span></span>
<span style="color: #009900;">                                <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ParentTable.RowHeaderWidth}&quot;</span> </span>
<span style="color: #009900;">                                <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ParentTable.ShowRowHeaders, Converter={StaticResource boolToVisibilityConverter}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderBrush}&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderThickness}&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Background}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;HighlightBorder&quot;</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridRow.HighlightBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SelectionBorder&quot;</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridRow.SelectedBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SelectedInactiveBorder&quot;</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridRow.SelectedInactiveBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CellsBorder&quot;</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{TemplateBinding HorizontalGridLineBrush}&quot;</span> </span>
<span style="color: #009900;">                <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HorizontalGridLineHeight, Converter={StaticResource doubleToThicknessConverter}, ConverterParameter=Bottom}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:AdvCellPanel</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;CellPanel&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Border<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Rectangle</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;FocusRect&quot;</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Stroke</span>=<span style="color: #ff0000;">&quot;Black&quot;</span> <span style="color: #000066;">StrokeDashArray</span>=<span style="color: #ff0000;">&quot;1,2&quot;</span> <span style="color: #000066;">SnapsToDevicePixels</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
        <span style="color: #808080; font-style: italic;">&lt;!-- Use a Cell here to ensure height of row when loading matches height of row when loaded. --&gt;</span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:AdvGridCell</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;LoadingMessage&quot;</span> <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;Collapsed&quot;</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">VerticalContentAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Left&quot;</span> </span>
<span style="color: #009900;">                        <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;20,0,0,0&quot;</span> <span style="color: #000066;">Content</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridRow.DataLoadingMessageStringKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SelectionStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Unselected&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Selected&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;SelectionBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;FocusRect&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Visibility&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{x:Static Visibility.Collapsed}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CellSelectedWithin&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CellSelectedWithinInactive&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;AllColumnsSelected&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;AllColumnsSelectedInactive&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SelectedInactive&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;SelectedInactiveBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;FocusRect&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Visibility&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{x:Static Visibility.Collapsed}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;HighlightedStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;NotHighlighted&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;IsHighlighted&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;HighlightBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;FocusRect&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Visibility&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{x:Static Visibility.Collapsed}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;FocusStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Unfocused&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Focused&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;FocusRect&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate.Triggers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Trigger</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;ShowHorizontalGridLines&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;False&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">TargetName</span>=<span style="color: #ff0000;">&quot;CellsBorder&quot;</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;BorderThickness&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Trigger<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Trigger</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;IsDataLoading&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;True&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">TargetName</span>=<span style="color: #ff0000;">&quot;CellPanel&quot;</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">TargetName</span>=<span style="color: #ff0000;">&quot;LoadingMessage&quot;</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Visibility&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Visible&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Trigger<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate.Triggers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;dc:AdvGridRowHeader&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Background}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderThickness}&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderBrush}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CellSelectedBorder&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;0,-1,-1,-1&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;0,1,1,1&quot;</span> </span>
<span style="color: #009900;">                        <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridRow.CellSelectedHeaderBorderBrushKey}}&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridRow.CellSelectedHeaderBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;RowSelectedBorder&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;0,-1,-1,-1&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;0,1,1,1&quot;</span> </span>
<span style="color: #009900;">                        <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridRow.RowSelectedHeaderBorderBrushKey}}&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridRow.RowSelectedHeaderBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SelectedInactiveBorder&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;0,-1,-1,-1&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;0,1,1,1&quot;</span> </span>
<span style="color: #009900;">                        <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridRow.SelectedInactiveHeaderBorderBrushKey}}&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridRow.SelectedInactiveHeaderBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;HighlightBorder&quot;</span>  <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;0,-1,-1,-1&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;0,1,1,1&quot;</span> </span>
<span style="color: #009900;">                        <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridRow.HighlightHeaderBorderBrushKey}}&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridRow.HighlightHeaderBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ContentPresenter</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Presenter&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Padding}&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;{TemplateBinding HorizontalContentAlignment}&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;{TemplateBinding VerticalContentAlignment}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Path</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;FocusGlyph&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Style</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridRow.HeaderSelectedGlyphStyleKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Border<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Thumb</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Stretch&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Bottom&quot;</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000066;">Cursor</span>=<span style="color: #ff0000;">&quot;SizeNS&quot;</span> <span style="color: #000066;">Template</span>=<span style="color: #ff0000;">&quot;{StaticResource RowHeaderThumbTemplate}&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource AncestorType=dc:AdvGridRow}, Path=LockHeight, Converter={StaticResource boolToVisibilityConverter}, ConverterParameter=Inverse}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Thumb</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Stretch&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Right&quot;</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000066;">Cursor</span>=<span style="color: #ff0000;">&quot;SizeWE&quot;</span> <span style="color: #000066;">Template</span>=<span style="color: #ff0000;">&quot;{StaticResource RowHeaderThumbTemplate}&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource AncestorType=dc:AdvGrid}, Path=LockRowHeaderWidth, Converter={StaticResource boolToVisibilityConverter}, ConverterParameter=Inverse}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CommonStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Normal&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Disabled&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Highlighted&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;HighlightBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;FocusStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;RowUnfocused&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;RowFocused&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;FocusGlyph&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SelectionStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Unselected&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Selected&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;RowSelectedBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CellSelectedWithin&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;CellSelectedBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;AllColumnsSelected&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;RowSelectedBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SelectedInactive&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;SelectedInactiveBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CellSelectedWithinInactive&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;SelectedInactiveBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;AllColumnsSelectedInactive&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;SelectedInactiveBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h2>AdvGridCell Control Template</h2>
<p>Here is the default control template for AdvGridCell. You can use it as a starting place for customizing your own.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;dc:AdvGridCell&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;MainGrid&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;Transparent&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.ColumnDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ColumnDefinition</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ColumnDefinition</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.ColumnDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderBrush}&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderThickness}&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Background}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SelectedBorder&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderThickness}&quot;</span> </span>
<span style="color: #009900;">                <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridCell.IsSelectedBorderBrushKey}}&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridCell.IsSelectedBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;InactiveSelectedBorder&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderThickness}&quot;</span> </span>
<span style="color: #009900;">                <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridCell.SelectedInactiveBorderBrushKey}}&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridCell.SelectedInactiveBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;HighlightBorder&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderThickness}&quot;</span> </span>
<span style="color: #009900;">                <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridCell.IsHighlightedBorderBrushKey}}&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static dc:AdvGridCell.IsHighlightedBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Rectangle</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;GridLine&quot;</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Stretch&quot;</span></span>
<span style="color: #009900;">                    <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CellDefinition.ParentCollection.ShowGridLines, Converter={StaticResource boolToVisibilityConverter}}&quot;</span></span>
<span style="color: #009900;">                    <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CellDefinition.GridLineBrush}&quot;</span> </span>
<span style="color: #009900;">                    <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CellDefinition.GridLineWidth}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:EditingContentControl</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;Editor&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;-1&quot;</span> <span style="color: #000066;">Style</span>=<span style="color: #ff0000;">&quot;{TemplateBinding EditorStyle}&quot;</span> <span style="color: #000066;">Validation.ErrorTemplate</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Validation.ErrorTemplate}&quot;</span></span>
<span style="color: #009900;">                                    <span style="color: #000066;">Padding</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Padding, Converter={StaticResource additionConverter}, ConverterParameter=1}&quot;</span></span>
<span style="color: #009900;">                                    <span style="color: #000066;">VerticalContentAlignment</span>=<span style="color: #ff0000;">&quot;{TemplateBinding VerticalContentAlignment}&quot;</span> <span style="color: #000066;">HorizontalContentAlignment</span>=<span style="color: #ff0000;">&quot;{TemplateBinding HorizontalContentAlignment}&quot;</span></span>
<span style="color: #009900;">                                    <span style="color: #000066;">EditorSettings</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CellDefinition.EditorSettings}&quot;</span></span>
<span style="color: #009900;">                                    <span style="color: #000066;">ContentTemplate</span>=<span style="color: #ff0000;">&quot;{TemplateBinding ContentTemplate}&quot;</span> <span style="color: #000066;">ContentStringFormat</span>=<span style="color: #ff0000;">&quot;{TemplateBinding ContentStringFormat}&quot;</span></span>
<span style="color: #009900;">                                    <span style="color: #000066;">Content</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content, Mode=TwoWay, UpdateSourceTrigger=Explicit}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CommonStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Normal&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Disabled&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Highlighted&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;HighlightBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;00:00:00.03&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SelectionStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Unselected&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Selected&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;SelectedBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;00:00:00.03&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SelectedByColumn&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;SelectedBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;00:00:00.03&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SelectedInactive&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;InactiveSelectedBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;00:00:00.03&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>                            
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h2>ColumnsPresenter Control Template</h2>
<p>Here are the default ControlTemplates for ColumnsPresenter and ColumnPresenter. You can use them as starting place for customizing your own templates for these controls.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;{x:Type ctrls:ColumnsPresenter}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;MainGrid&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.ContextMenu<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ContextMenu</span> <span style="color: #000066;">ItemsSource</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ColumnDefinitions}&quot;</span> </span>
<span style="color: #009900;">                            <span style="color: #000066;">ItemContainerStyle</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static ctrls:ColumnsPresenter.ContextMenuItemStyleKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.ContextMenu<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ContentPresenter</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Label&quot;</span> <span style="color: #000066;">Content</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Label}&quot;</span> <span style="color: #000066;">ContentTemplate</span>=<span style="color: #ff0000;">&quot;{TemplateBinding LabelTemplate}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Grid.Row</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderThickness}&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderBrush}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Rectangle</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Top&quot;</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;{TemplateBinding HeaderHeight}&quot;</span> <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;{TemplateBinding HeaderBackground}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ItemsPresenter</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Top&quot;</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;{TemplateBinding HeaderHeight}&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderBrush}&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{TemplateBinding HeaderBorderThickness}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Border<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate.Triggers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DataTrigger</span> <span style="color: #000066;">Binding</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ColumnDefinitions.IsContextMenuEnabled}&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;False&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">TargetName</span>=<span style="color: #ff0000;">&quot;MainGrid&quot;</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Grid.ContextMenu&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{x:Null}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/DataTrigger<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate.Triggers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;ctrls:ColumnPresenter&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;Transparent&quot;</span> <span style="color: #000066;">SnapsToDevicePixels</span>=<span style="color: #ff0000;">&quot;True&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ctrls:ColumnHeader</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;Header&quot;</span> <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;{Binding ShowHeader, Converter={StaticResource boolToVisibilityConverter}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Thumb</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;ResizeThumb&quot;</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;6&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Right&quot;</span> <span style="color: #000066;">Cursor</span>=<span style="color: #ff0000;">&quot;SizeWE&quot;</span> </span>
<span style="color: #009900;">                <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;{Binding AllowColumnResize, Converter={StaticResource boolToVisibilityConverter}}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Thumb.Template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;Transparent&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Thumb.Template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Thumb<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;ColumnBorder&quot;</span> <span style="color: #000066;">Grid.Row</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Background}&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderThickness}&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderBrush}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Rectangle</span> <span style="color: #000066;">Grid.Row</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Right&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Top&quot;</span></span>
<span style="color: #009900;">                    <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource AncestorType=ctrls:AdvTabularControl}, Path=Padding, Converter={StaticResource thicknessToDoubleConverter}, ConverterParameter=Top}&quot;</span> </span>
<span style="color: #009900;">                    <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;{Binding GridLineBrush}&quot;</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;{Binding GridLineWidth}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate.Triggers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Trigger</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Pin&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Right&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">TargetName</span>=<span style="color: #ff0000;">&quot;ResizeThumb&quot;</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;HorizontalAlignment&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Left&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">TargetName</span>=<span style="color: #ff0000;">&quot;ResizeThumb&quot;</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Margin&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;-6,0,0,0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Trigger<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate.Triggers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;ctrls:ColumnHeader&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;Transparent&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Background}&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderThickness}&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderBrush}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CellSelectedBorder&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;-1,0,0,0&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;1,0,1,1&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static ctrls:ColumnPresenter.CellSelectedHeaderBorderBrushKey}}&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static ctrls:ColumnPresenter.CellSelectedHeaderBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;ColumnSelectedBorder&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;-1,0,0,0&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;1,0,1,1&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static ctrls:ColumnPresenter.ColumnSelectedHeaderBorderBrushKey}}&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static ctrls:ColumnPresenter.ColumnSelectedHeaderBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SelectedInactiveBorder&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;-1,0,0,0&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;1,0,1,1&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static ctrls:ColumnPresenter.SelectedInactiveHeaderBorderBrushKey}}&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static ctrls:ColumnPresenter.SelectedInactiveHeaderBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;PressedBorder&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;-1,0,0,0&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;1,0,1,1&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static ctrls:ColumnPresenter.HeaderHighlightBorderBrushKey}}&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static ctrls:ColumnPresenter.HeaderPressedBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;HighlightBorder&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;-1,0,0,0&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;1,0,1,1&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static ctrls:ColumnPresenter.HeaderHighlightBorderBrushKey}}&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static ctrls:ColumnPresenter.HeaderHighlightBackgroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ContentPresenter</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Presenter&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Padding}&quot;</span> </span>
<span style="color: #009900;">                            <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;{TemplateBinding HorizontalContentAlignment}&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;{TemplateBinding VerticalContentAlignment}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Control</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SortGlyph&quot;</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Style</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static ctrls:ColumnPresenter.ColumnSortGlyphStyleKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CommonStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Normal&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Disabled&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Highlighted&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;HighlightBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Pressed&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;PressedBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SelectionStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Unselected&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;ColumnSelected&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;ColumnSelectedBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CellSelectedWithin&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;CellSelectedBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SelectedInactive&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;SelectedInactiveBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>The following is the Style applied to the ContextMenu that is created by default for ColumnsPresenter when IsContextMenuActive = true.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Style</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;{x:Static ctrls:ColumnsPresenter.ContextMenuItemStyleKey}&quot;</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;MenuItem&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Style.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ctrls:VisibilityToBooleanConverter</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;visibilityToBoolConverter&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Style.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Foreground&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static ctrls:MenuResources.MenuItemForegroundKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Padding&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static ctrls:MenuResources.MenuItemPaddingKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;IsCheckable&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;IsChecked&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{Binding Visibility, Converter={StaticResource visibilityToBoolConverter}, Mode=TwoWay}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Header&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{Binding Header}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Style.Triggers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DataTrigger</span> <span style="color: #000066;">Binding</span>=<span style="color: #ff0000;">&quot;{Binding IsLocked}&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;True&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Visibility&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Collapsed&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/DataTrigger<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Style.Triggers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

</li>


<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=1130' rel='bookmark' title='Permanent Link: WPF Color Control Quick Start Guide'>WPF Color Control Quick Start Guide</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=1133' rel='bookmark' title='Permanent Link: Brush Control Quick Start Guide'>Brush Control Quick Start Guide</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=1015' rel='bookmark' title='Permanent Link: WPF AdvTree Quick Start Guide'>WPF AdvTree Quick Start Guide</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1299</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create Ribbon Tab Groups in DotNetBar for WinForms</title>
		<link>http://www.devcomponents.com/kb2/?p=1295</link>
		<comments>http://www.devcomponents.com/kb2/?p=1295#comments</comments>
		<pubDate>Wed, 29 Feb 2012 17:52:40 +0000</pubDate>
		<dc:creator>Maintainer</dc:creator>
				<category><![CDATA[DotNetBar for Windows Forms]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Ribbon]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1295</guid>
		<description><![CDATA[Follow these steps to create Ribbon Tab Groups: Add RibbonControl to the form. Select the RibbonTabItem2 that is created by default. In VS.NET Property window find Group property and select it Click the drop-down button for Group property and choose Create New Group Select RibbonControl and in Property VS.NET window ensure that TabGroupsVisible property is [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=573' rel='bookmark' title='Permanent Link: How to use Option Groups feature'>How to use Option Groups feature</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=504' rel='bookmark' title='Permanent Link: Ribbon Quick Access Toolbar Customization'>Ribbon Quick Access Toolbar Customization</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=127' rel='bookmark' title='Permanent Link: How To Add GalleryGroup to GalleryContainer'>How To Add GalleryGroup to GalleryContainer</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Follow these steps to create Ribbon Tab Groups:</p>
<ol>
<li>Add RibbonControl to the form.</li>
<li>Select the RibbonTabItem2 that is created by default.</li>
<li>In VS.NET Property window find <strong>Group</strong> property and select it</li>
<li>Click the drop-down button for <strong>Group</strong> property and choose <strong>Create New Group</strong></li>
<li>Select <strong>RibbonControl</strong> and in Property VS.NET window ensure that <strong>TabGroupsVisible</strong> property is set to <strong>true</strong></li>
</ol>
<p>Note that Tab Groups will be displayed only if there is space above the tab to show the group. If Quick Access Toolbar extends over the tab then group will not be rendered.</p>


<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=573' rel='bookmark' title='Permanent Link: How to use Option Groups feature'>How to use Option Groups feature</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=504' rel='bookmark' title='Permanent Link: Ribbon Quick Access Toolbar Customization'>Ribbon Quick Access Toolbar Customization</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=127' rel='bookmark' title='Permanent Link: How To Add GalleryGroup to GalleryContainer'>How To Add GalleryGroup to GalleryContainer</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1295</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use ItemPanel Data-Binding Features &#8211; WinForms</title>
		<link>http://www.devcomponents.com/kb2/?p=1245</link>
		<comments>http://www.devcomponents.com/kb2/?p=1245#comments</comments>
		<pubDate>Thu, 01 Dec 2011 18:30:16 +0000</pubDate>
		<dc:creator>Maintainer</dc:creator>
				<category><![CDATA[DotNetBar for Windows Forms]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[ItemPanel]]></category>
		<category><![CDATA[WinForms]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1245</guid>
		<description><![CDATA[DotNetBar for Windows Forms ItemPanel control starting with 10.1.0.6 release includes support for data-binding. To bind ItemPanel to your data source follow these steps: Set DataSource property to the source of your data. This can be array of custom objects or data set. Set ItemTemplate property to the item which will act as template for [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=65' rel='bookmark' title='Permanent Link: Data-binding on popup and DataSource'>Data-binding on popup and DataSource</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=63' rel='bookmark' title='Permanent Link: Data Binding on undocked/floating Bars, dockable windows'>Data Binding on undocked/floating Bars, dockable windows</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=894' rel='bookmark' title='Permanent Link: Micro-Charts for WinForms Quick Start Guide'>Micro-Charts for WinForms Quick Start Guide</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>DotNetBar for Windows Forms ItemPanel control starting with <strong>10.1.0.6</strong> release includes support for data-binding. To bind ItemPanel to your data source follow these steps:</p>
<ol>
<li>Set <strong>DataSource</strong> property to the source of your data. This can be array of custom objects or data set.</li>
<li>Set <strong>ItemTemplate</strong> property to the item which will act as template for each data row from data source. The ItemTemplate is an BaseItem inherited item that is repeated for each data row. In VS.NET designer you can invoke drop-down to create desired item to use as template.</li>
<li>Set <strong>ItemTemplateBindings</strong> collection with the list of bindings that are applied on the ItemTemplate. ItemTemplateBindings collection accepts BindingDef type which describes the single binding. Two key properties on BindingDef must be set: <strong>DataMember</strong> &#8211; which is name of the field from your data-source that provides the data for PropertyName &#8211; which specifies the property on <strong>ItemTemplate</strong> which receives data.
<p>Please note that if you are changing <strong>ItemTemplateBindings</strong> collection after the DataSource is assigned, you should call RefreshItems() to re-generate the visual data representation.
</li>
</ol>
<p>You can add following code to the form which has itemPanel1 control added to it to demo the data-binding (note that code assumes your form is named Form1 and ItemPanel is named itemPanel1):</p>
<p>C#:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> Form1<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    InitializeComponent<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #008080; font-style: italic;">// Create custom data</span>
    List<span style="color: #008000;">&lt;</span>CustomClass<span style="color: #008000;">&gt;</span> items <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> List<span style="color: #008000;">&lt;</span>CustomClass<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #0600FF; font-weight: bold;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span> i <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span> i <span style="color: #008000;">&lt;</span> <span style="color: #FF0000;">20</span><span style="color: #008000;">;</span> i<span style="color: #008000;">++</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        items<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">new</span> CustomClass<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Item &quot;</span> <span style="color: #008000;">+</span> i<span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>, <span style="color: #666666;">&quot;Name &quot;</span> <span style="color: #008000;">+</span> i<span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
    <span style="color: #008080; font-style: italic;">// Create template used for each data row</span>
    MetroTileItem template <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> MetroTileItem<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    template<span style="color: #008000;">.</span><span style="color: #0000FF;">TileColor</span> <span style="color: #008000;">=</span> eMetroTileColor<span style="color: #008000;">.</span><span style="color: #0000FF;">Magenta</span><span style="color: #008000;">;</span>
    itemPanel1<span style="color: #008000;">.</span><span style="color: #0000FF;">ItemTemplate</span> <span style="color: #008000;">=</span> template<span style="color: #008000;">;</span>
    <span style="color: #008080; font-style: italic;">// Define bindings</span>
    itemPanel1<span style="color: #008000;">.</span><span style="color: #0000FF;">ItemTemplateBindings</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Clear</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008080; font-style: italic;">// Bind MetroTileItem.Text to CustomClass.Text</span>
    itemPanel1<span style="color: #008000;">.</span><span style="color: #0000FF;">ItemTemplateBindings</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">new</span> BindingDef<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Text&quot;</span>, <span style="color: #666666;">&quot;Text&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008080; font-style: italic;">// Bind MetroTileItem.TitleText to CustomClass.Name</span>
    itemPanel1<span style="color: #008000;">.</span><span style="color: #0000FF;">ItemTemplateBindings</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">new</span> BindingDef<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;TitleText&quot;</span>, <span style="color: #666666;">&quot;Name&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008080; font-style: italic;">// Assign data source</span>
    itemPanel1<span style="color: #008000;">.</span><span style="color: #0000FF;">DataSource</span> <span style="color: #008000;">=</span> items<span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> CustomClass <span style="color: #008000;">:</span> INotifyPropertyChanged
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> CustomClass<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
    <span style="color: #008000;">&#125;</span>
    <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span>
    <span style="color: #008080; font-style: italic;">/// Initializes a new instance of the CustomClass class.</span>
    <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span>
    <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;text&quot;&gt;&lt;/param&gt;</span>
    <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;name&quot;&gt;&lt;/param&gt;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> CustomClass<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span> text, <span style="color: #6666cc; font-weight: bold;">string</span> name<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        _Text <span style="color: #008000;">=</span> text<span style="color: #008000;">;</span>
        _Name <span style="color: #008000;">=</span> name<span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">string</span> _Text<span style="color: #008000;">;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">string</span> Text
    <span style="color: #008000;">&#123;</span>
        get <span style="color: #008000;">&#123;</span> <span style="color: #0600FF; font-weight: bold;">return</span> _Text<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
        set
        <span style="color: #008000;">&#123;</span>
            _Text <span style="color: #008000;">=</span> value<span style="color: #008000;">;</span>
            OnPropertyChanged<span style="color: #008000;">&#40;</span><span style="color: #008000;">new</span> PropertyChangedEventArgs<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Text&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">string</span> _Name<span style="color: #008000;">;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">string</span> Name
    <span style="color: #008000;">&#123;</span>
        get <span style="color: #008000;">&#123;</span> <span style="color: #0600FF; font-weight: bold;">return</span> _Name<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
        set
        <span style="color: #008000;">&#123;</span>
            _Name <span style="color: #008000;">=</span> value<span style="color: #008000;">;</span>
            OnPropertyChanged<span style="color: #008000;">&#40;</span><span style="color: #008000;">new</span> PropertyChangedEventArgs<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Name&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #008080;">#region INotifyPropertyChanged Members</span>
    <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span>
    <span style="color: #008080; font-style: italic;">/// Raises the PropertyChanged event.</span>
    <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span>
    <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;e&quot;&gt;Provides event arguments.&lt;/param&gt;</span>
    <span style="color: #0600FF; font-weight: bold;">protected</span> <span style="color: #0600FF; font-weight: bold;">virtual</span> <span style="color: #6666cc; font-weight: bold;">void</span> OnPropertyChanged<span style="color: #008000;">&#40;</span>PropertyChangedEventArgs e<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        PropertyChangedEventHandler handler <span style="color: #008000;">=</span> PropertyChanged<span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>handler <span style="color: #008000;">!=</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span> handler<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span>, e<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
    <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span>
    <span style="color: #008080; font-style: italic;">/// Occurs when property on BindingDef object has changed.</span>
    <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span>
    <span style="color: #008000;">&#91;</span>Description<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Occurs when property on BindingDef object has changed.Occurs when property on BindingDef object has changed.&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">event</span> PropertyChangedEventHandler PropertyChanged<span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #008080;">#endregion</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>VB:</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #E56717; font-weight: bold;">Public</span> <span style="color: #E56717; font-weight: bold;">Sub</span> <span style="color: #E56717; font-weight: bold;">New</span>()
	<span style="color: #008000;">' Create custom data
</span>	<span style="color: #151B8D; font-weight: bold;">Dim</span> items <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #E56717; font-weight: bold;">New</span> List(Of CustomClass)()
	<span style="color: #8D38C9; font-weight: bold;">For</span> i <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Integer</span> = 0 <span style="color: #8D38C9; font-weight: bold;">To</span> 19
		items.Add(<span style="color: #E56717; font-weight: bold;">New</span> CustomClass(<span style="color: #800000;">&quot;Item &quot;</span> &amp; i.ToString(), <span style="color: #800000;">&quot;Name &quot;</span> &amp; i.ToString()))
	<span style="color: #8D38C9; font-weight: bold;">Next</span>
	<span style="color: #008000;">' Create template used for each data row
</span>	<span style="color: #151B8D; font-weight: bold;">Dim</span> template <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #E56717; font-weight: bold;">New</span> MetroTileItem()
	template.TileColor = eMetroTileColor.Magenta
	itemPanel1.ItemTemplate = template
	<span style="color: #008000;">' Define bindings
</span>	itemPanel1.ItemTemplateBindings.Clear()
	<span style="color: #008000;">' Bind MetroTileItem.Text to CustomClass.Text
</span>	itemPanel1.ItemTemplateBindings.Add(<span style="color: #E56717; font-weight: bold;">New</span> BindingDef(<span style="color: #800000;">&quot;Text&quot;</span>, <span style="color: #800000;">&quot;Text&quot;</span>))
	<span style="color: #008000;">' Bind MetroTileItem.TitleText to CustomClass.Name
</span>	itemPanel1.ItemTemplateBindings.Add(<span style="color: #E56717; font-weight: bold;">New</span> BindingDef(<span style="color: #800000;">&quot;TitleText&quot;</span>, <span style="color: #800000;">&quot;Name&quot;</span>))
	<span style="color: #008000;">' Assign data source
</span>	itemPanel1.DataSource = items
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span>
&nbsp;
<span style="color: #E56717; font-weight: bold;">Public</span> Class CustomClass
	<span style="color: #151B8D; font-weight: bold;">Implements</span> INotifyPropertyChanged
	<span style="color: #E56717; font-weight: bold;">Public</span> <span style="color: #E56717; font-weight: bold;">Sub</span> <span style="color: #E56717; font-weight: bold;">New</span>()
	<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span>
	<span style="color: #008000;">''' &lt;summary&gt;
</span>	<span style="color: #008000;">''' Initializes a new instance of the CustomClass class.
</span>	<span style="color: #008000;">''' &lt;/summary&gt;
</span>	<span style="color: #008000;">''' &lt;param name=&quot;text&quot;&gt;&lt;/param&gt;
</span>	<span style="color: #008000;">''' &lt;param name=&quot;name&quot;&gt;&lt;/param&gt;
</span>	<span style="color: #E56717; font-weight: bold;">Public</span> <span style="color: #E56717; font-weight: bold;">Sub</span> <span style="color: #E56717; font-weight: bold;">New</span>(text <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span>, name <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span>)
		_Text = text
		_Name = name
	<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span>
&nbsp;
	<span style="color: #E56717; font-weight: bold;">Private</span> _Text <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span>
	<span style="color: #E56717; font-weight: bold;">Public</span> <span style="color: #151B8D; font-weight: bold;">Property</span> Text() <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span>
		<span style="color: #151B8D; font-weight: bold;">Get</span>
			Return _Text
		<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #151B8D; font-weight: bold;">Get</span>
		<span style="color: #151B8D; font-weight: bold;">Set</span>
			_Text = value
			OnPropertyChanged(<span style="color: #E56717; font-weight: bold;">New</span> PropertyChangedEventArgs(<span style="color: #800000;">&quot;Text&quot;</span>))
		<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #151B8D; font-weight: bold;">Set</span>
	<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #151B8D; font-weight: bold;">Property</span>
&nbsp;
	<span style="color: #E56717; font-weight: bold;">Private</span> _Name <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span>
	<span style="color: #E56717; font-weight: bold;">Public</span> <span style="color: #151B8D; font-weight: bold;">Property</span> Name() <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span>
		<span style="color: #151B8D; font-weight: bold;">Get</span>
			Return _Name
		<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #151B8D; font-weight: bold;">Get</span>
		<span style="color: #151B8D; font-weight: bold;">Set</span>
			_Name = value
			OnPropertyChanged(<span style="color: #E56717; font-weight: bold;">New</span> PropertyChangedEventArgs(<span style="color: #800000;">&quot;Name&quot;</span>))
		<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #151B8D; font-weight: bold;">Set</span>
	<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #151B8D; font-weight: bold;">Property</span>
&nbsp;
	#Region <span style="color: #800000;">&quot;INotifyPropertyChanged Members&quot;</span>
	<span style="color: #008000;">''' &lt;summary&gt;
</span>	<span style="color: #008000;">''' Raises the PropertyChanged event.
</span>	<span style="color: #008000;">''' &lt;/summary&gt;
</span>	<span style="color: #008000;">''' &lt;param name=&quot;e&quot;&gt;Provides event arguments.&lt;/param&gt;
</span>	Protected Overridable <span style="color: #E56717; font-weight: bold;">Sub</span> OnPropertyChanged(e <span style="color: #151B8D; font-weight: bold;">As</span> PropertyChangedEventArgs)
		<span style="color: #151B8D; font-weight: bold;">Dim</span> handler <span style="color: #151B8D; font-weight: bold;">As</span> PropertyChangedEventHandler = PropertyChanged
		<span style="color: #151B8D; font-weight: bold;">RaiseEvent</span> handler(Me, e)
	<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span>
	<span style="color: #008000;">''' &lt;summary&gt;
</span>	<span style="color: #008000;">''' Occurs when property on BindingDef object has changed.
</span>	<span style="color: #008000;">''' &lt;/summary&gt;
</span>	&lt;Description(<span style="color: #800000;">&quot;Occurs when property on BindingDef object has changed.Occurs when property on BindingDef object has changed.&quot;</span>)&gt; _
	<span style="color: #E56717; font-weight: bold;">Public</span> Event PropertyChanged <span style="color: #151B8D; font-weight: bold;">As</span> PropertyChangedEventHandler
&nbsp;
	#End Region
<span style="color: #8D38C9; font-weight: bold;">End</span> Class
&nbsp;
Convert again</pre></div></div>

<p>&nbsp;</p>


<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=65' rel='bookmark' title='Permanent Link: Data-binding on popup and DataSource'>Data-binding on popup and DataSource</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=63' rel='bookmark' title='Permanent Link: Data Binding on undocked/floating Bars, dockable windows'>Data Binding on undocked/floating Bars, dockable windows</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=894' rel='bookmark' title='Permanent Link: Micro-Charts for WinForms Quick Start Guide'>Micro-Charts for WinForms Quick Start Guide</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1245</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to do MVVM with WPF Navigation Pane</title>
		<link>http://www.devcomponents.com/kb2/?p=1235</link>
		<comments>http://www.devcomponents.com/kb2/?p=1235#comments</comments>
		<pubDate>Mon, 07 Nov 2011 17:58:28 +0000</pubDate>
		<dc:creator>Maintainer</dc:creator>
				<category><![CDATA[DotNetBar for WPF]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[NavigationPane WPF]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1235</guid>
		<description><![CDATA[For MVVM usage scenarios you bind the NavigationPane.ItemSource to the list of your custom view objects. Here is how to create and bind items properly: &#60;dc:NavigationPane DataContext=&#34;{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}&#34; ItemsSource=&#34;{Binding Path=PaneItems}&#34; LargeItemsCount=&#34;2&#34;&#62; &#60;dc:NavigationPane.ItemTemplate&#62; &#60;DataTemplate&#62; &#60;TextBlock Text=&#34;{Binding Path=DisplayName}&#34; /&#62; &#60;/DataTemplate&#62; &#60;/dc:NavigationPane.ItemTemplate&#62; &#60;dc:NavigationPane.ItemContainerStyle&#62; &#60;Style TargetType=&#34;{x:Type dc:PaneItem}&#34;&#62; &#60;Setter Property=&#34;ImageSource&#34; Value=&#34;{Binding Path=DisplayImage}&#34; /&#62; &#60;/Style&#62; &#60;/dc:NavigationPane.ItemContainerStyle&#62; &#60;/dc:NavigationPane&#62; Notice [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=390' rel='bookmark' title='Permanent Link: How to Create WPF Navigation Pane Items Using Code'>How to Create WPF Navigation Pane Items Using Code</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>For MVVM usage scenarios you bind the NavigationPane.ItemSource to the list of your custom view objects. Here is how to create and bind items properly:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:NavigationPane</span> <span style="color: #000066;">DataContext</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}&quot;</span> <span style="color: #000066;">ItemsSource</span>=<span style="color: #ff0000;">&quot;{Binding Path=PaneItems}&quot;</span> <span style="color: #000066;">LargeItemsCount</span>=<span style="color: #ff0000;">&quot;2&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:NavigationPane.ItemTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DataTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextBlock</span> <span style="color: #000066;">Text</span>=<span style="color: #ff0000;">&quot;{Binding Path=DisplayName}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/DataTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:NavigationPane.ItemTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:NavigationPane.ItemContainerStyle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Style</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;{x:Type dc:PaneItem}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;ImageSource&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{Binding Path=DisplayImage}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:NavigationPane.ItemContainerStyle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:NavigationPane<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Notice that we created new <strong>ItemTemplate </strong>and also notice how Image is set by creating <strong>ItemContainerStyle</strong>.</p>


<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=390' rel='bookmark' title='Permanent Link: How to Create WPF Navigation Pane Items Using Code'>How to Create WPF Navigation Pane Items Using Code</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1235</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add row numbers to DataGridView</title>
		<link>http://www.devcomponents.com/kb2/?p=1230</link>
		<comments>http://www.devcomponents.com/kb2/?p=1230#comments</comments>
		<pubDate>Wed, 26 Oct 2011 20:43:02 +0000</pubDate>
		<dc:creator>Maintainer</dc:creator>
				<category><![CDATA[DotNetBar for Windows Forms]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[DataGridView]]></category>
		<category><![CDATA[DataGridViewX]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1230</guid>
		<description><![CDATA[You can render row numbers for DataGridView and DataGridViewX by handling RowPostPaint event. Then you use following code: C#: void DataGridViewRowPostPaint&#40;object sender, DataGridViewRowPostPaintEventArgs e&#41; &#123; DataGridView dg = &#40;DataGridView&#41;sender; // Current row record string rowNumber = &#40;e.RowIndex + 1&#41;.ToString&#40;&#41;; &#160; // Format row based on number of records displayed by using leading zeros while &#40;rowNumber.Length [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=638' rel='bookmark' title='Permanent Link: How to set custom size for BalloonTip Control'>How to set custom size for BalloonTip Control</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=141' rel='bookmark' title='Permanent Link: How to change global text rendering properties'>How to change global text rendering properties</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=63' rel='bookmark' title='Permanent Link: Data Binding on undocked/floating Bars, dockable windows'>Data Binding on undocked/floating Bars, dockable windows</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>You can render row numbers for DataGridView and DataGridViewX by handling <strong>RowPostPaint</strong> event. Then you use following code:</p>
<p>C#:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #6666cc; font-weight: bold;">void</span> DataGridViewRowPostPaint<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, DataGridViewRowPostPaintEventArgs e<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    DataGridView dg <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span>DataGridView<span style="color: #008000;">&#41;</span>sender<span style="color: #008000;">;</span>
    <span style="color: #008080; font-style: italic;">// Current row record</span>
    <span style="color: #6666cc; font-weight: bold;">string</span> rowNumber <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">RowIndex</span> <span style="color: #008000;">+</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #008080; font-style: italic;">// Format row based on number of records displayed by using leading zeros</span>
    <span style="color: #0600FF; font-weight: bold;">while</span> <span style="color: #008000;">&#40;</span>rowNumber<span style="color: #008000;">.</span><span style="color: #0000FF;">Length</span> <span style="color: #008000;">&lt;</span> dg<span style="color: #008000;">.</span><span style="color: #0000FF;">RowCount</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Length</span><span style="color: #008000;">&#41;</span> rowNumber <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;0&quot;</span> <span style="color: #008000;">+</span> rowNumber<span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #008080; font-style: italic;">// Position text</span>
    SizeF size <span style="color: #008000;">=</span> e<span style="color: #008000;">.</span><span style="color: #0000FF;">Graphics</span><span style="color: #008000;">.</span><span style="color: #0000FF;">MeasureString</span><span style="color: #008000;">&#40;</span>rowNumber, <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Font</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>dg<span style="color: #008000;">.</span><span style="color: #0000FF;">RowHeadersWidth</span> <span style="color: #008000;">&lt;</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#40;</span>size<span style="color: #008000;">.</span><span style="color: #0000FF;">Width</span> <span style="color: #008000;">+</span> <span style="color: #FF0000;">20</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> dg<span style="color: #008000;">.</span><span style="color: #0000FF;">RowHeadersWidth</span> <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#40;</span>size<span style="color: #008000;">.</span><span style="color: #0000FF;">Width</span> <span style="color: #008000;">+</span> <span style="color: #FF0000;">20</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #008080; font-style: italic;">// Use default system text brush</span>
    Brush b <span style="color: #008000;">=</span> SystemBrushes<span style="color: #008000;">.</span><span style="color: #0000FF;">ControlText</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #008080; font-style: italic;">// Draw row number</span>
    e<span style="color: #008000;">.</span><span style="color: #0000FF;">Graphics</span><span style="color: #008000;">.</span><span style="color: #0000FF;">DrawString</span><span style="color: #008000;">&#40;</span>rowNumber, dg<span style="color: #008000;">.</span><span style="color: #0000FF;">Font</span>, b, e<span style="color: #008000;">.</span><span style="color: #0000FF;">RowBounds</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Location</span><span style="color: #008000;">.</span><span style="color: #0000FF;">X</span> <span style="color: #008000;">+</span> <span style="color: #FF0000;">15</span>, e<span style="color: #008000;">.</span><span style="color: #0000FF;">RowBounds</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Location</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Y</span> <span style="color: #008000;">+</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>e<span style="color: #008000;">.</span><span style="color: #0000FF;">RowBounds</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Height</span> <span style="color: #008000;">-</span> size<span style="color: #008000;">.</span><span style="color: #0000FF;">Height</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">/</span> <span style="color: #FF0000;">2</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>VB:</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #E56717; font-weight: bold;">Private</span> <span style="color: #E56717; font-weight: bold;">Sub</span> DataGridViewRowPostPaint(sender <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Object</span>, e <span style="color: #151B8D; font-weight: bold;">As</span> DataGridViewRowPostPaintEventArgs)
	<span style="color: #151B8D; font-weight: bold;">Dim</span> dg <span style="color: #151B8D; font-weight: bold;">As</span> DataGridView = DirectCast(sender, DataGridView)
	<span style="color: #008000;">' Current row record
</span>	<span style="color: #151B8D; font-weight: bold;">Dim</span> rowNumber <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span> = (e.RowIndex + 1).ToString()
&nbsp;
	<span style="color: #008000;">' Format row based on number of records displayed by using leading zeros
</span>	<span style="color: #8D38C9; font-weight: bold;">While</span> rowNumber.Length &lt; dg.RowCount.ToString().Length
		rowNumber = <span style="color: #800000;">&quot;0&quot;</span> &amp; rowNumber
	<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">While</span>
&nbsp;
	<span style="color: #008000;">' Position text
</span>	<span style="color: #151B8D; font-weight: bold;">Dim</span> size <span style="color: #151B8D; font-weight: bold;">As</span> SizeF = e.Graphics.MeasureString(rowNumber, Me.Font)
	<span style="color: #8D38C9; font-weight: bold;">If</span> dg.RowHeadersWidth &lt; CInt(size.Width + 20) <span style="color: #8D38C9; font-weight: bold;">Then</span>
		dg.RowHeadersWidth = CInt(size.Width + 20)
	<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
&nbsp;
	<span style="color: #008000;">' Use default system text brush
</span>	<span style="color: #151B8D; font-weight: bold;">Dim</span> b <span style="color: #151B8D; font-weight: bold;">As</span> Brush = SystemBrushes.ControlText
&nbsp;
	<span style="color: #008000;">' Draw row number
</span>	e.Graphics.DrawString(rowNumber, dg.Font, b, e.RowBounds.Location.X + 15, e.RowBounds.Location.Y + ((e.RowBounds.Height - size.Height) / 2))
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=638' rel='bookmark' title='Permanent Link: How to set custom size for BalloonTip Control'>How to set custom size for BalloonTip Control</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=141' rel='bookmark' title='Permanent Link: How to change global text rendering properties'>How to change global text rendering properties</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=63' rel='bookmark' title='Permanent Link: Data Binding on undocked/floating Bars, dockable windows'>Data Binding on undocked/floating Bars, dockable windows</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1230</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with Metro UI in DotNetBar for WPF</title>
		<link>http://www.devcomponents.com/kb2/?p=1197</link>
		<comments>http://www.devcomponents.com/kb2/?p=1197#comments</comments>
		<pubDate>Wed, 07 Sep 2011 16:38:53 +0000</pubDate>
		<dc:creator>donwingate</dc:creator>
				<category><![CDATA[DotNetBar for WPF]]></category>
		<category><![CDATA[Metro]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1197</guid>
		<description><![CDATA[Metro UI consists of a set of&#160; purpose-built controls, custom Styles and resources for existing DotNetBar controls and common Microsoft controls, and an automatic color generator. All of which work together to help you develop great looking Metro look and feel user interface for your apps. The set of new Metro controls includes the following: [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=1160' rel='bookmark' title='Permanent Link: Getting started with Metro UI in DotNetBar for WinForms'>Getting started with Metro UI in DotNetBar for WinForms</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=10' rel='bookmark' title='Permanent Link: All you need to know about Color Input controls in DotNetBar for WPF'>All you need to know about Color Input controls in DotNetBar for WPF</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=861' rel='bookmark' title='Permanent Link: How to build Office 2010 style Backstage application menu with DotNetBar for WPF'>How to build Office 2010 style Backstage application menu with DotNetBar for WPF</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Metro UI consists of a set of&#160; purpose-built controls, custom Styles and resources for existing DotNetBar controls and common Microsoft controls, and an automatic color generator. All of which work together to help you develop great looking Metro look and feel user interface for your apps. The set of new Metro controls includes the following:</p>
<ol>
<li><strong>MetroAppWindow</strong> – A chromeless window with support for resizing. This is a Window with WindowStyle property fixed to None (this cannot be changed.) Other inherited Window properties are supported and behave the same.&#160;&#160; </li>
<li><strong>MetroShell</strong> – A TabControl for <em>MetroTabItems</em> that also serves as the container for other Metro controls. Usually <em>MetroAppWindow</em> will have a <em>MetroShell</em> as its single Content item.&#160; Provides the glue which holds all other parts together and ensures consistent look and feel.&#160; </li>
<li><strong>MetroChrome</strong> – Provides chrome for Metro app and is host for the quick access toolbar. </li>
<li><strong>MetroStatusBar</strong> – Metro styled status bar for your application. </li>
<li><strong>QuickAccessToolBar</strong> – A quick access toolbar like the one in Ribbon control.&#160;&#160; </li>
<li><strong>MetroBackstage</strong> – Backstage area opens when File button is clicked. </li>
<li><strong>MetroToolBar</strong> – A toolbar which expands to show extra items. </li>
<li><strong>MetroTile</strong> – Based on Button with the additional properties Title, ImageSource and TileColor – an enumeration of built-in Brushes.&#160; </li>
<li><strong>MetroStartControl</strong> – A container for MetroTiles which has the ability to slide in and out of view.&#160; </li>
<li><strong>MetroDialog</strong> – A chromeless window with MetroChrome and Metro styling. </li>
</ol>
<h1>Building a Metro App</h1>
<p>The typical Metro app begins with <em>MetroAppWindow</em>. This provides a chromeless Window with square borders and support for resizing, including a styled ResizeGrip used when ResizeMode = CanResizeWithGrip. </p>
<p><em>MetroUI.Theme</em> attached property should be set on the window ensuring all Metro styles and resources are available as required.</p>
<p>The single Content element of the window<em> </em>will generally be an instance of <em>MetroShell</em>. <em>MetroShell</em> is based on TabControl, but instead of TabItem, its native container type is <em>MetroTabItem</em>. In addition to providing tab control functionality for the Metro app, <em>MetroShell</em> provides a convenient way to add the different Metro controls to the UI and for ensuring that they are properly positioned and function together.</p>
<p>Use the following <em>MetroShell</em> properties for adding Metro parts to your app (Note: all of these properties are defined as type Object, even though specific types are provided &#8211; though not absolutely required. The reason for this is so they work well in an MVVM environment):</p>
<ul>
<li>Backstage – This is the object which will be displayed when the end user clicks on the File button (or when <em>MetroShell.IsBackstageOpen</em> is set true.) Generally, it will be an instance of <em>MetroBackstage</em>. </li>
<li>Chrome – This is the top most object. It should be a <em>MetroChrome</em>.&#160; </li>
<li>StatusBar – This is the bottom most object. Generally a <em>MetroStatusBar</em>. </li>
<li>Start – A place holder for <em>MetroStartControl</em> which can be added to give your app a Metro style staging area. </li>
</ul>
<p>The quick access toolbar – <em>QuickAccessToolBar – </em>is added to the UI via a property of <em>MetroChrome</em> of the same name. Elements added to the QAT at design time are included in the customize menu. Note the use of attached property <em>QuickAccessToolBar.DisplayName</em> to give these elements display text for the customize menu.</p>
<p>Here is a very basic example of a Metro app based on the above:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroAppWindow</span> <span style="color: #000066;">x:Class</span>=<span style="color: #ff0000;">&quot;MetroSample.MainWindow&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">xmlns:x</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">xmlns:m</span>=<span style="color: #ff0000;">&quot;clr-namespace:DevComponents.WPF.Metro;assembly=DevComponents.WPF.Metro&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">Title</span>=<span style="color: #ff0000;">&quot;DOTNETBAR METRO SAMPLE&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;600&quot;</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;825&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">ResizeMode</span>=<span style="color: #ff0000;">&quot;CanResizeWithGrip&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">Icon</span>=<span style="color: #ff0000;">&quot;AppIcon.ico&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">m:MetroUI.Theme</span>=<span style="color: #ff0000;">&quot;{x:Static m:MetroTheme.Default}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroShell<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroShell.Chrome<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>            
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroChrome<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroChrome.QuickAccessToolBar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:QuickAccessToolBar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Button</span> <span style="color: #000066;">m:QuickAccessToolBar.DisplayName</span>=<span style="color: #ff0000;">&quot;Open&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Image</span> <span style="color: #000066;">Source</span>=<span style="color: #ff0000;">&quot;/Images/Open.png&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Button<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Button</span> <span style="color: #000066;">m:QuickAccessToolBar.DisplayName</span>=<span style="color: #ff0000;">&quot;Save&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Image</span> <span style="color: #000066;">Source</span>=<span style="color: #ff0000;">&quot;/Images/Save.png&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Button<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:QuickAccessToolBar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroChrome.QuickAccessToolBar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroChrome<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroShell.Chrome<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroShell.Backstage<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroBackstage</span> <span style="color: #000066;">CloseOnClick</span>=<span style="color: #ff0000;">&quot;True&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:BackstageButton</span> <span style="color: #000066;">ImageSource</span>=<span style="color: #ff0000;">&quot;/Images/Save.png&quot;</span> <span style="color: #000066;">Content</span>=<span style="color: #ff0000;">&quot;Save&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:BackstageTabItem</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;Print&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextBlock</span> <span style="color: #000066;">Text</span>=<span style="color: #ff0000;">&quot;Print&quot;</span> <span style="color: #000066;">FontSize</span>=<span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:BackstageTabItem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroBackstage<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroShell.Backstage<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroShell.StatusBar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroStatusBar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextBlock</span> <span style="color: #000066;">Text</span>=<span style="color: #ff0000;">&quot;CONNECTED TO SERVER - ALL DATA IS UP TO DATE&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Left&quot;</span> <span style="color: #000066;">TextTrimming</span>=<span style="color: #ff0000;">&quot;CharacterEllipsis&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextBlock</span> <span style="color: #000066;">Text</span>=<span style="color: #ff0000;">&quot;READY&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;10,0,0,0&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Right&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroStatusBar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroShell.StatusBar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroShell.Items<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroTabItem</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;MAIL&quot;</span> <span style="color: #000066;">IsSelected</span>=<span style="color: #ff0000;">&quot;True&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextBlock</span> <span style="color: #000066;">Text</span>=<span style="color: #ff0000;">&quot;MAIL CONTENT AREA&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroTabItem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroTabItem</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;CALENDAR&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextBlock</span> <span style="color: #000066;">Text</span>=<span style="color: #ff0000;">&quot;CALENDAR CONTENT AREA&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroTabItem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroTabItem</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;CONTACTS&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextBlock</span> <span style="color: #000066;">Text</span>=<span style="color: #ff0000;">&quot;CONTACTS CONTENT AREA&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroTabItem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroShell.Items<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroShell<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroAppWindow<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>And here is a screen shot of the above example when executed:</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroExampleScreenShot.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="MetroExampleScreenShot" border="0" alt="MetroExampleScreenShot" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroExampleScreenShot_thumb.png" width="534" height="355" /></a></p>
<p>The central content area of <em>MetroShell</em> is where the content of the selected tab is positioned. Anything you require for your application can be placed inside a <em>MetroTabItem</em>. Any control from the list in the Metro Styles section above will be automatically given the Metro look and feel (that is, unless you override the built-in Styling with styles of your own.) </p>
<h1>Metro Look &amp; Feel</h1>
<h2>Metro Colors</h2>
<p>All colors used by Metro UI are automatically generated from two seed colors. The seed colors are referred to as the Canvas color and the Base color.</p>
<p>Colors for Metro theme are created and defined by the class <em>MetroColors</em>, which is based on ResourceDictionary. Colors are created and stored as resources and are also exposed as instance properties. A set of ComponentResourceKeys are defined which are used for for accessing the colors from Xaml. A corresponding set of Brushes, in addition to the color resources, is also provided.</p>
<p>Color generation is performed by calling method <em>MetroColors</em>.<em>GenerateColors</em>, which takes two Color parameters as input – one for canvas color and one for base color.</p>
<p>Since <em>MetroColors</em> is&#160; a ResourceDictionary, its colors and brushes can be made available to elements within a visual tree by simply being merged with the resources of the top element. We use a behavior to accomplish this. The behavior is implemented as an attached dependency property named <em>Theme</em> on the static class <em>MetroUI</em>. <em>MetroUI</em>.<em>Theme</em> is a property of type <em>MetroTheme</em>. </p>
<p>Following is a list of the names of the Color properties defined by MetroColors. Corresponding component resource keys have the same names with ‘Key’ appended to them. Component resource keys for the corresponding Brushes are similarly named but the word ‘Brush’ is used in place of the word ‘Color’.</p>
<ul>
<li>CanvasColor (CanvasColorKey, CanvasBrushKey) </li>
<li>TextColor </li>
<li>TextInactiveColor </li>
<li>TextDisabledColor </li>
<li>CanvasDarkColor </li>
<li>CanvasLightColor </li>
<li>BaseColor </li>
<li>BaseTextColor </li>
<li>BaseLightColor </li>
<li>BaseLightTextColor </li>
<li>BaseDarkColor </li>
<li>BaseDarkerColor </li>
<li>ComplementColor </li>
<li>ComplementLightColor </li>
<li>ComplementDarkColor </li>
<li>ComplementDarkerColor </li>
<li>ComplementTextColor </li>
<li>ComplementLightTextColor </li>
<li>CanvasGradientStartColor </li>
<li>CanvasGradientEndColor </li>
</ul>
<h2>Metro Theme</h2>
<p><em>MetroTheme</em> is a wrapper class for canvas and base color, with an additional property for display name. It also exposes a set of static, self-typed, properties which are used as “built-in” themes. Setting up your application to use the Metro theme is simply a matter of setting a value for <em>MetroUI.Theme</em> on the root element (usually the Window itself.) Note: if your application has multiple windows you can set different color themes for each.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">m:MetroUI.Theme=&quot;{x:Static m:MetroTheme.Rust}&quot;</pre></div></div>

<p>You can use the Metro colors and brushes in your application, when needed, by using a DynamicResource. In this example, the Background of the border is being set to the Brush identified by the static property <em>MetroColors.CanvasBrushKey</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{DynamicResource {x:Static m:MetroColors.CanvasBrushKey}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>Here is the list of of the pre-defined themes available as static members of class <em>MetroTheme</em>:</p>
<ul>
<li>Default </li>
<li>BlackClouds </li>
<li>BlackLilac </li>
<li>BlackMaroon </li>
<li>BlackSky </li>
<li>BluishBrown </li>
<li>Bordeaux </li>
<li>Brown </li>
<li>Cherry </li>
<li>DarkBrown </li>
<li>DarkRed </li>
<li>EarlyMaroon </li>
<li>EarlyOrange </li>
<li>EarlyRed </li>
<li>Espresso </li>
<li>GrayOrange </li>
<li>Latte </li>
<li>LatteDarkSteel </li>
<li>LatteRed </li>
<li>MaroonSilver </li>
<li>NapaRed </li>
<li>Orange </li>
<li>PowderRed </li>
<li>RetroBlue </li>
<li>Rust </li>
<li>SliverBlues </li>
<li>SilverGreen </li>
<li>SimplyBlue </li>
<li>SkyGreen </li>
<li>WashedBlue </li>
<li>WashedWhite </li>
</ul>
<h2>Metro Styles</h2>
<p>Of course all controls in the Metro library are by default styled to match the Metro UI look and feel. But these don’t help with all the other controls you will need when building your app. To make it easy to keep the Metro UI consistent throughout your application we have defined a set of custom Styles (or resources used by the default styles) for many of the common controls from DotNetBar as well as from Microsoft. Implicit Styles for these controls are merged into the resources with MetroColors the first time MetroUI.Theme is set. </p>
<p>Custom styles are defined for the following Microsoft controls:</p>
<ul>
<li>Button </li>
<li>ToggleButton </li>
<li>RadioButton </li>
<li>CheckBox </li>
<li>MenuItem </li>
<li>ContextMenu </li>
<li>ToolTip </li>
<li>TextBox </li>
<li>ComboBoxItem </li>
<li>ComboBox </li>
<li>ListBoxItem </li>
<li>ListBox </li>
<li>ScrollBar </li>
<li>ScrollViewer </li>
</ul>
<p>Metro styling is also provided for the following DotNetBar controls (other than the purpose built Metro controls):</p>
<ul>
<li>AdvTree </li>
<li>AdvTreeNode </li>
<li>AdvTreeCell </li>
<li>PropertyGrid </li>
<li>PropertyGridItem </li>
<li>DropDownButton </li>
<li>EnumPicker </li>
<li>ColorControl </li>
<li>BrushControl </li>
</ul>
<h1>Localization</h1>
<p>This section describes how to change the strings displayed by Metro controls.</p>
<p>Strings associated with the window commands Minimize, Maximize, Close, Restore, Size and Move can be set directly in code via properties on the static <em>WindowCommands.Strings</em> (in <em>DevComponents.WPF.Controls)</em>. Additionally, the strings can be defined as resources in your window’s resource dictionary. The following component resource keys are mapped appropriately.</p>
<ul>
<li>WindowCommands.CloseStringKey </li>
<li>WindowCommands.MaximizeStringKey </li>
<li>WindowCommands.MinimizeStringKey </li>
<li>WindowCommands.MoveStringKey </li>
<li>WindowCommands.RestoreStringKey </li>
<li>WindowCommands.SizeStringKey </li>
</ul>
<p>All other strings which are used in Metro UI are defined the class <em>MetroStrings</em> (in <em>DevComponents.WPF.Metro</em>). They can be accessed directly in code via the static instance <em>MetroStrings.Default</em>. In addition to being settable via properties of MetroStrings, these strings can also be defined as resources in your window’s resource dictionary. </p>
<p>The string properties defined by <em>MetroStrings</em> are:</p>
<ul>
<li>CustomizeQATMenuHeaderString </li>
<li>AddToQATCommandString </li>
<li>RemoveFromQATCommandString </li>
<li>CustomizeQATCommandString </li>
</ul>
<p>The corresponding component resource keys are:</p>
<ul>
<li>MetroStrings.CustomizeQATMenuHeaderStringKey </li>
<li>MetroStrings.AddToQATCommandString </li>
<li>MetroStrings.RemoveFromQATCommandString </li>
<li>MetroStrings.CustomizeQATCommandString </li>
</ul>
<p>Here is an example of defining a string in a resource dictionary:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sys:String</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;{x:Static ctrls:WindowCommands.CloseStringKey}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Custom Close String<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sys:String<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Note that the namespace sys is defined like this:&#160; xmlns:sys=&quot;clr-namespace:System;assembly=mscorlib&quot;</p>
<h1>Metro Controls</h1>
<p>This section will look at the individual Metro controls in greater detail.</p>
<h2>MetroAppWindow</h2>
<p>MetroAppWindow is based on <em>ChromelessWindow</em> – which is defined in the DevComponents.WPF.Controls library. <em>ChromelessWindow</em> is based on System.Windows.Controls.Window and inherits all of that object’s functionality except for the WindowStyle property, which has been fixed to the value None and cannot be changed. Here is a screen shot of an empty <em>MetroAppWindow:</em></p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroAppWindow.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="MetroAppWindow" border="0" alt="MetroAppWindow" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroAppWindow_thumb.png" width="551" height="177" /></a></p>
<h3>Properties</h3>
<p>Properties defined by <em>MetroAppWindow</em> (either directly or via <em>ChromelessWindow</em>) include:</p>
<ul>
<li><em>HasDropShadow</em> – Determines whether the drop shadow will be drawn around the Window. </li>
<li>ResizeBorderThickness – Specifies the thickness of the Border for which resizing is enabled. Does not affect the window’s visual border. The visual border is specified by the standard BorderThickness property, in conjunction with the BorderBrush property. </li>
</ul>
<h3>Events</h3>
<p>And the events are:</p>
<ul>
<li>ResizeBorderClickEvent – Routed event that is raised when the resize border receives a mouse click. </li>
</ul>
<h2>MetroShell</h2>
<p><em>MetroShell</em> is based on TabControl and inherits all of its properties, methods and events. </p>
<h3>Properties</h3>
<p>The following additional properties are defined by <em>MetroShell</em>:</p>
<ul>
<li><em>Backstage</em> – This is the object which will be displayed when the end user clicks on the File button (or when <em>MetroShell.IsBackstageOpen</em> is set true.) Generally, it will be an instance of <em>MetroBackstage</em>. </li>
<li><em>BackstageButtonContent</em> – Defines the content rendered inside the backstage button (i.e. the File button.) </li>
<li><em>Chrome</em> – This is the top most object. It should normally be a <em>MetroChrome</em>. </li>
<li><em>IsBackstageOpen</em> – Determines whether the backstage object is visible. </li>
<li><em>ShowBackstageButton</em> – Determines whether the backstage button is visible. </li>
<li><em>ShowStatusBar</em> – Determines whether the status bar is visible. </li>
<li><em>Start</em> – This object is rendered on top of the main application area. It is a place holder for a <em>MetroStartControl</em>. </li>
<li><em>StatusBar</em> – This is the bottom most object. Generally a <em>MetroStatusBar</em>. </li>
</ul>
<h3>Events</h3>
<p><em>MetroShell</em> exposes the following events:</p>
<ul>
<li><em>BackstageOpened</em> – Routed event that is raised when the value of <em>IsBackstageOpened</em> changes from false to true. </li>
<li><em>BackstageClosed</em> – Routed event raised when the value of <em>IsBackstageOpened</em> changes from true to false. </li>
</ul>
<h3>Methods</h3>
<p>The following methods are defined by <em>MetroShell</em>:</p>
<ul>
<li>OnBackstageOpened (protected). </li>
<li><em>OnBackstageClosed</em> (protected). </li>
</ul>
<h2>MetroChrome</h2>
<p><em>MetroChrome</em> is an ItemsControl. Custom elements are added to its Items collection and by default displayed to the left of the minimize button. Window icon and title are taken from the containing Window. Minimize, Maximize and Close buttons are enabled or hidden based on the Window’s WindowState and ResizeMode properties, in the same manner as the standard Window chrome. The system menu is likewise shown the same as the system menu of the standard Window. System menu can be disabled by setting <em>ShowSystemMenu</em> = false. Here is an image of <em>MetroChrome</em> with QAT and custom items included:</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroChrome.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="MetroChrome" border="0" alt="MetroChrome" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroChrome_thumb.png" width="543" height="28" /></a></p>
<h3>Properties</h3>
<p>The following properties are defined by <em>MetroChrome:</em></p>
<ul>
<li><em>QuickAccessToolBar</em> – An Object which serves as the quick access toolbar for the application. This should be a <em>QuickAccessToolBar</em>. </li>
<li><em>ShowSystemMenu</em> – Determines whether the system menu is shown when user right-clicks over the title area or left-clicks on the app icon. </li>
</ul>
<p><em>MetroChrome</em> does not define any public or protected methods.</p>
<h2>QuickAccessToolBar</h2>
<p><em>QuickAccesssToolBar</em> is based on System.Windows.Controls.ToolBar. Anything added to its Items collection will be visible in the toolbar. An overflow panel with overflow button is included in the default style. </p>
<p>Items added to the QAT at design time (or at runtime before its template is applied) will appear in the customize menu, which allows the user to select/deselect which items are visible in the UI. Items added to the customize menu need a display name, which you provide using the attached property <em>QuickAccessToolBar.DisplayName</em>. Here is a picture of the QAT with the Customize menu open:</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroQuickAccessToolBar.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="MetroQuickAccessToolBar" border="0" alt="MetroQuickAccessToolBar" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroQuickAccessToolBar_thumb.png" width="304" height="93" /></a></p>
<p>Elements in the app UI which implement <em>ISupportQuickAccessToolBar</em> can be added to QAT by the user at run-time. Currently there are three controls built-in which implement ISupportQuickAccessToolBar: <em>MetroButton</em>, <em>MetroToggleButton</em> and <em>MetroComboBox</em>. The default context menu for each of these has the option “Add to Quick Access ToolBar”. Note: elements which can be added to the QAT at runtime by user need a unique identifier. You can use the element’s Name property for this or the attached property <em>QuickAccessToolBar.Id</em>. </p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/AddToQAT.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="AddToQAT" border="0" alt="AddToQAT" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/AddToQAT_thumb.png" width="427" height="76" /></a></p>
<p>All items that are visible in the QAT are given context menu which has option “Remove from Quick Access ToolBar”. However, if you explicitly set a ContextMenu on an element that you place into the QAT, that context menu will not be replaced.</p>
<p>The current state of the QAT is stored in a string available via the dependency property <em>SerializationString</em>. You can this to restore the QAT to its last state when your app is starts up.</p>
<h3>Properties</h3>
<p>The following dependency properties (in addition to inherited properties) are defined by QuickAccessToolBar:</p>
<ul>
<li><em>IsCustomizeMenuOpen</em> – Determines whether the customize menu is open. </li>
<li><em>IsLocked</em> – When locked, items cannot be added or removed from the QAT. </li>
<li><em>SerializationString</em> – Stores current state of QAT and can be used to reset UI when your app starts up. </li>
<li><em>ShowCustomizeButton</em> – Determines whether the customize button is visible. </li>
</ul>
<p><em>QuickAccessToolBar</em> also defines the following attached dependency properties:</p>
<ul>
<li><em>CanAddToQuickAccessToolBar</em> – Applies to elements which implement <em>ISupportQuickAccessTool</em>Bar only. Provides a means of disabling the element for the QAT. Default value is true. </li>
<li><em>DisplayName</em> – Used by the customize menu for user-friendly identification of elements. </li>
<li><em>Id</em> – Used as unique identifier for elements which implement <em>ISupportQuickAccessTooolBar</em>. </li>
</ul>
<h3>Methods</h3>
<p>The following public methods are defined by <em>QuickAccessToolBar</em>:</p>
<ul>
<li>Add(<em>ISupportQuickAccessToolBar</em> item) – Clones the item and adds the clone to the QAT’s visible items collection. </li>
<li>Contains(ISupportQuickAccessToolBar) – Determines whether the item is in the QAT. </li>
<li>Contains(string) – Determines whether an item with given ID is in the QAT. </li>
<li>Remove(object) – Removes the object from the QAT. </li>
</ul>
<h2>MetroToolBar</h2>
<p><em>MetroToolBar</em> is an enhanced ToolBar developed especially for Metro UI. It it meant to be placed anywhere in your application that makes sense for you to do so.</p>
<p>What makes <em>MetroToolBar</em> different from a standard tool bar is that it has an expanded state. In addition to the Items and ItemsSource properties, <em>MetroToolBar</em> exposes properties <em>ExtraItems</em> and <em>ExtraItemsSource</em>. The tool bar expands to show the extra items. When it expands, it does so over the top of existing content, rather than displacing and causing the content to be moved. The tool bar can be expanded programmatically or by user input – there is a button for this purpose. Like a ComboBox, It will collapse automatically when the user clicks on a button within it or clicks anywhere outside of it. Here is an image of MetroToolBar in its expanded state:</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroToolBar.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="MetroToolBar" border="0" alt="MetroToolBar" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroToolBar_thumb.png" width="441" height="97" /></a></p>
<p><em>MetroToolBar</em> is a good place to put controls which you want to be QAT enabled. These include any control which implements <em>ISupportQuickAccessToolBar</em>. Current Metro controls which implement this interface are <em>MetroButton</em>, <em>MetroToggleButton</em> and <em>MetroComboBox</em>. </p>
<h3>Properties</h3>
<p>In addition to the inherited properties, <em>MetroToolBa</em>r defines the following properties:</p>
<ul>
<li><em>AutoCollapse</em> – Determines whether the toolbar collapses automatically. The default value is true. </li>
<li><em>ExpandDirection</em> – Specifies the direction that the toolbar will expand. Possible values are Up, Down and Auto. Default is Auto. </li>
<li><em>ExtraItemsSource</em> – This value is passed on to the internal ItemsControl which contains the Extra Items. </li>
<li><em>IsExpanded</em> – Determines whether the tool bar is expanded. </li>
</ul>
<h3>Events</h3>
<p><em>MetroToolBar</em> defines the following events:</p>
<ul>
<li><em>Expanded</em> – Raised when the value of <em>IsExpanded</em> changes to true. </li>
<li><em>Collapsed</em> – Raised when the value of <em>IsExpanded</em> changes to false. </li>
</ul>
<h2>MetroStatusBar</h2>
<p><em>MetroStatusBar</em> is based on ItemsControl and inherits all its properties, events and methods. It differs from ItemsControl in that its default panel is <em>MetroStatusBarPanel</em>. </p>
<p><em>MetroStatusBarPanel</em> is based on Grid. Using a Grid for the panel allows great control as to where elements are positioned within it. The number of columns is synchronized with the number of items in parent status bar. Column widths are set depending on horizontal alignment of the element it contains: Auto for left aligned, Star for center aligned, Star for the first right aligned and Auto after that, and Star for elements which are aligned Stretch.</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroStatusBar.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="MetroStatusBar" border="0" alt="MetroStatusBar" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroStatusBar_thumb.png" width="552" height="20" /></a></p>
<p><em>MetroStatusBar</em> does not define any properties, methods or events other than what it inherits.</p>
<h2>MetroBackstage</h2>
<p><em>MetroBackstage</em> is based on TabControl. The native container type is <em>BackstageTabItem</em>, It will, however, accept any UIElement. In general, you will use a combination of <em>BackstageTabItem</em> and <em>BackstageButton </em>to achieve styling consistent with the Metro UI. Here is an image of <em>MetroBackstage</em> with several BackkstageTabItems and BackstageButtons:</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroBackstage.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="MetroBackstage" border="0" alt="MetroBackstage" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroBackstage_thumb.png" width="340" height="262" /></a></p>
<p><em>MetroBackstage</em> defines a single property: <em>CloseOnClick</em>. When true, the backstage will close automatically when a click or mouse left button up event occurs within it.</p>
<h2>MetroTile</h2>
<p><em>MetroTile</em> is a Button with extra properties and a default template designed to help you maintain a consistent look and feel. Use properties <em>Content</em>, <em>ImageSource</em>, <em>Title </em>and <em>TileColor </em>to complete the presentation of the tile.</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroTile.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="MetroTile" border="0" alt="MetroTile" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroTile_thumb.png" width="179" height="88" /></a></p>
<h3>Properties</h3>
<p><em>MetroTile</em> defines these properties (in addition to the inherited properties):</p>
<ul>
<li><em>ImageSource</em> – Specifies the source (ImageSource) for the image which is displayed by the tile. </li>
<li><em>TileColor</em> – An enumeration specifying one from a set of built-in brushes which is made the tile’s background. Alternatively you can set Background yourself. </li>
<li><em>Title</em> – Specifies the tile’s title text. </li>
</ul>
<h2>MetroStartControl</h2>
<p><em>MetroStartControl</em> is designed to emulate the Metro start screen in Windows 8.&#160; </p>
<p><em>MetroStartControl</em> is a <em>PageSlider</em>. The native container type is <em>MetroStartPage</em>. </p>
<p>The way to add <em>MetroStartControl</em> to your Metro UI is via the <em>Start </em>property of <em>MetroShell</em>. The start control is rendered on top of the main application UI (i.e. <em>MetroShell</em>) and slides out of view when the end user wants to access main app. Programmatically, this is controlled via the property <em>IsDocked</em>. A value of true makes the control slide out of view. Changing from true to false causes it to slide back into the view. By default, when the user clicks on a region not occupied by a <em>MetroTile</em> the control will slide out of view (<em>IsDocked</em> will be set to true.) This can be changed by setting <em>DockOnClick</em> = false.</p>
<p>By default, when the control’s contents are docked – i.e. rendered outside the control’s visible boundaries – a Thumb is displayed on the boundary edge which the user can use to drag the contents back into view. Clicking on the thumb also will set <em>IsDocked</em> = false. The thumb can be hidden by setting <em>ShowDragThumb</em> = false.</p>
<p>Here is an image of <em>MetroStartControl</em> that is being dragged back into visible state by the user:</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroStartControl.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="MetroStartControl" border="0" alt="MetroStartControl" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroStartControl_thumb.png" width="600" height="372" /></a></p>
<p>Another feature of <em>MetroStartControl</em> is its embedded <em>TransitioningSelector</em> control. <em>TransitioningSelector</em> (in <em>DevComponents.WPF.Controls</em>) is a MultiSelector which works much like a TabControl in that its items are selectable and when an item is selected its content is rendered in the main content area. What <em>TransitioningSelector</em> adds is animation. For example, if the <em>SlidingAnimator</em> is used, when selected an item’s content slides into view and when unselected slides out of view. When used in <em>MetroStartControl</em> this enables modal views (i.e. any UI element) to be presented to the user in response to commands from any part of the application. You can add items to the embedded transitioning selector by binding a list to property <em>TransitioningSelectorItemsSource</em> or adding items directly to <em>TransitioningSelectorItems</em>. The latter can be done in Xaml. </p>
<p>Here is an example of a <em>MetroStartControl</em> being set as value of property <em>MetroShell.Start</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroShell.Start<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroStartControl</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;StartControl&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroStartControl.TransitioningSelectorItems<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ctrls:TransitioningSelectorItem</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;OptionsForm&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;Red&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource AncestorType=m:MetroAppWindow}, Path=Background}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextBlock</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">Text</span>=<span style="color: #ff0000;">&quot;OPTIONS HERE&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Button</span> <span style="color: #000066;">Content</span>=<span style="color: #ff0000;">&quot;Ok&quot;</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;80&quot;</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Right&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Bottom&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #000066;">FontSize</span>=<span style="color: #ff0000;">&quot;16&quot;</span> <span style="color: #000066;">FontWeight</span>=<span style="color: #ff0000;">&quot;Bold&quot;</span> <span style="color: #000066;">Click</span>=<span style="color: #ff0000;">&quot;OptionsFormOkButton_Click&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ctrls:TransitioningSelectorItem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroStartControl.TransitioningSelectorItems<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroStartControl.Items<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroTile</span> <span style="color: #000066;">Title</span>=<span style="color: #ff0000;">&quot;Options&quot;</span> <span style="color: #000066;">ImageSource</span>=<span style="color: #ff0000;">&quot;/Images/Options.png&quot;</span> <span style="color: #000066;">TileColor</span>=<span style="color: #ff0000;">&quot;Blueish&quot;</span> <span style="color: #000066;">Content</span>=<span style="color: #ff0000;">&quot;Select options for the app.&quot;</span> <span style="color: #000066;">Click</span>=<span style="color: #ff0000;">&quot;ShowOptionTile_Click&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;m:MetroTile</span> <span style="color: #000066;">Title</span>=<span style="color: #ff0000;">&quot;Main App&quot;</span> <span style="color: #000066;">ImageSource</span>=<span style="color: #ff0000;">&quot;/Images/ShowApp.png&quot;</span> <span style="color: #000066;">TileColor</span>=<span style="color: #ff0000;">&quot;Green&quot;</span> <span style="color: #000066;">Content</span>=<span style="color: #ff0000;">&quot;Go to the main application.&quot;</span> <span style="color: #000066;">Click</span>=<span style="color: #ff0000;">&quot;ShowAppTile_Click&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroStartControl.Items<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroStartControl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/m:MetroShell.Start<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h3>Properties</h3>
<p><em>MetroStartControl</em> defines the following properties:</p>
<ul>
<li><em>AnimationDuration</em> – The duration of the slide animation when docking or undocking. </li>
<li><em>DockingSide</em> – Determines the side to which the control content will go when it slides out of view (i.e. when docked.) </li>
<li><em>DockOnClick</em> – Determines whether the the <em>StartControl</em> docks itself when clicked on outside of a <em>MetroTile</em>. <!--EndFragment--></li>
<li><em>IsDocked</em> – Determines whether the control is in the docked state. In the docked state the control’s contents are outside the control’s visual boundaries. Changing this value triggers the sliding animation to start. </li>
<li><em>ImageSource</em> – Image part of the current user identity. </li>
<li><em>FirstName</em> – First name of the current user identity. </li>
<li><em>LastName</em> – Last name of the current user identity. </li>
<li><em>ShowDragThumb</em> – When true, a Thumb is made available at the control’s dock edge with which the user can drag the content out of the docked state and into visible state. </li>
<li><em>Title</em> – The <em>StartControl</em>’s title. </li>
<li><em>TransitioningSelectorItems</em> – Gets a reference to a list which is used as ItemsSource for the embedded <em>TransitioningSelector</em>. (Not a dependency property.)</li>
<li><em>TransitioningSelectorItemsSource</em> – An enumerable which is set as ItemsSource of the embedded <em>TransitioningSelector</em>.</li>
<li><em>TransitioningSelectorItemContainerStyle</em> – A Style which is set as value for ItemContainerStyle property of the embedded <em>TransitioningSelector</em>.</li>
</ul>
<h3>Events</h3>
<p><em>MetroStartControl</em> defines these events:</p>
<ul>
<li><em>Docked</em> – Routed event raised when the value of <em>IsDocked</em> changes to true. </li>
<li><em>Undocked</em> – Routed event raised when the value of <em>IsDocked</em> changes to false. </li>
</ul>
<h2>MetroDialog</h2>
<p><em>MetroDialog</em> is a chromeless window similar to MetroAppWindow, but with default MetroChrome and a stylized border. You can base your own dialogs on <em>MetroDialog</em> for convenience. </p>
<p>If a window is set as MetroDialog’s Owner, and if that window has a value for the <em>MetroUI.Theme</em> attached property, then that theme is automatically used by the dialog. Otherwise, if you do not set a theme yourself, the default theme will be used (i.e. <em>MetroTheme.Default</em>)</p>
<p>MetroDialog exports a single property, <em>Chrome</em>, which is given an appropriate default <em>MetroChrome </em>if left unset. </p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroDialog.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="MetroDialog" border="0" alt="MetroDialog" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/09/MetroDialog_thumb.png" width="321" height="120" /></a></p>


<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=1160' rel='bookmark' title='Permanent Link: Getting started with Metro UI in DotNetBar for WinForms'>Getting started with Metro UI in DotNetBar for WinForms</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=10' rel='bookmark' title='Permanent Link: All you need to know about Color Input controls in DotNetBar for WPF'>All you need to know about Color Input controls in DotNetBar for WPF</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=861' rel='bookmark' title='Permanent Link: How to build Office 2010 style Backstage application menu with DotNetBar for WPF'>How to build Office 2010 style Backstage application menu with DotNetBar for WPF</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1197</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting started with Metro UI in DotNetBar for WinForms</title>
		<link>http://www.devcomponents.com/kb2/?p=1160</link>
		<comments>http://www.devcomponents.com/kb2/?p=1160#comments</comments>
		<pubDate>Fri, 26 Aug 2011 15:03:55 +0000</pubDate>
		<dc:creator>Maintainer</dc:creator>
				<category><![CDATA[Metro]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1160</guid>
		<description><![CDATA[DotNetBar for Windows Forms includes set of Metro controls to help you develop great looking Metro look and feel user interface for your apps. Usually Metro applications will use at least: 1. MetroAppForm &#8211; which is chrome-less Metro style form: 2. MetroShell &#8211; which provides basic window chrome, backstage and top-level application tabs: 3. MetroStatusBar [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>DotNetBar for Windows Forms includes set of Metro controls to help you develop great looking Metro look and feel user interface for your apps. Usually Metro applications will use at least:</p>
<p>1. <strong>MetroAppForm</strong> &#8211; which is chrome-less Metro style form:<br />
<a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/MetroAppForm.png"><img class="alignnone size-full wp-image-1164" title="DotNetBar Metro UI Application Form" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/MetroAppForm.png" alt="" width="413" height="276" /></a><br />
2. <strong>MetroShell</strong> &#8211; which provides basic window chrome, backstage and top-level application tabs:<br />
<a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroShell.png"><img class="alignnone size-full wp-image-1165" title="DotNetBar Metro UI Shell Control" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroShell.png" alt="" width="445" height="67" /></a></p>
<p>3. <strong>MetroStatusBar</strong> &#8211; provides Metro style status bar:<br />
<a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroStatusBar.png"><img class="alignnone size-full wp-image-1166" title="DotNetBar Metro UI Status-Bar Control" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroStatusBar.png" alt="" width="445" height="24" /></a></p>
<p>The easiest way to get started is to simply use new form template in Visual Studio that we provide. In Visual Studio go to <strong>Project-&gt;Add Windows Forms</strong> in your Windows Forms project and from the list choose <strong>Metro App Form</strong> (you might need to scroll form template list in some versions of VS.NET to find this template). Template will give you basic shell like this:<br />
<a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroAppFormTemplate.png"><img class="alignnone size-full wp-image-1168" title="DotNetBar Metro UI Application Form VS.NET Template" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroAppFormTemplate.png" alt="" width="469" height="329" /></a></p>
<h4>Modal Panels</h4>
<p>MetroAppForm can show any control as modal panel. The control will be centered inside of the form and it will cover all form content but leave visible only form title (if MetroShell is used). It will also disable all commands on MetroShell practically giving you same functionality as modal dialog. To show a control as modal panel simply call <strong>ShowModalPanel</strong> method on MetroAppForm. You will specify control you want shown as modal panel as well as optional slide animation that will accompany showing of the control. To close the modal panel call <strong>CloseModalPanel</strong> method and pass reference to your control as well. You can also specify the slide animation to be performed while panel is taken out of the view.</p>
<p>You can stack multiple modal panels on top of each other by calling ShowModalPanel method.</p>
<h4>Key MetroAppForm Properties</h4>
<p>Following key properties are provided on MetroAppForm to control its behavior:</p>
<ul>
<li><strong>BorderColor</strong> &#8211; allows you to override theme border colors for the form.</li>
<li><strong>BorderThickness</strong> &#8211; specifies the custom form border thickness.</li>
<li><strong>CloseBoxVisible</strong> &#8211; specifies whether x button in top-right corner of the form chrome that closes the form is visible.</li>
<li><strong>FormResizeBorder</strong> &#8211; specifies the thickness in pixels around the form edge which allows user to resize the form.</li>
<li><strong>IsActive</strong> &#8211; returns whether form is active.</li>
<li><strong>MetroShell</strong> &#8211; returns reference to MetroShell control that provides form chrome.</li>
<li><strong>Sizable</strong> &#8211; specifies whether form can be resized.</li>
</ul>
<h4>Localizing MetroAppForm</h4>
<p>MetroAppForm provides its own Metro styled system menus. The menu text can be localized using standard WinForms localization by setting following properties on MetroAppForm:<br />
SystemMenuClose, SystemMenuMaximize, SystemMenuMinimize, SystemMenuMove, SystemMenuRestore and SystemMenuSize.</p>
<h2>MetroForm</h2>
<p>MetroForm is a standard form with window chrome which you can use for modal dialogs (although we recommend using modal panels instead). The easiest way to add new MetroForm to your project is using templates we provide. In Visual Studio go to <strong>Project-&gt;Add Windows Forms</strong> in your Windows Forms project and from the list choose <strong>Metro Form</strong> (you might need to scroll form template list in some versions of VS.NET to find this template). Template will give you form like this:</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroForm.png"><img title="DotNetBar Metro UI Form" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroForm.png" alt="" width="395" height="170" /></a></p>
<h2>MetroShell</h2>
<p>MetroShell is a root control that is docked to the top of the form and it provides form chrome (system buttons to close, minimize and maximize form), backstage or application menu, quick access toolbar and top-level application tabs. Many elements that are displayed by MetroShell control are optional, so for example you do not have to have application menu or backstage and you can remove it at design-time. Same applies to quick access toolbars and even tabs.</p>
<h4>Application Menu</h4>
<p>Application menu on MetroShell control is opened using FILE button: <a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/MetroFileButton.png"><img class="alignnone size-full wp-image-1172" title="MetroFileButton" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/MetroFileButton.png" alt="" width="65" height="31" /></a></p>
<p>To create default backstage application menu or standard menu use right-click context menu options in VS.NET as shown in image below:<br />
<a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroAppButtonBack.png"><img class="alignnone size-full wp-image-1173" title="DotNetBarMetroAppButtonBack" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroAppButtonBack.png" alt="" width="401" height="292" /></a></p>
<p>If your application does not have need for application menu simply selection File button and delete it.</p>
<h4>Quick Access Toolbar</h4>
<p>Quick Access Toolbar (QAT) provides access to common used commands in an app. Following image shows an example of QAT:<br />
<a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroQAT.png"><img class="alignnone size-full wp-image-1178" title="DotNetBar Metro UI Quick Access Toolbar" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroQAT.png" alt="" width="182" height="28" /></a></p>
<p>You can provide default commands by adding them at design-time. To add button to QAT at design-time right-click the QAT and choose <strong>Create Button</strong> context-menu command. If you want some buttons in QAT to be permanently there and which end-user cannot remove, set CanCustomize=false on those buttons.</p>
<p>User can add commands to QAT from MetroToolbar controls by right-clicking the command and choosing appropriate command from context-menu. Note that MetroToolbar toolbars that have commands that can be added to QAT should be available, i.e. loaded, when MetroShell control is created as well. This will ensure that any customization that end-user has made to the QAT can be applied and loaded. You load and save QAT customization by serializing <strong>MetroShell.QatLayout</strong> property which is simple text property an which can be serialized to any storage of your  choice, like registry or text file.</p>
<p>To prevent buttons from MetroToolbar from being added to the QAT set CanCustomize=false on those buttons. MetroToolbar.Text property will be used in QAT Customization Dialog to categorize available QAT commands.</p>
<h4>Help and Settings Buttons</h4>
<p>MetroShell control by default shows the Help and Settings buttons in the form caption as shown: <a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/MetroHelpSettingsButtons.png"><img class="alignnone size-full wp-image-1174" title="DotNetBar Metro UI Help Settings Buttons in Form Caption" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/MetroHelpSettingsButtons.png" alt="" width="161" height="17" /></a></p>
<p>These buttons do not necessarily have to be used for Help and Settings, you can change their text using <strong>SettingsButtonText</strong> and <strong>HelpButtonText</strong> properties. Events <strong>SettingsButtonClick</strong> and <strong>HelpButtonClick</strong> are invoked when buttons are clicked. You can hide any of the buttons using <strong>SettingsButtonVisible</strong> and <strong>HelpButtonVisible</strong> properties all on MetroShell control.</p>
<h4>Key MetroShell Control Properties, Methods and Events</h4>
<p>Key Properties:</p>
<ul>
<li><strong>CanCustomize</strong> &#8211; Indicates whether control can be customized and items added to Quick Access Toolbar by end-user.</li>
<li><strong>CaptionFont</strong> &#8211; Indicates custom Font that is used to render the form caption.</li>
<li><strong>CaptionHeight</strong> &#8211; Indicates custom height for the form caption.</li>
<li><strong>CaptionVisible</strong> &#8211; Indicates whether control shows the caption which includes system buttons, form title and QAT.</li>
<li><strong>CategorizeMode</strong> &#8211; Specifies how commands are categorized in QAT Customize Dialog.</li>
<li><strong>GlobalContextMenuBar</strong> &#8211; Specifies Context menu bar associated with the this control which is used as part of <a href="http://www.devcomponents.com/kb2/?p=96">Global Items</a> feature.</li>
<li><strong>Items</strong> &#8211; Gets the collection of the items that appear in tab-strip area of the control.</li>
<li><strong>MouseWheelTabScrollEnabled</strong> &#8211; Indicates whether selected tab is changed when mouse wheel is used over the tab-strip.</li>
<li><strong>QatFrequentCommands</strong> &#8211; Get the collection of the commands that are displayed on the Customize Quick Access Toolbar menu and which allow end-user to quickly add or remove them from QAT. Commands shown here should be available on MetroToolbar controls.</li>
<li><strong>QatLayout</strong> &#8211; Gets or sets the Quick Access Toolbar layout. This property is used to save and load the QAT customizations.</li>
<li><strong>QatLayoutChanged</strong> &#8211; Gets whether end-user made any customizations to QAT.</li>
<li><strong>QuickToolbarItems</strong> &#8211; Gets collection that holds all items displayed on QAT.</li>
<li><strong>SelectedTab</strong> &#8211; Gets or sets currently selected Metro tab.</li>
<li><strong>SystemText</strong> &#8211; Gets the object that holds all internal strings MetroShell control uses.  When performing Localization you will change properties on this object.</li>
<li><strong>TabStripFont</strong> &#8211; Gets or sets the font that Metro tab-strip area uses.</li>
<li><strong>TitleText</strong> &#8211; Specifies the form title-bar text. By default control uses Form.Text to display it on title-bar, but if you wish that displayed title text is different from Form.Text or if you wish to use our <a href="http://www.devcomponents.com/kb2/?p=515">text-markup</a>, set this property.</li>
<li><strong>UseCustomizeDialog</strong> &#8211; Indicates whether built-in customize dialog is used to customize the quick access toolbar. You can handle the <strong>EnterCustomize</strong> event to display your custom dialog instead of built-in dialog for customization.</li>
<li><strong>UseExternalCustomization</strong> &#8211; Indicates whether custom context menu content is used instead of built-in customization menu which is shown when end-user clicks the buttons on MetroToolbar. When set to true you must handle <strong>BeforeCustomizeMenuPopup</strong> event to provide your own customize context menu commands.</li>
</ul>
<p>Key Events:</p>
<ul>
<li><strong>BeforeQatCustomizeDialog</strong> &#8211; Occurs before Quick Access Toolbar dialog is displayed. This event provides the opportunity to cancel the showing of built-in dialog and display custom customization dialog.</li>
<li><strong>AfterQatCustomizeDialog</strong> &#8211; Occurs after the Quick Access Toolbar dialog is closed.</li>
<li><strong>AfterQatDialogChangesApplied</strong> &#8211; Occurs after any changes done on the Quick Access Toolbar dialog are applied to the actual Quick Access Toolbar.</li>
<li><strong>BeforeAddItemToQuickAccessToolbar</strong> &#8211; Occurs before an item is added to the quick access toolbar as result of user action. This event provides ability to cancel the addition of the item by setting the Cancel=true of event arguments.</li>
<li><strong>BeforeCustomizeMenuPopup</strong> &#8211; Occurs just before the customize popup menu is displayed and provides the ability to cancel the menu display as well as to add/remove the menu items from the customize popup menu.</li>
<li><strong>BeforeRemoveItemFromQuickAccessToolbar</strong> &#8211; Occurs before an item is removed from the quick access toolbar as result of user action. This event provides ability to cancel the addition of the item by setting the Cancel=true of event arguments.</li>
<li><strong>TitleTextMarkupLinkClick</strong> &#8211; Occurs when text markup link from TitleText markup is clicked. Markup links can be created using &#8220;a&#8221; tag.</li>
</ul>
<p>Key Methods:</p>
<ul>
<li><strong>AddItemToQuickAccessToolbar</strong> &#8211; Adds an object that inherits from BaseItem to QAT.</li>
<li><strong>RemoveItemFromQuickAccessToolbar</strong> &#8211; Remove an item from QAT.</li>
<li><strong>CreateTab</strong> &#8211; Creates a metro tab and associated panel.</li>
<li><strong>ShowQatCustomizeDialog</strong> &#8211; Shows Quick Access Toolbar customize dialog.</li>
<li><strong>RegisterToolbar</strong> &#8211; Registers MetroToolbar with control so it can participate in QAT customization.</li>
<li><strong>UnregisterToolbar</strong> &#8211; Removes MetroToolbar from QAT customization.</li>
</ul>
<h2>MetroToolbar</h2>
<p>MetroToolbar is a toolbar like control which displays the most frequently used items at all times but also allows the access to extra or infrequently used items when expanded. Here is MetroToolbar control in its default state displaying the top-level items:</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroToolbar.png"><img class="alignnone size-full wp-image-1189" title="DotNetBar Metro UI Toolbar" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroToolbar.png" alt="" width="394" height="34" /></a></p>
<p>Notice the button with 3 dots in right-hand side. That is expand button which expands the toolbar and shows extra toolbar items as shown below:</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroToolbarExtra.png"><img class="alignnone size-full wp-image-1190" title="DotNetBar Metro UI Toolbar Showing Extra Items" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroToolbarExtra.png" alt="" width="392" height="65" /></a></p>
<p>Toolbar will be automatically collapsed once extra button is clicked or mouse is clicked somewhere outside the toolbar.</p>
<p>Working with MetroToolbar is very simple. At design-time right-click toolbar to create items. Drag &amp; drop items between top-level and extra line to change their position.</p>
<p>Since MetroToolbar shows the extra content inline, meaning its size and location is changed to show it, we recommend placing the control on the form without setting its Dock or even Anchor properties. Reason for this is that when MetroToolbar expands it should not change the layout of the other controls, which would happen if you set Dock or Anchor properties. Expanding the MetroToolbar should simply cover other control temporary while choice of extra items is being made.</p>
<h4>Key MetroToolbar Properties</h4>
<ul>
<li><strong>AnimationSpeed</strong> &#8211; Specifies toolbar collapse/expand animation speed duration in milliseconds. Default value is 150 milliseconds. Set to zero, 0 to disable animation.</li>
<li><strong>AutoCollapse</strong> &#8211; Specifies whether control is automatically collapsed, i.e. Expanded property set to False, if control was expanded and any button on the control was clicked or mouse is clicked elsewhere, parent form has lost input focus or some other control gains input focus.</li>
<li><strong>AutoRegister</strong> &#8211; Specifies whether toolbar is attempted to be automatically registered with parent MetroShell control so it can participate in Quick Access Toolbar operations. Default value is true.</li>
<li><strong>ExpandDirection</strong> &#8211; Specifies expand direction for the toolbar. Default value is Auto.</li>
<li><strong>Expanded</strong> &#8211; Indicates whether control is expanded or not. When control is expanded both main and extra toolbar items are visible. When collapsed only main items are visible.</li>
<li><strong>ExtraItems</strong> &#8211; Gets collection that holds extra items displayed on toolbar when expanded.</li>
<li><strong>Items</strong> &#8211; Gets collection of top-level items toolbar displays at all times.</li>
<li><strong>ItemSpacing</strong> &#8211; Specifies spacing between toolbar items.</li>
</ul>
<h4>Key MetroToolbar Events</h4>
<ul>
<li><strong>ExpandedChanging</strong> &#8211; Occurs before Expanded property has changed, i.e. control expanded or collapsed and allows you to cancel action by setting Cancel=true on event arguments.</li>
<li><strong>ExpandedChanged</strong> &#8211; Occurs after Expanded property value has changed, i.e. control was expanded or collapsed.</li>
</ul>
<h2>Styling</h2>
<p>Metro UI uses <strong>StyleManager</strong> component to control its appearance. We have developed proprietary color scheme generation algorithms that will take two colors you specify and generate complete color scheme for all UI elements in a way that color scheme is visually pleasing and is perfect fit for Metro UI. StyleManager is automatically added to the form once you add MetroShell control. We provide number of per-defined very good looking color combinations but please experiment yourself.</p>
<p>Our color scheme generation algorithm takes 2 colors as input:</p>
<ol>
<li><strong>Canvas</strong> color which is a background color for forms etc.</li>
<li><strong>Base</strong> color which is a master signature color for the color scheme and which is used with Canvas color to generate whole color scheme.</li>
</ol>
<p>These colors can be specified on StyleManager.MetroColorParameters object. Simply select it in VS.NET property dialog and change its values as shown below:</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroColorThemeSel.png"><img class="alignnone size-full wp-image-1188" title="DotNetBar Metro UI Predefined Color Theme Selection" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/08/DotNetBarMetroColorThemeSel.png" alt="" width="383" height="126" /></a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1160</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Silverlight Toolbar Quick Start Guide</title>
		<link>http://www.devcomponents.com/kb2/?p=1157</link>
		<comments>http://www.devcomponents.com/kb2/?p=1157#comments</comments>
		<pubDate>Wed, 13 Jul 2011 23:10:34 +0000</pubDate>
		<dc:creator>donwingate</dc:creator>
				<category><![CDATA[Common Silverlight Controls]]></category>
		<category><![CDATA[DotNetBar for Silverlight]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1157</guid>
		<description><![CDATA[Toolbar is used to assist in arrangement and styling of a group of common Silverlight controls from such as Button, ToggleButton, RadioButton, ComboBox and TextBox along with common DevComponents controls such as DropDownButton, SplitButton and EnumPicker.&#160; Toolbar follows the basic design of the Toolbar control which is included with WPF, for those familiar with that [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=1149' rel='bookmark' title='Permanent Link: Circular Progress Control (Silverlight) Quick Start Guide'>Circular Progress Control (Silverlight) Quick Start Guide</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=1143' rel='bookmark' title='Permanent Link: Rating Control for Silverlight Quick Start Guide'>Rating Control for Silverlight Quick Start Guide</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=374' rel='bookmark' title='Permanent Link: SuperToolTip Control'>SuperToolTip Control</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/07/Toolbar-Blue.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Toolbar Blue" border="0" alt="Toolbar Blue" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/07/Toolbar-Blue_thumb.png" width="588" height="65" /></a></p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/07/Toolbar-Silver.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Toolbar Silver" border="0" alt="Toolbar Silver" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/07/Toolbar-Silver_thumb.png" width="587" height="64" /></a></p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/07/Toolbar-Black.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Toolbar Black" border="0" alt="Toolbar Black" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/07/Toolbar-Black_thumb.png" width="586" height="65" /></a></p>
<p>Toolbar is used to assist in arrangement and styling of a group of common Silverlight controls from such as Button, ToggleButton, RadioButton, ComboBox and TextBox along with common DevComponents controls such as DropDownButton, SplitButton and EnumPicker.&#160; Toolbar follows the basic design of the Toolbar control which is included with WPF, for those familiar with that control. </p>
<p>Toolbar is an ItemsControl, and therefore any object can be placed in it. It is also fully compatible with an MVVM approach. </p>
<p>A Toolbar can be added to the visual tree directly, or it can be placed inside a <em>ToolbarTray</em>. <em>ToolbarTray</em> is a container for arranging Toolbars. Use the attached properties <em>ToolbarTray.Band</em> and <em>ToolbarTray.BandIndex</em> to control the positioning of the toolbars.</p>
<p>Toolbar control manages overflow. If the width of the Toolbar is insufficient to display all the items, then the hidden items are available to the user via an overflow panel. The overflow panel is opened with the overflow button. By default this button is always visible. However, this can be changed via property <em>AlwaysShowOverflowButton</em>. </p>
<p>It is possible to add custom items to the overflow panel, for example a command button which opens a dialog. <em>CustomItem</em> property is used for this purpose. <em>CustomItem</em> is typed as an Object. To add a collection of custom items use an ItemsControl or supply a DataTemplate which knows how to render the collection.</p>
<p>Auto styling of common controls is supported. A special resource dictionary is used to store pre-defined styles for the controls which are commonly added to the Toolbar. By default, if an item, or its container, is one the supported common controls, then before it is inserted into the Toolbar panel’s Children collection, its Style is set equal to the corresponding Style found in the resource dictionary. Note that if the control’s Style property is already set, that Style will not be overridden. To turn off auto-styling in general, set the <em>Toolbar</em> property <em>AutoStyleCommonControls</em> to false.</p>
<p>The resource dictionary which defines the Styles for common controls added to the Toolbar is a componentized resource dictionary (meaning that it has a code-behind class associated with it.) The resource dictionary instance is a static singleton accessible via <em>ToolbarCommonControlStyles.Default</em>. This instance is created and merged into the application’s resources if, and only if, a Toolbar is used. The Styles it defines are accessible in code via properties defined on the class <em>ToolbarCommonControlStyles</em> as well as in Xaml as static resources with keys the same as the property names. Note that if you are referencing the Style resources in xaml it may be necessary to ensure that they are loaded into the global resources before the framework attempts to resolve the StaticReference. To to this, simply set a variable equal to <em>ToolbarCommonControlStyles.Default </em>prior to calling InitializeComponent() in your Silverlight UserControl. </p>
<p>The resource dictionary <em>ToolbarCommonControlStyles</em> contains the following named resources. Additionally, it defines properties with the same names which are typed Style.</p>
<ul>
<li><em>ToolbarSeparatorStyle</em> </li>
<li><em>ToolbarButtonStyle</em> </li>
<li><em>ToolbarButtonToggleButtonStyle</em> </li>
<li><em>ToolbarRadioButtonStyle</em> </li>
<li><em>ToolbarComboBoxItemStyle</em> </li>
<li><em>ToolbarComboBoxStyle</em> </li>
<li><em>ToolbarTextBoxStyle</em> </li>
<li><em>ToolbarDropDownButtonStyle</em> </li>
<li><em>ToolbarSplitButtonStyle</em> </li>
<li><em>ToolbarEnumPickerStyle</em> </li>
</ul>
<h1>Properties</h1>
<p>Following are lists of the properties defined by <em>Toolbar</em> and <em>ToolbarTray</em> for your reference.</p>
<h2>Toolbar Properties</h2>
<p><em>AutoStyleCommonControls</em> – Determines whether the built-in styling for common controls should be used. Default value is true.</p>
<p><em>AlwaysShowOverflowButton</em> – Determines whether the overflow button is shown even if there are no overflow items or custom items to show. The default value is true.</p>
<p><em>CornerRadius</em> – Get or set the corner radius of the Toolbar.</p>
<p><em>CustomItem</em> – An object which is added to the overflow panel.</p>
<p><em>CustomItemTemplate</em> – A DataTemplate which shows how to render <em>CustomItem</em>.</p>
<p><em>HasOverflowItems</em> – Gets whether there are overflow items. This is a read-only property.</p>
<p><em>IsOverflowOpen</em> – Gets or sets whether the overflow panel drop down is open.</p>
<p><em>Orientation</em> – Gets or sets whether the Toolbar is orientated Horizontally or Vertically. The default is Horizontal.</p>
<h2>ToolbarTray Properties</h2>
<p><em>Orientation</em> – Gets or sets whether the Toolbar is orientated Horizontally or Vertically. The default is Horizontal.</p>
<p><em>Band</em> – This is an attached property which, when set on a <em>Toolbar</em>, determines which row or column (depending on Orientation) the Toolbar is placed in.</p>
<p><em>BandIndex</em> – This is a attached property which, when set on a Toolbar, determines the Toolbar’s position within its Band.</p>
<h1>Default Styles</h1>
<p>Following is a listing of the default styles for Toolbar and ToolbarTray (and the resources they depend on) which you can use as starting point for customization.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Style</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;ToolbarOverflowButtonStyle&quot;</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;ToggleButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;ClickMode&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Press&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;dc:DynamicResource.BackgroundKey&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;ToolbarOverflowButtonBackground&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter.Value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;ToggleButton&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;MainGrid&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;Transparent&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Background}&quot;</span></span>
<span style="color: #009900;">                                <span style="color: #000066;">CornerRadius</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(dc:ControlBehavior.CornerRadius)}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;HoverBorder&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">dc:DynamicResource.BackgroundKey</span>=<span style="color: #ff0000;">&quot;ButtonHoverBackground&quot;</span> </span>
<span style="color: #009900;">                                <span style="color: #000066;">CornerRadius</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(dc:ControlBehavior.CornerRadius)}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;PressedBorder&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">dc:DynamicResource.BackgroundKey</span>=<span style="color: #ff0000;">&quot;ButtonCheckedBackground&quot;</span> </span>
<span style="color: #009900;">                                <span style="color: #000066;">CornerRadius</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(dc:ControlBehavior.CornerRadius)}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;IsCheckedBorder&quot;</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">dc:DynamicResource.BackgroundKey</span>=<span style="color: #ff0000;">&quot;ButtonCheckedBackground&quot;</span> </span>
<span style="color: #009900;">                                <span style="color: #000066;">CornerRadius</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(dc:ControlBehavior.CornerRadius)}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ContentPresenter</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;ContentPresenter&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Padding}&quot;</span> </span>
<span style="color: #009900;">                                          <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;{TemplateBinding VerticalContentAlignment}&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;{TemplateBinding HorizontalContentAlignment}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CommonStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Normal&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;MouseOver&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;HoverBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Pressed&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;PressedBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Disabled&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;CheckedStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Unchecked&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;IsCheckedBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Checked&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;IsCheckedBorder&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>                                           
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;FocusStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Focused&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Unfocused&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Setter.Value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Setter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Style</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;dc:Toolbar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;VerticalAlignment&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Top&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;HorizontalAlignment&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Left&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;CornerRadius&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;dc:DynamicResource.BorderBrushKey&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;ToolbarBorder&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;dc:DynamicResource.BackgroundKey&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;ToolbarBackground&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Margin&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;1,1,0,0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Padding&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;BorderThickness&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter.Value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;dc:Toolbar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;OuterBorder&quot;</span> <span style="color: #000066;">Grid.ColumnSpan</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderThickness}&quot;</span> </span>
<span style="color: #009900;">                            <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderBrush}&quot;</span> <span style="color: #000066;">CornerRadius</span>=<span style="color: #ff0000;">&quot;{TemplateBinding CornerRadius}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:NullableObjectToVisibilityValueConverter</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;nullableToVisibilityConverter&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:BoolToVisibilityConverter</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;boolToVisibilityConverter&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;HorizontalContent&quot;</span> <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;Collapsed&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.ColumnDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ColumnDefinition</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ColumnDefinition</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;OverflowButtonColumn&quot;</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.ColumnDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:PopupAwareToggleButton</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;HorizontalOverflowButton&quot;</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Right&quot;</span> </span>
<span style="color: #009900;">                                                            <span style="color: #000066;">HorizontalContentAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">VerticalContentAlignment</span>=<span style="color: #ff0000;">&quot;Bottom&quot;</span></span>
<span style="color: #009900;">                                                            <span style="color: #000066;">Style</span>=<span style="color: #ff0000;">&quot;{StaticResource ToolbarOverflowButtonStyle}&quot;</span> </span>
<span style="color: #009900;">                                                            <span style="color: #000066;">IsChecked</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsOverflowOpen, Mode=TwoWay}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;HorizontalOverflowGlyph&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;3,0,3,4&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;Black&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;0,1,0,0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Path</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;1,2&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;Black&quot;</span> <span style="color: #000066;">Data</span>=<span style="color: #ff0000;">&quot;M 0,0 L 2.5,3 5,0 Z&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Border<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:PopupAwareToggleButton<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Padding</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Padding}&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Background}&quot;</span> <span style="color: #000066;">CornerRadius</span>=<span style="color: #ff0000;">&quot;{TemplateBinding CornerRadius}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ToolbarPanel</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;HorizontalItemsHost&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Border<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:AutoClosePopup</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;HorizontalPopup&quot;</span> <span style="color: #000066;">KeepInHorizontalBounds</span>=<span style="color: #ff0000;">&quot;True&quot;</span>                                                    </span>
<span style="color: #009900;">                                                    <span style="color: #000066;">Placement</span>=<span style="color: #ff0000;">&quot;Bottom&quot;</span> <span style="color: #000066;">PlacementTarget</span>=<span style="color: #ff0000;">&quot;{Binding ElementName=HorizontalOverflowButton}&quot;</span></span>
<span style="color: #009900;">                                                    <span style="color: #000066;">IsOpen</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsOverflowOpen, Mode=TwoWay}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Padding</span>=<span style="color: #ff0000;">&quot;3,2&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">dc:DynamicResource.BorderBrushKey</span>=<span style="color: #ff0000;">&quot;ToolbarOverflowBorder&quot;</span> <span style="color: #000066;">dc:DynamicResource.BackgroundKey</span>=<span style="color: #ff0000;">&quot;ToolbarOverflowBackground&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border.Effect<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DropShadowEffect</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0.3&quot;</span> <span style="color: #000066;">ShadowDepth</span>=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Border.Effect<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;StackPanel</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;HorizontalOverflowPanel&quot;</span> <span style="color: #000066;">Orientation</span>=<span style="color: #ff0000;">&quot;Horizontal&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Grid.Row</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CustomItems, Converter={StaticResource nullableToVisibilityConverter}}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Rectangle</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;0,3&quot;</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Top&quot;</span> <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;Gray&quot;</span></span>
<span style="color: #009900;">                                                            <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HasOverflowItems, Converter={StaticResource boolToVisibilityConverter}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ContentPresenter</span> <span style="color: #000066;">Grid.Row</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Content</span>=<span style="color: #ff0000;">&quot;{TemplateBinding CustomItem}&quot;</span> <span style="color: #000066;">ContentTemplate</span>=<span style="color: #ff0000;">&quot;{TemplateBinding CustomItemTemplate}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Border<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:AutoClosePopup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;VerticalContent&quot;</span> <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;Collapsed&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;OverflowButtonRow&quot;</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:PopupAwareToggleButton</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;VerticalOverflowButton&quot;</span> <span style="color: #000066;">Grid.Row</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Bottom&quot;</span></span>
<span style="color: #009900;">                                                           <span style="color: #000066;">HorizontalContentAlignment</span>=<span style="color: #ff0000;">&quot;Right&quot;</span> <span style="color: #000066;">VerticalContentAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span></span>
<span style="color: #009900;">                                                           <span style="color: #000066;">Style</span>=<span style="color: #ff0000;">&quot;{StaticResource ToolbarOverflowButtonStyle}&quot;</span> </span>
<span style="color: #009900;">                                                           <span style="color: #000066;">IsChecked</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsOverflowOpen, Mode=TwoWay}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;VerticalOverflowGlyph&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;0,3,4,3&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;Black&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;1,0,0,0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Path</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;2,1&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;Black&quot;</span> <span style="color: #000066;">Data</span>=<span style="color: #ff0000;">&quot;M 0,0 L 3,2.5 0,5 Z&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Border<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:PopupAwareToggleButton<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Padding</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Padding}&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Background}&quot;</span> <span style="color: #000066;">CornerRadius</span>=<span style="color: #ff0000;">&quot;{TemplateBinding CornerRadius}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ToolbarPanel</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;VerticalItemsHost&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Border<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:AutoClosePopup</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;VerticalPopup&quot;</span> <span style="color: #000066;">KeepInVerticalBounds</span>=<span style="color: #ff0000;">&quot;True&quot;</span></span>
<span style="color: #009900;">                                                    <span style="color: #000066;">Placement</span>=<span style="color: #ff0000;">&quot;Right&quot;</span> <span style="color: #000066;">PlacementTarget</span>=<span style="color: #ff0000;">&quot;{Binding ElementName=VerticalOverflowButton}&quot;</span></span>
<span style="color: #009900;">                                                    <span style="color: #000066;">IsOpen</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsOverflowOpen, Mode=TwoWay}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Padding</span>=<span style="color: #ff0000;">&quot;2,3&quot;</span> <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">dc:DynamicResource.BorderBrushKey</span>=<span style="color: #ff0000;">&quot;ToolbarOverflowBorder&quot;</span> <span style="color: #000066;">dc:DynamicResource.BackgroundKey</span>=<span style="color: #ff0000;">&quot;ToolbarOverflowBackground&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border.Effect<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DropShadowEffect</span> <span style="color: #000066;">Opacity</span>=<span style="color: #ff0000;">&quot;0.3&quot;</span> <span style="color: #000066;">ShadowDepth</span>=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Border.Effect<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.ColumnDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ColumnDefinition</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ColumnDefinition</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.ColumnDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;StackPanel</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;VerticalOverflowPanel&quot;</span> <span style="color: #000066;">Orientation</span>=<span style="color: #ff0000;">&quot;Vertical&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CustomItems, Converter={StaticResource nullableToVisibilityConverter}}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.ColumnDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ColumnDefinition</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ColumnDefinition</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;Auto&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.ColumnDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Rectangle</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;3,0&quot;</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Left&quot;</span> <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;Gray&quot;</span> </span>
<span style="color: #009900;">                                                            <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HasOverflowItems, Converter={StaticResource boolToVisibilityConverter}}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ContentPresenter</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Content</span>=<span style="color: #ff0000;">&quot;{TemplateBinding CustomItem}&quot;</span> <span style="color: #000066;">ContentTemplate</span>=<span style="color: #ff0000;">&quot;{TemplateBinding CustomItemTemplate}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Border<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:AutoClosePopup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;OverflowButtonStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;OverflowButtonEnabled&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;OverflowButtonDisabled&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;HorizontalOverflowButton&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;IsEnabled&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;False&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;VerticalOverflowButton&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;IsEnabled&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;False&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;HorizontalOverflowGlyph&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;0.3&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;VerticalOverflowGlyph&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Opacity&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;0.3&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;OverflowButtonCollapsed&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;HorizontalOverflowButton&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Visibility&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Collapsed&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;OverflowButtonColumn&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Width&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;VerticalOverflowButton&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Visibility&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Collapsed&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;OverflowButtonRow&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Height&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;OrientationStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Horizontal&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;HorizontalContent&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Visibility&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Visible&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;VerticalPopup&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Visibility&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Collapsed&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Vertical&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;VerticalContent&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Visibility&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Visible&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;HorizontalPopup&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Visibility&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Collapsed&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Border<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Setter.Value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Setter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Style</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;dc:ToolbarTray&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>       
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Padding&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;4&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Background&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{x:Null}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;dc:DynamicResource.BackgroundKey&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;ToolbarTrayBackground OnlyIfNull&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;ItemsPanel&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter.Value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ItemsPanelTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ToolbarTrayPanel</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ItemsPanelTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Setter.Value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Setter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter.Value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;dc:ToolbarTray&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Border</span> <span style="color: #000066;">Padding</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Padding}&quot;</span> <span style="color: #000066;">BorderBrush</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderBrush}&quot;</span> </span>
<span style="color: #009900;">                            <span style="color: #000066;">BorderThickness</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderThickness}&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Background}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ItemsPresenter</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Border<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Setter.Value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Setter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>



<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=1149' rel='bookmark' title='Permanent Link: Circular Progress Control (Silverlight) Quick Start Guide'>Circular Progress Control (Silverlight) Quick Start Guide</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=1143' rel='bookmark' title='Permanent Link: Rating Control for Silverlight Quick Start Guide'>Rating Control for Silverlight Quick Start Guide</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=374' rel='bookmark' title='Permanent Link: SuperToolTip Control'>SuperToolTip Control</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1157</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Circular Progress Control (Silverlight) Quick Start Guide</title>
		<link>http://www.devcomponents.com/kb2/?p=1149</link>
		<comments>http://www.devcomponents.com/kb2/?p=1149#comments</comments>
		<pubDate>Tue, 21 Jun 2011 17:04:52 +0000</pubDate>
		<dc:creator>donwingate</dc:creator>
				<category><![CDATA[Common Silverlight Controls]]></category>
		<category><![CDATA[DotNetBar for Silverlight]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1149</guid>
		<description><![CDATA[CircularProgressControl is a progress control in circular format. It inherits properties Value, Minimum and Maximum from base class System.Windows.Controls.Primitives.RangeBase. As with the base class, the default value of Minimum is 0 and Maximum is 1. To display the value of Value in the control, set DisplayValue to true. This will make visible a text block [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=1143' rel='bookmark' title='Permanent Link: Rating Control for Silverlight Quick Start Guide'>Rating Control for Silverlight Quick Start Guide</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=374' rel='bookmark' title='Permanent Link: SuperToolTip Control'>SuperToolTip Control</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=1035' rel='bookmark' title='Permanent Link: Customizing Appointment Views in Silverlight Schedule'>Customizing Appointment Views in Silverlight Schedule</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>CircularProgressControl is a progress control in circular format. It inherits properties <em>Value</em>, <em>Minimum</em> and <em>Maximum</em> from base class <em>System.Windows.Controls.Primitives.RangeBase</em>. As with the base class, the default value of <em>Minimum</em> is 0 and <em>Maximum</em> is 1.</p>
<p>To display the value of Value in the control, set <em>DisplayValue</em> to true. This will make visible a text block positioned in the control’s center. Font size is set to 10 point by the default style, but can be changed through progress control’s <em>FontSize</em> property. (Likewise for other font properties inherited from <em>FrameworkElement</em>.) </p>
<p>An extensive sample project for CircularProgressControl is included with the installation of DotNetBar for WPF. </p>
<h1>Modes</h1>
<p>Two <em>Modes</em> are supported, <em>Endless</em> and <em>Percent</em>. </p>
<p>In <em>Percent</em> mode, progress is indicated by the angle of the display where the angle is determined by the value of <em>Value</em> as a percentage of the distance between <em>Minimum</em> and <em>Maximum</em>. Of course, the value of <em>Value</em> must be updated by the client as progress is made.</p>
<p>In <em>Endless</em> mode, the control’s content will rotate continuously, indicating “busy”. (Note that endless mode can serve as a progress reporter and not just a “busy” indicator by setting <em>DisplayValue</em> to true and updating <em>Value</em> as progress is made.) The speed of rotation can be controlled with property <em>RotationSpeedMultiplier</em>. Values less than 1 will slow the rotation, greater than 1 will speed it up. </p>
<h1>Types</h1>
<p>CircularProgressControl has 5 built-in Types, which determine the look-and-feel. Included is a type simulating the Vista wait cursor and a type that simulates the Silverlight download wait control. Also included is a Content type for using content of your choosing in the rotating portion of the control. </p>
<p>Below is an screen shot showing the available Types in various states and stages of progress which was taken of the included sample project.</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2011/06/CircularProgressControl2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="CircularProgressControl" border="0" alt="CircularProgressControl" src="http://www.devcomponents.com/kb2/wp-content/uploads/2011/06/CircularProgressControl_thumb2.png" width="244" height="171" /></a></p>
<p><em>ProgressBrush</em> is used for the element or elements which indicate progress.</p>
<p>Use <em>BorderBrush</em> and <em>BorderThickness</em> to control the stroke of the outer circumference. Note that <em>BorderThickness</em> is inherited property of type Thickness, but the default template only uses the value assigned to Left. <em>Background</em> can be used to achieve different effects depending on the <em>Type</em>.</p>
<p>Use property <em>InnerRadius</em> to achieve the effect of a ring. <em>InnerBorderThickness</em> and <em>InnerBorderBrush</em> control the stroke of the inner circumference. (For consistency with inherited property <em>BorderBrush</em>, <em>InnerBorderThickness</em> is also of type <em>Thickness.</em>)</p>
<p>It is possible to define your own custom type. To do so, create a <em>ControlTemplate</em> targeting type <em>Control</em> and set it as value of property <em>AnimatingControlTemplate</em>. </p>
<p>Following is a list of the built-in Types:</p>
<ul>
<li><em>Custom –</em> Use when you want to set up a custom <em>AnimatingControlTemplate.</em> </li>
<li><em>Basic</em> </li>
<li><em>Pie</em> </li>
<li><em>Wedge</em> (use <em>InternalValueOverride</em> to set the relative angle of the wedge. If this is not done, then the wedge size is reflective of the value of Value.) </li>
<li><em>Line</em> – Has 12 lines. </li>
<li><em>Line3</em> – Has 3 lines. </li>
<li><em>Dot</em> – Has 12 dots. </li>
<li><em>Dot3</em> – Has 3 dots. </li>
<li><em>Cone</em> – Applies the shader effect <em>ConeEffect</em> (defined in <em>DevComponents.WPF.Controls</em> namespace) to the ProgresBrush, which turns the two ends of the linear gradient into each other creating a circle. </li>
<li><em>Content</em> (set <em>ClipToBounds</em> to false if content is unwantedly clipped by circular border.) </li>
<li><em>Pod</em> (aka Vista Busy) – Use <em>PalleteColor</em> to change the color scheme of the background while maintaining same look and feel. Setting Background directly will override the default look. </li>
<li><em>VanishingDot</em> (aka Silverlight) – Use PalleteColor to change color scheme of dots but maintain same general look. Setting <em>ProgressBrush</em> directly will override the default look. </li>
</ul>
<h1>Properties</h1>
<p>Here is a complete list of properties defined by <em>CircularProgressControl</em> for your reference:</p>
<p><em>AnimatingControlTemplatet</em> – A ControlTemplate for a Control which is responsible for animating progress.</p>
<p>PalleteColor – An optional color which is used by certain Types for creating default look and feel. In particular, the <em>Pod</em> (Vista Busy) type uses <em>PalleteColor</em> as input for creating a default Background to achieve the Vista look. <em>VanishingDot</em> (Silverlight) uses it to create default <em>ProgressBrush</em> used as fill for the dots. </p>
<p><em>Content</em> – Content which will be rotated when <em>Type</em> is <em>Content</em>. By setting a value for <em>Content</em>, <em>Type </em>is automatically set to <em>Content</em> unless it has already been set to something else.</p>
<p><em>ContentTemplate</em> – a DataTemplate which shows how to render <em>Content.</em></p>
<p><em>DisplayValue</em> – Determines whether to display the value of <em>Value</em> inside the control. Default value is false.</p>
<p><em>IsRunning</em> – Determines whether the progress control is rotating when mode is <em>Endless</em>. Is ignored if mode is not <em>Endless</em>. </p>
<p><em>InnerRadius</em> – Sets the radius of the inner border of the circular control. Value can be either absolute or relative. Values less than or equal to 1 will be treated as relative to <em>Radius</em>. Values greater than 1 are treated as absolute.</p>
<p><em>InnerBorderThickness</em> – Thickness of the stroke used to draw the inner radius. Note that because the inherited property <em>BorderThickness</em> is of type <em>Thickness</em>, this property is also a <em>Thickness</em> for consistency. (Only the left value is used.)</p>
<p><em>InternalValueOverride</em> – Provides a means of directly controlling the angle of the progress display. Must be a double between 0 and 1.</p>
<p><em>Mode</em> – Either <em>Percent</em> or <em>Endless</em>.</p>
<p><em>ProgressBrush</em> – Brush used for the UI Element which indicates progress.</p>
<p><em>Radius</em> – A read-only property indicating the radius of the circle.</p>
<p><em>RotationSpeedMultiplier</em> – Use to control speed of rotation when in <em>Endless</em> mode. Value of 1 is the default speed. Less than 1 slows down and greater than 1 speeds up the rotation.</p>
<p><em>Type</em> – Determines the look and feel of the circular progress control.</p>
<p><em>ValueStringFormat</em> – Optional format string for displaying <em>Value</em>, when <em>DisplayValue</em> is true. (Hint: to show percentage when <em>Minimum</em> and <em>Maximum</em> are their default values of 0 and 1 use 0% as format string.)</p>
<h1>Styles and Templates</h1>
<p>Here is the default Template for CircularProgressControl, included for your reference:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;CircularProgressControlDefaultTemplate&quot;</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;dc:CircularProgressControl&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;SquareGrid&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:DoubleToPointConverter</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;doubleToPointConverter&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;ClippedGrid&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Background}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:CircularProgressAnimatingControl</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;AnimatingControl&quot;</span> <span style="color: #000066;">Margin</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderThickness}&quot;</span> <span style="color: #000066;">Padding</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Padding}&quot;</span> </span>
<span style="color: #009900;">                                                    <span style="color: #000066;">IsRunning</span>=<span style="color: #ff0000;">&quot;{TemplateBinding IsRunning}&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{TemplateBinding ProgressBrush}&quot;</span></span>
<span style="color: #009900;">                                                    <span style="color: #000066;">DataContext</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}}&quot;</span> <span style="color: #000066;">Template</span>=<span style="color: #ff0000;">&quot;{TemplateBinding AnimatingControlTemplate}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.Clip<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;GeometryGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;EllipseGeometry</span> <span style="color: #000066;">Center</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Radius, Converter={StaticResource doubleToPointConverter}}&quot;</span> </span>
<span style="color: #009900;">                                                    <span style="color: #000066;">RadiusX</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Radius}&quot;</span> </span>
<span style="color: #009900;">                                                    <span style="color: #000066;">RadiusY</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Radius}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;EllipseGeometry</span> <span style="color: #000066;">Center</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Radius, Converter={StaticResource doubleToPointConverter}}&quot;</span> </span>
<span style="color: #009900;">                                                    <span style="color: #000066;">RadiusX</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerRadiusInternal}&quot;</span> </span>
<span style="color: #009900;">                                                    <span style="color: #000066;">RadiusY</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerRadiusInternal}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/GeometryGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.Clip<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Ellipse</span> <span style="color: #000066;">Stretch</span>=<span style="color: #ff0000;">&quot;Uniform&quot;</span> <span style="color: #000066;">Stroke</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderBrush}&quot;</span> </span>
<span style="color: #009900;">                                <span style="color: #000066;">StrokeThickness</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource thicknessToDoubleConverter}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Ellipse</span> <span style="color: #000066;">Stretch</span>=<span style="color: #ff0000;">&quot;Uniform&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span>  <span style="color: #000066;">Stroke</span>=<span style="color: #ff0000;">&quot;{TemplateBinding InnerBorderBrush}&quot;</span></span>
<span style="color: #009900;">                                <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerRadiusInternal, Converter={StaticResource multiplicationConverter}, ConverterParameter=2}&quot;</span> </span>
<span style="color: #009900;">                                <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerRadiusInternal, Converter={StaticResource multiplicationConverter}, ConverterParameter=2}&quot;</span></span>
<span style="color: #009900;">                                <span style="color: #000066;">StrokeThickness</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerBorderThickness, Converter={StaticResource thicknessToDoubleConverter}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextBlock</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;ValueTextBlock&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> </span>
<span style="color: #009900;">                                <span style="color: #000066;">Visibility</span>=<span style="color: #ff0000;">&quot;{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DisplayValue, Converter={StaticResource boolToVisibilityConverter}}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;TypeStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Custom&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Basic&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;AnimatingControl&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{StaticResource BasicAnimatingControlTemplateKey}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Line&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;AnimatingControl&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{StaticResource LineAnimatingControlTemplateKey}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Line3&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;AnimatingControl&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{StaticResource Line3AnimatingControlTemplateKey}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Dot&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;AnimatingControl&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{StaticResource DotAnimatingControlTemplateKey}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Dot3&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;AnimatingControl&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{StaticResource Dot3AnimatingControlTemplateKey}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Pie&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;AnimatingControl&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{StaticResource PieAnimatingControlTemplateKey}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Wedge&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;AnimatingControl&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{StaticResource WedgeAnimatingControlTemplateKey}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Cone&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;AnimatingControl&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{StaticResource ConeAnimatingControlTemplateKey}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Pod&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;AnimatingControl&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{StaticResource PodAnimatingControlTemplateKey}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;VanishingDot&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;AnimatingControl&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{StaticResource VanishingDotAnimatingControlTemplateKey}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Content&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;AnimatingControl&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{StaticResource ContentAnimatingControlTemplateKey}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;ClippedGrid&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Clip&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;{x:Null}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Here is the ControlTemplate used for the Control which presents the animating content. You can use this as a starting point for creating custom ControlTemplate which you then set as value of property <em>AnimatingControlTemplate</em>.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;BasicAnimatingControlTemplateKey&quot;</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;dc:CircularProgressAnimatingControl&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;AnimatedGrid&quot;</span> <span style="color: #000066;">RenderTransformOrigin</span>=<span style="color: #ff0000;">&quot;0.5,0.5&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;{Binding Path=Radius, Converter={StaticResource multiplicationConverter}, ConverterParameter=2}&quot;</span> </span>
<span style="color: #009900;">            <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;{Binding Path=Radius, Converter={StaticResource multiplicationConverter}, ConverterParameter=2}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:ObjectValueToBooleanConverter</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;valueToBooleanConverter&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;IsRunningStoryboard&quot;</span> <span style="color: #000066;">RepeatBehavior</span>=<span style="color: #ff0000;">&quot;Forever&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DoubleAnimation</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;ProgressEllipse&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;(Grid.RenderTransform).(RotateTransform.Angle)&quot;</span> <span style="color: #000066;">Duration</span>=<span style="color: #ff0000;">&quot;00:00:01.25&quot;</span> <span style="color: #000066;">From</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">To</span>=<span style="color: #ff0000;">&quot;359.99&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Ellipse</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;ProgressEllipse&quot;</span> <span style="color: #000066;">Grid.RowSpan</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">Stretch</span>=<span style="color: #ff0000;">&quot;Uniform&quot;</span> <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;{Binding ProgressBrush}&quot;</span> <span style="color: #000066;">RenderTransformOrigin</span>=<span style="color: #ff0000;">&quot;0.5,0.5&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Ellipse.RenderTransform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RotateTransform</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Ellipse.RenderTransform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Ellipse<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Rectangle</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;ProgressMarker&quot;</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Center&quot;</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;{Binding BorderBrush}&quot;</span> <span style="color: #000066;">Stretch</span>=<span style="color: #ff0000;">&quot;Fill&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.RenderTransform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RotateTransform</span> <span style="color: #000066;">Angle</span>=<span style="color: #ff0000;">&quot;{Binding Path=NormalizedValue, Converter={StaticResource multiplicationConverter}, ConverterParameter=360}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.RenderTransform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualStateGroup</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;ModeStates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Percent&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VisualState</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Endless&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ObjectAnimationUsingKeyFrames</span> <span style="color: #000066;">Storyboard.TargetName</span>=<span style="color: #ff0000;">&quot;ProgressMarker&quot;</span> <span style="color: #000066;">Storyboard.TargetProperty</span>=<span style="color: #ff0000;">&quot;Visibility&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DiscreteObjectKeyFrame</span> <span style="color: #000066;">KeyTime</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;Collapsed&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ObjectAnimationUsingKeyFrames<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Storyboard<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualState<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VisualStateManager.VisualStateGroups<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>



<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=1143' rel='bookmark' title='Permanent Link: Rating Control for Silverlight Quick Start Guide'>Rating Control for Silverlight Quick Start Guide</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=374' rel='bookmark' title='Permanent Link: SuperToolTip Control'>SuperToolTip Control</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=1035' rel='bookmark' title='Permanent Link: Customizing Appointment Views in Silverlight Schedule'>Customizing Appointment Views in Silverlight Schedule</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1149</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

