diff --git a/XCalendarFormsSample/XCalendarFormsSample/Helpers/PopupHelper.cs b/XCalendarFormsSample/XCalendarFormsSample/Helpers/PopupHelper.cs index 877fcd1..6763224 100644 --- a/XCalendarFormsSample/XCalendarFormsSample/Helpers/PopupHelper.cs +++ b/XCalendarFormsSample/XCalendarFormsSample/Helpers/PopupHelper.cs @@ -18,6 +18,7 @@ public static class PopupHelper public static List AllPageStartModes { get; set; } = Enum.GetValues(typeof(PageStartMode)).Cast().ToList(); public static List AllNavigationLoopModes { get; set; } = Enum.GetValues(typeof(NavigationLoopMode)).Cast().ToList(); public static List AllDaysOfWeek { get; set; } = DayOfWeek.Monday.GetWeekAsFirst(); + public static List AllStackOrientations { get; set; } = Enum.GetValues(typeof(StackOrientation)).Cast().ToList(); #endregion #region Methods diff --git a/XCalendarFormsSample/XCalendarFormsSample/ViewModels/PlaygroundViewModel.cs b/XCalendarFormsSample/XCalendarFormsSample/ViewModels/PlaygroundViewModel.cs index add8e9c..a2f0db2 100644 --- a/XCalendarFormsSample/XCalendarFormsSample/ViewModels/PlaygroundViewModel.cs +++ b/XCalendarFormsSample/XCalendarFormsSample/ViewModels/PlaygroundViewModel.cs @@ -52,6 +52,9 @@ public class PlaygroundViewModel : BaseViewModel public double DayHeightRequest { get; set; } = 45; public double DayWidthRequest { get; set; } = -1; public bool DayAutoSetStyleBasedOnDayState { get; set; } = true; + public double DayEventCornerRadius { get; set; } = 100; + public double DayEventsSpacing { get; set; } = 2.5; + public StackOrientation DayEventsOrientation { get; set; } = StackOrientation.Horizontal; public int ForwardsNavigationAmount { get; set; } = 1; public int BackwardsNavigationAmount { get; set; } = -1; public string TargetCultureCode { get; set; } = CultureInfo.CurrentCulture?.Name ?? CultureInfo.DefaultThreadCurrentCulture?.Name ?? CultureInfo.CurrentUICulture?.Name ?? CultureInfo.DefaultThreadCurrentUICulture?.Name ?? "en"; @@ -99,6 +102,8 @@ public class PlaygroundViewModel : BaseViewModel public ICommand ChangeDateSelectionCommand { get; set; } public ICommand ChangeCalendarVisibilityCommand { get; set; } public ICommand UpdateCurrentCultureCommand { get; set; } + public ICommand ShowDayEventsOrientationDialogCommand { get; set; } + #endregion #region Constructors @@ -130,6 +135,7 @@ public PlaygroundViewModel() ChangeDateSelectionCommand = new Command(ChangeDateSelection); ChangeCalendarVisibilityCommand = new Command(ChangeCalendarVisibility); UpdateCurrentCultureCommand = new Command(UpdateCurrentCulture); + ShowDayEventsOrientationDialogCommand = new Command(ShowDayEventsOrientationDialog); List events = new List() { @@ -374,6 +380,10 @@ public async void ShowDayInvalidTextColorDialog() { DayInvalidTextColor = await PopupHelper.ShowColorDialogAsync(DayInvalidTextColor); } + public async void ShowDayEventsOrientationDialog() + { + DayEventsOrientation = await PopupHelper.ShowSelectItemDialogAsync(DayEventsOrientation, PopupHelper.AllStackOrientations); + } #endregion } } \ No newline at end of file diff --git a/XCalendarFormsSample/XCalendarFormsSample/Views/PlaygroundPage.xaml b/XCalendarFormsSample/XCalendarFormsSample/Views/PlaygroundPage.xaml index ba1c6be..7121788 100644 --- a/XCalendarFormsSample/XCalendarFormsSample/Views/PlaygroundPage.xaml +++ b/XCalendarFormsSample/XCalendarFormsSample/Views/PlaygroundPage.xaml @@ -667,6 +667,58 @@ VerticalOptions="End"/> + + + + + + + + +