I need get a WPF control height for calculate my next control margin top, but when I try get control height with textbox1.height
, this is return 'Auto' and not numbers
What can I do for get control height, when it is set 'Auto'?
You should try this:
textBox1.ActualHeight
Remarks (by @Viv)
just make sure when you query for textBox1.ActualHeight, you do it once the control is Loaded. You're going to get 0.0 if you check ActualHeight before it's setup properly
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With