gotoDayButton style per expanding days

2 posts, 0 answers
  1. Marco
    Marco avatar
    3 posts
    Member since:
    Sep 2012

    Posted 03 Jun 2013 Link to this post

    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">
                    <ControlTemplate TargetType="local:TimeRulerMonthViewItem">

                            <mLocal:HeaderConverter groupHeader="{Binding}"  items="{Binding Items}" trItem="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />

                            <telerik:RadButton Height="22"
                                               CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent},
                                               Style="{StaticResource GoToDayButtonStyle}">
                                <ContentPresenter Margin="{TemplateBinding Padding}" />
  2. Yana
    Yana avatar
    4615 posts

    Posted 03 Jun 2013 Link to this post

    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?


    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top