Show / Hide Table of Contents

RowHeader

RowHeader represents the control displayed as row header that can perform row selection and row resizing operation, as demonstrated in AdventureWorksLT.WpfApp sample:

image

Features

  • Row selection.
  • Row resizing via drag-and-drop.

Usage

Put the RowHeader inside a RowView, it will be wired up and work automatically.

You can add RowHeader via row binding by calling BindTo API, as demonstrated in AdventureWorksLT.WpfApp sample:

  • C#
  • VB.Net
protected override void BuildTemplate(TemplateBuilder builder)
{
    builder
        ...
        .AddBinding(0, 1, _.BindTo<RowHeader>())
        ...;
}
Protected Overrides Sub BuildTemplate(builder As TemplateBuilder)
    Dim e = Entity
    builder
        ...
        .AddBinding(0, 1, e.BindTo(Of RowHeader)()) _
        ...
End Sub

You can also add RowHeader via composite row binding.

Resizing Implementation

Resizing is implemented via RowHeader.IsResizeGripper attached property. In the control template of RowHeader, an UIElement with this attached property value set to true will detect the mouse drag-and-drop and perform the row resizing operation.

Styles

Style Description
Flat Displays RowHeader as flat.
  • Improve this Doc
Back to top Copyright © Weifen Luo | DevZest