Detecting and Implementing Scrollbar Style in Window 8/RT Application

156 Views Asked by At

I am developing a Custom Control to be placed inside a ScrollViewer, I have Custom coded a generic.xaml for applying visual style for the Scrollviewer.

                        <ScrollBar x:Name="VerticalScrollBar"
                                   Grid.Row="0"
                                   Grid.Column="1"
                                   Width="18"
                                   Margin="0,-1,-1,-1"
                                   IndicatorMode="TouchIndicator"
                                   IsTabStop="False"
                                   Maximum="{TemplateBinding ScrollableHeight}"

The Problem I am facing is, I need to set the IndicatorMode to TouchIndicator/MouseIndicator based on whether the user is using Touch Devices or not. Is there a way to do it?

Thanks

Arun Selva Kumar. B

1

There are 1 best solutions below

0
On BEST ANSWER

Used Visual State Manager to achieve the requirement.