2024-04-18 01:44:37 +02:00
|
|
|
|
using Windows.UI.Xaml;
|
2024-11-10 23:28:25 +01:00
|
|
|
|
using Wino.Core.UWP;
|
2024-04-18 01:44:37 +02:00
|
|
|
|
using Wino.Mail.ViewModels;
|
|
|
|
|
|
|
2025-02-16 11:54:23 +01:00
|
|
|
|
namespace Wino.Views.Abstract;
|
|
|
|
|
|
|
|
|
|
|
|
public abstract class MailRenderingPageAbstract : BasePage<MailRenderingPageViewModel>
|
2024-04-18 01:44:37 +02:00
|
|
|
|
{
|
2025-02-16 11:54:23 +01:00
|
|
|
|
public bool IsDarkEditor
|
2024-04-18 01:44:37 +02:00
|
|
|
|
{
|
2025-02-16 11:54:23 +01:00
|
|
|
|
get { return (bool)GetValue(IsDarkEditorProperty); }
|
|
|
|
|
|
set { SetValue(IsDarkEditorProperty, value); }
|
|
|
|
|
|
}
|
2024-04-18 01:44:37 +02:00
|
|
|
|
|
2025-02-16 11:54:23 +01:00
|
|
|
|
public static readonly DependencyProperty IsDarkEditorProperty = DependencyProperty.Register(nameof(IsDarkEditor), typeof(bool), typeof(MailRenderingPageAbstract), new PropertyMetadata(false, OnIsComposerDarkModeChanged));
|
2024-04-18 01:44:37 +02:00
|
|
|
|
|
2025-02-16 11:54:23 +01:00
|
|
|
|
private static void OnIsComposerDarkModeChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (obj is MailRenderingPageAbstract page)
|
2024-04-18 01:44:37 +02:00
|
|
|
|
{
|
2025-02-16 11:54:23 +01:00
|
|
|
|
page.OnEditorThemeChanged();
|
2024-04-18 01:44:37 +02:00
|
|
|
|
}
|
2025-02-16 11:43:30 +01:00
|
|
|
|
}
|
2025-02-16 11:54:23 +01:00
|
|
|
|
|
|
|
|
|
|
public virtual void OnEditorThemeChanged() { }
|
2024-04-18 01:44:37 +02:00
|
|
|
|
}
|