Label Size is always NaN ?

Posted by khue on Stack Overflow See other posts from Stack Overflow or by khue
Published on 2010-05-28T11:21:27Z Indexed on 2010/05/28 11:42 UTC
Read the original article Hit count: 208

Filed under:
|
|

Hi, I have a Panel which I want to extend and override MeassureOverride and Arrange to have my custom layout. Basically, the panel will contain some labels. As the label has some text content, it should have a specific size. However when I use label.ActualHeight or actualwidth, desiredSize ... in the MeassureOverride or ArrangeOverride, all result to NaN. Is there any way I can get the desired Size of the label so that the text content is fit?

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf