public static FlowDirection GetFlowDirection(this IMauiContext mauiContext) { var window = mauiContext.GetPlatformWindow(); if (window == null) { return(FlowDirection.LeftToRight); } return(window.EffectiveUserInterfaceLayoutDirection.ToFlowDirection()); }
internal void Unsubscribe(Window window) { IMauiContext mauiContext = window?.MauiContext; EWindow nativeWindow = mauiContext.GetPlatformWindow(); var toRemove = Subscriptions.Where(s => s.Window == nativeWindow).ToList(); foreach (AlertRequestHelper alertRequestHelper in toRemove) { alertRequestHelper.Dispose(); Subscriptions.Remove(alertRequestHelper); } }
void OnApplyTemplateFinished(object?sender, EventArgs e) { if (_rootView.AppTitleBar != null) { var platformWindow = _mauiContext.GetPlatformWindow(); platformWindow.ExtendsContentIntoTitleBar = true; UpdateAppTitleBar(true); } if (_rootView.NavigationViewControl != null) { _rootView.NavigationViewControl.HeaderControl = _toolbar; } }
internal void Subscribe(Window window) { IMauiContext mauiContext = window?.MauiContext; EWindow platformWindow = mauiContext.GetPlatformWindow(); if (mauiContext == null || platformWindow == null) { return; } if (Subscriptions.Any(s => s.Window == platformWindow)) { return; } Subscriptions.Add(new AlertRequestHelper(platformWindow, mauiContext)); }
public static ModalStack GetModalStack(this IMauiContext mauiContext) => mauiContext.GetPlatformWindow().GetModalStack();
public static ELayout GetPlatformParent(this IMauiContext mauiContext) => mauiContext.GetPlatformWindow().GetBaseLayout();