ColumnWidthBehavior ClassDW.WPFToolkit Documentation
Brings the feature to controls with a GridViewColumnHeader to have columns with a dynamic width.
Inheritance Hierarchy

SystemObject
  System.Windows.ThreadingDispatcherObject
    System.WindowsDependencyObject
      DW.WPFToolkit.InteractivityColumnWidthBehavior

Namespace: DW.WPFToolkit.Interactivity
Assembly: DW.WPFToolkit (in DW.WPFToolkit.dll) Version: 5.6.0.0
Syntax

C#
public class ColumnWidthBehavior : DependencyObject

The ColumnWidthBehavior type exposes the following members.

Constructors

  NameDescription
Public methodColumnWidthBehavior
Initializes a new instance of the ColumnWidthBehavior class
Top
Methods

  NameDescription
Public methodStatic memberGetAutoSize
Gets resize kind for a column.
Public methodStatic memberGetProportionalWidth
Gets proportional size in percent for a column.
Public methodStatic memberGetTemplatePaddingWidthFix
Gets additional space left from a column by calculating the width.
Public methodStatic memberSetAutoSize
Attaches the resize kind for a column.
Public methodStatic memberSetProportionalWidth
Attaches the proportional size in percent for a column.
Public methodStatic memberSetTemplatePaddingWidthFix
Attaches the additional space left from a column by calculating the width.
Top
Fields

  NameDescription
Public fieldStatic memberAutoSizeProperty
Public fieldStatic memberProportionalWidthProperty
Public fieldStatic memberTemplatePaddingWidthFixProperty
Top
Attached Properties

  NameDescription
Public attached propertyAutoSize
Public attached propertyProportionalWidth
Public attached propertyTemplatePaddingWidthFix
Top
Examples

XAML
<ListView Interactivity:ColumnWidthBehavior.AutoSize="ByContent" />

<ListView Interactivity:ColumnWidthBehavior.AutoSize="Proportional">
    <ListView.View>
        <GridView>
            <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" Interactivity:ColumnWidthBehavior.ProportionalWidth="60" />
            <GridViewColumn Header="Size" DisplayMemberBinding="{Binding Size}" Interactivity:ColumnWidthBehavior.ProportionalWidth="30" />
            <GridViewColumn Header="Date" DisplayMemberBinding="{Binding Date}" Interactivity:ColumnWidthBehavior.ProportionalWidth="10" />
        </GridView>
    </ListView.View>
</ListView>
See Also

Reference