TrySetViewMode always returns false

4 posts, 0 answers
  1. Fabio
    Fabio avatar
    20 posts
    Member since:
    Apr 2015

    Posted 29 Apr 2015 Link to this post

    Hello

     I am using RadCalendar Component and I am setting the TrySetViewMode to CalendarViewMode.Year but the method is always returning false. I am using Xamarin forms and testing with an Android device.

     

        public YearCalendarView()
            {
                StackLayout mainView = new StackLayout
                {
                    Padding = 0,
                    Spacing = 0,
                };

                CustomizeNavigationBar(mainView);

                RadCalendar calendar = new RadCalendar
                {
                    VerticalOptions = LayoutOptions.FillAndExpand,
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                };

                bool setView = calendar.TrySetViewMode(CalendarViewMode.Year);

                Console.WriteLine(setView);

                mainView.Children.Add(calendar);

                Content = mainView;
            }

  2. Fabio
    Fabio avatar
    20 posts
    Member since:
    Apr 2015

    Posted 30 Apr 2015 in reply to Fabio Link to this post

    Mhhhmm never mind, calling the method inside OnAppearing did the thing.

     

    protected override void OnAppearing()
            {
                base.OnAppearing();

                bool setView = calendar.TrySetViewMode(CalendarViewMode.Year);

                Console.WriteLine(setView);
            }

  3. DevCraft banner
  4. Lyndon
    Lyndon avatar
    1 posts
    Member since:
    May 2014

    Posted 18 Nov 2015 in reply to Fabio Link to this post

    Thanks for posting this. I would really like to see better documentation for this product.     
  5. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    550 posts

    Posted 23 Nov 2015 Link to this post

    Hello,

    Thank you for the feedback. We have added new events that occur when the native control is ready and it is safe to call methods that update the calendar view mode. We have also updated our documentation: Calendar View Mode

    Please, let us know if you have any other questions.

    Regards,
    Rosy Topchiyska
    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
DevCraft banner