简体   繁体   English

Xamarin Calender使用PCL

[英]Xamarin Calender using PCL

I am looking for a calender in Xamarin Form PCL. 我正在寻找Xamarin Form PCL的压光机。 After several hours of research I am able to develop one Calander using XAMForms.Controls.Calender but look and feel is not same. 经过几个小时的研究,我能够使用XAMForms.Controls.Calender开发一个Calander,但外观和感觉并不相同。

I need calender with events as shown in attached Image. 我需要日历进行事件处理,如所附图片所示。 在此处输入图片说明

Use syncfusion xamarin Calendar Control and Customise as per your need 根据需要使用syncfusion xamarin Calendar Control和Customize

Refer https://www.syncfusion.com/products/xamarin/calendar 请参阅https://www.syncfusion.com/products/xamarin/calendar

and https://help.syncfusion.com/xamarin/sfcalendar/getting-started https://help.syncfusion.com/xamarin/sfcalendar/getting-started

You can customise each cell of calendar in syncfusion calendar control 您可以在syncfusion日历控件中自定义日历的每个单元格

On GitHub there are some plugin 在GitHub上有一些插件

XamForms.Controls.Calendar XamForms.Controls.Calendar

new Calendar
{
  BorderColor = Color.Gay,
  BorderWidth = 3,
  BackgroundColor = Color.Gay,
  StartDay = DayOfWeek.Sunday,
  StartDate = DateTime.Now
}

TheAlmightyBob/Calendars 全能鲍勃/日历

rid00z/Xamarin.Forms.Calendar rid00z / Xamarin.Forms.Calendar

public class SampleCalendarPage : ContentPage 
{
    CalendarView _calendarView;
    StackLayout _stacker;

    public SampleCalendarPage ()
    {
        Title = "Calendar Sample";

        _stacker = new StackLayout ();
        Content = _stacker;

        _calendarView = new CalendarView() {
            VerticalOptions = LayoutOptions.Start,
            HorizontalOptions = LayoutOptions.CenterAndExpand
        };
        _stacker.Children.Add (_calendarView);
        _calendarView.DateSelected += (object sender, DateTime e) => {
            _stacker.Children.Add(new Label() 
                { 
                    Text = "Date Was Selected" + e.ToString("d"),
                    VerticalOptions = LayoutOptions.Start,
                    HorizontalOptions = LayoutOptions.CenterAndExpand,
                });
        };

    }
}

An option I've been using is the ComponentOne Calendar. 我一直在使用的一个选项是ComponentOne日历。 This has templating support for the daypart of the calendar so you can create any look and feel you want for the day cells. 这对日历的时段具有模板支持,因此您可以为日单元创建所需的外观。 It is not free though. 它不是免费的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM