Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3595860
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T19:54:29+00:00 2026-05-18T19:54:29+00:00

What I want to do (I actually don’t know if it’s possible) is to

  • 0

What I want to do (I actually don’t know if it’s possible) is to set the height of a given row according to its content:

< Grid.RowDefinitions>

< RowDefinition Height=”{Binding ElementName=aaa, Path=Height” />

< RowDefinition Height=”*” />

< /Grid.RowDefinitions>

Assume that aaa is put into the row of the Grid.

Please note: I want my row to keep the height set at the very beginning.

Is that possible at all?

Cheers!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T19:54:29+00:00Added an answer on May 18, 2026 at 7:54 pm
    <RowDefinition Height="Auto" />
    

    should do what you want.

    EDIT

    What you could do is add an handler to your content’s SizeChanged event. In that handler, set the grid’s appropriate RowDefinition’s height to the ActualHeight of the content and remove the handler:

    grid.RowDefinitions[x].Height = new GridLength(((FrameworkElement)sender).ActualHeight, GridUnitType.Pixel);
    content.SizeChanged -= content_SizeChanged;
    

    I haven’t tested it, but it should give you a good start. EDIT tested, it works. Maybe there’s a better way to do it, but that’s one way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What I want to do (I actually don't know if it's possible) is to
Somehow my master and my origin/master branch have diverged. I actually don't want them
I don't mean an alias or function. I actually want to add an entire
I'm actually developing an application using Google Drive SDK. I don't want to create
I want all the views of Row in OnListItemClick() Actually I want to change
Well I don't actually want to make a calendar but I need a view
How would I add next/previous buttons to this snippet. I actually don't want the
As the title suggests, I want to actually brute-force (don't pay attention, useless information)
Note: This is a hypothetical discussion. I don't actually want to implement a struct
I actually don't even know how to call this :P, but... I have one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.