Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

ScrollBar Thumb not working (after applying template)- WPF

$
0
0

Hi,

   I have a scrollbar for whichi I  am applying template and the XAML is given below. I have two questions from the below XAML. 

  •     When I drag the thumb, its not moving.
  •     How to increase the size of Thumb>
<ScrollBar Minimum="0" Maximum="100" Orientation="Vertical" Grid.Column="4"><ScrollBar.Style><Style TargetType="ScrollBar"><Setter Property="Template"><Setter.Value ><ControlTemplate TargetType="ScrollBar"><Grid ><Grid.RowDefinitions><RowDefinition Height="20"/><RowDefinition Height="*"/><RowDefinition Height="20"/></Grid.RowDefinitions><RepeatButton Command="ScrollBar.PageUpCommand" Content="up"/><Track Name="trck" IsDirectionReversed="true" Grid.Row="1"><Track.IncreaseRepeatButton ><RepeatButton Command="ScrollBar.PageDownCommand" Opacity="0" Background="Transparent"  /></Track.IncreaseRepeatButton><Track.Thumb ><Thumb   Foreground="Red"><Thumb.Style><Style  TargetType="Thumb"><Setter Property="Height" Value="30"/><Setter Property="Template"><Setter.Value><ControlTemplate TargetType="Thumb"><Ellipse Fill="Orange" Width="20" Height="30"/></ControlTemplate></Setter.Value></Setter></Style></Thumb.Style></Thumb></Track.Thumb><Track.DecreaseRepeatButton ><RepeatButton Command="ScrollBar.PageUpCommand" Opacity="0" Background="Transparent"  /></Track.DecreaseRepeatButton></Track><RepeatButton Content="Dn" Command="ScrollBar.PageDownCommand" Grid.Row="2"/></Grid></ControlTemplate></Setter.Value></Setter></Style></ScrollBar.Style></ScrollBar>

I couldnt see my orange color Ellipse (inside the Thumb) even after increasing hte size.

Kindly help me in above two questions.

Sanjay.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>