1

Is there a way to use the ContentPage in a UIViewController?

I'm using SyncFusion SfCalendar that inherits View and i want to show the callendar in my view controller.

    SfCalendar _calendar;
    public CalendarTest(IntPtr handle) : base(handle)
    {
    }

    public override void ViewDidLoad()
    {
        _calendar = new SfCalendar();
        _calendar.OnDateCellHolding += DateCellClicked;

        base.ViewDidLoad();
    }
Quality Catalyst
  • 6,531
  • 8
  • 38
  • 62
Lucas Gazire
  • 301
  • 5
  • 16

1 Answers1

1

I have attached the code sample, which added the SFCalendar to ViewController view.

    public override void ViewDidLoad()
    {
        SFCalendar calendar = new SFCalendar();
        base.ViewDidLoad();
        calendar.Frame = new CGRect(0, 0, View.Frame.Width, View.Frame.Height);
        SFMonthViewSettings month = new SFMonthViewSettings();
        month.BorderColor = UIColor.Red;
        calendar.MonthViewSettings = month;
        View.AddSubview(calendar);

    }