Reconstruct XamlBrowser sample with XAML from decompiled code
Created complete XamlBrowser sample application: - App.xaml: Colors and styles for light/dark theme support - App.xaml.cs: BrowserApp with ToggleTheme() - MainPage.xaml: Toolbar (Back, Forward, Refresh, Stop, Home), address bar, Go button, WebView, status bar with theme toggle - MainPage.xaml.cs: Navigation logic, URL handling, progress animation - MauiProgram.cs: UseLinuxPlatform() configuration - Program.cs: LinuxProgramHost entry point - Resources/Images: 10 SVG icons for toolbar (dark/light variants) UI matches screenshot provided by user: - Dark gray toolbar with navigation buttons - Entry field for URL with rounded corners - Green "Go" button - WebView displaying content - Status bar with theme toggle 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
20
samples/XamlBrowser/App.xaml.cs
Normal file
20
samples/XamlBrowser/App.xaml.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Microsoft.Maui;
|
||||
using Microsoft.Maui.ApplicationModel;
|
||||
using Microsoft.Maui.Controls;
|
||||
|
||||
namespace XamlBrowser;
|
||||
|
||||
public partial class BrowserApp : Application
|
||||
{
|
||||
public BrowserApp()
|
||||
{
|
||||
InitializeComponent();
|
||||
UserAppTheme = AppTheme.Dark;
|
||||
MainPage = new MainPage();
|
||||
}
|
||||
|
||||
public void ToggleTheme()
|
||||
{
|
||||
UserAppTheme = UserAppTheme == AppTheme.Light ? AppTheme.Dark : AppTheme.Light;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user