mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-22 00:54:26 +08:00
0.2.8
天气组件、倒计时组件微调。引入浏览器组件。
This commit is contained in:
73
LanMontainDesktop/Views/Components/BrowserWidget.axaml
Normal file
73
LanMontainDesktop/Views/Components/BrowserWidget.axaml
Normal file
@@ -0,0 +1,73 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:fi="using:FluentIcons.Avalonia"
|
||||
xmlns:webview="clr-namespace:AvaloniaWebView;assembly=Avalonia.WebView"
|
||||
mc:Ignorable="d"
|
||||
d:DesignWidth="480"
|
||||
d:DesignHeight="480"
|
||||
x:Class="LanMontainDesktop.Views.Components.BrowserWidget">
|
||||
|
||||
<Border x:Name="RootBorder"
|
||||
Background="#F4F7FC"
|
||||
CornerRadius="24"
|
||||
ClipToBounds="True"
|
||||
Padding="10">
|
||||
<Grid RowDefinitions="*,Auto"
|
||||
RowSpacing="8">
|
||||
<Border x:Name="WebViewHostBorder"
|
||||
Grid.Row="0"
|
||||
CornerRadius="16"
|
||||
ClipToBounds="True"
|
||||
Background="#FFFFFFFF"
|
||||
BorderBrush="#22000000"
|
||||
BorderThickness="1">
|
||||
<webview:WebView x:Name="BrowserWebView" />
|
||||
</Border>
|
||||
|
||||
<Border x:Name="AddressBarBorder"
|
||||
Grid.Row="1"
|
||||
CornerRadius="14"
|
||||
Background="#ECF2FA"
|
||||
BorderBrush="#22000000"
|
||||
BorderThickness="1"
|
||||
Padding="8,6">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto"
|
||||
ColumnSpacing="8">
|
||||
<Button x:Name="RefreshButton"
|
||||
Grid.Column="0"
|
||||
Width="34"
|
||||
Height="34"
|
||||
Padding="0"
|
||||
CornerRadius="17"
|
||||
ToolTip.Tip="Refresh"
|
||||
Click="OnRefreshButtonClick">
|
||||
<fi:SymbolIcon Symbol="ArrowClockwise"
|
||||
FontSize="15" />
|
||||
</Button>
|
||||
|
||||
<TextBox x:Name="AddressTextBox"
|
||||
Grid.Column="1"
|
||||
VerticalContentAlignment="Center"
|
||||
HorizontalContentAlignment="Left"
|
||||
Watermark="https://example.com"
|
||||
Text="https://www.bing.com"
|
||||
KeyDown="OnAddressTextBoxKeyDown" />
|
||||
|
||||
<Button x:Name="GoButton"
|
||||
Grid.Column="2"
|
||||
Width="34"
|
||||
Height="34"
|
||||
Padding="0"
|
||||
CornerRadius="17"
|
||||
ToolTip.Tip="Go"
|
||||
Click="OnGoButtonClick">
|
||||
<fi:SymbolIcon Symbol="ArrowRight"
|
||||
FontSize="15" />
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user