This is a migrated thread and some comments may be shown as answers.

hide the scroll bars in RadCartesianChart

4 Answers 197 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Александр
Top achievements
Rank 1
Александр asked on 29 Oct 2015, 10:03 AM
Hello.
I use the <telerik:ChartPanAndZoomBehavior DragMode="Pan" PanMode="Both" ZoomMode="Both" /> for scaling the RadCartesianChart.
How I can hide the scroll bars?

4 Answers, 1 is accepted

Sort by
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 30 Oct 2015, 02:54 PM
Hello Александр,

You can hide the vertical and the horizontal scroll bar of the RadChartView by applying an implicit Style to the PanZoomBar like so:

<telerik:RadCartesianChart >
           <telerik:RadCartesianChart.Resources>
               <Style TargetType="telerik:PanZoomBar">
                   <Setter Property="Visibility" Value="Collapsed"/>
               </Style>
           </telerik:RadCartesianChart.Resources>

I have attached a sample project where you can see this implemented. Give it a try and let me know if this is the solution you are looking for.

Regards,
Dinko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Dmitry
Top achievements
Rank 1
answered on 28 Sep 2016, 10:19 AM
Nice solution! Finally I found the solution to my problem similar by this post.
0
Philip
Top achievements
Rank 1
answered on 24 Jan 2017, 08:42 PM

I wonder if the style is missing BasedOn="{StaticResource PanZoomBarStyle}"

It doesn't matter if you just want to hide it, but I think it's needed if you want to toggle visibility etc.

0
Martin Ivanov
Telerik team
answered on 27 Jan 2017, 05:10 PM
Hello Philip,

The BasedOn attribute is required for custom styles only when using NoXaml dlls and the Implicit Styles theming mechanism. For more information about this see the Setting a Theme and Styling Controls help articles.

If you are not using NoXaml dlls you can skip setting the BasedOn property. Actually, in this scenario if you set the property, an exception will be thrown because the inherited Style won't be found.

If you are using NoXaml dlls and skip setting the BasedOn property, the custom style will completely override the default style of the control. This includes also its Template. Which means nothing will be displayed.

Regards,
Martin
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ChartView
Asked by
Александр
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Dmitry
Top achievements
Rank 1
Philip
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or