Fixes for pages

This commit is contained in:
2026-01-24 02:37:37 +00:00
parent 7830356f24
commit ed89b6494d
5 changed files with 40 additions and 21 deletions

View File

@@ -764,9 +764,25 @@ public class LinuxApplication : IDisposable
navPage.Invalidate(); // Force redraw of navigation page
}
// Special handling for ContentPage - it stores content in Content property
// Special handling for SkiaPage - refresh via MauiPage handler and process Content
if (view is SkiaPage page)
{
// Refresh page properties via handler if MauiPage is set
var pageHandler = page.MauiPage?.Handler;
if (pageHandler != null)
{
try
{
Console.WriteLine($"[LinuxApplication] Refreshing page theme: {page.MauiPage?.GetType().Name}");
pageHandler.UpdateValue(nameof(IView.Background));
pageHandler.UpdateValue("BackgroundColor");
}
catch (Exception ex)
{
Console.WriteLine($"[LinuxApplication] Error refreshing page theme: {ex.Message}");
}
}
page.Invalidate(); // Force redraw to pick up theme-aware background
if (page.Content != null)
{