Hi,
I need to customize XamZoombar' style so it looks exactly like the default WPF Scrollbar.
It has too look the same and to have the same functionality as a simple scrollbar (it should only be able to scroll, and not to zoom).
Is that possible?
Hello Darko,
You can use the ZoombarStyle to retemplate the control since there is no built-in behavior to achieve your requirement.
eg.
<Window.Resources>
<Style x:Key="ZoombarStyle" TargetType="{x:Type ig:XamZoombar}">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</Window.Resources>
<ig:XamTimeline x:Name="xamTimeline" ZoombarStyle="{StaticResource ZoombarStyle}">
Let me know if you have any questions.
Hello Michael,
Thank you. I know about ZoombarStyle, but I was hoping that you somehow supported regular scroll bar as well.
Another problem: even when I create custom ZoombarStyle, I can still use mouse to resize the "thumb" part of the zoom bar which doesn't happen on a regular scroll bar.
Is there a way to disable this?
Best regards,
Darko
Thank you for following up. There is no display mode that changes the look and feel of the XamZoombar. Can you please list your requirements, and the controls you wish to use the scrollbar with? May I ask if you have tried implementing the inbox Scrollbar/ScrollViewer controls provided by Microsoft?
To work around the click interactions to prohibit dragging and panning you can handle the control's PreviewMouseDown and cancel the event when needed.
private void XamZoombar_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{
e.Handled = true;
}
Let me know if you have any questions regarding this matter.