<?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>Fri, 12 Apr 2013 16:54:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How to change width or height of WPF Calendar/Schedule control scroll-bars</title>
		<link>http://www.devcomponents.com/kb2/?p=1387</link>
		<comments>http://www.devcomponents.com/kb2/?p=1387#comments</comments>
		<pubDate>Fri, 12 Apr 2013 16:54:59 +0000</pubDate>
		<dc:creator>Maintainer</dc:creator>
				<category><![CDATA[DotNetBar for WPF]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Schedule (WPF)]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1387</guid>
		<description><![CDATA[To change width of vertical scrollbar or height of horizontal scrollbar used by DotNetBar for WPF CalendarView control define following resources in CalendarView.Resources: For width of vertical scroll-bar define: &#60;s:CalendarView.Resources&#62; &#60;sys:Double x:Key=&#34;{x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}&#34;&#62;32&#60;/sys:Double&#62; &#60;/s:CalendarView.Resources&#62; For height of horizontal scroll-bar define: &#60;s:CalendarView.Resources&#62; &#60;sys:Double x:Key=&#34;{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}&#34;&#62;32&#60;/sys:Double&#62; &#60;/s:CalendarView.Resources&#62; The s: namespace refers to: xmlns:s=&#8221;clr-namespace:DevComponents.WpfSchedule;assembly=DevComponents.WpfSchedule&#8221; The sys: namespace refers [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=797' rel='bookmark' title='Permanent Link: WPF Schedule Quick Start Guide'>WPF Schedule Quick Start Guide</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=781' rel='bookmark' title='Permanent Link: How to customize WPF Office 2007 Color Schemes'>How to customize WPF Office 2007 Color Schemes</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=614' rel='bookmark' title='Permanent Link: How To Start Using Wpf-Ribbon Control'>How To Start Using Wpf-Ribbon Control</a></li>
</ol>]]></description>
				<content:encoded><![CDATA[<p>To change width of vertical scrollbar or height of horizontal scrollbar used by DotNetBar for WPF CalendarView control define following resources in CalendarView.Resources:</p>
<p>For width of vertical scroll-bar define:</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;s:CalendarView.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sys:Double</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;{x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>32<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sys:Double<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:CalendarView.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>For height of horizontal scroll-bar define:</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;s:CalendarView.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sys:Double</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>32<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sys:Double<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:CalendarView.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>The <strong>s:</strong> namespace refers to: xmlns:s=&#8221;clr-namespace:DevComponents.WpfSchedule;assembly=DevComponents.WpfSchedule&#8221;<br />
The <strong>sys:</strong> namespace refers to: xmlns:sys=&#8221;clr-namespace:System;assembly=mscorlib&#8221;</p>


<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=797' rel='bookmark' title='Permanent Link: WPF Schedule Quick Start Guide'>WPF Schedule Quick Start Guide</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=781' rel='bookmark' title='Permanent Link: How to customize WPF Office 2007 Color Schemes'>How to customize WPF Office 2007 Color Schemes</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=614' rel='bookmark' title='Permanent Link: How To Start Using Wpf-Ribbon Control'>How To Start Using Wpf-Ribbon Control</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1387</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create Backstage application menu in DotNetBar for WPF Ribbon Control</title>
		<link>http://www.devcomponents.com/kb2/?p=1384</link>
		<comments>http://www.devcomponents.com/kb2/?p=1384#comments</comments>
		<pubDate>Tue, 09 Apr 2013 22:43:25 +0000</pubDate>
		<dc:creator>Maintainer</dc:creator>
				<category><![CDATA[DotNetBar for WPF]]></category>
		<category><![CDATA[Ribbon (WPF)]]></category>
		<category><![CDATA[from code]]></category>
		<category><![CDATA[ribbon wpf]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1384</guid>
		<description><![CDATA[Use following code to create Backstage application menu for the Ribbon control included with DotNetBar for WPF: &#160; C#: Backstage backstage = new Backstage&#40;&#41;; ButtonDropDown btn = new ButtonDropDown&#40;&#41;; btn.Header = &#34;Save&#34;; btn.ImageSource = &#34;images/Save.png&#34;; backstage.Items.Add&#40;btn&#41;; &#160; btn = new ButtonDropDown&#40;&#41;; btn.Header = &#34;Save As&#34;; backstage.Items.Add&#40;btn&#41;; &#160; BackstageTab tab = new BackstageTab&#40;&#41;; tab.Header = &#34;New&#34;; [...]


Related posts:<ol><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>
<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>
<li><a href='http://www.devcomponents.com/kb2/?p=113' rel='bookmark' title='Permanent Link: How to Access and Change WPF-Ribbon Window Title Text Alignment'>How to Access and Change WPF-Ribbon Window Title Text Alignment</a></li>
</ol>]]></description>
				<content:encoded><![CDATA[<p>Use following code to create Backstage application menu for the Ribbon control included with DotNetBar for WPF:</p>
<p>&nbsp;</p>
<p>C#:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">Backstage backstage <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Backstage<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
ButtonDropDown btn <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> ButtonDropDown<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
btn<span style="color: #008000;">.</span><span style="color: #0000FF;">Header</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Save&quot;</span><span style="color: #008000;">;</span>
btn<span style="color: #008000;">.</span><span style="color: #0000FF;">ImageSource</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;images/Save.png&quot;</span><span style="color: #008000;">;</span>
backstage<span style="color: #008000;">.</span><span style="color: #0000FF;">Items</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>btn<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
btn <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> ButtonDropDown<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
btn<span style="color: #008000;">.</span><span style="color: #0000FF;">Header</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Save As&quot;</span><span style="color: #008000;">;</span>
backstage<span style="color: #008000;">.</span><span style="color: #0000FF;">Items</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>btn<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
BackstageTab tab <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> BackstageTab<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
tab<span style="color: #008000;">.</span><span style="color: #0000FF;">Header</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;New&quot;</span><span style="color: #008000;">;</span>
tab<span style="color: #008000;">.</span><span style="color: #0000FF;">PanelBackground</span> <span style="color: #008000;">=</span> eBackstagePanelBackgroundImage<span style="color: #008000;">.</span><span style="color: #0000FF;">Green</span><span style="color: #008000;">;</span>
backstage<span style="color: #008000;">.</span><span style="color: #0000FF;">Items</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>tab<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
DockPanel panel <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> DockPanel<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
Label label <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Label<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
label<span style="color: #008000;">.</span><span style="color: #0000FF;">Content</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Label Content&quot;</span><span style="color: #008000;">;</span>
panel<span style="color: #008000;">.</span><span style="color: #0000FF;">Children</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>label<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
tab<span style="color: #008000;">.</span><span style="color: #0000FF;">Content</span> <span style="color: #008000;">=</span> panel<span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">// Set tab content</span>
&nbsp;
AppMenu<span style="color: #008000;">.</span><span style="color: #0000FF;">BackstageTab</span> <span style="color: #008000;">=</span> backstage<span style="color: #008000;">;</span></pre></div></div>

<p>VB:</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;">Backstage backstage = <span style="color: #E56717; font-weight: bold;">new</span> Backstage();
ButtonDropDown btn = <span style="color: #E56717; font-weight: bold;">new</span> ButtonDropDown();
btn.Header = <span style="color: #800000;">&quot;Save&quot;</span>;
btn.ImageSource = <span style="color: #800000;">&quot;images/Save.png&quot;</span>;
backstage.Items.Add(btn);
&nbsp;
btn = <span style="color: #E56717; font-weight: bold;">new</span> ButtonDropDown();
btn.Header = <span style="color: #800000;">&quot;Save As&quot;</span>;
backstage.Items.Add(btn);
&nbsp;
BackstageTab tab = <span style="color: #E56717; font-weight: bold;">new</span> BackstageTab();
tab.Header = <span style="color: #800000;">&quot;New&quot;</span>;
tab.PanelBackground = eBackstagePanelBackgroundImage.Green;
backstage.Items.Add(tab);
&nbsp;
DockPanel panel = <span style="color: #E56717; font-weight: bold;">new</span> DockPanel();
Label label = <span style="color: #E56717; font-weight: bold;">new</span> Label();
label.Content = <span style="color: #800000;">&quot;Label Content&quot;</span>;
panel.Children.Add(label);
tab.Content = panel; // <span style="color: #151B8D; font-weight: bold;">Set</span> tab content
&nbsp;
AppMenu.BackstageTab = backstage;</pre></div></div>

<p>AppMenu in this case represents an instance of ApplicationMenu which has been assigned to the Ribbon.</p>


<p>Related posts:<ol><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>
<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>
<li><a href='http://www.devcomponents.com/kb2/?p=113' rel='bookmark' title='Permanent Link: How to Access and Change WPF-Ribbon Window Title Text Alignment'>How to Access and Change WPF-Ribbon Window Title Text Alignment</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1384</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create custom columns when binding data to AdvTree</title>
		<link>http://www.devcomponents.com/kb2/?p=1376</link>
		<comments>http://www.devcomponents.com/kb2/?p=1376#comments</comments>
		<pubDate>Thu, 24 Jan 2013 00:28:42 +0000</pubDate>
		<dc:creator>Maintainer</dc:creator>
				<category><![CDATA[DotNetBar for Windows Forms]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[advtree]]></category>
		<category><![CDATA[Binding]]></category>
		<category><![CDATA[WinForms]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1376</guid>
		<description><![CDATA[DotNetBar AdvTree WinForms control includes full support for data-binding through advTree.DataSource property which accepts many data objects and automatically creates columns based on advTree.DisplayMembers property setting which accepts comma separated list of field names to display. When you set DisplayMembers property the control automatically generates the column and sets default size for them. If you [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=1245' rel='bookmark' title='Permanent Link: How to use ItemPanel Data-Binding Features &#8211; WinForms'>How to use ItemPanel Data-Binding Features &#8211; WinForms</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=876' rel='bookmark' title='Permanent Link: ComboTree Quick Start Guide'>ComboTree Quick Start Guide</a></li>
<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>
</ol>]]></description>
				<content:encoded><![CDATA[<p>DotNetBar AdvTree WinForms control includes full support for data-binding through advTree.<strong>DataSource</strong> property which accepts many data objects and automatically creates columns based on advTree.<strong>DisplayMembers</strong> property setting which accepts comma separated list of field names to display.</p>
<p>When you set <strong>DisplayMembers</strong> property the control automatically generates the column and sets default size for them. If you want to customize columns you have two options:</p>
<p>1. Handle advTree.<strong>DataColumnCreated event</strong> which is fired for each ColumnHeader control internally creates. Using event arguments you can get access to the ColumnHeader created and modify it to suit your needs.</p>
<p>2. <strong>Clear DisplayMembers</strong> property (must be set to an empty string or null/nothing) and create your columns manually in designer or using code. In designer simply use right-click-&gt;Edit Columns command. In code create new instances of ColumnHeader object, add it to advTree.Columns collection, set its properties to set it up the way you want it, and make sure to set columnHeader.<strong>DataFieldName</strong> property with the name of the field that holds data that will be loaded into the column. <em>Note, that this must be done <strong>before</strong> DataSource is set.</em></p>
<p>&nbsp;</p>


<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=1245' rel='bookmark' title='Permanent Link: How to use ItemPanel Data-Binding Features &#8211; WinForms'>How to use ItemPanel Data-Binding Features &#8211; WinForms</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=876' rel='bookmark' title='Permanent Link: ComboTree Quick Start Guide'>ComboTree Quick Start Guide</a></li>
<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>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1376</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Everything you need to know about RadialMenu control for WinForms</title>
		<link>http://www.devcomponents.com/kb2/?p=1363</link>
		<comments>http://www.devcomponents.com/kb2/?p=1363#comments</comments>
		<pubDate>Sat, 19 Jan 2013 19:07:41 +0000</pubDate>
		<dc:creator>Maintainer</dc:creator>
				<category><![CDATA[DotNetBar for Windows Forms]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Radial Menu]]></category>
		<category><![CDATA[WinForms]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1363</guid>
		<description><![CDATA[RadialMenu control is a popup menu control included with DotNetBar for WinForms. RadialMenu control is used to minimize movement between the action which opens the menu and menu command selection. RadialMenu control is not only very useful for touch based screens but its benefits are the same when mouse only is used. RadialMenu control provides [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=748' rel='bookmark' title='Permanent Link: How to find CrumBarItem in CrumbBar control by name'>How to find CrumBarItem in CrumbBar control by name</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=1347' rel='bookmark' title='Permanent Link: How to change the ButtonItem.Symbol property using code'>How to change the ButtonItem.Symbol property using code</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=1245' rel='bookmark' title='Permanent Link: How to use ItemPanel Data-Binding Features &#8211; WinForms'>How to use ItemPanel Data-Binding Features &#8211; WinForms</a></li>
</ol>]]></description>
				<content:encoded><![CDATA[<p>RadialMenu control is a popup menu control included with DotNetBar for WinForms. RadialMenu control is used to minimize movement between the action which opens the menu and menu command selection. RadialMenu control is not only very useful for touch based screens but its benefits are the same when mouse only is used.</p>
<p>RadialMenu control provides two different types of menus:</p>
<p>1. <strong>MenuType = eRadialMenuType.Segment</strong>. This menu type allows showing of sub-menu items and menu item text. Following image shows this type of radial menu:</p>
<p><a href="http://www.devcomponents.com/kb2/?attachment_id=1364" rel="attachment wp-att-1364"><img class="alignnone size-full wp-image-1364" alt="DotNetBarRadialMenu" src="http://www.devcomponents.com/kb2/wp-content/uploads/2013/01/DotNetBarRadialMenu.png" width="231" height="217" /></a></p>
<p>2. <strong>MenuType = eRadialMenuType.Circular</strong>. This menu type does not allow either sub-menu items or menu item text. It only shows Symbol or Image set on menu item. Following image shows circular menu type:</p>
<p><a href="http://www.devcomponents.com/kb2/?attachment_id=1365" rel="attachment wp-att-1365"><img class="alignnone size-full wp-image-1365" alt="DotNetBar RadialMenu Circular Menu Type" src="http://www.devcomponents.com/kb2/wp-content/uploads/2013/01/DotNetBarRadialMenu2.png" width="195" height="167" /></a></p>
<p>When menu is collapsed, not open, its circular button is visible on the form which when clicked opens the menu. This is what is seen when RadialMenu control is added to the form:</p>
<p><a href="http://www.devcomponents.com/kb2/?attachment_id=1367" rel="attachment wp-att-1367"><img class="alignnone size-full wp-image-1367" alt="DotNetBar RadialMenu Open Button" src="http://www.devcomponents.com/kb2/wp-content/uploads/2013/01/DotNetBarRadialMenu3.png" width="44" height="43" /></a></p>
<p>RadialMenu control accepts only <strong>RadialMenuItem</strong> object type to define its menu structure. These items are added to <strong>RadialMenu.Items</strong> collection.</p>
<h3>RadialMenu control <strong>key properties</strong></h3>
<ul>
<li><strong>BackButtonSymbol</strong> &#8211; specifies the symbol that is displayed in center of radial menu when sub-menu is shown. This button when clicked cycles back to parent menu.</li>
<li><strong>BackButtonSymbolSize</strong> &#8211; specifies the size of the back button symbol.</li>
<li><strong>CenterButtonDiameter</strong> &#8211; specifies the radial menu center button diameter in pixels.</li>
<li><strong>CloseMenuOnAppDeactivate</strong> &#8211; specifies whether radial menu if its open closes when application deactivates. Its not recommended to change default setting for this property since menu will be left open and you will have to close it manually from code.</li>
<li><strong>Colors</strong> &#8211; returns the color table that allows customization of all colors used by the radial menu control. Please see our RadialMenu sample project which is included with your DotNetBar install which shows how to use this property to customize RadialMenu colors.</li>
<li><strong>Diameter</strong> &#8211; specifies open radial menu diameter.</li>
<li><strong>Image</strong> &#8211; specifies image displayed on circular button which opens radial menu. Note that setting Symbol overrides the Image setting.</li>
<li><strong>IsOpen</strong> &#8211; gets or sets whether radial menu is open. You can use this property to open radial menu from code.</li>
<li><strong>Items</strong> &#8211; returns the collection which holds instances of RadialMenuItem objects which define the content of radial menu.</li>
<li><strong>MaxItemPieAngle</strong> &#8211; specifies the maximum pie angle an menu item can occupy, essentially maximum radial size of menu item.</li>
<li><strong>MaxItemRadialAngle</strong> &#8211; specifies maximum radial angle single item in menu can consume. By default this property is set to zero which indicates that radial menu is equally divided between visible menu items and constrained by MaxItemPieAngle property setting.</li>
<li><strong>MenuLocation</strong> &#8211; specifies custom menu location in screen-coordinates. For an example of how to use this property see RadialMenu sample project which is included with your DotNetBar install.</li>
<li><strong>MenuType</strong> &#8211; specifies the radial menu type.</li>
<li><strong>SubMenuEdgeItemSpacing</strong> &#8211; specifies spacing between the outer edge of the radial menu item and sub menu ring.</li>
<li><strong>SubMenuEdgeWidth</strong> &#8211; specifies width of the sub-menu ring that is drawn around the radial menu items and which shows whether an item has sub-menu and allows switch to sub-menu</li>
<li><strong>Symbol</strong> &#8211; specifies <a href="http://www.devcomponents.com/kb2/?p=1347">Symbol</a> shown on circular button which opens the radial menu. When Symbol is set it overrides Image setting.</li>
<li><strong>SymbolSize</strong> &#8211; specifies the symbol size shown on circular button which opens radial menu.</li>
</ul>
<h3>RadialMenu control <strong>key events</strong></h3>
<ul>
<li><strong>BeforeMenuOpen</strong> &#8211; occurs before radial menu is open and it allows you to cancel opening of the menu by setting Cancel=true on event arguments.</li>
<li><strong>ItemClick</strong> &#8211; occurs when any of the radial menu items is clicked. Can be used as single point click event handler for menu items although we recommend using <a href="http://www.devcomponents.com/kb2/?p=58">Commands</a> instead.</li>
<li><strong>MenuClosed</strong> &#8211; occurs after radial menu is closed.</li>
<li><strong>MenuOpened</strong> &#8211; occurs after radial menu is open.</li>
</ul>
<h3>RadialMenuItem key properties</h3>
<ul>
<li><strong>Checked</strong> &#8211; specifies whether radial menu item is checked. <em>Applies only to MenuType=Segment</em>.</li>
<li><strong>CircularBackColor</strong> &#8211; specifies background color for circular menu item. <em>Applies only to MenuType=Circular</em>.</li>
<li><strong>CircularBorderColor</strong> &#8211; specifies border color for circular menu item. <em>Applies only to MenuType=Circular</em>.</li>
<li><strong>CircularForeColor</strong> &#8211; specifies foreground color of the symbol displayed on circular menu item. <em>Applies only to MenuType=Circular</em>.</li>
<li><strong>CircularMenuDiameter</strong> &#8211; specifies diameter of the circular menu item. <em>Applies only to MenuType=Circular</em>.</li>
<li><strong>Command</strong> &#8211; specifies the command which is executed when menu item is clicked.</li>
<li><strong>Image</strong> &#8211; specifies image displayed on menu item. Note that if Symbol property is set, it will override image setting.</li>
<li><strong>IsMouseOver</strong> &#8211; returns whether mouse is over the menu item.</li>
<li><strong>SubItems</strong> &#8211; returns collection which represents sub-menu items. You add new instances of RadialMenuItem object to this collection to create sub-menus. Note that sub-menus are visible only for <em> MenuType=Segment</em>.</li>
<li><strong>Symbol</strong> &#8211; specifies symbol displayed on menu item. Note that setting Symbol will override image setting.</li>
<li><strong>SymbolSize</strong> &#8211; specifies symbol size.</li>
<li><strong>Text</strong> &#8211; specifies the text displayed on menu item. Note that you can use line break characters \r\n to break text into multiple lines. <em>Applies only to MenuType=Segment</em>.</li>
<li><strong>TextOffset</strong> &#8211; specifies optional text offset from its original layout position. Sometimes its necessary to adjust text location for best appearance. This is property to use.</li>
<li><strong>TextVisible</strong> &#8211; specifies whether menu item shows text if set. <em>Applies only to MenuType=Segment</em>.</li>
<li><strong>TracksMouse</strong> &#8211; specifies whether menu item changes its appearance to indicates when mouse is over.</li>
</ul>
<h2>How to create RadialMenu using code</h2>
<p>For working demonstration please see our RadialMenu sample project included with your DotNetBar install.</p>
<p>C#:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">RadialMenu menu <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> RadialMenu<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
menu<span style="color: #008000;">.</span><span style="color: #0000FF;">Location</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Point<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">32</span>,<span style="color: #FF0000;">32</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
menu<span style="color: #008000;">.</span><span style="color: #0000FF;">Symbol</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\u</span>f040&quot;</span><span style="color: #008000;">;</span>
menu<span style="color: #008000;">.</span><span style="color: #0000FF;">Diameter</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">220</span><span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">// Make menu diameter larger</span>
<span style="color: #008080; font-style: italic;">// Handle some events</span>
menu<span style="color: #008000;">.</span><span style="color: #0000FF;">ItemClick</span> <span style="color: #008000;">+=</span> <span style="color: #008000;">new</span> EventHandler<span style="color: #008000;">&#40;</span>RadialMenuItemClick<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
menu<span style="color: #008000;">.</span><span style="color: #0000FF;">MenuOpened</span> <span style="color: #008000;">+=</span> <span style="color: #008000;">new</span> EventHandler<span style="color: #008000;">&#40;</span>RadialMenuOpened<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
menu<span style="color: #008000;">.</span><span style="color: #0000FF;">MenuClosed</span> <span style="color: #008000;">+=</span> <span style="color: #008000;">new</span> EventHandler<span style="color: #008000;">&#40;</span>RadialMenuClosed<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
RadialMenuItem item <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> RadialMenuItem<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
item<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Item 1&quot;</span><span style="color: #008000;">;</span>
item<span style="color: #008000;">.</span><span style="color: #0000FF;">Symbol</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\u</span>f011&quot;</span><span style="color: #008000;">;</span>
menu<span style="color: #008000;">.</span><span style="color: #0000FF;">Items</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>item<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
item <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> RadialMenuItem<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
item<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Item 2&quot;</span><span style="color: #008000;">;</span>
item<span style="color: #008000;">.</span><span style="color: #0000FF;">Symbol</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\u</span>f00e&quot;</span><span style="color: #008000;">;</span>
menu<span style="color: #008000;">.</span><span style="color: #0000FF;">Items</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>item<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
item <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> RadialMenuItem<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
item<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Item 3&quot;</span><span style="color: #008000;">;</span>
item<span style="color: #008000;">.</span><span style="color: #0000FF;">Symbol</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\u</span>f010&quot;</span><span style="color: #008000;">;</span>
menu<span style="color: #008000;">.</span><span style="color: #0000FF;">Items</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>item<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> 
&nbsp;
<span style="color: #008080; font-style: italic;">// Create spacer item</span>
item <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> RadialMenuItem<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
menu<span style="color: #008000;">.</span><span style="color: #0000FF;">Items</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>item<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
item <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> RadialMenuItem<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
item<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Item 4&quot;</span><span style="color: #008000;">;</span>
item<span style="color: #008000;">.</span><span style="color: #0000FF;">Symbol</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\u</span>f011&quot;</span><span style="color: #008000;">;</span>
menu<span style="color: #008000;">.</span><span style="color: #0000FF;">Items</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>item<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> 
<span style="color: #008080; font-style: italic;">// Add sub items to last menu item</span>
RadialMenuItem childItem <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> RadialMenuItem<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
childItem<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Sub menu 1&quot;</span><span style="color: #008000;">;</span>
childItem<span style="color: #008000;">.</span><span style="color: #0000FF;">Symbol</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\u</span>f012&quot;</span><span style="color: #008000;">;</span>
item<span style="color: #008000;">.</span><span style="color: #0000FF;">SubItems</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>childItem<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">// Add sub menu to its parent</span>
&nbsp;
childItem <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> RadialMenuItem<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
childItem<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Sub<span style="color: #008080; font-weight: bold;">\r</span><span style="color: #008080; font-weight: bold;">\n</span>menu 2&quot;</span><span style="color: #008000;">;</span>
childItem<span style="color: #008000;">.</span><span style="color: #0000FF;">Symbol</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\u</span>f013&quot;</span><span style="color: #008000;">;</span>
item<span style="color: #008000;">.</span><span style="color: #0000FF;">SubItems</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>childItem<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Controls</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>menu<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">// Adds menu to the form</span></pre></div></div>

<p>VB:</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #151B8D; font-weight: bold;">Dim</span> menu <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #E56717; font-weight: bold;">New</span> DevComponents.DotNetBar.RadialMenu()
menu.Location = <span style="color: #E56717; font-weight: bold;">New</span> Point(32, 32)
menu.Symbol = ChrW(&amp;amp;HF040).ToString()
menu.Diameter = 220 <span style="color: #008000;">' Make menu diameter larger
</span><span style="color: #008000;">' Handle some events
</span>AddHandler menu.ItemClick, AddressOf RadialMenuItemClick
AddHandler menu.MenuOpened, AddressOf RadialMenuOpened
AddHandler menu.MenuClosed, AddressOf RadialMenuClosed
&nbsp;
<span style="color: #151B8D; font-weight: bold;">Dim</span> item <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #E56717; font-weight: bold;">New</span> RadialMenuItem()
item.Text = <span style="color: #800000;">&quot;Item 1&quot;</span>
item.Symbol = ChrW(&amp;amp;HF011).ToString()
menu.Items.Add(item)
&nbsp;
item = <span style="color: #E56717; font-weight: bold;">New</span> RadialMenuItem()
item.Text = <span style="color: #800000;">&quot;Item 2&quot;</span>
item.Symbol = ChrW(&amp;amp;HF00E).ToString()
menu.Items.Add(item)
&nbsp;
item = <span style="color: #E56717; font-weight: bold;">New</span> RadialMenuItem()
item.Text = <span style="color: #800000;">&quot;Item 3&quot;</span>
item.Symbol = ChrW(&amp;amp;HF010).ToString()
menu.Items.Add(item)
&nbsp;
<span style="color: #008000;">' Create spacer item
</span>item = <span style="color: #E56717; font-weight: bold;">New</span> RadialMenuItem()
menu.Items.Add(item)
&nbsp;
item = <span style="color: #E56717; font-weight: bold;">New</span> RadialMenuItem()
item.Text = <span style="color: #800000;">&quot;Item 4&quot;</span>
item.Symbol = ChrW(&amp;amp;HF011).ToString()
menu.Items.Add(item)
<span style="color: #008000;">' Add sub items to last menu item
</span><span style="color: #151B8D; font-weight: bold;">Dim</span> childItem <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #E56717; font-weight: bold;">New</span> RadialMenuItem()
childItem.Text = <span style="color: #800000;">&quot;Sub menu 1&quot;</span>
childItem.Symbol = ChrW(&amp;amp;HF012).ToString()
item.SubItems.Add(childItem) <span style="color: #008000;">' Add sub menu to its parent
</span>
childItem = <span style="color: #E56717; font-weight: bold;">New</span> RadialMenuItem()
childItem.Text = <span style="color: #800000;">&quot;Sub&quot;</span> &amp;amp; vbCrLf &amp;amp; <span style="color: #800000;">&quot;menu 2&quot;</span>
childItem.Symbol = ChrW(&amp;amp;HF013).ToString()
item.SubItems.Add(childItem)
&nbsp;
Me.Controls.Add(menu) ' Add menu <span style="color: #8D38C9; font-weight: bold;">to</span> the form</pre></div></div>



<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=748' rel='bookmark' title='Permanent Link: How to find CrumBarItem in CrumbBar control by name'>How to find CrumBarItem in CrumbBar control by name</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=1347' rel='bookmark' title='Permanent Link: How to change the ButtonItem.Symbol property using code'>How to change the ButtonItem.Symbol property using code</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=1245' rel='bookmark' title='Permanent Link: How to use ItemPanel Data-Binding Features &#8211; WinForms'>How to use ItemPanel Data-Binding Features &#8211; WinForms</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1363</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enumerate through all nodes in AdvTree control</title>
		<link>http://www.devcomponents.com/kb2/?p=1357</link>
		<comments>http://www.devcomponents.com/kb2/?p=1357#comments</comments>
		<pubDate>Mon, 14 Jan 2013 18:23:44 +0000</pubDate>
		<dc:creator>Maintainer</dc:creator>
				<category><![CDATA[DotNetBar for Windows Forms]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[advtree]]></category>
		<category><![CDATA[WinForms]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1357</guid>
		<description><![CDATA[You can use following code to enumerate through all nodes in DotNetBar for WinForms AdvTree control: C#: // Following code enumerates through all nodes and prints out node text to console foreach &#40;Node node in AllNodes&#40;advTree1.Nodes&#41;&#41; &#123; Console.WriteLine&#40;node.Text&#41;; &#125; &#160; // This is what makes flat access to tree nodes easy private static IEnumerable AllNodes&#40;NodeCollection [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=327' rel='bookmark' title='Permanent Link: AdvTree Drag &#038; Drop Events And Options'>AdvTree Drag &#038; Drop Events And Options</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=109' rel='bookmark' title='Permanent Link: How to accept external drag &#038; drop on AdvTree control'>How to accept external drag &#038; drop on AdvTree control</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=748' rel='bookmark' title='Permanent Link: How to find CrumBarItem in CrumbBar control by name'>How to find CrumBarItem in CrumbBar control by name</a></li>
</ol>]]></description>
				<content:encoded><![CDATA[<p>You can use following code to enumerate through all nodes in DotNetBar for WinForms AdvTree control:</p>
<p>C#:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">// Following code enumerates through all nodes and prints out node text to console</span>
<span style="color: #0600FF; font-weight: bold;">foreach</span> <span style="color: #008000;">&#40;</span>Node node <span style="color: #0600FF; font-weight: bold;">in</span> AllNodes<span style="color: #008000;">&#40;</span>advTree1<span style="color: #008000;">.</span><span style="color: #0000FF;">Nodes</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span>node<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">// This is what makes flat access to tree nodes easy</span>
<span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">static</span> IEnumerable AllNodes<span style="color: #008000;">&#40;</span>NodeCollection nodes<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</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>nodes<span style="color: #008000;">.</span><span style="color: #0000FF;">Count</span><span style="color: #008000;">;</span> i<span style="color: #008000;">++</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        Node node <span style="color: #008000;">=</span> nodes<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">yield</span> <span style="color: #0600FF; font-weight: bold;">return</span> node<span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>node<span style="color: #008000;">.</span><span style="color: #0000FF;">Nodes</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Count</span> <span style="color: #008000;">&gt;</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #0600FF; font-weight: bold;">foreach</span> <span style="color: #008000;">&#40;</span>Node item <span style="color: #0600FF; font-weight: bold;">in</span> AllNodes<span style="color: #008000;">&#40;</span>node<span style="color: #008000;">.</span><span style="color: #0000FF;">Nodes</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                <span style="color: #0600FF; font-weight: bold;">yield</span> <span style="color: #0600FF; font-weight: bold;">return</span> item<span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</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: #008000;">' Following code enumerates through all nodes and prints out node text to console
</span><span style="color: #8D38C9; font-weight: bold;">For</span> <span style="color: #8D38C9; font-weight: bold;">Each</span> node <span style="color: #151B8D; font-weight: bold;">As</span> Node <span style="color: #8D38C9; font-weight: bold;">In</span> AllNodes(advTree1.Nodes)
	Console.WriteLine(node.Text)
<span style="color: #8D38C9; font-weight: bold;">Next</span> node
&nbsp;
<span style="color: #008000;">' This is what makes flat access to tree nodes easy
</span><span style="color: #E56717; font-weight: bold;">Private</span> Shared Iterator <span style="color: #E56717; font-weight: bold;">Function</span> AllNodes(<span style="color: #151B8D; font-weight: bold;">ByVal</span> nodes <span style="color: #151B8D; font-weight: bold;">As</span> NodeCollection) <span style="color: #151B8D; font-weight: bold;">As</span> IEnumerable
	<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> nodes.Count - 1
		<span style="color: #151B8D; font-weight: bold;">Dim</span> node <span style="color: #151B8D; font-weight: bold;">As</span> Node = nodes(i)
		Yield node
		<span style="color: #8D38C9; font-weight: bold;">If</span> node.Nodes.Count &gt; 0 <span style="color: #8D38C9; font-weight: bold;">Then</span>
			<span style="color: #8D38C9; font-weight: bold;">For</span> <span style="color: #8D38C9; font-weight: bold;">Each</span> item <span style="color: #151B8D; font-weight: bold;">As</span> Node <span style="color: #8D38C9; font-weight: bold;">In</span> AllNodes(node.Nodes)
				Yield item
			<span style="color: #8D38C9; font-weight: bold;">Next</span> item
		<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
	<span style="color: #8D38C9; font-weight: bold;">Next</span> i
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Function</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=327' rel='bookmark' title='Permanent Link: AdvTree Drag &#038; Drop Events And Options'>AdvTree Drag &#038; Drop Events And Options</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=109' rel='bookmark' title='Permanent Link: How to accept external drag &#038; drop on AdvTree control'>How to accept external drag &#038; drop on AdvTree control</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=748' rel='bookmark' title='Permanent Link: How to find CrumBarItem in CrumbBar control by name'>How to find CrumBarItem in CrumbBar control by name</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1357</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change the ButtonItem.Symbol property using code</title>
		<link>http://www.devcomponents.com/kb2/?p=1347</link>
		<comments>http://www.devcomponents.com/kb2/?p=1347#comments</comments>
		<pubDate>Mon, 26 Nov 2012 18:28:14 +0000</pubDate>
		<dc:creator>Maintainer</dc:creator>
				<category><![CDATA[DotNetBar for Windows Forms]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[ButtonItem]]></category>
		<category><![CDATA[WinForms]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=1347</guid>
		<description><![CDATA[DotNetBar ButtonItem include built-in symbol library. At design-time symbols are set using visual editor provided for Symbol property which makes choice of symbol easy. From code however, you need to use symbol unicode. That code would look like this: C#: button.Symbol = &#34;\uf060&#34;; VB: button.Symbol = ChrW(&#38;Hf060) Here is the table with available symbols and [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=300' rel='bookmark' title='Permanent Link: How to Create Menu Using Code'>How to Create Menu Using Code</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=384' rel='bookmark' title='Permanent Link: How to Create Toolbars Using Code'>How to Create Toolbars Using Code</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=45' rel='bookmark' title='Permanent Link: Code generation for property failed'>Code generation for property failed</a></li>
</ol>]]></description>
				<content:encoded><![CDATA[<p>DotNetBar ButtonItem include built-in symbol library. At design-time symbols are set using visual editor provided for Symbol property which makes choice of symbol easy.</p>
<p>From code however, you need to use symbol unicode. That code would look like this:</p>
<p>C#:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">button<span style="color: #008000;">.</span><span style="color: #0000FF;">Symbol</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\u</span>f060&quot;</span><span style="color: #008000;">;</span></pre></div></div>

<p>VB:</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;">button.Symbol = ChrW(&amp;Hf060)</pre></div></div>

<p>Here is the table with available symbols and corresponding unicode values:</p>
<p><a href="http://www.devcomponents.com/kb2/wp-content/uploads/2012/11/ButtonItemSymbolMap.png"><img src="http://www.devcomponents.com/kb2/wp-content/uploads/2012/11/ButtonItemSymbolMap.png" alt="" title="DotNetBar Button Symbol Map" width="544" height="1096" class="alignnone size-full wp-image-1349" /></a></p>


<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=300' rel='bookmark' title='Permanent Link: How to Create Menu Using Code'>How to Create Menu Using Code</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=384' rel='bookmark' title='Permanent Link: How to Create Toolbars Using Code'>How to Create Toolbars Using Code</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=45' rel='bookmark' title='Permanent Link: Code generation for property failed'>Code generation for property failed</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1347</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ribbon Control re-sizing modes and support for different DPI settings</title>
		<link>http://www.devcomponents.com/kb2/?p=511</link>
		<comments>http://www.devcomponents.com/kb2/?p=511#comments</comments>
		<pubDate>Thu, 12 Jul 2012 18:29:53 +0000</pubDate>
		<dc:creator>Brian Tallman</dc:creator>
				<category><![CDATA[DotNetBar for Windows Forms]]></category>
		<category><![CDATA[Ribbon]]></category>

		<guid isPermaLink="false">http://www.devcomponents.com/kb2/?p=511</guid>
		<description><![CDATA[The RibbonControl by default has fixed height and its height needs to be adjusted manually if for example DPI settings on target machine change or usage of larger fonts is expected on target machines. Ribbon Control does not manage the height automatically since it does not have knowledge about the full ribbon height. There might [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=682' rel='bookmark' title='Permanent Link: How To Perform Custom Ribbon Merging'>How To Perform Custom Ribbon Merging</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=472' rel='bookmark' title='Permanent Link: Tips when working with Ribbon control from code'>Tips when working with Ribbon control from code</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=696' rel='bookmark' title='Permanent Link: How to loop through all ribbon tabs, ribbon bar and items on WinForms Ribbon control'>How to loop through all ribbon tabs, ribbon bar and items on WinForms Ribbon control</a></li>
</ol>]]></description>
				<content:encoded><![CDATA[<p>The RibbonControl by default has fixed height and its height needs to be adjusted manually if for example DPI settings on target machine change or usage of larger fonts is expected on target machines.</p>
<p>Ribbon Control does not manage the height automatically since it does not have knowledge about the full ribbon height. There might be items that you dynamically show, merged items from MDI Child forms etc. so it is developers responsibility to manage the height of the Ribbon.</p>
<p>The automatic scaling provided by Windows Forms is linear per control scaling. Since there are multiple RibbonBar controls on each Ribbon panel they will not scale the same due to the different content they have and Windows Forms framework does not know how to scale complex controls. For example the Image Size is fixed while the font size changes. That creates uneven non-linear sizing which is what you might see if you do not manage the height of the control.</p>
<p><strong>RibbonControl has two sizing modes:</strong></p>
<ol>
<li><strong>RibbonControl.AutoSize=false </strong>which means that you are in control of the height of the control. How do you manage the height is up to you. We recommend that you take a RibbonBar that you know that is tallest and determines the total height. Then use its RibbonBar.GetAutoSizeHeight() method to calculate the total height of the control. To that you can add RibbonControl.RibbonStrip.Height and also you might need to add couple of pixels to account for the borders, padding etc. This method should work very well if you use Form. AutoScaleMode = AutoScaleMode.Font</li>
<li><strong>RibbonControl.AutoSize=true </strong>which means we are managing the height of the control based on the content that it has, which also means that height might change when you switch from tab to tab due to different size of the RibbonBar controls on each tab. Most people do not prefer this mode since they want to control the height of the control and control height changes based on what is selected. Office 2007 Ribbon Design Guidelines also state that ribbon should be fixed in height so this property should not really be used if compliance with guidelines is needed.</li>
</ol>


<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=682' rel='bookmark' title='Permanent Link: How To Perform Custom Ribbon Merging'>How To Perform Custom Ribbon Merging</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=472' rel='bookmark' title='Permanent Link: Tips when working with Ribbon control from code'>Tips when working with Ribbon control from code</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=696' rel='bookmark' title='Permanent Link: How to loop through all ribbon tabs, ribbon bar and items on WinForms Ribbon control'>How to loop through all ribbon tabs, ribbon bar and items on WinForms Ribbon control</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=511</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is InitializeComponent() method and how to use it to learn how to create controls from code</title>
		<link>http://www.devcomponents.com/kb2/?p=1327</link>
		<comments>http://www.devcomponents.com/kb2/?p=1327#comments</comments>
		<pubDate>Mon, 18 Jun 2012 19:27:20 +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=1327</guid>
		<description><![CDATA[InitializeComponent() method in Visual Studio.NET C# or VB.NET is method that is automatically created and managed by Windows Forms designer and it defines everything you see on the form. Everything done on the form in VS.NET using designers generates code. Every single control added and property set will generate code and that code goes into [...]


Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=300' rel='bookmark' title='Permanent Link: How to Create Menu Using Code'>How to Create Menu Using Code</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=393' rel='bookmark' title='Permanent Link: How to Create/Remove Tabs Using Code'>How to Create/Remove Tabs Using Code</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=384' rel='bookmark' title='Permanent Link: How to Create Toolbars Using Code'>How to Create Toolbars Using Code</a></li>
</ol>]]></description>
				<content:encoded><![CDATA[<p><strong>InitializeComponent()</strong> method in Visual Studio.NET C# or VB.NET is method that is automatically created and managed by Windows Forms designer and it defines everything you see on the form. Everything done on the form in VS.NET using designers generates code. Every single control added and property set will generate code and that code goes into InitializeComponent() method.</p>
<p>When you run the app (or open the form in VS.NET), that code creates and configures controls just as you did in the designer. So every single change you make and control you add ends up in InitializeComponent() method. This means that doing things at design-time and run-time is essentially the same. Note that you should not modify this method manually since it might confuse the VS.NET designer. However you should use it to learn how to do things from code and how to setup controls and components correctly.</p>
<p>In C# access to this method is always visible through form constructor. Simply position the cursor in InitializeComponent method call and press F12 in VS.NET and Form .designer file will open to show the implementation of the InitializeComponent method.</p>
<p>In VB.NET the Visual Studio hides the access to InitializeComponent method. Actual method implementation is in Form.designer.vb file for that form. File is accessible via Solution Explorer once you have clicked on the <strong>Show All Files</strong> toolbar button which you can find on top of the Solution Explorer window. Following video shows how to do this:<br />
<!-- copy and paste. Modify height and width if desired. -->       <object id="scPlayer"  width="640" height="342" type="application/x-shockwave-flash" data="http://content.screencast.com/users/devco/folders/Jing/media/fe7f7558-c1e0-4dbe-9e95-98e31a63cb70/scplayer.swf" ><param name="movie" value="http://content.screencast.com/users/devco/folders/Jing/media/fe7f7558-c1e0-4dbe-9e95-98e31a63cb70/scplayer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="thumb=http://content.screencast.com/users/devco/folders/Jing/media/fe7f7558-c1e0-4dbe-9e95-98e31a63cb70/FirstFrame.jpg&#038;containerwidth=640&#038;containerheight=342&#038;autohide=true&#038;autostart=false&#038;loop=false&#038;showendscreen=true&#038;showsearch=true&#038;showstartscreen=true&#038;tocdoc=float&#038;xmp=sc.xmp&#038;content=http://content.screencast.com/users/devco/folders/Jing/media/fe7f7558-c1e0-4dbe-9e95-98e31a63cb70/InitializeComponent.mp4&#038;blurover=false" /><param name="allowFullScreen" value="true" /><param name="scale" value="showall" /><param name="allowScriptAccess" value="always" /><param name="base" value="http://content.screencast.com/users/devco/folders/Jing/media/fe7f7558-c1e0-4dbe-9e95-98e31a63cb70/" /><iframe type="text/html" frameborder="0" scrolling="no" style="overflow:hidden;" src="http://www.screencast.com/users/devco/folders/Jing/media/fe7f7558-c1e0-4dbe-9e95-98e31a63cb70/embed" height="342" width="640" ></iframe></object></p>
<p>So if you want to find out how to create controls or setup things from code you can easily discover how to do that by doing what you want to do from code in VS.NET designer, say adding controls to the form and changing their properties, then you go to InitializeComponent() method and look through code that is generated and which shows how to create everything you see on the form. The easiest is to start with new form and simply add the controls to it and change their properties then go to InitializeComponent method to see how its done from code.</p>


<p>Related posts:<ol><li><a href='http://www.devcomponents.com/kb2/?p=300' rel='bookmark' title='Permanent Link: How to Create Menu Using Code'>How to Create Menu Using Code</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=393' rel='bookmark' title='Permanent Link: How to Create/Remove Tabs Using Code'>How to Create/Remove Tabs Using Code</a></li>
<li><a href='http://www.devcomponents.com/kb2/?p=384' rel='bookmark' title='Permanent Link: How to Create Toolbars Using Code'>How to Create Toolbars Using Code</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.devcomponents.com/kb2/?feed=rss2&#038;p=1327</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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 custom columns when binding data to AdvTree How [...]


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=1376' rel='bookmark' title='Permanent Link: How to create custom columns when binding data to AdvTree'>How to create custom columns when binding data to AdvTree</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>
</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=1376' rel='bookmark' title='Permanent Link: How to create custom columns when binding data to AdvTree'>How to create custom columns when binding data to AdvTree</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>
</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>
	</channel>
</rss>
