<
telerikInput:RadCalendar
/>
<
telerikInput:RadCalendar
x:Name
=
"Calendar"
>
<
telerikInput:RadCalendar.BlackoutCellStyle
>
<
telerikInput:CalendarCellStyle
>
<
telerikInput:CalendarCellStyle.ContentStyle
>
<
Style
TargetType
=
"TextBlock"
>
<
Setter
Property
=
"Margin"
Value
=
"4"
/>
<
Setter
Property
=
"FontSize"
Value
=
"16"
/>
<
Setter
Property
=
"Foreground"
Value
=
"#546363"
/>
<
Setter
Property
=
"TextAlignment"
Value
=
"Center"
/>
<
Setter
Property
=
"VerticalAlignment"
Value
=
"Bottom"
/>
<
Setter
Property
=
"HorizontalAlignment"
Value
=
"Left"
/>
</
Style
>
</
telerikInput:CalendarCellStyle.ContentStyle
>
<
telerikInput:CalendarCellStyle.DecorationStyle
>
<
Style
TargetType
=
"Border"
>
<
Setter
Property
=
"Background"
Value
=
"#28363D"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"DarkGray"
/>
</
Style
>
</
telerikInput:CalendarCellStyle.DecorationStyle
>
</
telerikInput:CalendarCellStyle
>
</
telerikInput:RadCalendar.BlackoutCellStyle
>
</
telerikInput:RadCalendar
>
this
.Calendar.DisplayDateStart =
new
DateTime(2013, 6, 5);
public
class
CustomStateSelector : CalendarCellStateSelector
{
protected
override
void
SelectStateCore(CalendarCellStateContext context, RadCalendar container)
{
if
(context.Date ==
new
DateTime(2013, 6, 13) || context.Date ==
new
DateTime(2013, 6, 15))
{
context.IsBlackout =
true
;
}
}
}
public
class
CustomStyleSelector : CalendarCellStyleSelector
{
public
DataTemplate SpecialBlackoutCell
{
get
;
set
;
}
protected
override
void
SelectStyleCore(CalendarCellStyleContext context, RadCalendar container)
{
if
(context.Date ==
new
DateTime(2013, 6, 13) || context.Date ==
new
DateTime(2013, 6, 15))
{
context.CellTemplate = SpecialBlackoutCell;
}
}
}
<
local:CustomStateSelector
x:Key
=
"CustomStateSelector"
/>
<
local:CustomStyleSelector
x:Key
=
"CustomStyleSelector"
>
<
local:CustomStyleSelector.SpecialBlackoutCell
>
<
DataTemplate
>
<
Grid
>
<
TextBlock
Foreground
=
"#D14900"
FontSize
=
"16"
HorizontalAlignment
=
"Right"
FontFamily
=
"Segoe UI Symbol"
Text
=
"⏰"
Margin
=
"2"
/>
<
TextBlock
Text
=
"{Binding Label}"
Foreground
=
"#D14900"
FontSize
=
"16"
VerticalAlignment
=
"Bottom"
Margin
=
"6,0,0,4"
/>
</
Grid
>
</
DataTemplate
>
</
local:CustomStyleSelector.SpecialBlackoutCell
>
</
local:CustomStyleSelector
>
<
telerikInput:RadCalendar
x:Name
=
"Calendar"
CellStateSelector
=
"{StaticResource CustomStateSelector}"
CellStyleSelector
=
"{StaticResource CustomStyleSelector}"
BlackoutCellStyle
=
"{StaticResource CustomCellStyle}"
/>
Georgi worked at Progress Telerik to build a product that added the Progress value into the augmented and virtual reality development workflow.