Skip to main content
A newer version of this page is available. .

How to: Bind the Grid to Columns and Summaries Specified in ViewModel

  • 6 minutes to read

This example shows how to put columns and data summary definition logic in the ViewModel and setup the Grid Control.

View Example

<Window x:Class="WPFGridMVVMBindableColumns.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
        xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
        xmlns:local="clr-namespace:SLGridMVVMBindableColumns"
        Title="MainWindow" Height="600" Width="800">
    <local:MainPage/>
</Window>