Hi support:
Today I upgraded the Xamarin UI from R3 2016 to the R2 2017. The problem is that under Android I cant find a way to change the ShapeSize nor ShapeType of the appointment indicator of the Month view. In the past I could display a rectangle as
this.calendar.AppointmentsStyle.ShapeSize = new Size(5, 1);
To show a line in the calendarcell to be able to show many appointments, but now the cell can only hold two rectangles, so its like is ignoring my properties values.
I tried to change the Shape Type without luck like this:
this.calendar.AppointmentsStyle = new CalendarAppointmentsStyle
{
DisplayMode = AppointmentDisplayMode.Shape,
Padding = new Thickness(5, 5, 5, 5),
MaxCount = 20,
Spacing = 1,
ShapeType = CalendarAppointmentShapeType.Ellipse,
};
What could I be missing here.
Thanks
David
12 Answers, 1 is accepted
Hi Support:
We need to know why we cant shape the style of the shape in Android.
Please could you answer my post ?
Thanks
David
We have managed to replicate the issue in Android so I have logged it as a bug in our internal system. You can track its progress on the following link from our Ideas & Feedback portal - Calendar[Android]: Setting the AppointmentsStyle before the control is loaded is not respected. I have added some points to your account for reporting the issue.
In the meantime, setting the AppointmentsStyte in the NativeControlLoaded event seems to fix the issue at my end. Please give it a try in your actual application as well.
Regards,
Stefan Nenchev
Progress Telerik
Calendar.NativeControlLoaded += (sender, e) =>
{
//System.Diagnostics.Debug.WriteLine("Hola");
Calendar.AppointmentsStyle = new CalendarAppointmentsStyle
{
DisplayMode = AppointmentDisplayMode.Shape,
Padding = new Thickness(1, 2, 1, 2),
MaxCount = 3,
Spacing = 2,
ShapesHorizontalLocation = HorizontalLocation.Center,
ShapesVerticalLocation = VerticalLocation.Bottom,
ShapesOrientation = Orientation.Horizontal,
ShapeSize = new Size(8, 8),
ShapeType = CalendarAppointmentShapeType.Ellipse,
};
};
I have double-checked the approach and applying the AppointmentsStyle in the event works properly. Would it be possible to share more information on your setup or provide a sample project which we can examine from our side? What version of the Telerik UI for Xamarin suite are you using? I have attached a demo for your reference.
Have a great week.
Regards,
Stefan Nenchev
Progress Telerik
@StefanNenchev Looks like having a binded list to the calendar like this:
<renderer:CalendarCustomRenderer
x:Name="Calendar"
AppointmentsSource="{Binding CalendarAppointments}"
SelectedDate="{Binding SelectedDate, Mode=TwoWay}"
NativeControlLoaded="CalendarIsLoaded"
HeightRequest="320">
</renderer:CalendarCustomRenderer>
Does not respect the CalendarAppointmentsStyle (looks like another bug.)
https://media.giphy.com/media/3oEhmJXTNcedwTKOJi/giphy.gif
Indeed, changing the AppointmentsSource of the RadCalendar results in the AppointmentsStyle being lost. I have logged the behavior as a bug in our system. You can track its progress on the following link from our Ideas & Feedback portal - Calendar: [Android] Changing the AppointmentsSource causes the AppointmentsStyle to not be respected. I have also added some points to your account for reporting the issue.
I am glad to see that you have managed to find a workaround. If convenient for you, providing the custom adapter will be appreciated as it might be useful for other customers that are affected by the issue.
Have a great rest of the week.
Regards,
Stefan Nenchev
Progress Telerik