如何将 ContentPage 与 UIViewController 一起使用 - VisualStudio IOS
How to use ContentPage with UIViewController - VisualStudio IOS
有没有办法在 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();
}
我附上了代码示例,它将 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);
}
有没有办法在 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();
}
我附上了代码示例,它将 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);
}