This is a migrated thread and some comments may be shown as answers.
In latest version, I change the ShapeSize
12 Answers 22 Views
This is a migrated thread and some comments may be shown as answers.
FS
Top achievements
Rank 1
FS asked on 13 Jul 2017, 04:21 PM

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

Sort by
0
FS
Top achievements
Rank 1
answered on 17 Jul 2017, 06:29 PM

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

 

 

 

0
Stefan Nenchev
Telerik team
answered on 18 Jul 2017, 10:21 AM
Hi 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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
FS
Top achievements
Rank 1
answered on 18 Jul 2017, 03:04 PM
Thanks Stefan.
0
Adam
Top achievements
Rank 1
answered on 11 Aug 2017, 06:42 PM
I am having the same issue and it seems that using NativeControlLoaded event is not fixing the issue:

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,
                };
            };
0
Stefan Nenchev
Telerik team
answered on 14 Aug 2017, 10:39 AM
Hello Adam,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Adam
Top achievements
Rank 1
answered on 14 Aug 2017, 07:40 PM

@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.)

0
Adam
Top achievements
Rank 1
answered on 14 Aug 2017, 07:58 PM
It is important to note that the AppointmentsSource is being filled with server side data.
0
Adam
Top achievements
Rank 1
answered on 15 Aug 2017, 12:55 AM
I have attached a video where if you set the AppointmentsSource before the appointments will have the correct UI but when you change the collection with another data then the design is reset:

https://media.giphy.com/media/3oEhmJXTNcedwTKOJi/giphy.gif
0
Adam
Top achievements
Rank 1
answered on 15 Aug 2017, 12:55 AM
0
Adam
Top achievements
Rank 1
answered on 16 Aug 2017, 03:00 PM
Hello @StefanNenchev any workaround on this?
0
Adam
Top achievements
Rank 1
answered on 16 Aug 2017, 10:45 PM
I was able to create a workaround using a Custom Event Adapter on Android.
0
Stefan Nenchev
Telerik team
answered on 17 Aug 2017, 08:58 AM
Hi Adam,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
FS
Top achievements
Rank 1
Answers by
FS
Top achievements
Rank 1
Stefan Nenchev
Telerik team
Adam
Top achievements
Rank 1
Share this question
or