There is a page which has a scroll viewer and some content which is dynamic in nature. In the middle of the page there is a grid. Whenever the user scrolls the page and grid reaches the top of the page i want a notifier. Basically i want to make the grid sticky on top whenever it reaches top of the page. Is there any way we can achieve this in Windows phone application. I dont want to calculate the offset because the content between top of the page and grid is dynamic.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
This used to be tricky to do but thanks to the new Windows Composition API, it's now fairly simple.
Let's say I have a
ScrollViewer
namedMainScroll
which hosts aGrid
calledStickyGrid
and I want to make the latter sticky once it hits the top.There's the code with comments to explain what it does.
Here is a working demo on GitHub.