Is is possible to 开发者_开发百科disable DataGrid
scrolling ? If yes, how ?
Thanks.
In your wpf datagrid set the datagrid property as
<DataGrid Name="mydatagrid" HorizontalScrollBarVisibility="Disabled
"VerticalScrollBarVisibility="Disabled" />
You can disable the scrolling using the following properties:
ScrollViewer.CanContentScroll="False"
VerticalScrollBarVisibility="Disabled"
HorizontalScrollBarVisibility="Disabled"
However in some cases (such as one I'm stuck with now); when you disable scrolling, using the scroll-wheel over the grid won't work in the more higher FrameworkElements.
精彩评论