Good Day,
I have a scrollview control that has a StackPanel (Orientation=Vertical) UI Element inside of it. I have a series of textboxes (24) inside the StackPanel. The scrollviewer height = 250px. Ideally, what I want is when I start to tab from textbox to the next textbox, I want the scrollview to automatically scrolldown without user interaction.
I have code that successfully does this. How would I go about computing what the Textbox height is?
My code looks something like:
private void TB_GotFocus(object sender, RoutedEventArgs e) { if (sender is TextBox) { TextBox tb = (TextBox)sender; // but using tb.Height does not obtain the value for me. It returns a NaN } }
Any suggestions or comments otherwise would be helpful.