From: Seunghyun Choi Date: Thu, 13 Apr 2017 11:22:00 +0000 (+0900) Subject: Enhance document in CalendarView, dialog X-Git-Tag: accepted/tizen/unified/20170418.072802~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=38fb56670073a5f9b945b12c748a5e7b19e86675;p=platform%2Fcore%2Fcsapi%2Fxamarin-forms-extension.git Enhance document in CalendarView, dialog - Add document to BindableProperty - Add document for the Dialog's Buttons - Fixed Defect(null Exception) in CalendarView Change-Id: I2acdae3a859685e9c9a50c6d155ee4d598cc6a42 Signed-off-by: Seunghyun Choi --- diff --git a/Tizen.Xamarin.Forms.Extension/CalendarView.cs b/Tizen.Xamarin.Forms.Extension/CalendarView.cs index ffa466c..a5fb393 100644 --- a/Tizen.Xamarin.Forms.Extension/CalendarView.cs +++ b/Tizen.Xamarin.Forms.Extension/CalendarView.cs @@ -19,6 +19,9 @@ namespace Tizen.Xamarin.Forms.Extension /// public class CalendarView : View { + /// + /// BindableProperty.Identifies the MinimumDate bindable property. + /// public static readonly BindableProperty MinimumDateProperty = BindableProperty.Create(nameof(MinimumDate), typeof(DateTime), typeof(CalendarView), new DateTime(1902, 1, 1), coerceValue: (bindable, value) => { DateTime dateTime = (DateTime)value; @@ -29,6 +32,9 @@ namespace Tizen.Xamarin.Forms.Extension return dateTime; }); + /// + /// BindableProperty.Identifies the MaximumDate bindable property. + /// public static readonly BindableProperty MaximumDateProperty = BindableProperty.Create(nameof(MaximumDate), typeof(DateTime), typeof(CalendarView), new DateTime(2037, 12, 31), coerceValue: (bindable, value) => { DateTime dateTime = (DateTime)value; @@ -39,16 +45,32 @@ namespace Tizen.Xamarin.Forms.Extension return dateTime; }); + /// + /// BindableProperty.Identifies the FirstDayOfWeek bindable property. + /// public static readonly BindableProperty FirstDayOfWeekProperty = BindableProperty.Create(nameof(FirstDayOfWeek), typeof(DayOfWeek), typeof(CalendarView), DayOfWeek.Sunday); + /// + /// BindableProperty.Identifies the WeekDayNames bindable property. + /// public static readonly BindableProperty WeekDayNamesProperty = BindableProperty.Create(nameof(WeekDayNames), typeof(IReadOnlyList), typeof(CalendarView), new List { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }, validateValue: (bindable, value) => { List weekDayNames = (List)value; - int count = weekDayNames.Count; + if (weekDayNames != null) + { + int count = weekDayNames.Count; - return (count == 7); + return (count == 7); + } + else + { + return false; + } }); + /// + /// BindableProperty.Identifies the SelectedDate bindable property. + /// public static readonly BindableProperty SelectedDateProperty = BindableProperty.Create(nameof(SelectedDate), typeof(DateTime), typeof(CalendarView), DateTime.Today, defaultBindingMode: BindingMode.TwoWay, propertyChanged: (bindable, oldValue, newValue) => { ((CalendarView)bindable).SelectedDateChanged?.Invoke(bindable, new DateChangedEventArgs((DateTime)oldValue, (DateTime)newValue)); diff --git a/Tizen.Xamarin.Forms.Extension/Dialog.cs b/Tizen.Xamarin.Forms.Extension/Dialog.cs index 9d7699a..ca76813 100644 --- a/Tizen.Xamarin.Forms.Extension/Dialog.cs +++ b/Tizen.Xamarin.Forms.Extension/Dialog.cs @@ -4,7 +4,7 @@ using Xamarin.Forms; namespace Tizen.Xamarin.Forms.Extension { /// - /// The dialog widget displays its content with a particular direction. + /// The dialog widget displays its content with buttons and title. /// /// /// @@ -40,16 +40,34 @@ namespace Tizen.Xamarin.Forms.Extension /// public class Dialog : BindableObject { + /// + /// BindableProperty.Identifies the Content bindable property. + /// public static readonly BindableProperty ContentProperty = BindableProperty.Create(nameof(Content), typeof(View), typeof(Dialog), null); + /// + /// BindableProperty.Identifies the Positive bindable property. + /// public static readonly BindableProperty PositiveProperty = BindableProperty.Create(nameof(Positive), typeof(Button), typeof(Dialog), null); + /// + /// BindableProperty.Identifies the Neutral bindable property. + /// public static readonly BindableProperty NeutralProperty = BindableProperty.Create(nameof(Neutral), typeof(Button), typeof(Dialog), null); + /// + /// BindableProperty.Identifies the Negative bindable property. + /// public static readonly BindableProperty NegativeProperty = BindableProperty.Create(nameof(Negative), typeof(Button), typeof(Dialog), null); + /// + /// BindableProperty.Identifies the Title bindable property. + /// public static readonly BindableProperty TitleProperty = BindableProperty.Create(nameof(Title), typeof(string), typeof(Dialog), null); + /// + /// BindableProperty.Identifies the Subtitle bindable property. + /// public static readonly BindableProperty SubtitleProperty = BindableProperty.Create(nameof(Subtitle), typeof(string), typeof(Dialog), null); IDialog _dialog = null; @@ -121,6 +139,9 @@ namespace Tizen.Xamarin.Forms.Extension /// /// Gets or sets positive button of the Dialog. + /// This button is on the Left. + /// When used alone, it is variable in size.(Can increase to the size of dialog) + /// Dialog's all buttons style is bottom /// public Button Positive { @@ -130,6 +151,8 @@ namespace Tizen.Xamarin.Forms.Extension /// /// Gets or sets neutral button of the Dialog. + /// This button is on the center. + /// When used alone or used with Positive, its size is half the size of the dialog and is on the right. /// public Button Neutral { @@ -139,6 +162,7 @@ namespace Tizen.Xamarin.Forms.Extension /// /// Gets or sets negative button of the Dialog. + /// This button is always on the right and is displayed at a fixed size. /// public Button Negative {