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>
81 lines
4.3 KiB
XML
81 lines
4.3 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
x:Class="XamlBrowser.BrowserApp">
|
|
<Application.Resources>
|
|
<ResourceDictionary>
|
|
<!-- Primary Colors -->
|
|
<Color x:Key="PrimaryColor">#1A73E8</Color>
|
|
<Color x:Key="PrimaryDarkColor">#8AB4F8</Color>
|
|
|
|
<!-- Page Backgrounds -->
|
|
<Color x:Key="PageBackgroundLight">#FFFFFF</Color>
|
|
<Color x:Key="PageBackgroundDark">#202124</Color>
|
|
|
|
<!-- Toolbar Backgrounds -->
|
|
<Color x:Key="ToolbarBackgroundLight">#FFFFFF</Color>
|
|
<Color x:Key="ToolbarBackgroundDark">#292A2D</Color>
|
|
|
|
<!-- Entry Backgrounds -->
|
|
<Color x:Key="EntryBackgroundLight">#F1F3F4</Color>
|
|
<Color x:Key="EntryBackgroundDark">#3C4043</Color>
|
|
|
|
<!-- Button Backgrounds -->
|
|
<Color x:Key="ButtonBackgroundLight">#F1F3F4</Color>
|
|
<Color x:Key="ButtonBackgroundDark">#202124</Color>
|
|
|
|
<!-- Text Colors -->
|
|
<Color x:Key="TextPrimaryLight">#202124</Color>
|
|
<Color x:Key="TextPrimaryDark">#E8EAED</Color>
|
|
<Color x:Key="TextSecondaryLight">#5F6368</Color>
|
|
<Color x:Key="TextSecondaryDark">#9AA0A6</Color>
|
|
|
|
<!-- Placeholder Colors -->
|
|
<Color x:Key="PlaceholderLight">#80868B</Color>
|
|
<Color x:Key="PlaceholderDark">#9AA0A6</Color>
|
|
|
|
<!-- Status Bar Backgrounds -->
|
|
<Color x:Key="StatusBackgroundLight">#F8F9FA</Color>
|
|
<Color x:Key="StatusBackgroundDark">#35363A</Color>
|
|
|
|
<!-- Navigation Button Style -->
|
|
<Style x:Key="NavButtonStyle" TargetType="Button">
|
|
<Setter Property="WidthRequest" Value="40" />
|
|
<Setter Property="HeightRequest" Value="40" />
|
|
<Setter Property="CornerRadius" Value="20" />
|
|
<Setter Property="FontSize" Value="18" />
|
|
<Setter Property="FontFamily" Value="Segoe UI Symbol, Symbola, DejaVu Sans, sans-serif" />
|
|
<Setter Property="Padding" Value="0" />
|
|
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource ButtonBackgroundLight}, Dark={StaticResource ButtonBackgroundDark}}" />
|
|
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
|
|
</Style>
|
|
|
|
<!-- Go Button Style -->
|
|
<Style x:Key="GoButtonStyle" TargetType="Button">
|
|
<Setter Property="WidthRequest" Value="60" />
|
|
<Setter Property="HeightRequest" Value="36" />
|
|
<Setter Property="CornerRadius" Value="18" />
|
|
<Setter Property="FontSize" Value="14" />
|
|
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource PrimaryColor}, Dark={StaticResource PrimaryDarkColor}}" />
|
|
<Setter Property="TextColor" Value="{AppThemeBinding Light=White, Dark=#202124}" />
|
|
</Style>
|
|
|
|
<!-- Address Bar Style -->
|
|
<Style x:Key="AddressBarStyle" TargetType="Entry">
|
|
<Setter Property="FontSize" Value="14" />
|
|
<Setter Property="HeightRequest" Value="36" />
|
|
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource EntryBackgroundLight}, Dark={StaticResource EntryBackgroundDark}}" />
|
|
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" />
|
|
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource PlaceholderLight}, Dark={StaticResource PlaceholderDark}}" />
|
|
</Style>
|
|
|
|
<!-- Status Label Style -->
|
|
<Style x:Key="StatusLabelStyle" TargetType="Label">
|
|
<Setter Property="FontSize" Value="12" />
|
|
<Setter Property="Padding" Value="8,4" />
|
|
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" />
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</Application.Resources>
|
|
</Application>
|