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

Problems to change style of navigation control

5 Answers 139 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kirstin
Top achievements
Rank 1
Kirstin asked on 18 Feb 2015, 04:52 PM
Hi altogether,

I would like to change the style of the navigation control of the rad calendar control. I first tried to override the corresponding Telerik named brushes (e.g. TelerikCalendarNavigationControlBackgroundBrush) but no reaction on that.

Next I tried with manipulating the template of the <Calendar:CalendarNavigationControl> control in the calendars template but executing the app results in the following error.

System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
   at Windows.UI.Xaml.FrameworkElement.MeasureOverride(Size availableSize)
   at Telerik.UI.Xaml.Controls.RadControl.MeasureOverride(Size availableSize)

To reproduce the error you can just add the calendar control to a blank universal app, right click on the calendar in the visual Editor > Edit Template > Edit a copy and then do the same for the Navigation control: rightclick on it in the visual Editor > Edit Template > Edit a copy. Just after executing I get the error although I didn't Change something

So any ideas on how to fix that issue / how to Change the Navigation control style?

Thank you :)

5 Answers, 1 is accepted

Sort by
0
Kirstin
Top achievements
Rank 1
answered on 18 Feb 2015, 05:00 PM
Update: the overriding of the Telerik brushes works but how to change style aspects for which there are no corresponding brushes like the font Family of the Navigation control?
0
Dimitrina
Telerik team
answered on 23 Feb 2015, 02:37 PM
Hello Kirstin,

Please find an attached project that demonstrates this scenario.

I hope this helps. Let us know if you have further questions.

Regards,
Dimitrina
Telerik

0
Nitesh
Top achievements
Rank 1
answered on 17 Mar 2015, 07:58 AM
Hi Dimitrina,

i have followed the document as mentioned here :-
http://docs.telerik.com/windows-universal/controls/radcalendar/styling/teleriknamedbrushes

But how can i change the background of navigation control , though it is mentioned here and also i need to change the background of days row and the dates cells.
Also i am trying to build calendar attached inline which i have made using silverlight toolkit and currently i am working on runtime app which does not support silverlight toolkit and i found that telerik calendar is much helpful for our app in calendar.

Please guide.

Thanks,
NItesh
0
Rosy Topchiyska
Telerik team
answered on 19 Mar 2015, 11:17 AM
Hello Nitesh,

I believe that I have answered your questions in a support ticket, but for the general public, I will attach the sample project that demonstrates how to use the Telerik named brushes and a custom CalendarCellStyleSelector to achieve the desired calendar style.

Let us know if you have further questions.

Regards,
Rosy Topchiyska
Telerik

0
Nitesh
Top achievements
Rank 1
answered on 19 Mar 2015, 03:22 PM
HI Rosy,

Thanks for quick help.

Regards,
NItesh
Tags
Calendar
Asked by
Kirstin
Top achievements
Rank 1
Answers by
Kirstin
Top achievements
Rank 1
Dimitrina
Telerik team
Nitesh
Top achievements
Rank 1
Rosy Topchiyska
Telerik team
Share this question
or