I have been working on an issue where I want a scrollviewer whose scroll bar is replaced with a button to scroll left and a button to scroll right. (seperate buttons in different grid locations), however I have been struggling to get my head around it as the scrollviewers quite a complicated control.
Lets say I am creating a new control template for scrollviewer and I want to add an extra button into the template that would scroll the content to the right. How would I hook into the command that moves the horizontalscrollbar right. For example my code might have the following scroll bar and buttons and I want to hook into "horizontalscrollbars" right scroll button.
<ScrollBar x:Name="HorizontalScrollBar"
Grid.Column="0"
IsTabStop="False"
Maximum="{TemplateBinding ScrollableWidth}"
Margin="0,0,0,0"
Minimum="0"
Orientation="Horizontal"
Grid.Row="0"
Visibility="Collapsed"
Value="{TemplateBinding HorizontalOffset}"
ViewportSize="{TemplateBinding ViewportWidth}"
/>
<Button Grid.Column="0"
x:Name="LeftBtnScroll">
</Button>
<Button Grid.Column="2"
x:Name="RightBtnScroll">
</Button>
p.s I don't have access to blend.