ScrollViewer viewport size event changed

I have some custom calculations that resize the control based on the size of the ScrollViewer viewport. I am currently doing these calculations when I receive the ScrollViewer.SizeChanged event. However, it appears that the SizeChanged event is fired before ScrollViewer updates the ViewPort dimensions. My event handler for SizeChanged shows the ScrollViewer sender with the width and height updated to new dimensions, but the ViewportWidth and ViewportHeight properties are old.

Is there a way to execute code after changing these values?

+4
source share
2 answers

SizeChanged. ScrollViewer Viewport, Background Loaded prority. ScrollViewer Viewport.

0

MSDN ScrollViewer ScrollChanged. , , .

OnScrollChanged , , , .

+10

Source: https://habr.com/ru/post/1526441/


All Articles