2
0

web finalized

This commit is contained in:
2026-01-17 08:34:04 +00:00
parent e9d4b84790
commit 26b39a403a
3 changed files with 10 additions and 9 deletions

View File

@@ -4,7 +4,7 @@
x:Class="WebViewDemo.WebViewPage" x:Class="WebViewDemo.WebViewPage"
BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}"> BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}">
<Grid RowDefinitions="Auto,*,Auto"> <Grid RowDefinitions="Auto,Auto,*,Auto">
<!-- Browser Toolbar --> <!-- Browser Toolbar -->
<Grid Grid.Row="0" <Grid Grid.Row="0"
@@ -51,7 +51,7 @@
<!-- URL Bar --> <!-- URL Bar -->
<Border Grid.Column="3" <Border Grid.Column="3"
BackgroundColor="{AppThemeBinding Light=#F0F0F0, Dark=#2A2A2A}" BackgroundColor="{AppThemeBinding Light={StaticResource CardBackgroundLight}, Dark={StaticResource CardBackgroundDark}}"
StrokeThickness="1" StrokeThickness="1"
Stroke="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource BorderDark}}" Stroke="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource BorderDark}}"
Padding="8,4" Padding="8,4"
@@ -122,18 +122,16 @@
ToolTipProperties.Text="Toggle Theme" /> ToolTipProperties.Text="Toggle Theme" />
</Grid> </Grid>
<!-- Loading Progress Bar --> <!-- Loading Progress Bar (own row above WebView) -->
<ProgressBar Grid.Row="1" <ProgressBar Grid.Row="1"
x:Name="LoadingProgress" x:Name="LoadingProgress"
VerticalOptions="Start"
HeightRequest="3" HeightRequest="3"
ProgressColor="{StaticResource AccentColor}" ProgressColor="{StaticResource AccentColor}"
Progress="0" Progress="0"
IsVisible="False" IsVisible="False" />
ZIndex="1" />
<!-- WebView - Main Content Area --> <!-- WebView - Main Content Area -->
<WebView Grid.Row="1" <WebView Grid.Row="2"
x:Name="MainWebView" x:Name="MainWebView"
VerticalOptions="Fill" VerticalOptions="Fill"
HorizontalOptions="Fill" HorizontalOptions="Fill"
@@ -141,7 +139,7 @@
Navigated="OnNavigated" /> Navigated="OnNavigated" />
<!-- Status Bar --> <!-- Status Bar -->
<Grid Grid.Row="2" <Grid Grid.Row="3"
Padding="8,4" Padding="8,4"
BackgroundColor="{AppThemeBinding Light=#E8E8E8, Dark=#1A1A1A}"> BackgroundColor="{AppThemeBinding Light=#E8E8E8, Dark=#1A1A1A}">
<Label x:Name="StatusLabel" <Label x:Name="StatusLabel"

View File

@@ -16,6 +16,9 @@ public partial class WebViewPage : ContentPage
// Set initial URL // Set initial URL
MainWebView.Source = new UrlWebViewSource { Url = "https://dotnet.microsoft.com" }; MainWebView.Source = new UrlWebViewSource { Url = "https://dotnet.microsoft.com" };
// Configure URL entry to select all on double-click (like a browser address bar)
EntryExtensions.SetSelectAllOnDoubleClick(UrlEntry, true);
Console.WriteLine("[WebViewPage] Constructor finished"); Console.WriteLine("[WebViewPage] Constructor finished");
} }

View File

@@ -1,3 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="#FFFFFF"> <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="#333333">
<path d="M480-120q-150 0-255-105T120-480q0-150 105-255t255-105q14 0 27.5 1t26.5 3q-41 29-65.5 75.5T444-660q0 90 63 153t153 63q55 0 101-24.5t75-65.5q2 13 3 26.5t1 27.5q0 150-105 255T480-120Zm0-80q88 0 158-48.5T740-375q-20 5-40 8t-40 3q-123 0-209.5-86.5T364-660q0-20 3-40t8-40q-78 32-126.5 102T200-480q0 116 82 198t198 82Zm-10-270Z"/> <path d="M480-120q-150 0-255-105T120-480q0-150 105-255t255-105q14 0 27.5 1t26.5 3q-41 29-65.5 75.5T444-660q0 90 63 153t153 63q55 0 101-24.5t75-65.5q2 13 3 26.5t1 27.5q0 150-105 255T480-120Zm0-80q88 0 158-48.5T740-375q-20 5-40 8t-40 3q-123 0-209.5-86.5T364-660q0-20 3-40t8-40q-78 32-126.5 102T200-480q0 116 82 198t198 82Zm-10-270Z"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 446 B

After

Width:  |  Height:  |  Size: 446 B