- Where Developers Learn, Share, & Build Careers


I am using Telerich's Red Calendar control for my Windows Phone application. I want to change the background color of SelectedDate in WindowsPhone's RadCalendar ... is there any way to change this?

You can change the properties of the selected day using a special template. Here is a sample data template for one day:

  & lt; TelerikInput: RadCalendar & gt; & Lt; TelerikInput: RadCalendar.ItemTemplate & gt; & Lt; DataTemplate & gt; & Lt; Grid margin = "5" & gt; & Lt; TextBlock Text = "{Binding Extension Text}" FontSism = "7" MaxHight = "25" Vertical Element = "Top" margin = "0, -2,0,0" /> & Lt; Text block text = "{binding text}" workspaceElement = "bottom" horizontal alignment = "left" /> & Lt; / Grid & gt; & Lt; / DataTemplate & gt; & Lt; / TelerikInput: RadCalendar.ItemTemplate & gt; & Lt; / TelerikInput: RadCalendar & gt;   

Example of a special template for the weekend

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; UserControl.Resources & gt; & Lt; Local: WeekendDector X: Key = "WeekendDayceller" & gt; & Lt; Local: WeekendDaySelector.SpecialTemplate & gt; & Lt; DataTemplate & gt; & Lt; Grid margin = "5" & gt; & Lt; Image source = "/ calendar / images / special day page" width = "24" height = "24" /> & Lt; TextBlock Text = "{binding text}" x: name = "textproducer" vertical alignment = "bottom" horizontal alignment = "left" /> & Lt; / Grid & gt; & Lt; / DataTemplate & gt; & Lt; / Local: WeekendDaySelector.SpecialTemplate & gt; & Lt; / Local: WeekendDaySelector & gt; & Lt; /UserControl.Resources> & Lt; Telecommunication input: Radclalder item template plugin = "{static resource weekdayseller") />   

Template selector now

  public class weekend option: datatappletlet selector {public datatappletplet special template {get; Set; } Public Override DataTimetal SelectionTemplate (Object Item, Dependency Object Container) {CalendarButtonContentInfo info = CalendarButtonContentInfo as Item; Calendar button button = container in the form of calendar button; If (! Button.IsFromCurrentView) return tap; If (info.Date == tap) return tap; If (info.Date.Value.DayOfWeek == DayOfWeek.Saturday || info.Date.Value.DayOfWeek == DayOfYik.Candy) {Return Special Template; } Return basis Select the item (item, container); }}   

You can learn more.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -