Category / Section
How to disable the mouse scroll interaction in TimeSpanEdit
TimeSpanEdit value can be incremented or decremented by mouse wheel. Mouse scroll interaction can be disable by setting IncrementOnScrolling property of TimeSpanEdit as false.
The same has been explained in the following code snippet:
XAML:
//Code Explains how to disable mouse scroll interaction in TimeSpanEdit <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:syncfusion="http://schemas.syncfusion.com/wpf" x:Class="TimeSpanEdit.MainWindow" Title="MainWindow" Height="350" Width="525"> <Grid> <syncfusion:TimeSpanEdit Name="TimeSpan" Width="150" Height="80" IncrementOnScrolling="False"></syncfusion:TimeSpanEdit> </Grid> </Window>
C#:
//Code Explains how to disable mouse scroll interaction in TimeSpanEdit
namespace TimeSpanEdit
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
TimeSpan.IncrementOnScrolling = true;
}
}
}