Category / Section
How to show and hide scrollbar on mouse over and mouse leave respectively
1 min read
To show scrollbar on mouse over set “VerticalScrollBarVisibility” and “HorizontalScrollBarVisibility” properties to “Auto” mode when “IsMouseOver” property is “True” otherwise set to “Hidden”.
XAML
<Grid> <Grid.Resources> <Style TargetType="syncfusion:EditControl"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="VerticalScrollBarVisibility" Value="Auto"/> <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/> </Trigger> <Trigger Property="IsMouseOver" Value="False"> <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/> <Setter Property="VerticalScrollBarVisibility" Value="Hidden"/> </Trigger> </Style.Triggers> </Style> </Grid.Resources> <syncfusion:EditControl HorizontalContentAlignment="Left" Text="{Binding Text}" DocumentLanguage="SQL"/> </Grid>
The following screenshots illustrates the output of the above code example
On mouse over:
On mouse leave: