<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://community.devexpress.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">The Progress Bar - DevExpress XPF Blog</title><subtitle type="html" /><id>http://community.devexpress.com/blogs/theprogressbar/atom.aspx</id><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/default.aspx" /><link rel="self" type="application/atom+xml" href="http://community.devexpress.com/blogs/theprogressbar/atom.aspx" /><generator uri="http://communityserver.org" version="3.1.30415.43">Community Server</generator><updated>2011-05-04T12:00:26Z</updated><entry><title>WPF and Silverlight Themes – Introducing the Seven Theme</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/08/23/wpf-and-silverlight-themes-introducing-the-seven-theme.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/08/23/wpf-and-silverlight-themes-introducing-the-seven-theme.aspx</id><published>2011-08-23T22:48:37Z</published><updated>2011-08-23T22:48:37Z</updated><content type="html">&lt;p&gt;As part of our continuous effort to enhance the visual experience of using our WPF and Silverlight controls, we have been working hard to complement our products with new themes. With the latest release of DXperience vol 2011 v1.7, we have introduced the new “Seven” theme, which matches (but doesn&amp;#39;t completely imitate) the appearance of the Microsoft Windows 7 operating system. This elegant theme can be immediately applied to your WPF and Silverlight based business applications.&lt;/p&gt;  &lt;p&gt;Here are some screenshots to demonstrate the look and feel of the theme:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="docking-layout" border="0" alt="docking-layout" src="http://community.devexpress.com/blogs/theprogressbar/docking-layout_676F7856.png" width="680" height="452" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="grid-card-view" border="0" alt="grid-card-view" src="http://community.devexpress.com/blogs/theprogressbar/grid-card-view_1ED58985.png" width="563" height="517" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="docking-dashboard" border="0" alt="docking-dashboard" src="http://community.devexpress.com/blogs/theprogressbar/docking-dashboard_7D75E3E8.png" width="639" height="518" /&gt;&lt;/p&gt;      &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="grid-using-printing-templates" border="0" alt="grid-using-printing-templates" src="http://community.devexpress.com/blogs/theprogressbar/grid-using-printing-templates_7439A8A7.png" width="555" height="535" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="pivot-field-customization" border="0" alt="pivot-field-customization" src="http://community.devexpress.com/blogs/theprogressbar/pivot-field-customization_2650D325.png" width="581" height="392" /&gt;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=352432" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author><category term="Silverlight" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Silverlight/default.aspx" /><category term="Themes" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Themes/default.aspx" /><category term="WPF" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/WPF/default.aspx" /></entry><entry><title>WPF Data Grid Control – PLINQ Data Support</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/08/22/wpf-data-grid-control-plinq-data-support.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/08/22/wpf-data-grid-control-plinq-data-support.aspx</id><published>2011-08-22T20:53:54Z</published><updated>2011-08-22T20:53:54Z</updated><content type="html">&lt;p&gt;Starting with the latest v2011 vol1 update (11.1.7), we have introduced PLINQ data source support for the DXGrid Control for WPF. The DevExpress Data Grid for WPF can now operate on any in-memory&lt;i&gt; IEnumerable&lt;/i&gt; data sources using Parallel LINQ (PLINQ), improving performance for data-intensive operations (e.g. sorting, grouping, filtering, summary calculation, etc.) by making full use of all the available processors/cores on the system.&lt;/p&gt;  &lt;p&gt;For this, DevExpress offers two new components (PLINQ data sources), each designed to address a specific data-processing mode (&lt;u&gt;&lt;a href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/03/01/wpf-grid-control-and-the-new-instant-feedback-ui-mode-coming-in-v2011-1.aspx" target="_blank"&gt;synchronous and asynchronous&lt;/a&gt;&lt;/u&gt;) – &lt;i&gt;PLinqServerModeDataSource&lt;/i&gt; and &lt;i&gt;PLinqInstantFeedbackDataSource&lt;/i&gt;, respectively.&lt;/p&gt;  &lt;p&gt;To make it easier for you to access and use them at design-time, both data sources are presented in WPF Designer Toolbox. Note that these are non-visual components for WPF.&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="DevExpress_WPF_Grid_PLINQ" border="0" alt="DevExpress_WPF_Grid_PLINQ" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_WPF_Grid_PLINQ_75A41EBC.png" width="617" height="370" /&gt;&lt;/p&gt;  &lt;p&gt;To get started with enabling support for Parallel LINQ, you should specify the source collection for a PLINQ data source and bind it to the grid. The source collection must implement &lt;i&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/i&gt;. The exact type of its elements should not be specified as the type is automatically evaluated at runtime.&lt;/p&gt;  &lt;p&gt;There are three ways to specify the source collection:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Use the &lt;b&gt;ItemsSource&lt;/b&gt; property if a source collection implements &lt;i&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/i&gt; &lt;/li&gt;    &lt;li&gt;Use the &lt;b&gt;ListSource&lt;/b&gt; property if a source collection implements &lt;i&gt;IListSource&lt;/i&gt;. &lt;/li&gt;    &lt;li&gt;If &lt;i&gt;PLinqInstantFeedbackDataSource&lt;/i&gt; is used, you can dynamically specify the source collection within the &lt;b&gt;GetEnumerable&lt;/b&gt; event handler. &lt;/li&gt; &lt;/ol&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:539724df-b16f-4181-a93a-6cb955cc53c5" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dx&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;PLinqInstantFeedbackDataSource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;pLinqInstantSource&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; ListSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Path&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=DataContext.ListSource}&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridControl&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;grid&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; ItemsSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; ElementName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=pLinqInstantSource,&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Path&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=Data}&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;When using &lt;i&gt;PLinqInstantFeedbackDataSource&lt;/i&gt;, the source collection can be dynamically populated by the &lt;i&gt;IListSource.GetList() &lt;/i&gt;method or within the &lt;i&gt;GetEnumerable&lt;/i&gt; event handler. In these instances, data objects are loaded in a separate thread, allowing you to perform time-consuming operations (e.g. create large volumes of data) without UI freezing. You should however ensure that the operations remain thread safe.&lt;/p&gt;  &lt;p&gt;One thing to be aware of when using &lt;i&gt;PLinqInstantFeedbackDataSource&lt;/i&gt;, is that this PLINQ data source must be disposed of to terminate the processing thread and release all the resources that it owns. This can be done either by calling its &lt;b&gt;Dispose&lt;/b&gt;() method or by executing &lt;b&gt;DisposeCommand&lt;/b&gt;. For instance, you can execute this command in an MVVM-friendly manner using &lt;i&gt;EventTrigger&lt;/i&gt; after a window has been closed (Example: &lt;a href="http://www.devexpress.com/example=E3382"&gt;http://www.devexpress.com/example=E3382&lt;/a&gt;).&lt;/p&gt;    &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:3dc5154a-1b14-4fbc-a9ac-b9b7b2556dd5" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;i&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Interaction.Triggers&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;i&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;EventTrigger&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; EventName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Closed&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;i&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;InvokeCommandAction&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Command&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; ElementName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=pLinqInstantSource,&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Path&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=DisposeCommand}&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;i&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;EventTrigger&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;i&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Interaction.Triggers&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;    &lt;p&gt;Our PLINQ data sources provide properties (&lt;i&gt;DefaultSorting&lt;/i&gt;, &lt;i&gt;AreSourceRowsThreadSafe&lt;/i&gt;), allowing you to specify default sorting and whether data objects in a source collection are thread safe.&lt;/p&gt;  &lt;p&gt;Since PLINQ is not implemented in Silverlight, we’ve introduced a new data source for Silverlight – &lt;i&gt;LinqToObjectsInstantFeedbackDataSource&lt;/i&gt;, which processes in-memory data in Instant Feedback&lt;sup&gt;TM&lt;/sup&gt; UI Mode. This data source is similar to &lt;i&gt;PLinqInstantFeedbackDataSource&lt;/i&gt; for WPF. The only difference is that all data-intensive tasks (sorting, grouping, etc.) are run in a single separate thread (Example: &lt;a href="http://www.devexpress.com/example=E3383"&gt;http://www.devexpress.com/example=E3383&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;&lt;i&gt;PLinqServerModeDataSource&lt;/i&gt; and &lt;i&gt;PLinqInstantFeedbackDataSource&lt;/i&gt; are WPF specific wrappers around &lt;i&gt;PLinqServerModeSource&lt;/i&gt; and &lt;i&gt;PLinqInstantFeedbackSource&lt;/i&gt;. These two data sources are not platform-dependent and can be bound to DevExpress data-aware controls (e.g. XtraGrid) in WinForms applications. &lt;i&gt;PLinqServerModeSource&lt;/i&gt; can also be used with DevExpress ASPxGridView control in ASP.NET applications.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Benchmark Test&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;We’ve made an internal performance testing on Intel Core i5 4-cores processor that compares the performance of the DevExpress WPF Data Grid control bound to &lt;i&gt;PLinqServerModeDataSource&lt;/i&gt; and plain &lt;i&gt;List&amp;lt;T&amp;gt;&lt;/i&gt;. The source collection has included 10,000,000 records.&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PLINQ_Performance_Table" border="0" alt="PLINQ_Performance_Table" src="http://community.devexpress.com/blogs/theprogressbar/PLINQ_Performance_Table_5B63B598.png" width="761" height="119" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;embed src="http://community.devexpress.com/blogs/theprogressbar/emilm/xpf/dxgrid-plinq-support.swf" width="640" type="application/x-shockwave-flash" height="468"&gt;&lt;/embed&gt;&lt;/p&gt;  &lt;p&gt;This superb performance has been achieved by using compiled lambda-expressions in our PLINQ data sources.&lt;/p&gt;  &lt;p&gt;The test application for this demo is available on CodeCentral: &lt;a href="http://www.devexpress.com/example=E3382"&gt;http://www.devexpress.com/example=E3382&lt;/a&gt;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=352310" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author></entry><entry><title>WPF &amp; Silverlight Tree List Control - Tree Derivation Modes</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/08/22/wpf-amp-silverlight-tree-list-control-tree-derivation-modes.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/08/22/wpf-amp-silverlight-tree-list-control-tree-derivation-modes.aspx</id><published>2011-08-22T20:27:45Z</published><updated>2011-08-22T20:27:45Z</updated><content type="html">&lt;p&gt;In data bound mode, the TreeListView can display information in a tree from either self-referential (flat) or hierarchical data structure. For each type of data structure, corresponding tree derivation mode(s) can be specified using the &lt;b&gt;TreeDerivationMode&lt;/b&gt; property:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="DevExpress_Silverlight_WPF_Grid_Tree_Derivation" border="0" alt="DevExpress_Silverlight_WPF_Grid_Tree_Derivation" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_Silverlight_WPF_Grid_Tree_Derivation_48A07E09.png" width="612" height="146" /&gt;&lt;/p&gt;  &lt;h3&gt;Self-Referential Data Structure&lt;/h3&gt;  &lt;p&gt;This data structure (e.g. a table or list of business objects) should contain two special (service) fields:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;i&gt;&lt;strong&gt;Key Field&lt;/strong&gt;         &lt;br /&gt;        &lt;br /&gt;&lt;/i&gt;This field must contain unique values used to identify nodes. Its name should be assigned to the &lt;u&gt;&lt;strong&gt;TreeListView.KeyFieldName&lt;/strong&gt;&lt;/u&gt; property.       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;i&gt;&lt;strong&gt;Parent Field&lt;/strong&gt;         &lt;br /&gt;        &lt;br /&gt;&lt;/i&gt;This field contains values (pointers) that reference parent nodes. Its name should be assigned to the &lt;u&gt;&lt;strong&gt;TreeListView.ParentFieldName&lt;/strong&gt;&lt;/u&gt; property. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The only requirement is that service fields must contain data of the same type.&lt;/p&gt;  &lt;p&gt;The image below illustrates how the TreeListView generates a tree based on &lt;i&gt;Key&lt;/i&gt;-&lt;i&gt;Parent&lt;/i&gt; pairs:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="Tree_Generation" border="0" alt="Tree_Generation" src="http://community.devexpress.com/blogs/theprogressbar/Tree_Generation_79BFB8A9.png" width="787" height="482" /&gt;&lt;/p&gt;  &lt;p&gt;An example can be found on CodeCentral: &lt;a href="http://www.devexpress.com/example=E3127"&gt;http://www.devexpress.com/example=E3127&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Hierarchical Data Structure&lt;/h3&gt;  &lt;p&gt;In this context, a hierarchical data structure is any set of nested business objects that have a structure where the children of a node are in a ‘&lt;i&gt;children’&lt;/i&gt; field. Parents and children can be different object types.&lt;/p&gt;  &lt;p&gt;Assume a &lt;i&gt;Project-Stage-Task&lt;/i&gt; business class structure:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:cba585d6-62f4-4158-bd2e-a457ad9ef769" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;ProjectObject&lt;/span&gt; : BaseObject&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; ObservableCollection&amp;lt;&lt;span style="color:#2b91af;"&gt;ProjectStage&lt;/span&gt;&amp;gt; Stages { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;ProjectStage&lt;/span&gt; : BaseObject&lt;/li&gt; &lt;li&gt;{&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; ObservableCollection&amp;lt;&lt;span style="color:#2b91af;"&gt;Task&lt;/span&gt;&amp;gt; Tasks { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li&gt;}&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Task&lt;/span&gt; : BaseObject&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;    State state;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#008000;"&gt;// ...&lt;/span&gt;&lt;/li&gt; &lt;li&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;When working with such data structures, the tree list’s ItemsSource contains only data items that correspond to root nodes. In the example above, these are &lt;i&gt;ProjectObject &lt;/i&gt;items.&lt;/p&gt;  &lt;p&gt;To display the entire hierarchy, you can use one of the two approaches offered by the DevExpress TreeList Control:&lt;/p&gt;  &lt;p&gt;&lt;b&gt;1. &lt;/b&gt;&lt;b&gt;Using Hierarchical Data Templates&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;With this option, you can take advantage of hierarchical data templates:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a9a3ab55-ba5d-42dd-b456-f319b22851e3" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;UserControl.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ResourceDictionary&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;CustomHierarchicalDataTemplateSelector&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;selector&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;            &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;CustomHierarchicalDataTemplateSelector.ProjectDataTemplate&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;sdk&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;HierarchicalDataTemplate&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; ItemsSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Path&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=Stages}&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;            &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;CustomHierarchicalDataTemplateSelector.ProjectDataTemplate&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;CustomHierarchicalDataTemplateSelector.ProjectStageDataTemplate&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;sdk&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;HierarchicalDataTemplate&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; ItemsSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Path&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=Tasks}&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;CustomHierarchicalDataTemplateSelector.ProjectStageDataTemplate&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;CustomHierarchicalDataTemplateSelector&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ResourceDictionary&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;UserControl.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Create a template selector which implements &lt;i&gt;System.Windows.Controls.DataTemplateSelector&lt;/i&gt; and override the &lt;b&gt;SelectTemplate&lt;/b&gt; method.&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:60243f5f-9b10-4f28-b518-141f99951d45" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;CustomHierarchicalDataTemplateSelector&lt;/span&gt; : &lt;span style="color:#2b91af;"&gt;DataTemplateSelector&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;HierarchicalDataTemplate&lt;/span&gt; ProjectDataTemplate { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;HierarchicalDataTemplate&lt;/span&gt; ProjectStageDataTemplate { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; System.Windows.&lt;span style="color:#2b91af;"&gt;DataTemplate&lt;/span&gt; SelectTemplate(&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; item, System.Windows.&lt;span style="color:#2b91af;"&gt;DependencyObject&lt;/span&gt; container)&lt;/li&gt; &lt;li&gt;    {&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (item &lt;span style="color:#0000ff;"&gt;is&lt;/span&gt; ProjectObject)&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; ProjectDataTemplate;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (item &lt;span style="color:#0000ff;"&gt;is&lt;/span&gt; ProjectStage)&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; ProjectStageDataTemplate;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;;&lt;/li&gt; &lt;li&gt;    }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Assign the template selector to the TreeListView’s &lt;b&gt;DataRowTemplateSelector&lt;/b&gt; property and switch to &lt;i&gt;HierarchicalDataTemplate&lt;/i&gt; tree derivation mode:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:2a417e6b-6bcb-44d4-93f2-9cb30771b71f" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListControl.View&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListView&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; DataRowTemplateSelector&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; selector}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                       &lt;span style="color:#ff0000;"&gt; TreeDerivationMode&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;HierarchicalDataTemplate&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListControl.View&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;If all business objects have the same ‘&lt;i&gt;children’&lt;/i&gt; field, create a single template and assign it to the TreeListView’s &lt;b&gt;DataRowTemplate&lt;/b&gt; property.&lt;/p&gt;  &lt;p&gt;In WPF, you can define hierarchical data templates without a key in your resources. Instead, you specify the data type it should be applied to, like this:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e7f566f0-d167-4373-ae27-4d97e7794d7d" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ResourceDictionary&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;HierarchicalDataTemplate&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; DataType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Type&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;ProjectObject}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; ItemsSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Path&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=Stages}&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;HierarchicalDataTemplate&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; DataType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Type&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;ProjectStage}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; ItemsSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Path&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=Tasks}&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ResourceDictionary&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListControl.View&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListView&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; TreeDerivationMode&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;HierarchicalDataTemplate&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListControl.View&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt; &lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&lt;u&gt;How does the TreeListView select a template?&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;First, the TreeListView verifies its &lt;b&gt;DataRowTemplateSelector&lt;/b&gt; property. If the specified node selector returns &lt;i&gt;null&lt;/i&gt; or the &lt;b&gt;DataRowTemplateSelector&lt;/b&gt; property is not specified, a template specified by the &lt;b&gt;DataRowTemplate&lt;/b&gt; property is used. If this property is not specified, an implicit hierarchical data template is used.&lt;/p&gt;  &lt;p&gt;Once the required HierarchicalDataTemplate is defined for a node, its &lt;b&gt;ItemTemplate&lt;/b&gt; and &lt;b&gt;ItemTemplateSelector&lt;/b&gt; properties take priority over the corresponding properties specified by the TreeListView (&lt;b&gt;DataRowTemplate&lt;/b&gt; and &lt;b&gt;DataRowTemplateSelector&lt;/b&gt;).&lt;/p&gt;  &lt;p&gt;Examples of these are available for WPF and Silverlight: &lt;a href="http://www.devexpress.com/example=E3410"&gt;http://www.devexpress.com/example=E3410&lt;/a&gt; (WPF), &lt;a href="http://www.devexpress.com/example=E3411"&gt;http://www.devexpress.com/example=E3411&lt;/a&gt; (Silverlight)&lt;/p&gt;  &lt;p&gt;&lt;b&gt;2. &lt;/b&gt;&lt;b&gt;Building a Tree in ‘Code Behind’&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;In this case, you should manually write code to specify where a data object’s child items come from. So, create a selector class which implements &lt;i&gt;DevExpress.Xpf.Grid.IChildNodeSelector&lt;/i&gt; and returns the list of child nodes for the specified node.&lt;/p&gt;  &lt;p&gt;For the &lt;i&gt;Project-Stage-Task&lt;/i&gt; business class structure, a selector class will be as follows:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:ccf91aff-5aa3-4413-b3b8-b08003feea22" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;CustomChildrenSelector&lt;/span&gt; : IChildNodesSelector&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; IEnumerable SelectChildren(&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; item)&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    {&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (item &lt;span style="color:#0000ff;"&gt;is&lt;/span&gt; ProjectStage)&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; ((ProjectStage)item).Tasks;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (item &lt;span style="color:#0000ff;"&gt;is&lt;/span&gt; ProjectObject)&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; ((ProjectObject)item).Stages;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    }&lt;/li&gt; &lt;li&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Finally, you should assign the Child Nodes Selector to the TreeListView’s &lt;b&gt;ChildNodesSelector&lt;/b&gt; property and set the &lt;b&gt;TreeDerivationMode&lt;/b&gt; property to &lt;i&gt;ChildNodeSelector&lt;/i&gt;.&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:c62b7cf2-ce37-48fe-9474-202b1573a8a3" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListControl&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;treeList&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                       &lt;span style="color:#ff0000;"&gt; ItemsSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; DataItems}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                       &lt;span style="color:#ff0000;"&gt; DataContext&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; viewModel}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListControl.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;CustomChildrenSelector&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;childrenSelector&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListControl.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListControl.Columns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListColumn&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; FieldName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Name&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListColumn&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; FieldName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Executor&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListColumn&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; FieldName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;State&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListControl.Columns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListControl.View&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListView&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;view&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; TreeDerivationMode&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ChildNodesSelector&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                           &lt;span style="color:#ff0000;"&gt; ChildNodesSelector&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; childrenSelector}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListControl.View&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TreeListControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;If all business objects have the same ‘&lt;i&gt;children’&lt;/i&gt; field, assign its name to the TreeListView’s &lt;b&gt;ChildNodesPath&lt;/b&gt; property. Otherwise, a Child Nodes Selector should be created.&lt;/p&gt;  &lt;p&gt;An example of this is also available CodeCentral: &lt;a href="http://www.devexpress.com/example=E3298"&gt;http://www.devexpress.com/example=E3298&lt;/a&gt;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=352307" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author></entry><entry><title>MVVM Enhancements in WPF and Silverlight versions of Toolbar, Ribbon and Gallery Controls</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/08/03/mvvm-enhancements-in-wpf-and-silverlight-versions-of-toolbar-menu-and-gallery-controls.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/08/03/mvvm-enhancements-in-wpf-and-silverlight-versions-of-toolbar-menu-and-gallery-controls.aspx</id><published>2011-08-03T20:42:00Z</published><updated>2011-08-03T20:42:00Z</updated><content type="html">&lt;p&gt;In my &lt;a href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/07/19/wpf-and-silverlight-data-grid-mvvm-enhancements.aspx"&gt;previous blog post&lt;/a&gt;, I introduced the enhanced MVVM support for our WPF &amp;amp; Silverlight Data Grid Control to enable binding for column and summary creation. In this post, I’ll introduce new improvements in three of our other Silverlight and WPF components - DXBars, DXRibbon and GalleryControl. These features make it easy to use the controls when building applications following the MVVM pattern.&lt;/p&gt;  &lt;p&gt;The main scenario addressed by this new feature is the automatic generation of visual objects in DXBars, DXRibbon and GalleryControl based on data provided by underlying objects (i.e. by View Model classes).&lt;/p&gt;  &lt;p&gt;For the BarManager, the ideal MVVM support case would be as follows: The developer provides 1) a collection of objects each of which describes a toolbar and 2) a collection describing bar commands. As a result the BarManager automatically generates bars and populates them with bar items based on the provided data. &lt;/p&gt;  &lt;p&gt;As an example, let&amp;#39;s see how one could write an application using the BarManager and the MVVM pattern prior to the introduction of the enhanced features. Here is the markup that creates bars from an underlying collection: &lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e7c8069a-edc2-439b-a3be-43d992b86ab6" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;UserControl.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;MyBarModelToBarValueConverter&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;barValueConverter&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;UserControl.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Grid&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxb&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;BarManager&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;barManager1&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Grid&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxb&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;BarContainerControl&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; ItemsSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Path&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=BarsCollecton,&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Converter&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;={&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; barValueConverter}}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Grid&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxb&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;BarManager&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Grid&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;In the code, a bar container is populated with bars from a BarsCollection, which is a View Model class. At first glance, this code looks quite simple. However, if you go deeper you will see that it requires additional code to be written:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A custom ValueConverter that will convert collection elements into bar objects &lt;/li&gt;    &lt;li&gt;Code that initializes a bar&amp;#39;s properties via data binding &lt;/li&gt;    &lt;li&gt;Code that synchronizes the bar collection and underlying View Model collection &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;That’s not all though as the Bar’s own bar items will also need to be populated from another View Model collection. Therefore an additional ValueConverter must be implemented to convert collection elements into bar items. The code complexity increases with increasing the hierarchy level of children in a control. For instance, in DXRibbon, a four level hierarchy will need to be dealt with – requiring more complex code in your project.&lt;/p&gt;  &lt;p&gt;So, we looked at these scenarios and made some changes to our controls to make it easier to work with them using the MVVM pattern. &lt;/p&gt;  &lt;p&gt;Let’s start with the new properties we’ve added to our DXBars, DXRibbon and GalleryControl controls:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;ItemsSource&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;ItemStyle&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;ItemTemplate&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;ItemTemplateSelector&lt;/strong&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;All controls will follow the same naming convention for these properties.&lt;/p&gt;  &lt;p&gt;Using these properties you can easily generate a control&amp;#39;s items (including nested items) from collections by writing only XAML code, with one exception - code for TemplateSelectors should be written in code-behind files.&lt;/p&gt;  &lt;p&gt;So let’s take a look at a View Model that contains a Bars collection:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:abab7783-34ee-435b-bda2-06f7f6a9447b" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:500px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;BarManagerViewModel&lt;/span&gt; : &lt;span style="color:#2b91af;"&gt;DependencyObject&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;readonly&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;DependencyProperty&lt;/span&gt; BarsProperty =&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#2b91af;"&gt;DependencyProperty&lt;/span&gt;.Register(&lt;span style="color:#a31515;"&gt;&amp;quot;Bars&amp;quot;&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;typeof&lt;/span&gt;(ObservableCollection&amp;lt;BarViewModel&amp;gt;), &lt;span style="color:#0000ff;"&gt;typeof&lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;BarManagerViewModel&lt;/span&gt;), &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;PropertyMetadata&lt;/span&gt;(&lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;));&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; ObservableCollection&amp;lt;BarViewModel&amp;gt; Bars&lt;/li&gt; &lt;li&gt;    {&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt; { &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; (ObservableCollection&amp;lt;BarViewModel&amp;gt;)GetValue(BarsProperty); }&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt; { SetValue(BarsProperty, &lt;span style="color:#0000ff;"&gt;value&lt;/span&gt;); }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    }&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#008000;"&gt;//...&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Then suppose we also have another View Model that provides items for bars:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e0603f3d-526d-4007-91c1-efd2093a143d" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;BarViewModel&lt;/span&gt; : BarViewModelBase&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;readonly&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;DependencyProperty&lt;/span&gt; CommandsProperty;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; BarViewModel()&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    {&lt;/li&gt; &lt;li&gt;        CommandsProperty = &lt;span style="color:#2b91af;"&gt;DependencyProperty&lt;/span&gt;.Register(&lt;span style="color:#a31515;"&gt;&amp;quot;Commands&amp;quot;&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;typeof&lt;/span&gt;(ObservableCollection&amp;lt;BarCommand&amp;gt;), &lt;span style="color:#0000ff;"&gt;typeof&lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;BarViewModel&lt;/span&gt;), &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;PropertyMetadata&lt;/span&gt;(&lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;));&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    }&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; ObservableCollection&amp;lt;BarCommand&amp;gt; Commands&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    {&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt; { &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; ((ObservableCollection&amp;lt;BarCommand&amp;gt;)GetValue(CommandsProperty)); }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt; { SetValue(CommandsProperty, &lt;span style="color:#0000ff;"&gt;value&lt;/span&gt;); }&lt;/li&gt; &lt;li&gt;    }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#008000;"&gt;//...&lt;/span&gt;&lt;/li&gt; &lt;li&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;In the code, we&amp;#39;ll set a DataContext for the main window to BarManagerViewModel. This DataContext will be propagated to window&amp;#39;s children, including a BarManager component:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4a3b5bb5-0e04-4699-b305-0a6f0d731df6" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt; &lt;li&gt;BarManagerViewModel viewModel = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; BarManagerViewModel();&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.DataContext = viewModel;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Once we ensure that the BarManager gets the correct DataContext, we can populate a BarManager from the BarManagerViewModel.Bars collection using data binding:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:ce7c928c-ad6b-4b61-914c-6af8f8058576" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;BarsDemoModule.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DataTemplate&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;barTemplate&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ContentControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;            &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxb&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Bar&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Caption&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Name}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                    &lt;span style="color:#ff0000;"&gt; ItemLinksSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Commands}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ContentControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DataTemplate&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;BarsDemoModule.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxdb&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DemoModuleControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Grid&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxb&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;BarManager&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;           &lt;span style="color:#ff0000;"&gt; BarsSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Bars}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;           &lt;span style="color:#ff0000;"&gt; BarTemplate&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; barTemplate}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;       &lt;span style="color:#0000ff;"&gt; /&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Grid&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxdb&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DemoModuleControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;In this example, a DataTemplate is used to generate each bar from an underlying View Model (BarViewModel). You’ll notice that BarManagerViewModel.Bars is a collection of BarViewModel objects – this collection&amp;#39;s objects are automatically assigned to the DataTemplate&amp;#39;s DataContext, allowing us to initialize a bar&amp;#39;s settings with properties on BarViewModel. &lt;/p&gt;  &lt;p&gt;When defining a DataTemplate for a Bar, the DataTemplate&amp;#39;s root element must be ContentControl with a Bar object as the content. &lt;/p&gt;  &lt;p&gt;It is also possible to define a style that will be automatically applied to each bar created via a template. For instance, in the markup below, a style defines an item template selector (an object that selects templates for bar items based on your logic).&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:aac44849-01b4-4756-b120-a5d82e116db1" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;BarCommandTemplateSelector&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;itemTemplateSelector&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;barStyle&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; TargetType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;dxb:Bar&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Setter&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Property&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ItemTemplateSelector&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; itemTemplateSelector}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxb&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;BarManager&lt;/span&gt; &lt;/li&gt; &lt;li&gt;   &lt;span style="color:#ff0000;"&gt; BarsSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Bars}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt; &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;   &lt;span style="color:#ff0000;"&gt; BarTemplate&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; barTemplate}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;   &lt;span style="color:#ff0000;"&gt; BarStyle&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; barStyle}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;As seen above, all bindings between View Models and View are set up in XAML, without using code-behind files. However, there is one exception: template selectors must be written in code-behind files. The BarCommandTemplateSelector below chooses between two DataTemplates (subItemTemplate or itemTemplate) based on our model:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:739b74a2-0abb-4361-ac50-8a817d64f343" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;BarCommandTemplateSelector&lt;/span&gt; : &lt;span style="color:#2b91af;"&gt;DataTemplateSelector&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;DataTemplate&lt;/span&gt; SelectTemplate(&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; item, &lt;span style="color:#2b91af;"&gt;DependencyObject&lt;/span&gt; container)&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    {&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (item &lt;span style="color:#0000ff;"&gt;is&lt;/span&gt; BarSubMenuCommand) &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;DataTemplate&lt;/span&gt;)MVVMBar.SharedResources[&lt;span style="color:#a31515;"&gt;&amp;quot;subItemTemplate&amp;quot;&lt;/span&gt;];&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;DataTemplate&lt;/span&gt;)MVVMBar.SharedResources[&lt;span style="color:#a31515;"&gt;&amp;quot;itemTemplate&amp;quot;&lt;/span&gt;];&lt;/li&gt; &lt;li&gt;    }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;The complete code of this sample can be found in the &amp;quot;MVVM Bars&amp;quot; demos for WPF and Silverlight shipped with the installation.&lt;/p&gt;  &lt;p&gt;The described approach is extremely efficient and can also be applied when writing MVVM applications with the DXRibbon and GalleryControl. These controls provide corresponding properties (&lt;strong&gt;ItemsSource&lt;/strong&gt;, &lt;strong&gt;ItemStyle&lt;/strong&gt;, &lt;strong&gt;ItemTemplate&lt;/strong&gt; and &lt;strong&gt;ItemTemplateSelector&lt;/strong&gt;) that allow the controls to be populated with items from underlying collections.&lt;/p&gt;  &lt;p&gt;For implementation details, you may refer to the &amp;quot;MVVM Ribbon&amp;quot; demos for WPF and Silverlight included in the installation. The online demos can be launched from our Demo Center at:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://demos.devexpress.com/DemoCenter/"&gt;http://demos.devexpress.com/DemoCenter/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Finally, below you will find a list of DevExpress classes and properties in DXBars, DXRibbon and GalleryControl that support the MVVM pattern:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="5"&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;strong&gt;Class&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;strong&gt;Properties&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;BarManager&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;BarsSource &lt;/p&gt;          &lt;p&gt;BarTemplate &lt;/p&gt;          &lt;p&gt;BarStyle &lt;/p&gt;          &lt;p&gt;BarTemplateSelector&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;Bar, BarLinkContainerItem, BarSubItem, PopupMenu, PopupMenuInfo, RibbonPageGroup, ApplicationMenu&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;ItemLinksSource &lt;/p&gt;          &lt;p&gt;ItemTemplate &lt;/p&gt;          &lt;p&gt;ItemStyle &lt;/p&gt;          &lt;p&gt;ItemTemplateSelector&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;RibbonControl , RibbonStatusBarControl&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;CategoriesSource &lt;/p&gt;          &lt;p&gt;CategoryTemplate &lt;/p&gt;          &lt;p&gt;CategoryStyle &lt;/p&gt;          &lt;p&gt;CategoryTemplateSelector&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;RibbonPageCategory&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;PagesSource &lt;/p&gt;          &lt;p&gt;PageTemplate &lt;/p&gt;          &lt;p&gt;PageTemplateSelector &lt;/p&gt;          &lt;p&gt;PageStyle&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;RibbonPage&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;GroupsSource &lt;/p&gt;          &lt;p&gt;GroupTemplate &lt;/p&gt;          &lt;p&gt;GroupStyle &lt;/p&gt;          &lt;p&gt;GroupTemplateSelector&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;GalleryControl&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;GroupsSource &lt;/p&gt;          &lt;p&gt;GroupTemplate &lt;/p&gt;          &lt;p&gt;GroupStyle &lt;/p&gt;          &lt;p&gt;GroupTemplateSelector&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;GalleryItemGroup&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;ItemsSource &lt;/p&gt;          &lt;p&gt;ItemTemplate &lt;/p&gt;          &lt;p&gt;ItemStyle &lt;/p&gt;          &lt;p&gt;ItemTemplateSelector&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=351025" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author><category term="Bars" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Bars/default.aspx" /><category term="Gallery Control" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Gallery+Control/default.aspx" /><category term="MVVM" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/MVVM/default.aspx" /><category term="WPF" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/WPF/default.aspx" /><category term="Silverlight: Ribbon" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Silverlight_3A00_+Ribbon/default.aspx" /></entry><entry><title>WPF and Silverlight Data Grid – MVVM Enhancements</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/07/19/wpf-and-silverlight-data-grid-mvvm-enhancements.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/07/19/wpf-and-silverlight-data-grid-mvvm-enhancements.aspx</id><published>2011-07-19T17:43:48Z</published><updated>2011-07-19T17:43:48Z</updated><content type="html">&lt;p&gt;For typical WPF/Silverlight business application scenarios you can quickly create and setup the DevExpress Grid in XAML:&lt;/p&gt;  &lt;p&gt;   &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:42db9fd9-3c80-421d-9612-125a97678ab5" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridControl&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; ItemsSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Source}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridControl.Columns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridColumn&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; FieldName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;FirstName&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridColumn&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; FieldName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;LastName&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridControl.Columns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridControl.TotalSummary&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridSummaryItem&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; FieldName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;FirstName&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; SummaryType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Count&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridControl.TotalSummary&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/p&gt;  &lt;p&gt;When engineering Silverlight/WPF applications using the Model-View-ViewModel (MVVM) architectural pattern, you may be required to put the code that describes columns and summaries in Model or ViewModel.&lt;/p&gt;  &lt;p&gt;In previous versions of the DXGrid (prior to v2011 vol 1), columns could have been described via DataAnnotations attributes. In this instance, the grid automatically generated columns for all fields in a data source.&amp;#160;&amp;#160; The only way to customize column settings was to handle the grid’s ColumnsPopulated event in ‘code-behind’.&lt;/p&gt;  &lt;p&gt;With the release of DXperience v2011 vol 1, DevExpress WPF/Silverlight Grid Controls support column and summary binding capabilities. The grid can be bound to ViewModel properties that represent collections of objects with column and summary settings, thus minimizing the need for ‘code-behind’ and placing column and summary definition logic in the ViewModel.&lt;/p&gt;  &lt;p&gt;Three steps to populate columns and create summary items from the ViewModel:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Describe columns and/or summaries in the ViewModel.&lt;/li&gt;    &lt;li&gt;Create columns and summary items based on ViewModel settings.&lt;/li&gt;    &lt;li&gt;Setup&amp;#160; Grid Control bindings.&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;View Model Implementation&lt;/h3&gt;  &lt;p&gt;Let’s consider an Employee business object that contains employee information.&lt;/p&gt;  &lt;p&gt;   &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:3e5043ae-9983-407e-8d51-16bc41149e56" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Employee&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; FirstName { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; LastName { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; JobTitle { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; City { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;DateTime&lt;/span&gt; BirthDate { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/p&gt;  &lt;p&gt;In a Grid Control, data fields (public properties) are represented as columns. To describe a grid column in the ViewModel, create a class whose properties correspond to column settings. Let’s create two classes:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;i&gt;Column&lt;/i&gt; - describes a grid column used by default. This class provides properties that correspond to settings common to all grid columns types. &lt;/li&gt;    &lt;li&gt;&lt;i&gt;ComboBoxColumn&lt;/i&gt; - corresponds to a grid column with a ComboBoxEdit in-place editor. This class provides the &lt;b&gt;Source&lt;/b&gt; property that contains a list of&amp;#160; combo box items. We’ll use this class to represent an employee’s City. &lt;/li&gt; &lt;/ul&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4c0fff71-e2c4-4ce3-b701-2d21af1486cd" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Column&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; FieldName { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;SettingsType&lt;/span&gt; Settings { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li&gt;}&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;ComboColumn&lt;/span&gt; : &lt;span style="color:#2b91af;"&gt;Column&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; IList Source { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#008000;"&gt;// Enumerates possible types of in-place editors used to edit cell values.&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;enum&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;SettingsType&lt;/span&gt; { Default, Combo }&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Next, we’ll create a collection of &lt;i&gt;Column&lt;/i&gt; objects in the ViewModel:&lt;/p&gt;  &lt;p&gt;   &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bfa1085e-4b7e-4cf3-a536-86420f23fb74" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;ViewModel&lt;/span&gt; {&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    ...&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt; Cities { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; ObservableCollection&amp;lt;Column&amp;gt; Columns { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; ViewModel() {&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        ...&lt;/li&gt; &lt;li&gt;        List&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt; _cities = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt;();&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (Employee employee &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; Source) {&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!_cities.Contains(employee.City))&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                _cities.Add(employee.City);&lt;/li&gt; &lt;li&gt;        }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        Cities = _cities;&lt;/li&gt; &lt;li&gt;        Columns = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ObservableCollection&amp;lt;Column&amp;gt;() {&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;            &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Column() { FieldName = &lt;span style="color:#a31515;"&gt;&amp;quot;FirstName&amp;quot;&lt;/span&gt;, Settings = SettingsType.Default },&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Column() { FieldName = &lt;span style="color:#a31515;"&gt;&amp;quot;LastName&amp;quot;&lt;/span&gt;, Settings = SettingsType.Default },&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;            &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Column() { FieldName = &lt;span style="color:#a31515;"&gt;&amp;quot;BirthDate&amp;quot;&lt;/span&gt;, Settings = SettingsType.Default },&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ComboColumn() { FieldName = &lt;span style="color:#a31515;"&gt;&amp;quot;City&amp;quot;&lt;/span&gt;, Settings = SettingsType.Combo, Source = Cities }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        };&lt;/li&gt; &lt;li&gt;    }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/p&gt;  &lt;p&gt;To describe data summaries, we’ll create a corresponding class with summary settings:&lt;/p&gt;  &lt;p&gt;   &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4e7d5e84-dc02-4fc9-accd-98ddf9fea3c8" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Summary&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; SummaryItemType Type { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; FieldName { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/p&gt;  &lt;p&gt;In the ViewModel, we’ll create &lt;b&gt;GroupSumary&lt;/b&gt; and &lt;b&gt;TotalSummary&lt;/b&gt; collections:&lt;/p&gt;  &lt;p&gt;   &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:962b1f3d-84d4-4fc4-a522-e50f1f691dc4" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; ObservableCollection&amp;lt;Summary&amp;gt; TotalSummary { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; ObservableCollection&amp;lt;Summary&amp;gt; GroupSummary { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/p&gt;  &lt;p&gt;Note that we use &lt;i&gt;ObservableCollection&lt;/i&gt; to represent the &lt;b&gt;Columns&lt;/b&gt;, &lt;b&gt;GroupSummary&lt;/b&gt; and &lt;b&gt;TotalSummary&lt;/b&gt; collections. These collections should implement &lt;i&gt;INotifyCollectionChanged&lt;/i&gt; so that changes made within the ViewModel are automatically reflected by the Grid Control.&lt;/p&gt;  &lt;h3&gt;Column Templates and Template Selector&lt;/h3&gt;  &lt;p&gt;WPF and Silverlight data templating model is a perfect solution for representing grid columns based on settings specified in the ViewModel.&lt;/p&gt;  &lt;p&gt;Because of this flexibility, we’ll create multiple column templates - one template for each column type. By using a single template, we can create an unlimited number of columns in an unlimited number of grids.&lt;/p&gt;  &lt;p&gt;   &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:2e27d75b-0352-4892-adf5-221ae4fc5c97" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Window.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;view&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ColumnTemplateSelector&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ColumnTemplateSelector&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DataTemplate&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;DefaultColumnTemplate&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ContentControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridColumn&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; FieldName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; FieldName}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ContentControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DataTemplate&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DataTemplate&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ComboColumnTemplate&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ContentControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;            &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridColumn&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; FieldName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; FieldName}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridColumn.EditSettings&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxe&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ComboBoxEditSettings&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; ItemsSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Source}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridColumn.EditSettings&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;            &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridColumn&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ContentControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DataTemplate&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Window.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/p&gt;  &lt;p&gt;If all grid columns can be described using a single template, assign this template to the grid’s &lt;b&gt;ColumnGeneratorTemplate&lt;/b&gt; property; Otherwise, create a Data Template Selector.&lt;/p&gt;  &lt;p&gt;Note: No need to worry that Silverlight does not ship with a DataTemplateSeletor. This class is included in our DevExpress.Xpf.Core library and is widely used in our cross-platform controls.&lt;/p&gt;  &lt;p&gt;   &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b271ac77-e098-4a29-91a3-7d7c8265f747" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Windows;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Windows.Controls;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; Model;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;namespace&lt;/span&gt; View {&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;ColumnTemplateSelector&lt;/span&gt; : &lt;span style="color:#2b91af;"&gt;DataTemplateSelector&lt;/span&gt; {&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;DataTemplate&lt;/span&gt; SelectTemplate(&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; item, &lt;span style="color:#2b91af;"&gt;DependencyObject&lt;/span&gt; container) {&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;            Column column = (Column)item;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;DataTemplate&lt;/span&gt;)((&lt;span style="color:#2b91af;"&gt;Control&lt;/span&gt;)container).FindResource(column.Settings + &lt;span style="color:#a31515;"&gt;&amp;quot;ColumnTemplate&amp;quot;&lt;/span&gt;);&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        }&lt;/li&gt; &lt;li&gt;    }&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/p&gt;  &lt;p&gt;You can create a style to specify settings common to all columns generated using different templates. In WPF and Silverlight 5, you can specify bindings to ViewModel properties within a style (see &lt;i&gt;FieldName&lt;/i&gt; below):&lt;/p&gt;  &lt;p&gt;This style should be assigned to the grid’s &lt;b&gt;ColumnGeneratorStyle&lt;/b&gt; property.&lt;/p&gt;  &lt;p&gt;   &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:64fdcf37-6f32-4869-a4e9-2bfab879f4fd" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ColumnStyle&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; TargetType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;dxg:GridColumn&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Setter&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Property&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;FilterPopupMode&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;CheckedList&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Setter&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Property&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;FieldName&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; FieldName}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/p&gt;  &lt;h3&gt;Summary Template&lt;/h3&gt;  &lt;p&gt;Summary items are also generated from templates. A template that describes total summaries should be assigned to the grid’s &lt;b&gt;TotalSummaryGeneratorTemplate&lt;/b&gt; property. A group summary template should be assigned to the &lt;b&gt;GroupSummaryGeneratorTemplate&lt;/b&gt; property.&lt;/p&gt;  &lt;p&gt;For purposes of this blog, it will be a single template for group and total summaries.&lt;/p&gt;  &lt;p&gt;   &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:94bbd39c-245a-4ec6-8e09-abfd37df286c" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DataTemplate&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;SummaryTemplate&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ContentControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridSummaryItem&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; FieldName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Path&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=(dx:DependencyObjectExtensions.DataContext).FieldName,&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; RelativeSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;={&lt;/span&gt;&lt;span style="color:#a31515;"&gt;RelativeSource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Self}}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                   &lt;span style="color:#ff0000;"&gt; SummaryType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Path&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=(dx:DependencyObjectExtensions.DataContext).Type,&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; RelativeSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;={&lt;/span&gt;&lt;span style="color:#a31515;"&gt;RelativeSource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Self}}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ContentControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DataTemplate&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/p&gt;  &lt;h3&gt;Bindings Setup&lt;/h3&gt;  &lt;p&gt;For the final step, we’ll bind the grid to the &lt;b&gt;Columns&lt;/b&gt;, &lt;b&gt;TotalSummary&lt;/b&gt; and &lt;b&gt;GroupSummary&lt;/b&gt; properties in the ViewModel, specify the column template selector, total and group summary templates.&lt;/p&gt;  &lt;p&gt;   &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:8b79d6fb-3f84-4ca8-8f72-471aa25321cc" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#ddd;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridControl&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;grid&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;           &lt;span style="color:#ff0000;"&gt; ItemsSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Source}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;           &lt;span style="color:#ff0000;"&gt; ColumnsSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Columns}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;           &lt;span style="color:#ff0000;"&gt; ColumnGeneratorTemplateSelector&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; ColumnTemplateSelector}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;           &lt;span style="color:#ff0000;"&gt; TotalSummarySource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; TotalSummary}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;           &lt;span style="color:#ff0000;"&gt; TotalSummaryGeneratorTemplate&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; SummaryTemplate}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;           &lt;span style="color:#ff0000;"&gt; GroupSummarySource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; GroupSummary}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;           &lt;span style="color:#ff0000;"&gt; GroupSummaryGeneratorTemplate&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; SummaryTemplate}&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridControl.View&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TableView&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;tableView1&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;               &lt;span style="color:#ff0000;"&gt; AutoWidth&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;True&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;               &lt;span style="color:#ff0000;"&gt; NavigationStyle&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Cell&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;               &lt;span style="color:#ff0000;"&gt; ShowTotalSummary&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;True&amp;quot;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;               &lt;span style="color:#ff0000;"&gt; IsTotalSummaryMenuEnabled&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;False&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#a31515;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridControl.View&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;dxg&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;GridControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/p&gt;  &lt;p&gt;To see the full source code for this post, download the following example: &lt;a href="http://www.devexpress.com/Support/Center/e/E3358.aspx"&gt;http://www.devexpress.com/Support/Center/e/E3358.aspx&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Keep tuned to this blog for all the MVVM enhancements shipping with DevExpress Grid Controls for WPF and Silverlight.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=350007" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author><category term="Silverlight" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Silverlight/default.aspx" /><category term="Grid" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Grid/default.aspx" /><category term="MVVM" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/MVVM/default.aspx" /><category term="WPF" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/WPF/default.aspx" /><category term="DXGrid" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/DXGrid/default.aspx" /></entry><entry><title>Silverlight and WPF Video Training Roundup</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/07/05/silverlight-and-wpf-video-training-roundup.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/07/05/silverlight-and-wpf-video-training-roundup.aspx</id><published>2011-07-05T22:38:25Z</published><updated>2011-07-05T22:38:25Z</updated><content type="html">&lt;p&gt;During the last month, we’ve put together a number of videos demonstrating the use of several products and features that became available with the latest 2011.1 release of DXperience. Here is a roundup of the tutorial videos to help you get started with our most recent improvements and additions:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;WPF Data Grid&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://tv.devexpress.com/DXGridWPFBindEF4.movie" target="_blank"&gt;Data Binding Using Entity Framework 4 and Enabling Server Mode&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://tv.devexpress.com/DXGridWPFInstantFeedback.movie" target="_blank"&gt;Implementing the Instant Feedback UI Mode&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Silverlight Data Grid&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://tv.devexpress.com/DXGridSLInstantFeedback.movie" target="_blank"&gt;Implementing the Instant Feedback UI Mode&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;WPF TreeView Control&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://tv.devexpress.com/DXTreeListWPFDataBind.movie" target="_blank"&gt;Getting Started and Binding to Data&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Silverlight TreeView Control&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://tv.devexpress.com/DXTreeListSLBindRIAServices.movie" target="_blank"&gt;Data Binding Using RIA Services&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;WPF Ribbon Control&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://tv.devexpress.com/DXRibbonWPFDesignTime.movie" target="_blank"&gt;Working with the Powerful Design-time Features&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;WPF &amp;amp; Silverlight Splash Screen&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://tv.devexpress.com/DXSplashScreenIntro.movie" target="_blank"&gt;Product Demo and Introduction&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=348912" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author><category term="Training" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Training/default.aspx" /><category term="Silverlight" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Silverlight/default.aspx" /><category term="WPF" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/WPF/default.aspx" /><category term="DevExpress Channel" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/DevExpress+Channel/default.aspx" /><category term="Videos" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Videos/default.aspx" /></entry><entry><title>Performance Improvements of DevExpress Silverlight Controls in 2011.1</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/13/performance-improvements-of-devexpress-silverlight-controls-in-2011-1.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/13/performance-improvements-of-devexpress-silverlight-controls-in-2011-1.aspx</id><published>2011-05-13T22:38:00Z</published><updated>2011-05-13T22:38:00Z</updated><content type="html">&lt;p&gt;In my &lt;a href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/12/devexpress-controls-and-silverlight-5.aspx" target="_blank"&gt;yesterday’s post&lt;/a&gt;, I discussed the compatibility of our upcoming 2011.1 controls with the Silverlight 5 platform as well as the memory consumption improvements that developers and end-users will benefit from. That is however not the only improvements you are bound to see... thanks to a multitude of optimizations applied to our core products, you will notice dramatic performance improvements as well as decreased memory utilization across the board.&lt;/p&gt;
&lt;h3&gt;What are the performance improvements?&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Loading themes on demand &lt;br /&gt;&lt;/strong&gt;&lt;span style="COLOR:#ffffff;"&gt;_&lt;/span&gt; &lt;br /&gt;Themes for dependency features will no longer be loaded automatically unless they corresponding control is invoked within the application. As an example, if you have an application with a DXGrid control and have also included the ability to print/export the grid, only theme resources for the DXGrid control are loaded. The themes for the dependency features – in this case the printing library – will only be loaded when the end-user actually attempts to preview and print the grid control. While I used our Silverlight Grid control as an example, note that this is implemented across the board for all of our Silverlight products. &lt;br /&gt;&lt;span style="COLOR:#ffffff;"&gt;_&lt;/span&gt; &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Refactoring&lt;/strong&gt; &lt;br /&gt;&lt;span style="COLOR:#ffffff;"&gt;_&lt;/span&gt; &lt;br /&gt;We have thoroughly refactored our XAML markup to improve the loading performance of our controls. &lt;br /&gt;&lt;span style="COLOR:#ffffff;"&gt;_&lt;/span&gt; &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unlinked themes &lt;br /&gt;&lt;/strong&gt;&lt;span style="COLOR:#ffffff;"&gt;_&lt;/span&gt; &lt;br /&gt;The code for theme libraries has been greatly improved so that theme modules can be unlinked, delivering outstanding performance and end-user experience. &lt;br /&gt;&lt;span style="COLOR:#ffffff;"&gt;_&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt;
&lt;h3&gt;Test bed Configuration&lt;/h3&gt;
&lt;p&gt;To compare the memory consumption of our Silverlight controls between each version, we used a machine with the following specifications:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;CPU:&lt;/strong&gt; Intel Core 2 Duo 3.00 GHz &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Memory:&lt;/strong&gt; 4GB &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OS:&lt;/strong&gt; Windows 7 Enterprise, SP1, 32-Bit &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Browser:&lt;/strong&gt; Internet Explorer 9 &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Silverlight Runtime Version:&lt;/strong&gt; 4.0.60310.0 &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DevExpress Silverlight Controls:&lt;/strong&gt; 2010.2 and 2011.1 &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;For the scenarios, we created two sample applications that were put through rigorous tests, gradually increasing memory allocation. The standard memory consumption was measured at launch and then repeated every time another theme was applied to the application.&lt;/p&gt;
&lt;h3&gt;Results&lt;/h3&gt;
&lt;p&gt;The first test was a simple application with a &lt;a href="http://www.devexpress.com/Products/NET/Controls/Silverlight/Grid_Pro/" target="_blank"&gt;DevExpress Silverlight Grid&lt;/a&gt; control bound to a data source. You can see the double-digit memory utilization decrease when themes are applied at runtime:&lt;/p&gt;
&lt;p&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title="DevExpress_Grid_Memory_Consumption" border="0" alt="DevExpress_Grid_Memory_Consumption" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_Grid_Memory_Consumption_20689D48.png" width="498" height="373" /&gt;&lt;/p&gt;
&lt;p&gt;The second test application was designed to mimic the look and feel of Microsoft Outlook, combining the use of the DevExpress &lt;a href="http://www.devexpress.com/Products/NET/Controls/Silverlight/Grid_Pro/" target="_blank"&gt;Silverlight Grid&lt;/a&gt;, &lt;a href="http://www.devexpress.com/Products/NET/Controls/Silverlight/Ribbon/" target="_blank"&gt;Silverlight Ribbon&lt;/a&gt;, and the &lt;a href="http://www.devexpress.com/Products/NET/Controls/Silverlight/NavBar/" target="_blank"&gt;Silverlight NavBar&lt;/a&gt; controls. As you’ll see in the chart below, memory consumption was still noticeably lower than the 10.2 version of the controls:&lt;/p&gt;
&lt;p&gt;&lt;img style="BACKGROUND-IMAGE:none;BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title="DevExpress_Grid_Ribbon_NavBar_Memory_Consumption" border="0" alt="DevExpress_Grid_Ribbon_NavBar_Memory_Consumption" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_Grid_Ribbon_NavBar_Memory_Consumption_71A2E4A5.png" width="498" height="373" /&gt;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=344488" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author><category term="Silverlight" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Silverlight/default.aspx" /><category term="v2011.1" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/v2011.1/default.aspx" /><category term="Performance" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Performance/default.aspx" /><category term="Memory" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Memory/default.aspx" /></entry><entry><title>DevExpress Silverlight Controls and Silverlight 5</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/12/devexpress-controls-and-silverlight-5.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/12/devexpress-controls-and-silverlight-5.aspx</id><published>2011-05-12T23:35:00Z</published><updated>2011-05-12T23:35:00Z</updated><content type="html">&lt;p&gt;What do we do when a new Silverlight version is announced and made publicly available as a beta? We make sure that our controls not only work in the new release, but also provide outstanding performance! That’s exactly what we have done with our upcoming 2011.1 &lt;a href="http://www.devexpress.com/Products/NET/Controls/Silverlight/" target="_blank"&gt;Silverlight controls&lt;/a&gt; and the Silverlight 5 Public Beta.&lt;/p&gt;  &lt;p&gt;Following several compatibility testing runs and performance comparisons, we are proud to announce that our 2011.1 release of Silverlight products will be compatible with the Silverlight 5 platform! While there remain a few minor issues – reproducible only in very specific scenarios - that are introduced as part of the currently available build of Silverlight 5, we’ll continue to work with Microsoft to ensure those are resolved and have no affect on our products’ overall functionality and stability.&lt;/p&gt;  &lt;p&gt;But, we wouldn’t rest with just compatibility. Using our controls with Silverlight 5 also produced some amazing results in terms of memory consumption. Let’s take a look at some numbers...&lt;/p&gt;  &lt;p&gt;Here we have a sample application using our &lt;a href="http://www.devexpress.com/Products/NET/Controls/Silverlight/Grid_Pro/" target="_blank"&gt;Silverlight Grid Control&lt;/a&gt; bound to a sample data source:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="DevExpress_Grid_Silverlight5Beta_Memory_Consumption" border="0" alt="DevExpress_Grid_Silverlight5Beta_Memory_Consumption" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_Grid_Silverlight5Beta_Memory_Consumption_57DA380E.png" width="498" height="373" /&gt;&lt;/p&gt;  &lt;p&gt;You can see the dramatic improvement in memory consumption compared to Silverlight 4 when the application is loaded as well as when any of our themes are applied to our application.&lt;/p&gt;  &lt;p&gt;We then took this a step further and created another sample application – one mimicking the look and feel of an Outlook-style application. This application was using our &lt;a href="http://www.devexpress.com/Products/NET/Controls/Silverlight/Grid_Pro/" target="_blank"&gt;Silverlight Grid&lt;/a&gt;, &lt;a href="http://www.devexpress.com/Products/NET/Controls/Silverlight/Ribbon/" target="_blank"&gt;Silverlight Ribbon&lt;/a&gt;, and &lt;a href="http://www.devexpress.com/Products/NET/Controls/Silverlight/NavBar/" target="_blank"&gt;Silverlight NavBar&lt;/a&gt; controls:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="DevExpress_Grid_Ribbon_NavBar_Silverlight5Beta_Memory_Consumption" border="0" alt="DevExpress_Grid_Ribbon_NavBar_Silverlight5Beta_Memory_Consumption" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_Grid_Ribbon_NavBar_Silverlight5Beta_Memory_Consumption_44B90B62.png" width="498" height="373" /&gt;&lt;/p&gt;  &lt;p&gt;Using the same measurement criteria, we see similar results in terms of improved memory consumption.&lt;/p&gt;  &lt;p&gt;So, how do you – the developer – benefit from this? You get an existing suite of advanced Silverlight controls that are not only compatible with the new Silverlight 5 platform, but also use up to 21% less memory in typical application scenarios.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=344336" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author><category term="Silverlight" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Silverlight/default.aspx" /><category term="v2011.1" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/v2011.1/default.aspx" /><category term="Memory" scheme="http://community.devexpress.com/blogs/theprogressbar/archive/tags/Memory/default.aspx" /></entry><entry><title>Silverlight and WPF Splash Screen</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/12/silverlight-and-wpf-splash-screen-coming-v2011-1.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/12/silverlight-and-wpf-splash-screen-coming-v2011-1.aspx</id><published>2011-05-12T23:10:00Z</published><updated>2011-05-12T23:10:00Z</updated><content type="html">&lt;p&gt;Splash screens... with the powerful computers and devices on the market, one may argue that they are no longer needed. While certainly a valid argument with regards to native application performance, the need for some sort of an automated loading/splash screen is increasingly becoming relevant again thanks to ever-expanding rich internet applications. As developers, we all know that not all of our customers are bound to have high-end machines or top-of-the line internet connectivity, as such providing a good user experience during application startup is a crucial component.&lt;/p&gt;  &lt;p&gt;Splash Screens are easy to implement, but we at DevExpress decided to make it even easier for implementation within your Silverlight and WPF applications. Thus we are introducing the DXSplashScreen for Silverlight and WPF in the upcoming 2011.1 release of DXperience.&lt;/p&gt;  &lt;h3&gt;How does it work in Silverlight?&lt;/h3&gt;  &lt;p&gt;The DXSplashScreen can be added to your Silverlight application’s web project using a new item template:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://community.devexpress.com/blogs/theprogressbar/DevExpress_Silverlight_SplashScreen_New_Item_58287F3F.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="DevExpress_Silverlight_SplashScreen_New_Item" border="0" alt="DevExpress_Silverlight_SplashScreen_New_Item" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_Silverlight_SplashScreen_New_Item_thumb_5AEE3432.png" width="600" height="415" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;em&gt;Click image for a larger version.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Once selected, the required XAML and JavaScript content are generated and also added to your project. This will make sure that the splash screen is automatically run during application startup. When loaded, the default splash screen will look as follows:&lt;/p&gt;  &lt;p&gt;&lt;embed src="http://community.devexpress.com/blogs/theprogressbar/emilm/xpf/sl-dxsplashscreen.swf" width="624" type="application/x-shockwave-flash" height="500"&gt;&lt;/embed&gt;&lt;/p&gt;  &lt;h3&gt;How does it work in WPF?&lt;/h3&gt;  &lt;p&gt;The WPF version of DXSplashScreen can be added to the project in the same manner:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://community.devexpress.com/blogs/theprogressbar/DevExpress_WPF_SplashScreen_New_Item_677CDD6D.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="DevExpress_WPF_SplashScreen_New_Item" border="0" alt="DevExpress_WPF_SplashScreen_New_Item" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_WPF_SplashScreen_New_Item_thumb_10A475AC.png" width="600" height="415" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;em&gt;Click image for a larger version.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Following selection, the splash screen XAML file is generated and added to the project. You can then use a single line of code to invoke the splash screen at application startup and then use another line of code to close it once resource loading has been completed.&lt;/p&gt;  &lt;p&gt;The default splash screen features a marquee progress bar, but of course, this can be easily changed through code. Furthermore, since the splash screen is rendered using standard XAML markup, you can completely customize it to match your application’s look and feel.&lt;/p&gt;  &lt;p&gt;This is what the standard splash screen design looks like:&lt;/p&gt;  &lt;p&gt;&lt;embed src="http://community.devexpress.com/blogs/theprogressbar/emilm/xpf/wpf-dxsplashscreen.swf" width="728" type="application/x-shockwave-flash" height="588"&gt;&lt;/embed&gt;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=344333" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author></entry><entry><title>Silverlight Grid – Design Time Enhancements</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/11/silverlight-grid-design-time-enhancements-coming-in-v2011-1.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/11/silverlight-grid-design-time-enhancements-coming-in-v2011-1.aspx</id><published>2011-05-11T23:59:00Z</published><updated>2011-05-11T23:59:00Z</updated><content type="html">&lt;p&gt;The upcoming 2011.1 release of DXperience introduces powerful design-time support for our Silverlight Grid control within Visual Studio 2010 and Expression Blend. The enhancements include the intuitive Quick Customization Panel that enables lightning-fast access to required objects, changing the view type as well as modifying its settings, populating a view with columns and finally, assigning column data editors.&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="DevExpress_Silverlight_Grid_DesignTime_Quick_Customization" border="0" alt="DevExpress_Silverlight_Grid_DesignTime_Quick_Customization" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_Silverlight_Grid_DesignTime_Quick_Customization_0358274A.png" width="593" height="358" /&gt;&lt;/p&gt;  &lt;p&gt;The screenshot above shows that column headers can now be clicked to select the column and set its properties. The following short clip shows how the design-time functionality can be used to add new columns, set their editors, and finally delete them.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://community.devexpress.com/blogs/theprogressbar/DevExpress_Silverlight_Grid_DesignTime_Demo_34543BB4.gif"&gt;&lt;img style="display:inline;" title="DevExpress_Silverlight_Grid_DesignTime_Demo" alt="DevExpress_Silverlight_Grid_DesignTime_Demo" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_Silverlight_Grid_DesignTime_Demo_thumb_4FC917EA.gif" width="653" height="433" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Keep in mind that when a column or view within the grid is selected, its lists of properties and events are exposed through the Properties panel within Visual Studio.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=344083" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author></entry><entry><title>Silverlight and WPF Grid – Group Intervals for DateTime Columns in Server Mode</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/10/silverlight-and-wpf-grid-group-intervals-for-datetime-columns-in-server-mode-coming-v2011-1.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/10/silverlight-and-wpf-grid-group-intervals-for-datetime-columns-in-server-mode-coming-v2011-1.aspx</id><published>2011-05-10T17:02:32Z</published><updated>2011-05-10T17:02:32Z</updated><content type="html">&lt;p&gt;Following my &lt;a href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/10/silverlight-and-wpf-grid-custom-expressions-for-unbound-columns-in-server-mode-coming-in-v2011-1.aspx" target="_blank"&gt;last announcement&lt;/a&gt; about enhanced server mode functionality, there is another feature coming up in the 2011.1 release of DXperience that I wanted to briefly mention.&lt;/p&gt;  &lt;p&gt;In the next major release of the DevExpress Silverlight and WPF grid controls, &lt;a href="http://www.devexpress.com/Products/NET/Controls/WPF/Grid/sort-group.xml" target="_blank"&gt;Group Intervals&lt;/a&gt; for DateTime columns can be calculated on the server-side when Server Mode is enabled in the grid. This means that you won’t notice a difference nor need to take any precautions when implementing group intervals in a grid bound using Server Mode.&lt;/p&gt;  &lt;p&gt;Here is a screenshot of data grouped by a DateTime column and its group intervals displayed within the group header rows:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://community.devexpress.com/blogs/theprogressbar/DevExpress_WPF_Grid_DateTime_Group_Intervals_363440E9.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="DevExpress_WPF_Grid_DateTime_Group_Intervals" border="0" alt="DevExpress_WPF_Grid_DateTime_Group_Intervals" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_WPF_Grid_DateTime_Group_Intervals_thumb_30E55A38.png" width="600" height="382" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;em&gt;Click image for a larger version.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=344062" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author></entry><entry><title>Silverlight and WPF Grid – Custom Expressions for Unbound Columns in Server Mode</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/10/silverlight-and-wpf-grid-custom-expressions-for-unbound-columns-in-server-mode-coming-in-v2011-1.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/10/silverlight-and-wpf-grid-custom-expressions-for-unbound-columns-in-server-mode-coming-in-v2011-1.aspx</id><published>2011-05-10T16:44:00Z</published><updated>2011-05-10T16:44:00Z</updated><content type="html">&lt;p&gt;The upcoming 2011.1 release of DXperience will include support for populating unbound grid columns in server mode using custom expressions. These expressions can be specified through code, at design-time, or at runtime using the &lt;a href="http://www.devexpress.com/Products/NET/Controls/WPF/Grid/expression-editor.xml" target="_blank"&gt;DevExpress Expression Editor&lt;/a&gt; built into the DXGrid for Silverlight and WPF.&lt;/p&gt;  &lt;p&gt;The Expression Editor can be used by you or your end-users at runtime to create an expression using any of the available functions and operators. These expressions can reference other columns and then calculate a new value on the server-side before displaying them within your unbound column.&lt;/p&gt;  &lt;p&gt;Here is a screenshot of the Expression Editor launched for an unbound “Total” column in DXGrid for WPF:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://community.devexpress.com/blogs/theprogressbar/DevExpress_WPF_Grid_Unbound_Expression_Editor_65654A47.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="DevExpress_WPF_Grid_Unbound_Expression_Editor" border="0" alt="DevExpress_WPF_Grid_Unbound_Expression_Editor" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_WPF_Grid_Unbound_Expression_Editor_thumb_28DCAFD0.png" width="600" height="430" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;em&gt;Click image for a larger version.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Thanks to our common-codebase initiative – XPF – this feature has also been simultaneously developed for our Silverlight Grid. Here is a screenshot of the same demo in Silverlight:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://community.devexpress.com/blogs/theprogressbar/DevExpress_Silverlight_Grid_Unbound_Expression_Editor_36EB7900.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="DevExpress_Silverlight_Grid_Unbound_Expression_Editor" border="0" alt="DevExpress_Silverlight_Grid_Unbound_Expression_Editor" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_Silverlight_Grid_Unbound_Expression_Editor_thumb_12966EB1.png" width="600" height="418" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;em&gt;Click image for larger version&lt;/em&gt;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=344060" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author></entry><entry><title>WPF Grid Control – Video on implementing the Instant Feedback UI Mode</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/05/wpf-grid-control-video-on-implementing-the-instant-feedback-ui-mode-coming-in-v2011-1.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/05/wpf-grid-control-video-on-implementing-the-instant-feedback-ui-mode-coming-in-v2011-1.aspx</id><published>2011-05-05T21:34:36Z</published><updated>2011-05-05T21:34:36Z</updated><content type="html">&lt;p&gt;In &lt;a href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/03/01/wpf-grid-control-and-the-new-instant-feedback-ui-mode-coming-in-v2011-1.aspx" target="_blank"&gt;this earlier post&lt;/a&gt; I announced the availability of the Instant Feedback UI Mode in the upcoming 2011.1 release of DXperience. Check out the following video on the DevExpress Channel that demonstrates how to implement the Instant Feedback UI Mode in the DXGrid control for WPF.&lt;/p&gt;  &lt;p&gt;Click on the image to watch the video:    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://tv.devexpress.com/DXGridWPFInstantFeedback.movie" target="_blank"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="DevExpress_WPF_InstantFeedbackUI_Video" border="0" alt="DevExpress_WPF_InstantFeedbackUI_Video" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_WPF_InstantFeedbackUI_Video_5E736B9F.png" width="600" height="338" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=343705" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author></entry><entry><title>Silverlight Grid Control – Instant Feedback UI Mode</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/04/silverlight-grid-control-instant-feedback-ui-mode-coming-in-v2011-1.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/04/silverlight-grid-control-instant-feedback-ui-mode-coming-in-v2011-1.aspx</id><published>2011-05-04T21:55:17Z</published><updated>2011-05-04T21:55:17Z</updated><content type="html">&lt;p&gt;In &lt;a href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/02/silverlight-and-wpf-grid-new-scrolling-features-coming-in-v2011-1.aspx" target="_blank"&gt;this&lt;/a&gt; post, I announced the new, smooth scrolling features that will ship in the Silverlight Grid Control as part of the 2011.1 release of DXperience. While that is a great addition to our Silverlight Grid Control, I wanted to put together this post to highlight another exciting and anticipated feature coming up in the 2011.1 version of the DXGrid for Silverlight.&lt;/p&gt;  &lt;p&gt;The Instant Feedback UI Mode is an advanced data binding mode that is very similar in concept to the DevExpress Server Mode, in that data is retrieved only in portions that are required to populate the view and data-aware operations are performed on the server. Instant Feedback Mode is, however, an asynchronous server mode. The difference lies in how the grid behaves when data is being retrieved and populated. When a user scrolls through the records in Server Mode, the grid first waits for the partial data to be fetched before populating the rows. Depending on the data source performance, the volume of data being retrieved, and the network connectivity, the user may notice a considerable control freeze. Instant Feedback Mode addresses this issue by continuing to respond to the user’s actions while the data is being retrieved. The user can continue to scroll through records, and even re-sort, re-group and re-filter the control’s data. If required, the control will cancel the previous request and initiate a new request to the data source. To provide visual feedback, the Instant Feedback binding mode also includes options to display an animation indicating the status of operations within the grid.&lt;/p&gt;  &lt;p&gt;The following short animation demonstrates the Instant Feedback mode in action. There are over 100,000 records being retrieved from a SQL Server database and as would be expected, it requires a short amount of time to process the Grid’s requests and retrieve data. In this quick demo, you can see that data management features such as grouping are also performed on the server and take advantage of the Instant Feedback UI functionality.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://community.devexpress.com/blogs/theprogressbar/DevExpress_Silverlight_InstantFeedbackUI_68FAFD4E.gif"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="DevExpress_Silverlight_InstantFeedbackUI" border="0" alt="DevExpress_Silverlight_InstantFeedbackUI" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_Silverlight_InstantFeedbackUI_thumb_0688C44F.gif" width="750" height="452" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Stay tuned for a video demonstrating how to implement the Instant Feedback UI Mode for the DevExpress Silverlight Grid Control.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=343591" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author></entry><entry><title>WPF Grid TreeList View and WPF Project Wizard</title><link rel="alternate" type="text/html" href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/04/wpf-grid-treelist-view-and-wpf-project-wizard-coming-in-v2011-1.aspx" /><id>http://community.devexpress.com/blogs/theprogressbar/archive/2011/05/04/wpf-grid-treelist-view-and-wpf-project-wizard-coming-in-v2011-1.aspx</id><published>2011-05-04T19:00:26Z</published><updated>2011-05-04T19:00:26Z</updated><content type="html">&lt;p&gt;Last week, I announced the new &lt;a href="http://community.devexpress.com/blogs/theprogressbar/archive/2011/04/26/silverlight-and-wpf-treelist-control-coming-in-v2011-1.aspx" target="_blank"&gt;TreeList Control and TreeList View for WPF and Silverlight&lt;/a&gt;. This is just a quick not to let you know that the TreeList View will be available as a view option for the WPF Grid control in the DevExpress WPF Project Wizard.&lt;/p&gt;  &lt;p&gt;So if you need to quickly create a WPF application and use a TreeList View, you can do so directly from the Project Wizard without having to write a single line of code:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://community.devexpress.com/blogs/theprogressbar/DevExpress_WPF_Project_Wizard_TreeList_View_2A338EAB.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="DevExpress_WPF_Project_Wizard_TreeList_View" border="0" alt="DevExpress_WPF_Project_Wizard_TreeList_View" src="http://community.devexpress.com/blogs/theprogressbar/DevExpress_WPF_Project_Wizard_TreeList_View_thumb_0D59CDFC.png" width="720" height="588" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=343560" width="1" height="1"&gt;</content><author><name>Emil Mesropian (DevExpress)</name><uri>http://community.devexpress.com/members/Emil-Mesropian-_2800_DevExpress_2900_.aspx</uri></author></entry></feed>
