Some UI shit.
This commit is contained in:
@@ -111,6 +111,8 @@ public partial class CalendarAppShellViewModel : CalendarBaseViewModel,
|
|||||||
{
|
{
|
||||||
base.OnNavigatedTo(mode, parameters);
|
base.OnNavigatedTo(mode, parameters);
|
||||||
|
|
||||||
|
if (mode == NavigationMode.Back) return;
|
||||||
|
|
||||||
UpdateDateNavigationHeaderItems();
|
UpdateDateNavigationHeaderItems();
|
||||||
|
|
||||||
await InitializeAccountCalendarsAsync();
|
await InitializeAccountCalendarsAsync();
|
||||||
|
|||||||
@@ -161,6 +161,29 @@ public partial class CalendarPageViewModel : CalendarBaseViewModel,
|
|||||||
AccountCalendarStateService.CollectiveAccountGroupSelectionStateChanged += AccountCalendarStateCollectivelyChanged;
|
AccountCalendarStateService.CollectiveAccountGroupSelectionStateChanged += AccountCalendarStateCollectivelyChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void RegisterRecipients()
|
||||||
|
{
|
||||||
|
base.RegisterRecipients();
|
||||||
|
|
||||||
|
Messenger.Register<LoadCalendarMessage>(this);
|
||||||
|
Messenger.Register<CalendarItemDeleted>(this);
|
||||||
|
Messenger.Register<CalendarSettingsUpdatedMessage>(this);
|
||||||
|
Messenger.Register<CalendarItemTappedMessage>(this);
|
||||||
|
Messenger.Register<CalendarItemDoubleTappedMessage>(this);
|
||||||
|
Messenger.Register<CalendarItemRightTappedMessage>(this);
|
||||||
|
}
|
||||||
|
protected override void UnregisterRecipients()
|
||||||
|
{
|
||||||
|
base.UnregisterRecipients();
|
||||||
|
|
||||||
|
Messenger.Unregister<LoadCalendarMessage>(this);
|
||||||
|
Messenger.Unregister<CalendarItemDeleted>(this);
|
||||||
|
Messenger.Unregister<CalendarSettingsUpdatedMessage>(this);
|
||||||
|
Messenger.Unregister<CalendarItemTappedMessage>(this);
|
||||||
|
Messenger.Unregister<CalendarItemDoubleTappedMessage>(this);
|
||||||
|
Messenger.Unregister<CalendarItemRightTappedMessage>(this);
|
||||||
|
}
|
||||||
|
|
||||||
private void AccountCalendarStateCollectivelyChanged(object sender, GroupedAccountCalendarViewModel e)
|
private void AccountCalendarStateCollectivelyChanged(object sender, GroupedAccountCalendarViewModel e)
|
||||||
=> FilterActiveCalendars(DayRanges);
|
=> FilterActiveCalendars(DayRanges);
|
||||||
|
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ public partial class WinoCalendarControl : Control
|
|||||||
// Total height of the FlipViewItem is the same as vertical ScrollViewer to position day headers.
|
// Total height of the FlipViewItem is the same as vertical ScrollViewer to position day headers.
|
||||||
|
|
||||||
await Task.Yield();
|
await Task.Yield();
|
||||||
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.High, () =>
|
await DispatcherQueue.EnqueueAsync(() =>
|
||||||
{
|
{
|
||||||
double hourHeght = 60;
|
double hourHeght = 60;
|
||||||
double totalHeight = ActiveScrollViewer.ScrollableHeight;
|
double totalHeight = ActiveScrollViewer.ScrollableHeight;
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ public partial class WinoCalendarFlipView : CustomCalendarFlipView
|
|||||||
{
|
{
|
||||||
var flipViewItem = task.Result;
|
var flipViewItem = task.Result;
|
||||||
|
|
||||||
_ = Dispatcher.TryRunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
|
_ = DispatcherQueue.TryEnqueue(() =>
|
||||||
{
|
{
|
||||||
ActiveVerticalScrollViewer = flipViewItem.FindDescendant<ScrollViewer>();
|
ActiveVerticalScrollViewer = flipViewItem.FindDescendant<ScrollViewer>();
|
||||||
});
|
});
|
||||||
@@ -125,7 +125,7 @@ public partial class WinoCalendarFlipView : CustomCalendarFlipView
|
|||||||
{
|
{
|
||||||
var flipViewItem = task.Result;
|
var flipViewItem = task.Result;
|
||||||
|
|
||||||
_ = Dispatcher.TryRunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
|
_ = DispatcherQueue.TryEnqueue(() =>
|
||||||
{
|
{
|
||||||
ActiveCanvas = flipViewItem.FindDescendant<WinoDayTimelineCanvas>();
|
ActiveCanvas = flipViewItem.FindDescendant<WinoDayTimelineCanvas>();
|
||||||
});
|
});
|
||||||
@@ -142,7 +142,7 @@ public partial class WinoCalendarFlipView : CustomCalendarFlipView
|
|||||||
{
|
{
|
||||||
await Task.Yield();
|
await Task.Yield();
|
||||||
|
|
||||||
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.High, () =>
|
await DispatcherQueue.EnqueueAsync(() =>
|
||||||
{
|
{
|
||||||
// Find the day range that contains the date.
|
// Find the day range that contains the date.
|
||||||
var dayRange = GetItemsSource()?.FirstOrDefault(a => a.CalendarDays.Any(b => b.RepresentingDate.Date == dateTime.Date));
|
var dayRange = GetItemsSource()?.FirstOrDefault(a => a.CalendarDays.Any(b => b.RepresentingDate.Date == dateTime.Date));
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public class CoreBaseViewModel : ObservableRecipient, INavigationAware
|
|||||||
|
|
||||||
public virtual void OnNavigatedTo(NavigationMode mode, object parameters)
|
public virtual void OnNavigatedTo(NavigationMode mode, object parameters)
|
||||||
{
|
{
|
||||||
|
UnregisterRecipients();
|
||||||
RegisterRecipients();
|
RegisterRecipients();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -220,6 +220,9 @@ public partial class MailAppShellViewModel : MailBaseViewModel,
|
|||||||
public override async void OnNavigatedTo(NavigationMode mode, object parameters)
|
public override async void OnNavigatedTo(NavigationMode mode, object parameters)
|
||||||
{
|
{
|
||||||
base.OnNavigatedTo(mode, parameters);
|
base.OnNavigatedTo(mode, parameters);
|
||||||
|
|
||||||
|
if (mode == NavigationMode.Back) return;
|
||||||
|
|
||||||
await CreateFooterItemsAsync();
|
await CreateFooterItemsAsync();
|
||||||
|
|
||||||
await RecreateMenuItemsAsync();
|
await RecreateMenuItemsAsync();
|
||||||
|
|||||||
@@ -341,7 +341,7 @@ public partial class App : WinoApplication,
|
|||||||
/// Creates the main window without activating it.
|
/// Creates the main window without activating it.
|
||||||
/// Used for both normal launch and startup task launch (tray only).
|
/// Used for both normal launch and startup task launch (tray only).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void CreateWindow(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
|
private void CreateWindow(LaunchActivatedEventArgs args)
|
||||||
{
|
{
|
||||||
LogActivation("Creating main window.");
|
LogActivation("Creating main window.");
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using CommunityToolkit.WinUI;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using Wino.Calendar.Args;
|
using Wino.Calendar.Args;
|
||||||
@@ -255,7 +256,7 @@ public partial class WinoCalendarControl : Control
|
|||||||
// Total height of the FlipViewItem is the same as vertical ScrollViewer to position day headers.
|
// Total height of the FlipViewItem is the same as vertical ScrollViewer to position day headers.
|
||||||
|
|
||||||
await Task.Yield();
|
await Task.Yield();
|
||||||
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.High, () =>
|
await DispatcherQueue.EnqueueAsync(() =>
|
||||||
{
|
{
|
||||||
double hourHeght = 60;
|
double hourHeght = 60;
|
||||||
double totalHeight = ActiveScrollViewer.ScrollableHeight;
|
double totalHeight = ActiveScrollViewer.ScrollableHeight;
|
||||||
|
|||||||
@@ -88,8 +88,6 @@ public partial class WinoCalendarFlipView : CustomCalendarFlipView
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ContainerFromIndex(SelectedIndex) as FlipViewItem;
|
return ContainerFromIndex(SelectedIndex) as FlipViewItem;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateActiveScrollViewer()
|
private void UpdateActiveScrollViewer()
|
||||||
@@ -104,7 +102,7 @@ public partial class WinoCalendarFlipView : CustomCalendarFlipView
|
|||||||
{
|
{
|
||||||
var flipViewItem = task.Result;
|
var flipViewItem = task.Result;
|
||||||
|
|
||||||
_ = Dispatcher.TryRunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
|
_ = DispatcherQueue.TryEnqueue(() =>
|
||||||
{
|
{
|
||||||
ActiveVerticalScrollViewer = flipViewItem.FindDescendant<ScrollViewer>();
|
ActiveVerticalScrollViewer = flipViewItem.FindDescendant<ScrollViewer>();
|
||||||
});
|
});
|
||||||
@@ -125,7 +123,7 @@ public partial class WinoCalendarFlipView : CustomCalendarFlipView
|
|||||||
{
|
{
|
||||||
var flipViewItem = task.Result;
|
var flipViewItem = task.Result;
|
||||||
|
|
||||||
_ = Dispatcher.TryRunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
|
_ = DispatcherQueue.TryEnqueue(() =>
|
||||||
{
|
{
|
||||||
ActiveCanvas = flipViewItem.FindDescendant<WinoDayTimelineCanvas>();
|
ActiveCanvas = flipViewItem.FindDescendant<WinoDayTimelineCanvas>();
|
||||||
});
|
});
|
||||||
@@ -142,7 +140,7 @@ public partial class WinoCalendarFlipView : CustomCalendarFlipView
|
|||||||
{
|
{
|
||||||
await Task.Yield();
|
await Task.Yield();
|
||||||
|
|
||||||
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.High, () =>
|
await DispatcherQueue.EnqueueAsync(() =>
|
||||||
{
|
{
|
||||||
// Find the day range that contains the date.
|
// Find the day range that contains the date.
|
||||||
var dayRange = GetItemsSource()?.FirstOrDefault(a => a.CalendarDays.Any(b => b.RepresentingDate.Date == dateTime.Date));
|
var dayRange = GetItemsSource()?.FirstOrDefault(a => a.CalendarDays.Any(b => b.RepresentingDate.Date == dateTime.Date));
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using Microsoft.UI.Xaml;
|
|||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||||
using Microsoft.UI.Xaml.Input;
|
using Microsoft.UI.Xaml.Input;
|
||||||
|
using Microsoft.UI.Xaml.Navigation;
|
||||||
using Windows.Foundation;
|
using Windows.Foundation;
|
||||||
using Wino.Core.Domain;
|
using Wino.Core.Domain;
|
||||||
using Wino.Core.Domain.Entities.Mail;
|
using Wino.Core.Domain.Entities.Mail;
|
||||||
@@ -45,6 +46,13 @@ public sealed partial class MailAppShell : MailAppShellAbstract,
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnNavigatedFrom(e);
|
||||||
|
|
||||||
|
Bindings.StopTracking();
|
||||||
|
}
|
||||||
|
|
||||||
private async void ItemDroppedOnFolder(object sender, DragEventArgs e)
|
private async void ItemDroppedOnFolder(object sender, DragEventArgs e)
|
||||||
{
|
{
|
||||||
// Validate package content.
|
// Validate package content.
|
||||||
|
|||||||
@@ -73,9 +73,9 @@ public partial class AccountCalendarStateService : ObservableObject, IAccountCal
|
|||||||
|
|
||||||
public void ClearGroupedAccountCalendar()
|
public void ClearGroupedAccountCalendar()
|
||||||
{
|
{
|
||||||
foreach (var groupedAccountCalendar in _internalGroupedAccountCalendars)
|
while (_internalGroupedAccountCalendars.Any())
|
||||||
{
|
{
|
||||||
RemoveGroupedAccountCalendar(groupedAccountCalendar);
|
RemoveGroupedAccountCalendar(_internalGroupedAccountCalendars[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,15 +87,38 @@ public class NavigationService : NavigationServiceBase, INavigationService
|
|||||||
|
|
||||||
if (coreFrame == null) return false;
|
if (coreFrame == null) return false;
|
||||||
|
|
||||||
if (mode == WinoApplicationMode.Mail)
|
var targetPageType = mode == WinoApplicationMode.Mail ? typeof(MailAppShell) : typeof(CalendarAppShell);
|
||||||
|
var currentPageType = coreFrame.Content?.GetType();
|
||||||
|
var transitionInfo = GetNavigationTransitionInfo(NavigationTransitionType.DrillIn);
|
||||||
|
|
||||||
|
// If already on the target page, do nothing
|
||||||
|
if (currentPageType == targetPageType)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// Check if we can go back to the target page
|
||||||
|
if (coreFrame.CanGoBack && coreFrame.BackStack.Count > 0)
|
||||||
{
|
{
|
||||||
coreFrame.Navigate(typeof(MailAppShell), null);
|
var previousPage = coreFrame.BackStack[coreFrame.BackStack.Count - 1];
|
||||||
}
|
if (previousPage.SourcePageType == targetPageType)
|
||||||
else
|
{
|
||||||
{
|
coreFrame.GoBack(transitionInfo);
|
||||||
coreFrame.Navigate(typeof(CalendarAppShell), null);
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if we can go forward to the target page
|
||||||
|
if (coreFrame.CanGoForward && coreFrame.ForwardStack.Count > 0)
|
||||||
|
{
|
||||||
|
var nextPage = coreFrame.ForwardStack[coreFrame.ForwardStack.Count - 1];
|
||||||
|
if (nextPage.SourcePageType == targetPageType)
|
||||||
|
{
|
||||||
|
coreFrame.GoForward();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Navigate to the target page only if it's not in the navigation stack
|
||||||
|
coreFrame.Navigate(targetPageType, null, transitionInfo);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +135,11 @@ public class NavigationService : NavigationServiceBase, INavigationService
|
|||||||
if (shellFrame != null)
|
if (shellFrame != null)
|
||||||
{
|
{
|
||||||
var currentFrameType = GetCurrentFrameType(ref shellFrame);
|
var currentFrameType = GetCurrentFrameType(ref shellFrame);
|
||||||
|
bool isCalendarShellActive = shellFrame.Content != null && shellFrame.Content.GetType() == typeof(CalendarAppShell);
|
||||||
|
if (isCalendarShellActive)
|
||||||
|
{
|
||||||
|
return shellFrame.Navigate(pageType, parameter);
|
||||||
|
}
|
||||||
bool isMailListingPageActive = currentFrameType != null && currentFrameType == typeof(MailListPage);
|
bool isMailListingPageActive = currentFrameType != null && currentFrameType == typeof(MailListPage);
|
||||||
|
|
||||||
// Active page is mail list page and we are refreshing the folder.
|
// Active page is mail list page and we are refreshing the folder.
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<TitleBar
|
<TitleBar
|
||||||
x:Name="ShellTitleBar"
|
x:Name="ShellTitleBar"
|
||||||
Title="{x:Bind StatePersistanceService.CoreWindowTitle, Mode=OneWay}"
|
Title="{x:Bind StatePersistanceService.CoreWindowTitle, Mode=OneWay}"
|
||||||
MinHeight="48"
|
Margin="-2"
|
||||||
HorizontalContentAlignment="Stretch"
|
HorizontalContentAlignment="Stretch"
|
||||||
VerticalContentAlignment="Stretch"
|
VerticalContentAlignment="Stretch"
|
||||||
BackRequested="BackButtonClicked"
|
BackRequested="BackButtonClicked"
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
PaneToggleRequested="PaneButtonClicked">
|
PaneToggleRequested="PaneButtonClicked">
|
||||||
<TitleBar.RightHeader>
|
<TitleBar.RightHeader>
|
||||||
<Grid>
|
<Grid>
|
||||||
<controls:Segmented SelectionChanged="SegmentedChanged">
|
<controls:Segmented x:Name="AppModeSegmentedControl" SelectionChanged="SegmentedChanged">
|
||||||
<controls:SegmentedItem>
|
<controls:SegmentedItem>
|
||||||
<controls:SegmentedItem.Icon>
|
<controls:SegmentedItem.Icon>
|
||||||
<PathIcon
|
<PathIcon
|
||||||
@@ -60,6 +60,7 @@
|
|||||||
<Frame
|
<Frame
|
||||||
x:Name="MainShellFrame"
|
x:Name="MainShellFrame"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
|
CacheSize="2"
|
||||||
Navigated="MainFrameNavigated" />
|
Navigated="MainFrameNavigated" />
|
||||||
|
|
||||||
<notifyicon:TaskbarIcon
|
<notifyicon:TaskbarIcon
|
||||||
|
|||||||
@@ -69,9 +69,41 @@ public sealed partial class ShellWindow : WindowEx, IWinoShellWindow, IRecipient
|
|||||||
|
|
||||||
public void HandleAppActivation(LaunchActivatedEventArgs args)
|
public void HandleAppActivation(LaunchActivatedEventArgs args)
|
||||||
{
|
{
|
||||||
// TODO: Handle protocol activations.
|
// Parse launch arguments to determine the application mode
|
||||||
|
var launchArguments = args?.Arguments?.ToLower() ?? string.Empty;
|
||||||
|
|
||||||
MainShellFrame.Navigate(typeof(MailAppShell));
|
Core.Domain.Enums.WinoApplicationMode targetMode;
|
||||||
|
|
||||||
|
if (launchArguments.Contains("wino-calendar"))
|
||||||
|
{
|
||||||
|
targetMode = Core.Domain.Enums.WinoApplicationMode.Calendar;
|
||||||
|
}
|
||||||
|
else if (launchArguments.Contains("wino-mail"))
|
||||||
|
{
|
||||||
|
targetMode = Core.Domain.Enums.WinoApplicationMode.Mail;
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrEmpty(launchArguments))
|
||||||
|
{
|
||||||
|
// TODO: Handle other protocol activations (e.g., .eml files)
|
||||||
|
// For now, default to Mail mode for unknown protocols
|
||||||
|
targetMode = Core.Domain.Enums.WinoApplicationMode.Mail;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Default to Mail mode when no arguments provided
|
||||||
|
targetMode = Core.Domain.Enums.WinoApplicationMode.Mail;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use NavigationService to change application mode with proper navigation
|
||||||
|
|
||||||
|
if (targetMode == Core.Domain.Enums.WinoApplicationMode.Mail)
|
||||||
|
{
|
||||||
|
AppModeSegmentedControl.SelectedIndex = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AppModeSegmentedControl.SelectedIndex = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Microsoft.UI.Xaml.Controls.TitleBar GetTitleBar() => ShellTitleBar;
|
public Microsoft.UI.Xaml.Controls.TitleBar GetTitleBar() => ShellTitleBar;
|
||||||
@@ -88,7 +120,12 @@ public sealed partial class ShellWindow : WindowEx, IWinoShellWindow, IRecipient
|
|||||||
|
|
||||||
private void MainFrameNavigated(object sender, Microsoft.UI.Xaml.Navigation.NavigationEventArgs e)
|
private void MainFrameNavigated(object sender, Microsoft.UI.Xaml.Navigation.NavigationEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Content is BasePage basePage)
|
// Mail shell has shell content only for mail list page
|
||||||
|
// Thus, we check if the current content is MailAppShell
|
||||||
|
|
||||||
|
if (sender is Frame mainFrame && mainFrame.Content is MailAppShell mailAppShellPage)
|
||||||
|
ShellTitleBar.Content = mailAppShellPage.TopShellContent;
|
||||||
|
else if (e.Content is BasePage basePage)
|
||||||
ShellTitleBar.Content = basePage.ShellContent;
|
ShellTitleBar.Content = basePage.ShellContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,10 @@ using Wino.Mail.WinUI;
|
|||||||
|
|
||||||
namespace Wino.Mail.Views.Abstract;
|
namespace Wino.Mail.Views.Abstract;
|
||||||
|
|
||||||
public abstract class CalendarAppShellAbstract : BasePage<CalendarAppShellViewModel> { }
|
public abstract class CalendarAppShellAbstract : BasePage<CalendarAppShellViewModel>
|
||||||
|
{
|
||||||
|
protected CalendarAppShellAbstract()
|
||||||
|
{
|
||||||
|
NavigationCacheMode = Microsoft.UI.Xaml.Navigation.NavigationCacheMode.Enabled;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,4 +5,8 @@ namespace Wino.Views.Abstract;
|
|||||||
|
|
||||||
public abstract class MailAppShellAbstract : BasePage<MailAppShellViewModel>
|
public abstract class MailAppShellAbstract : BasePage<MailAppShellViewModel>
|
||||||
{
|
{
|
||||||
|
protected MailAppShellAbstract()
|
||||||
|
{
|
||||||
|
NavigationCacheMode = Microsoft.UI.Xaml.Navigation.NavigationCacheMode.Enabled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,86 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Page.Resources>
|
</Page.Resources>
|
||||||
|
|
||||||
|
<abstract:CalendarAppShellAbstract.ShellContent>
|
||||||
|
<Grid
|
||||||
|
Margin="4,0,0,0"
|
||||||
|
Background="Transparent"
|
||||||
|
ColumnSpacing="12">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Grid x:Name="ShellContentArea" ColumnSpacing="12">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
<StackPanel
|
||||||
|
x:Name="NavigationTitleStack"
|
||||||
|
Grid.Column="0"
|
||||||
|
Margin="0,0,12,4"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
Spacing="6">
|
||||||
|
<Button
|
||||||
|
x:Name="PreviousDateButton"
|
||||||
|
Click="PreviousDateClicked"
|
||||||
|
Style="{StaticResource CalendarNavigationButtonStyle}">
|
||||||
|
<PathIcon x:Name="PreviousDateButtonPathIcon" Data="F1 M 8.72 18.599998 C 8.879999 18.733334 9.059999 18.799999 9.26 18.799999 C 9.459999 18.799999 9.633332 18.719999 9.78 18.559999 C 9.926666 18.4 10 18.219999 10 18.019999 C 10 17.82 9.92 17.653332 9.76 17.52 L 4.52 12.559999 L 17.24 12.559999 C 17.453333 12.559999 17.633331 12.486667 17.779999 12.339999 C 17.926666 12.193334 18 12.013333 18 11.799999 C 18 11.586666 17.926666 11.406667 17.779999 11.259999 C 17.633331 11.113333 17.453333 11.039999 17.24 11.039999 L 4.52 11.039999 L 9.76 6.08 C 9.973333 5.893333 10.046666 5.653332 9.98 5.359999 C 9.913333 5.066666 9.74 4.880001 9.46 4.799999 C 9.179999 4.720001 8.933332 4.786667 8.72 5 L 2.32 11.08 C 2.16 11.24 2.053333 11.426666 2 11.639999 C 1.973333 11.746666 1.973333 11.853333 2 11.959999 C 2.053333 12.173333 2.16 12.360001 2.32 12.52 Z " />
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="NextDateButton"
|
||||||
|
Click="NextDateClicked"
|
||||||
|
Style="{StaticResource CalendarNavigationButtonStyle}">
|
||||||
|
<PathIcon x:Name="NextDateButtonPathIcon" Data="F1 M 11.28 5 C 11.12 4.866667 10.94 4.806667 10.74 4.82 C 10.539999 4.833334 10.366666 4.913334 10.219999 5.059999 C 10.073333 5.206665 10 5.379999 10 5.58 C 10 5.779999 10.08 5.946667 10.24 6.08 L 15.48 11.039999 L 2.76 11.039999 C 2.546667 11.039999 2.366667 11.113333 2.22 11.259999 C 2.073333 11.406667 2 11.586666 2 11.799999 C 2 12.013333 2.073333 12.193334 2.22 12.339999 C 2.366667 12.486667 2.546667 12.559999 2.76 12.559999 L 15.48 12.559999 L 10.24 17.52 C 10.026667 17.706665 9.953333 17.946667 10.02 18.24 C 10.086666 18.533333 10.259999 18.719999 10.54 18.799999 C 10.82 18.879999 11.066667 18.813334 11.28 18.599998 L 17.68 12.52 C 17.84 12.360001 17.946667 12.173333 18 11.959999 C 18 11.853333 18 11.746666 18 11.639999 C 17.946667 11.426666 17.84 11.24 17.68 11.08 Z " />
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<calendarControls:CustomCalendarFlipView
|
||||||
|
x:Name="DayHeaderNavigationItemsFlipView"
|
||||||
|
MaxHeight="30"
|
||||||
|
Margin="8,4,0,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalContentAlignment="Left"
|
||||||
|
Background="Transparent"
|
||||||
|
FontSize="14"
|
||||||
|
FontWeight="Normal"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
ItemsSource="{x:Bind ViewModel.DateNavigationHeaderItems}"
|
||||||
|
SelectedIndex="{x:Bind ViewModel.SelectedDateNavigationHeaderIndex, Mode=OneWay}">
|
||||||
|
<FlipView.ItemTemplate>
|
||||||
|
<DataTemplate x:DataType="x:String">
|
||||||
|
<TextBlock
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontSize="18"
|
||||||
|
Style="{StaticResource BodyTextBlockStyle}"
|
||||||
|
Text="{x:Bind}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</FlipView.ItemTemplate>
|
||||||
|
</calendarControls:CustomCalendarFlipView>
|
||||||
|
</StackPanel>
|
||||||
|
<AutoSuggestBox
|
||||||
|
x:Name="SearchBox"
|
||||||
|
Grid.Column="1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
BorderBrush="Transparent"
|
||||||
|
PlaceholderText="Search" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<calendarControls:WinoCalendarTypeSelectorControl
|
||||||
|
x:Name="CalendarTypeSelector"
|
||||||
|
Grid.Column="2"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
DisplayDayCount="{x:Bind ViewModel.StatePersistenceService.DayDisplayCount, Mode=OneWay}"
|
||||||
|
SelectedType="{x:Bind ViewModel.StatePersistenceService.CalendarDisplayType, Mode=TwoWay}"
|
||||||
|
TodayClickedCommand="{x:Bind ViewModel.TodayClickedCommand}" />
|
||||||
|
</Grid>
|
||||||
|
</abstract:CalendarAppShellAbstract.ShellContent>
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="RootGrid"
|
x:Name="RootGrid"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
@@ -46,107 +126,9 @@
|
|||||||
<ColumnDefinition Width="48" />
|
<ColumnDefinition Width="48" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="48" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<!-- CoreWindowText="{x:Bind ViewModel.StatePersistenceService.CoreWindowTitle, Mode=OneWay}" -->
|
|
||||||
<!--<coreControls:WinoAppTitleBar
|
|
||||||
x:Name="RealAppBar"
|
|
||||||
Grid.ColumnSpan="2"
|
|
||||||
BackButtonClicked="AppBarBackButtonClicked"
|
|
||||||
Canvas.ZIndex="150"
|
|
||||||
CoreWindowText="Wino Calendar"
|
|
||||||
IsBackButtonVisible="{x:Bind ViewModel.StatePersistenceService.IsBackButtonVisible, Mode=OneWay}"
|
|
||||||
IsNavigationPaneOpen="{x:Bind MainSplitView.IsPaneOpen, Mode=TwoWay}"
|
|
||||||
NavigationViewDisplayMode="{x:Bind helpers:XamlHelpers.NavigationViewDisplayModeConverter(MainSplitView.DisplayMode), Mode=OneWay}"
|
|
||||||
OpenPaneLength="{x:Bind ViewModel.StatePersistenceService.OpenPaneLength, Mode=OneWay}"
|
|
||||||
ShrinkShellContentOnExpansion="False"
|
|
||||||
SystemReserved="180">
|
|
||||||
<coreControls:WinoAppTitleBar.ShellFrameContent>
|
|
||||||
<Grid Margin="4,0,0,0" ColumnSpacing="12">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Grid
|
|
||||||
x:Name="DragArea"
|
|
||||||
Grid.ColumnSpan="3"
|
|
||||||
Background="Transparent" />
|
|
||||||
|
|
||||||
<Grid x:Name="ShellContentArea" ColumnSpacing="12">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="3*" />
|
|
||||||
<ColumnDefinition Width="7*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<AutoSuggestBox
|
|
||||||
x:Name="SearchBox"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
BorderBrush="Transparent"
|
|
||||||
PlaceholderText="Search" />
|
|
||||||
|
|
||||||
<StackPanel
|
|
||||||
x:Name="NavigationTitleStack"
|
|
||||||
Grid.Column="1"
|
|
||||||
Margin="0,0,12,4"
|
|
||||||
Orientation="Horizontal"
|
|
||||||
Spacing="6">
|
|
||||||
<Button
|
|
||||||
x:Name="PreviousDateButton"
|
|
||||||
Click="PreviousDateClicked"
|
|
||||||
Style="{StaticResource CalendarNavigationButtonStyle}">
|
|
||||||
<PathIcon x:Name="PreviousDateButtonPathIcon" Data="F1 M 8.72 18.599998 C 8.879999 18.733334 9.059999 18.799999 9.26 18.799999 C 9.459999 18.799999 9.633332 18.719999 9.78 18.559999 C 9.926666 18.4 10 18.219999 10 18.019999 C 10 17.82 9.92 17.653332 9.76 17.52 L 4.52 12.559999 L 17.24 12.559999 C 17.453333 12.559999 17.633331 12.486667 17.779999 12.339999 C 17.926666 12.193334 18 12.013333 18 11.799999 C 18 11.586666 17.926666 11.406667 17.779999 11.259999 C 17.633331 11.113333 17.453333 11.039999 17.24 11.039999 L 4.52 11.039999 L 9.76 6.08 C 9.973333 5.893333 10.046666 5.653332 9.98 5.359999 C 9.913333 5.066666 9.74 4.880001 9.46 4.799999 C 9.179999 4.720001 8.933332 4.786667 8.72 5 L 2.32 11.08 C 2.16 11.24 2.053333 11.426666 2 11.639999 C 1.973333 11.746666 1.973333 11.853333 2 11.959999 C 2.053333 12.173333 2.16 12.360001 2.32 12.52 Z " />
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
x:Name="NextDateButton"
|
|
||||||
Click="NextDateClicked"
|
|
||||||
Style="{StaticResource CalendarNavigationButtonStyle}">
|
|
||||||
<PathIcon x:Name="NextDateButtonPathIcon" Data="F1 M 11.28 5 C 11.12 4.866667 10.94 4.806667 10.74 4.82 C 10.539999 4.833334 10.366666 4.913334 10.219999 5.059999 C 10.073333 5.206665 10 5.379999 10 5.58 C 10 5.779999 10.08 5.946667 10.24 6.08 L 15.48 11.039999 L 2.76 11.039999 C 2.546667 11.039999 2.366667 11.113333 2.22 11.259999 C 2.073333 11.406667 2 11.586666 2 11.799999 C 2 12.013333 2.073333 12.193334 2.22 12.339999 C 2.366667 12.486667 2.546667 12.559999 2.76 12.559999 L 15.48 12.559999 L 10.24 17.52 C 10.026667 17.706665 9.953333 17.946667 10.02 18.24 C 10.086666 18.533333 10.259999 18.719999 10.54 18.799999 C 10.82 18.879999 11.066667 18.813334 11.28 18.599998 L 17.68 12.52 C 17.84 12.360001 17.946667 12.173333 18 11.959999 C 18 11.853333 18 11.746666 18 11.639999 C 17.946667 11.426666 17.84 11.24 17.68 11.08 Z " />
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<calendarControls:CustomCalendarFlipView
|
|
||||||
x:Name="DayHeaderNavigationItemsFlipView"
|
|
||||||
MaxHeight="30"
|
|
||||||
Margin="8,4,0,0"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
HorizontalContentAlignment="Left"
|
|
||||||
Background="Transparent"
|
|
||||||
FontSize="14"
|
|
||||||
FontWeight="Normal"
|
|
||||||
IsHitTestVisible="False"
|
|
||||||
ItemsSource="{x:Bind ViewModel.DateNavigationHeaderItems}"
|
|
||||||
SelectedIndex="{x:Bind ViewModel.SelectedDateNavigationHeaderIndex, Mode=OneWay}">
|
|
||||||
<FlipView.ItemTemplate>
|
|
||||||
<DataTemplate x:DataType="x:String">
|
|
||||||
<TextBlock
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="18"
|
|
||||||
Style="{StaticResource BodyTextBlockStyle}"
|
|
||||||
Text="{x:Bind}" />
|
|
||||||
</DataTemplate>
|
|
||||||
</FlipView.ItemTemplate>
|
|
||||||
</calendarControls:CustomCalendarFlipView>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<calendarControls:WinoCalendarTypeSelectorControl
|
|
||||||
x:Name="CalendarTypeSelector"
|
|
||||||
Grid.Column="2"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
DisplayDayCount="{x:Bind ViewModel.StatePersistenceService.DayDisplayCount, Mode=OneWay}"
|
|
||||||
SelectedType="{x:Bind ViewModel.StatePersistenceService.CalendarDisplayType, Mode=TwoWay}"
|
|
||||||
TodayClickedCommand="{x:Bind ViewModel.TodayClickedCommand}" />
|
|
||||||
</Grid>
|
|
||||||
</coreControls:WinoAppTitleBar.ShellFrameContent>
|
|
||||||
</coreControls:WinoAppTitleBar>-->
|
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Grid.RowSpan="2"
|
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Background="{ThemeResource WinoApplicationBackgroundColor}"
|
Background="{ThemeResource WinoApplicationBackgroundColor}"
|
||||||
IsHitTestVisible="False">
|
IsHitTestVisible="False">
|
||||||
@@ -164,9 +146,8 @@
|
|||||||
IsPaneOpen="{x:Bind ViewModel.PreferencesService.IsNavigationPaneOpened, Mode=TwoWay}"
|
IsPaneOpen="{x:Bind ViewModel.PreferencesService.IsNavigationPaneOpened, Mode=TwoWay}"
|
||||||
PaneBackground="Transparent">
|
PaneBackground="Transparent">
|
||||||
<SplitView.Pane>
|
<SplitView.Pane>
|
||||||
<Grid Padding="0,20,0,6">
|
<Grid Padding="0,0,0,6">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
|||||||
Reference in New Issue
Block a user