Back navigation and shell improvements.

This commit is contained in:
Burak Kaan Köse
2026-03-24 18:05:09 +01:00
parent d699818c6f
commit 27c90d2f89
10 changed files with 96 additions and 86 deletions
@@ -28,11 +28,6 @@ public interface IStatePersistanceService : INotifyPropertyChanged
/// </summary>
bool IsReaderNarrowed { get; set; }
/// <summary>
/// Should display back button on the shell title bar.
/// </summary>
bool IsBackButtonVisible { get; }
/// <summary>
/// Current application mode (Mail or Calendar).
/// Not persisted to configuration, only kept in memory.
@@ -44,11 +39,6 @@ public interface IStatePersistanceService : INotifyPropertyChanged
/// </summary>
bool IsEventDetailsVisible { get; set; }
/// <summary>
/// Whether the current application mode has an active backstack that can be navigated.
/// </summary>
bool HasCurrentModeBackStack { get; set; }
/// <summary>
/// Setting: Opened pane length for the navigation view.
/// </summary>
@@ -13,5 +13,6 @@ public interface INavigationService
Type GetPageType(WinoPage winoPage);
bool ChangeApplicationMode(WinoApplicationMode mode);
bool CanGoBack();
void GoBack(NavigationTransitionEffect slideEffect = NavigationTransitionEffect.FromRight);
}
@@ -20,12 +20,20 @@ public sealed class CalendarRangeTextFormatter : ICalendarRangeTextFormatter
return FormatDate(range.StartDate, culture);
}
if (range.SpansSingleMonth)
{
return $"{FormatDate(range.StartDate, culture)} - {FormatDay(range.EndDate, culture)}";
}
return $"{FormatDate(range.StartDate, culture)} - {FormatDate(range.EndDate, culture)}";
}
private static string FormatDate(DateOnly date, CultureInfo culture)
=> date.ToString(culture.DateTimeFormat.MonthDayPattern, culture);
private static string FormatDay(DateOnly date, CultureInfo culture)
=> date.Day.ToString(culture);
private static string FormatMonth(DateOnly date, CultureInfo culture)
=> date.ToString(culture.DateTimeFormat.YearMonthPattern, culture);
}