Home > WPF > Three sizing strategies

Three sizing strategies

In WPF, Grid support three sizing strategies which can be used to organize controls efficiently on a Window:

  1. Absolute sizes: Define the exact size using device-independent units. Example:
    <ColumnDefinition Width=”100″>
  2. Automatic sizes: Each row or column is given exactly the amount of space it needs, and
    no more. Example:
    <ColumnDefinition Width=”Auto”>
  3. Proportional sizes: Space is devided between rows and columns. This is the default setting. Example:
    <ColumnDefinition Width=”*”>
Advertisements
Categories: WPF
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: