Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Reply
[WPF] Grid: set height * of row from Code Behind
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Roberto Salemi
9y
660
1
Reply
Hi,
I have this definition:
<Grid Height="Auto" Width="Auto" Name="MainGrid">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
<RowDefinition Height="2"/>
<RowDefinition Height="auto" />
<RowDefinition Height="35" />
</Grid.RowDefinitions>
....
The MainGrid.RowDefinitions[1].Height is *
How can I set the height of the Row from CodeBehind?
The code should be:
MainGrid.RowDefinitions[1].Height = new GridLength(??, GridUnitType.Star);
but where there is "??" what is the correct value?
Thanks.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Filename is empty in SaveDialogue
WPF Gridview delete, add, update through databinding