How to get StackPanel height before rendering?
silverlight
Solution
Have you tried reading the `DesiredSize`? If that contains 0, try calling `Measure` passing in a `Size` structure containing large values for `Height` and `Width`, then reading the `DesiredSize`.
Note that the `DesiredSize` isn't necessarily what the containing element will allow it have but I suspect it will give you the information you are after.
Problem
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!