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

@@ -90,29 +90,19 @@ public class LinuxViewRenderer
try
{
// Render the page content
SkiaView? pageContent = null;
if (page is ContentPage contentPage && contentPage.Content != null)
{
pageContent = CurrentRenderer.RenderView(contentPage.Content);
}
// Render the page through the proper handler system
// This ensures all properties (including BackgroundColor via AppThemeBinding) are mapped
var skiaPage = CurrentRenderer.RenderPage(page);
if (pageContent == null)
if (skiaPage == null)
{
Console.WriteLine($"[PushPage] Failed to render page content");
Console.WriteLine($"[PushPage] Failed to render page through handler");
return false;
}
// Wrap in ScrollView if needed
if (pageContent is not SkiaScrollView)
{
var scrollView = new SkiaScrollView { Content = pageContent };
pageContent = scrollView;
}
// Push onto SkiaShell's navigation stack
CurrentSkiaShell.PushAsync(pageContent, page.Title ?? "Detail");
Console.WriteLine($"[PushPage] Successfully pushed page");
CurrentSkiaShell.PushAsync(skiaPage, page.Title ?? "Detail");
Console.WriteLine($"[PushPage] Successfully pushed page via handler system");
return true;
}
catch (Exception ex)