WPF Auto height in code

Posted by Karim on Stack Overflow See other posts from Stack Overflow or by Karim
Published on 2010-03-17T00:08:08Z Indexed on 2010/03/17 0:11 UTC
Read the original article Hit count: 920

Filed under:
|
|

How could I set the value of the Height property of a WPF control in C# code to "Auto"?

              <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                </Grid.RowDefinitions>

I want to reproduce this behavior in the code behind. Any ideas?

Thanks in advance

© Stack Overflow or respective owner

Related posts about wpf

Related posts about c#