Hi,
I have modified the ControlTemplate of the MonthView style called "TimeRuleMonthViewItemStyle"
I made the GoToDay button stretch vertically over the whole area. The content of the button is also replaced by a stackpanel like this:
This works fine, but I also use colored backgrounds for saturdays and sundays with special slots.
And they will not fill the whole area (see attached image).
I have looked everywhere but can't find what margin or other setting that might cause this.
Regards,
Håkan
I have modified the ControlTemplate of the MonthView style called "TimeRuleMonthViewItemStyle"
I made the GoToDay button stretch vertically over the whole area. The content of the button is also replaced by a stackpanel like this:
<
Style
x:Key
=
"TimeRulerMonthViewItemStyle"
TargetType
=
"local:TimeRulerMonthViewItem"
>
<
Setter
Property
=
"Foreground"
Value
=
"{StaticResource MonthViewTimeRulerItemForeground_Normal}"
/>
<
Setter
Property
=
"Margin"
Value
=
"0 -1 -1 1"
/>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"local:TimeRulerMonthViewItem"
>
<
Grid
>
<
telerik:RadButton
VerticalAlignment
=
"Stretch"
Padding
=
"0"
Style
=
"{StaticResource GoToDayButtonStyle}"
Command
=
"local:RadScheduleViewCommands.SetDayViewMode"
CommandParameter
=
"{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.DateTime.Date}"
>
<
StackPanel
Orientation
=
"Vertical"
VerticalAlignment
=
"Center"
IsHitTestVisible
=
"False"
>
<
TextBlock
Text
=
"{Binding Content.DateTime.Day, RelativeSource={RelativeSource TemplatedParent}}"
Foreground
=
"{StaticResource TextBrush}"
Opacity
=
"0.75"
HorizontalAlignment
=
"Center"
FontSize
=
"24"
/>
<
TextBlock
Text
=
"{Binding Content.DateTime, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DateTimeConverter}, ConverterParameter='MMMM'}"
Foreground
=
"{StaticResource TextBrush}"
Opacity
=
"0.75"
HorizontalAlignment
=
"Center"
FontSize
=
"10"
Margin
=
"0,-10,0,0"
/>
</
StackPanel
>
</
telerik:RadButton
>
</
Grid
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
This works fine, but I also use colored backgrounds for saturdays and sundays with special slots.
And they will not fill the whole area (see attached image).
I have looked everywhere but can't find what margin or other setting that might cause this.
Regards,
Håkan