I am trying to get the Width of a StackPanel. I tried:
double width = stk_main.ActualWidth;
which gave zero and it shouldnt be. Also:
double width = stk_main.Width;
which gives NaN because width set to auto previously. So how can I get the width?
You can use sizeChanged, but it doesn’t work when the stack panel you used not change size.
Hope it can give you some help…