Need to scroll one WPF Grid

余生长醉 提交于 2019-12-18 05:15:28

问题


I want to create two grids in the WPF Page. One Grid need scrollbar or scroll viewer. Another Grid is static.The grids are placed one by one in the page. How can I create and set the scroll in first Grid?


回答1:


<ScrollViewer>  
    <StackPanel>  
        ...   
    </StackPanel>  
</ScrollViewer>  



回答2:


Sounds like this user justs wants the first grid to scroll, such as:

<StackPanel>
    <ScrollViewer>
        <Grid>
        </Grid>
    </ScrollViewer>
    <Grid>
    </Grid>
</StackPanel>


来源:https://stackoverflow.com/questions/839062/need-to-scroll-one-wpf-grid

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!