【问题标题】:How to use ContentPage with UIViewController - VisualStudio IOS如何在 UIViewController 中使用 ContentPage - VisualStudio IOS
【发布时间】:2017-06-30 21:47:22
【问题描述】:

有没有办法在UIViewController 中使用ContentPage

我正在使用继承 View 的 SyncFusion SfCalendar,我想在我的视图控制器中显示 callendar。

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

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

        base.ViewDidLoad();
    }

【问题讨论】:

    标签: c# ios syncfusion sfcalendar


    【解决方案1】:

    我附上了代码示例,它将 SFCalendar 添加到 ViewController 视图。

        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);
    
        }
    

    【讨论】:

      猜你喜欢
      • 2017-08-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-28
      • 1970-01-01
      • 1970-01-01
      • 2023-02-14
      相关资源
      最近更新 更多