| Visual Basic (Declaration) | |
|---|---|
<TemplatePartAttribute(Name="PART_RowSelectorPane", Type=Xceed.Wpf.DataGrid.RowSelectorPane)> Public Class TableViewScrollViewer Inherits DataGridScrollViewer Implements ISupportInitialize, IFrameworkInputElement, IInputElement, IAddChild, IHaveResources, IAnimatable, DUCE.IResource | |
| C# | |
|---|---|
[TemplatePartAttribute(Name="PART_RowSelectorPane", Type=Xceed.Wpf.DataGrid.RowSelectorPane)] public class TableViewScrollViewer : DataGridScrollViewer, ISupportInitialize, IFrameworkInputElement, IInputElement, IAddChild, IHaveResources, IAnimatable, DUCE.IResource | |
| XAML | Copy Code |
|---|---|
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"> | |
Fixed Columns vs. Templates
In order to support fixed columns when creating a new row template for a table-view layout, the following criteria must be met:
- The PART_CellsHost template part must be a FixedCellPanel.
- The FixedCellCount property of the FixedCellPanel must be bound to the table view's FixedColumnCount property using a TwoWay ViewBinding.
The fixed-cell-panel properties listed below are also usually bound when provided a new row template for a table-view layout:
- SplitterStyle (TemplateBinding xcdg:TableView.FixedColumnSplitterStyle)
- SplitterWidth (xcdg:ViewBinding FixedColumnSplitterWidth)
- ShowSplitter (xcdg:ViewBinding ShowFixedColumnSplitter)
- FixedColumnDropMarkPen (xcdg:ViewBinding FixedColumnDropMarkPen)
If a new template is provided for a DataGridControl and fixed columns are to be supported, it is essential that a TableViewScrollViewer be used. This scroll viewer is responsible for preserving the TranslateTransforms that fix and scroll elements, as well as executing the PageLeft and PageRight actions according to the reduced viewport. It is also recommended that an AdornerDecorator be located above the TableViewScrollViewer of the templated DataGridControl to support drag and dropping of the fixed-column splitter correctly.
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Control
System.Windows.Controls.ContentControl
System.Windows.Controls.ScrollViewer
Xceed.Wpf.DataGrid.Views.DataGridScrollViewer
Xceed.Wpf.DataGrid.Views.TableViewScrollViewer
Supported Operating Systems: Windows Server 2003 Service Pack 1; Windows Vista; Windows XP Service Pack 2
Copy Code