Back to Devexpress

GridCommands.BestFitColumns Property

wpf-devexpress-dot-xpf-dot-grid-dot-gridcommands-065371ab.md

latest1.6 KB
Original Source

GridCommands.BestFitColumns Property

Adjusts the width of columns so that columns fit their contents in an optimal way.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public static RoutedCommand BestFitColumns { get; }
vb
Public Shared ReadOnly Property BestFitColumns As RoutedCommand

Property Value

TypeDescription
RoutedCommand

A RoutedCommand object that defines a command implementing the ICommand, and is routed through the element tree.

|

Remarks

xaml
<Button Command="dxg:GridCommands.BestFitColumns"
        CommandTarget="{Binding Path=View, ElementName=grid}">Best Fit (all columns)</Button>

Corresponding Method: TableView.BestFitColumns.

See Also

GridCommands Class

GridCommands Members

DevExpress.Xpf.Grid Namespace