In latest version, I change the ShapeSize

13 posts, 0 answers
  1. FS
    FS avatar
    21 posts
    Member since:
    Mar 2012

    Posted 13 Jul Link to this post

    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

  2. FS
    FS avatar
    21 posts
    Member since:
    Mar 2012

    Posted 17 Jul in reply to FS Link to this post

    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

     

     

     

  3. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    451 posts

    Posted 18 Jul Link to this post

    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
  4. FS
    FS avatar
    21 posts
    Member since:
    Mar 2012

    Posted 18 Jul in reply to Stefan Nenchev Link to this post

    Thanks Stefan.
  5. Adam
    Adam avatar
    21 posts
    Member since:
    Aug 2017

    Posted 11 Aug Link to this post

    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,
                    };
                };
  6. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    451 posts

    Posted 14 Aug Link to this post

    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
  7. Adam
    Adam avatar
    21 posts
    Member since:
    Aug 2017

    Posted 14 Aug Link to this post

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

  8. Adam
    Adam avatar
    21 posts
    Member since:
    Aug 2017

    Posted 14 Aug Link to this post

    It is important to note that the AppointmentsSource is being filled with server side data.
  9. Adam
    Adam avatar
    21 posts
    Member since:
    Aug 2017

    Posted 14 Aug Link to this post

    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
  10. Adam
    Adam avatar
    21 posts
    Member since:
    Aug 2017

    Posted 14 Aug Link to this post

  11. Adam
    Adam avatar
    21 posts
    Member since:
    Aug 2017

    Posted 16 Aug Link to this post

    Hello @StefanNenchev any workaround on this?
  12. Adam
    Adam avatar
    21 posts
    Member since:
    Aug 2017

    Posted 16 Aug Link to this post

    I was able to create a workaround using a Custom Event Adapter on Android.
  13. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    451 posts

    Posted 17 Aug Link to this post

    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
Back to Top