HI!
I want to hide the ExpandMonthViewButton in the month view, and mark with a different color the gotoDayButton for the days that cause the ExpandMonthViewButton to be visible.
E.G. if in the first week I've many appointments on the day 5, now on all days of the first week ExpandMonthViewButton became visisble, instead I want only the day 5 with a gotodaybutton with a different color.
To achieve that I've edited the TimeRulerMonthViewItemStyle, hiding the
ExpandMonthViewButton and placing a usercontrol binded to the items of the group header and to the isExpanded property.
the idea is to check for every day if is expanded and if there are more than 1 appointments, in that case my control became visisble.
but I've an issue, my control became visisble only if I switch to the week view and then back to the month view.
< Style x:Key="TimeRulerMonthViewItemStyle" TargetType="local:TimeRulerMonthViewItem">
<Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Normal}" />
<Setter Property="Margin" Value="0 -1 -1 0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:TimeRulerMonthViewItem">
<Grid>
<mLocal:HeaderConverter groupHeader="{Binding}" items="{Binding Items}" trItem="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />
<telerik:RadButton Height="22"
VerticalAlignment="Top"
Command="local:RadScheduleViewCommands.SetDayViewMode"
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent},
Path=Content.DateTime.Date}"
Padding="0"
Style="{StaticResource GoToDayButtonStyle}">
<ContentPresenter Margin="{TemplateBinding Padding}" />
</telerik:RadButton>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
I want to hide the ExpandMonthViewButton in the month view, and mark with a different color the gotoDayButton for the days that cause the ExpandMonthViewButton to be visible.
E.G. if in the first week I've many appointments on the day 5, now on all days of the first week ExpandMonthViewButton became visisble, instead I want only the day 5 with a gotodaybutton with a different color.
To achieve that I've edited the TimeRulerMonthViewItemStyle, hiding the
ExpandMonthViewButton and placing a usercontrol binded to the items of the group header and to the isExpanded property.
the idea is to check for every day if is expanded and if there are more than 1 appointments, in that case my control became visisble.
but I've an issue, my control became visisble only if I switch to the week view and then back to the month view.
< Style x:Key="TimeRulerMonthViewItemStyle" TargetType="local:TimeRulerMonthViewItem">
<Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Normal}" />
<Setter Property="Margin" Value="0 -1 -1 0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:TimeRulerMonthViewItem">
<Grid>
<mLocal:HeaderConverter groupHeader="{Binding}" items="{Binding Items}" trItem="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />
<telerik:RadButton Height="22"
VerticalAlignment="Top"
Command="local:RadScheduleViewCommands.SetDayViewMode"
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent},
Path=Content.DateTime.Date}"
Padding="0"
Style="{StaticResource GoToDayButtonStyle}">
<ContentPresenter Margin="{TemplateBinding Padding}" />
</telerik:RadButton>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>