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

Axis Title Style.

1 Answer 218 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Lee asked on 16 May 2014, 12:21 PM

My ' MultiVerticalAxis' is setted <Setter Property="Stroke" Value="{Binding Converter={StaticResource seriesColorConverter}}"/>.

In converter, 

axis.Title = obj.Unit;
axis.Maximum += 0.5;
axis.Minimum += -0.5;
axis.LineStroke = new SolidColorBrush(Colors.White);
axis.Foreground = new SolidColorBrush(Colors.White);
axis.FontSize = 11;

In this picture, I want to rotate 'Title Font'

What should I do??

1 Answer, 1 is accepted

Sort by
Martin Ivanov
Telerik team
answered on 19 May 2014, 11:52 AM
Hi Lee,

In order to rotate the Title of your axis you can define a DataTemplate with a native TextBlock element and set it as a value of the TitleTemplate property of the axis.  Then apply RotateTransform on the TextBlock. Here is an example in code:
<telerik:LinearAxis Title="Axis" >
            <TextBlock Text="{Binding}" TextOptions.TextFormattingMode="Display">
                    <RotateTransform Angle="90" />
To set the template in code behind you can define it in your application resources and get it in code behind by its x:Key property.
axis.TitleTemplate = this.Resources["myTitleTemplate"] as DataTemplate;

Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Asked by
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question