Skip to content

GridSplitter vs ContentSizerΒ #4479

@XAML-Knight

Description

@XAML-Knight

Both GridSplitter and ContentSizer allow a control to be resized by the user. But when to use one or the other?

When to use GridSplitter:

When the developer is trying to resize a grid-based layout (i.e., rows and columns)

  • Resize methods utilizing RowDefinition and ColumnDefinition properties
  • Grid interior GridResizeBehavior such as resizing scheme based on CurrentAndNext or PreviousAndNext row and column
  • GridLength measurement (IsAuto, IsStar, etc.)

Where to use ContentSizer:

Anywhere else not utilizing a grid-based layout

  • Includes, but certainly is not limited to, basic horizontal and/or vertical resizing

A third option?

Implement your own control, by deriving from the base class, SplitBase.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions