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

gotoDayButton style per expanding days

1 Answer 42 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Marco
Top achievements
Rank 1
Veteran
Marco asked on 03 Jun 2013, 07:37 AM
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>

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 03 Jun 2013, 10:29 AM
Hello Marco,

Could you please send us the HeaderConverter that you're using in the provided code as we need to test the exact scenario?

Regards,
Yana
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ScheduleView
Asked by
Marco
Top achievements
Rank 1
Veteran
Answers by
Yana
Telerik team
Share this question
or