using System.Windows.Automation.Provider;
using System.Windows.Automation;
public class ScrollableDataGrid : DataGrid
{
public ScrollableDataGrid()
{
MouseWheel += delegate(object sender, MouseWheelEventArgs e)
{
(OnCreateAutomationPeer() as IScrollProvider).Scroll(ScrollAmount.NoAmount,
e.Delta < 0 ? ScrollAmount.SmallIncrement : ScrollAmount.SmallDecrement);
};
}
}
Monday, September 21, 2009
How to scroll Silverlight DataGrid with mouse wheel
Subscribe to:
Post Comments (Atom)
Perfect!!!
ReplyDeleteIt's the best solution for this problem!
Thank you very much!!!
Implement scrolling in DataGridView
ReplyDelete