This question is locked. New answers and comments are not allowed.
Hi!
We use the ScheduleView in a scheduler application.
We use the MonthView to display how many appointments of a specific type that exist on each day.
Therefore we have a different appointment source for the MonthView that always have 6 appointments each day, one for each type.
We show them as small rectangles below each other with different colors and a number inside telling how many appointments of that specific type that exists on that day (see attached image).
If no appointments of one type exists, it's hidden. As you can see in the image, there is only four rectangles. There are actually 6 but two are hidden.
The problem is that when the ScheduleView is first loaded, the last (red) appointment is not displayed.
I have tested to place a refresh button that will just set the appoinment source to null and back again, then all of them will be displayed, very strange. I can't seem to do this in code anywhere, it must be user initialized.
As you can see in the image I have retemplated the MonntView, and removed the header for each day and also the button that will expand a day slot to show more appointments. I think it must be something with this button that is still present and hiding my last appointment. Becaus if I reduce the height of the appointments, they are all visible from the start. So there must be something hiding the last appointment.
Any ideas?
Here is my control template:
Regards,
Håkan
We use the ScheduleView in a scheduler application.
We use the MonthView to display how many appointments of a specific type that exist on each day.
Therefore we have a different appointment source for the MonthView that always have 6 appointments each day, one for each type.
We show them as small rectangles below each other with different colors and a number inside telling how many appointments of that specific type that exists on that day (see attached image).
If no appointments of one type exists, it's hidden. As you can see in the image, there is only four rectangles. There are actually 6 but two are hidden.
The problem is that when the ScheduleView is first loaded, the last (red) appointment is not displayed.
I have tested to place a refresh button that will just set the appoinment source to null and back again, then all of them will be displayed, very strange. I can't seem to do this in code anywhere, it must be user initialized.
As you can see in the image I have retemplated the MonntView, and removed the header for each day and also the button that will expand a day slot to show more appointments. I think it must be something with this button that is still present and hiding my last appointment. Becaus if I reduce the height of the appointments, they are all visible from the start. So there must be something hiding the last appointment.
Any ideas?
Here is my control template:
<
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
>
<!--<
Grid
>
<
telerik:RadButton
Padding
=
"0"
VerticalAlignment
=
"Top"
Height
=
"22"
Style
=
"{StaticResource GoToDayButtonStyle}"
Command
=
"local:RadScheduleViewCommands.SetDayViewMode"
CommandParameter
=
"{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.DateTime.Date}"
>
<
ContentPresenter
Margin
=
"{TemplateBinding Padding}"
/>
</
telerik:RadButton
>
<
telerik:RadToggleButton
Visibility
=
"{Binding ExpandButtonVisibility}"
IsChecked
=
"{Binding IsExpanded, Mode=TwoWay}"
Style
=
"{StaticResource ExpandMonthViewButtonStyle}"
HorizontalAlignment
=
"Right"
VerticalAlignment
=
"Bottom"
/>
</
Grid
>-->
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
Regards,
Håkan