开发者

Reset the scrollviewer to its initial position with Silverlight

开发者 https://www.devze.com 2023-04-01 19:14 出处:网络
I have a Silverlight application, containing a scrollviewer in a grid layout. When I move the scroller down andclose this grid with the close button, the scroller remains at the bottom whenever I re

I have a Silverlight application, containing a scrollviewer in a grid layout.

When I move the scroller down and close this grid with the close button, the scroller remains at the bottom whenever I reopen the grid.

Is there a way I can reset the scroller to the top posi开发者_JAVA技巧tion?


Hello supriya khamesra,

Please Try this. Please Put your grid inside scroll viewer and then write your bellow code after grid selection change.

grdDetail.ScrollToVerticalOffset(0d);

OR

grdDetail.ScrollToTop();

0

精彩评论

暂无评论...
验证码 换一张
取 消