In my software (silverlight 3 application) I create a StackPanel in the code, then add objects to it. Is it possible to get its height before rendering? If I try properties like “Height” or “ActualHeight”, it’s all zeroes…
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Have you tried reading the
DesiredSize? If that contains 0, try callingMeasurepassing in aSizestructure containing large values forHeightandWidth, then reading theDesiredSize.Note that the
DesiredSizeisn’t necessarily what the containing element will allow it have but I suspect it will give you the information you are after.