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

Change the font size?

1 Answer 560 Views
TimeLine
This is a migrated thread and some comments may be shown as answers.
Ji
Top achievements
Rank 1
Ji asked on 22 Mar 2019, 03:17 PM

in the Resources i define the text format for TimelineItemTemplate

<DataTemplate x:Key="ItemWithDurationTemplate">

<TextBlock  Foreground="Black" FontFamily="Segoe UI" FontSize="12"  Text="{Binding  Path=DataItem.recognitions}">

</DataTemplate >

TimelineItemTemplate="{StaticResource ItemWithDurationTemplate}"

How can I change the font size when the mouse  is scrolling?

Shoule i use the Radtimeline_MouseWheel event?

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 27 Mar 2019, 11:43 AM
Hello Ji,

What comes up to my mind is to first bind the FontSize property of the TextBlock to a custom property from your model. Then you can subscribe to the VisiblePeriodChanged event of the RadTimeLine control. In the event handler, you can create your own logic which changes the FontSize of the TextBlock depending on your conditions. The things here which need to be taking into consideration is that in what scenario to change the size. This event will be fired when the user scroll and zoom as the visible period is changed. 

Another approach will be to subscribe to the ItemIntervalChanged event. This way you could apply different FontSize depending on the current interval. You can get the new and old interval from the event arguments.

Hope one of these approaches will work for you.

Regards,
Dinko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
TimeLine
Asked by
Ji
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or