2026-03-03 04:56:04 +08:00
|
|
|
<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"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
d:DesignWidth="320"
|
|
|
|
|
d:DesignHeight="320"
|
|
|
|
|
x:Class="LanMontainDesktop.Views.Components.WeatherWidget">
|
|
|
|
|
|
|
|
|
|
<Border x:Name="RootBorder"
|
2026-03-03 18:26:29 +08:00
|
|
|
CornerRadius="30"
|
2026-03-03 04:56:04 +08:00
|
|
|
ClipToBounds="True"
|
|
|
|
|
Background="#68A9EC">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Border x:Name="BackgroundImageLayer"
|
2026-03-03 18:26:29 +08:00
|
|
|
CornerRadius="30"
|
2026-03-03 04:56:04 +08:00
|
|
|
ClipToBounds="True" />
|
|
|
|
|
|
|
|
|
|
<Border x:Name="BackgroundMotionLayer"
|
2026-03-03 18:26:29 +08:00
|
|
|
CornerRadius="30"
|
2026-03-03 04:56:04 +08:00
|
|
|
ClipToBounds="True"
|
2026-03-04 02:02:34 +08:00
|
|
|
Opacity="0.20"
|
2026-03-03 04:56:04 +08:00
|
|
|
RenderTransformOrigin="0.5,0.5">
|
|
|
|
|
<Border.RenderTransform>
|
|
|
|
|
<TransformGroup>
|
|
|
|
|
<ScaleTransform ScaleX="1.05"
|
|
|
|
|
ScaleY="1.05" />
|
|
|
|
|
<TranslateTransform />
|
|
|
|
|
</TransformGroup>
|
|
|
|
|
</Border.RenderTransform>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<Border x:Name="BackgroundTintLayer"
|
2026-03-03 18:26:29 +08:00
|
|
|
CornerRadius="30"
|
2026-03-03 04:56:04 +08:00
|
|
|
ClipToBounds="True"
|
2026-03-04 02:02:34 +08:00
|
|
|
Opacity="0.16" />
|
2026-03-03 04:56:04 +08:00
|
|
|
|
|
|
|
|
<Border x:Name="BackgroundLightLayer"
|
2026-03-03 18:26:29 +08:00
|
|
|
CornerRadius="30"
|
2026-03-03 04:56:04 +08:00
|
|
|
ClipToBounds="True"
|
2026-03-04 02:02:34 +08:00
|
|
|
Opacity="0.62">
|
2026-03-03 04:56:04 +08:00
|
|
|
<Border.Background>
|
|
|
|
|
<LinearGradientBrush StartPoint="0,0"
|
|
|
|
|
EndPoint="1,1">
|
2026-03-04 02:02:34 +08:00
|
|
|
<GradientStop Color="#52FFFFFF"
|
2026-03-03 04:56:04 +08:00
|
|
|
Offset="0" />
|
2026-03-04 02:02:34 +08:00
|
|
|
<GradientStop Color="#1AFFFFFF"
|
2026-03-03 04:56:04 +08:00
|
|
|
Offset="0.30" />
|
|
|
|
|
<GradientStop Color="#00000000"
|
2026-03-04 02:02:34 +08:00
|
|
|
Offset="0.56" />
|
2026-03-03 04:56:04 +08:00
|
|
|
</LinearGradientBrush>
|
|
|
|
|
</Border.Background>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<Border x:Name="BackgroundShadeLayer"
|
2026-03-03 18:26:29 +08:00
|
|
|
CornerRadius="30"
|
2026-03-03 04:56:04 +08:00
|
|
|
ClipToBounds="True"
|
2026-03-04 02:02:34 +08:00
|
|
|
Opacity="0.74">
|
2026-03-03 04:56:04 +08:00
|
|
|
<Border.Background>
|
|
|
|
|
<LinearGradientBrush StartPoint="0,0"
|
|
|
|
|
EndPoint="0,1">
|
2026-03-04 02:02:34 +08:00
|
|
|
<GradientStop Color="#00000000"
|
|
|
|
|
Offset="0.46" />
|
|
|
|
|
<GradientStop Color="#2009182D"
|
2026-03-03 04:56:04 +08:00
|
|
|
Offset="1" />
|
|
|
|
|
</LinearGradientBrush>
|
|
|
|
|
</Border.Background>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<Canvas x:Name="ParticleLayer"
|
|
|
|
|
IsHitTestVisible="False"
|
|
|
|
|
ClipToBounds="True" />
|
|
|
|
|
|
|
|
|
|
<Border x:Name="ContentPaddingBorder"
|
2026-03-04 02:02:34 +08:00
|
|
|
Padding="18,16"
|
2026-03-03 04:56:04 +08:00
|
|
|
Background="Transparent">
|
2026-03-03 18:26:29 +08:00
|
|
|
<Grid x:Name="LayoutRoot">
|
|
|
|
|
<Grid x:Name="ContentGrid"
|
|
|
|
|
RowDefinitions="Auto,*,Auto"
|
2026-03-04 02:02:34 +08:00
|
|
|
RowSpacing="0">
|
2026-03-03 18:26:29 +08:00
|
|
|
<Grid x:Name="TopRowGrid"
|
|
|
|
|
Grid.Row="0"
|
2026-03-04 02:02:34 +08:00
|
|
|
ColumnDefinitions="Auto,*,Auto"
|
|
|
|
|
ColumnSpacing="6">
|
2026-03-03 04:56:04 +08:00
|
|
|
<TextBlock x:Name="TemperatureTextBlock"
|
2026-03-03 18:26:29 +08:00
|
|
|
Grid.Column="0"
|
2026-03-04 02:02:34 +08:00
|
|
|
Text="7°"
|
|
|
|
|
FontSize="88"
|
2026-03-03 18:26:29 +08:00
|
|
|
FontWeight="Light"
|
2026-03-03 04:56:04 +08:00
|
|
|
FontFeatures="tnum"
|
2026-03-03 18:26:29 +08:00
|
|
|
VerticalAlignment="Top"
|
2026-03-04 02:02:34 +08:00
|
|
|
Margin="-1,-7,0,0"
|
2026-03-03 04:56:04 +08:00
|
|
|
TextTrimming="CharacterEllipsis"
|
|
|
|
|
MaxLines="1" />
|
|
|
|
|
|
2026-03-03 18:26:29 +08:00
|
|
|
<Image x:Name="WeatherIconImage"
|
2026-03-04 02:02:34 +08:00
|
|
|
Grid.Column="2"
|
|
|
|
|
Width="84"
|
|
|
|
|
Height="84"
|
2026-03-03 18:26:29 +08:00
|
|
|
HorizontalAlignment="Right"
|
|
|
|
|
VerticalAlignment="Top"
|
2026-03-04 02:02:34 +08:00
|
|
|
Margin="0,-4,0,0"
|
2026-03-03 18:26:29 +08:00
|
|
|
Stretch="Uniform" />
|
|
|
|
|
</Grid>
|
|
|
|
|
|
2026-03-04 02:02:34 +08:00
|
|
|
<StackPanel x:Name="BottomInfoStack"
|
|
|
|
|
Grid.Row="2"
|
|
|
|
|
VerticalAlignment="Bottom"
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
Spacing="0"
|
|
|
|
|
Margin="0,0,0,2">
|
|
|
|
|
<StackPanel x:Name="ConditionStack"
|
|
|
|
|
Orientation="Vertical"
|
|
|
|
|
Spacing="2"
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
VerticalAlignment="Bottom"
|
|
|
|
|
Margin="0,0,0,1">
|
2026-03-03 04:56:04 +08:00
|
|
|
<TextBlock x:Name="ConditionTextBlock"
|
2026-03-04 02:02:34 +08:00
|
|
|
Text="雾"
|
|
|
|
|
FontSize="26"
|
2026-03-03 04:56:04 +08:00
|
|
|
FontWeight="SemiBold"
|
2026-03-04 02:02:34 +08:00
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
TextAlignment="Left"
|
2026-03-03 04:56:04 +08:00
|
|
|
TextTrimming="CharacterEllipsis"
|
|
|
|
|
MaxLines="1" />
|
|
|
|
|
<TextBlock x:Name="RangeTextBlock"
|
2026-03-04 02:02:34 +08:00
|
|
|
Text="11°/4°"
|
|
|
|
|
FontSize="28"
|
2026-03-03 04:56:04 +08:00
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
FontFeatures="tnum"
|
2026-03-04 02:02:34 +08:00
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
TextAlignment="Left"
|
2026-03-03 04:56:04 +08:00
|
|
|
TextTrimming="CharacterEllipsis"
|
|
|
|
|
MaxLines="1" />
|
|
|
|
|
</StackPanel>
|
2026-03-03 18:26:29 +08:00
|
|
|
<Border x:Name="CityInfoBadge"
|
2026-03-04 02:02:34 +08:00
|
|
|
Background="Transparent"
|
|
|
|
|
CornerRadius="0"
|
|
|
|
|
Padding="0"
|
2026-03-03 18:26:29 +08:00
|
|
|
HorizontalAlignment="Left">
|
|
|
|
|
<StackPanel Orientation="Horizontal"
|
2026-03-04 02:02:34 +08:00
|
|
|
Spacing="0"
|
|
|
|
|
HorizontalAlignment="Left"
|
2026-03-03 18:26:29 +08:00
|
|
|
VerticalAlignment="Center">
|
|
|
|
|
<fi:SymbolIcon x:Name="LocationIcon"
|
|
|
|
|
Symbol="Location"
|
2026-03-04 02:02:34 +08:00
|
|
|
FontSize="12"
|
2026-03-03 18:26:29 +08:00
|
|
|
IsVisible="False"
|
|
|
|
|
VerticalAlignment="Center" />
|
|
|
|
|
<TextBlock x:Name="CityTextBlock"
|
2026-03-04 02:02:34 +08:00
|
|
|
Text="北京"
|
|
|
|
|
FontSize="17"
|
|
|
|
|
FontWeight="Regular"
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
TextAlignment="Left"
|
2026-03-03 18:26:29 +08:00
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
TextTrimming="CharacterEllipsis"
|
|
|
|
|
MaxLines="1" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Border>
|
|
|
|
|
</StackPanel>
|
2026-03-03 04:56:04 +08:00
|
|
|
</Grid>
|
2026-03-03 18:26:29 +08:00
|
|
|
</Grid>
|
2026-03-03 04:56:04 +08:00
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</UserControl>
|