mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 23:54:26 +08:00
166 lines
7.6 KiB
XML
166 lines
7.6 KiB
XML
<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"
|
|
CornerRadius="30"
|
|
ClipToBounds="True"
|
|
Background="#68A9EC">
|
|
<Grid>
|
|
<Border x:Name="BackgroundImageLayer"
|
|
CornerRadius="30"
|
|
ClipToBounds="True" />
|
|
|
|
<Border x:Name="BackgroundMotionLayer"
|
|
CornerRadius="30"
|
|
ClipToBounds="True"
|
|
Opacity="0.24"
|
|
RenderTransformOrigin="0.5,0.5">
|
|
<Border.RenderTransform>
|
|
<TransformGroup>
|
|
<ScaleTransform ScaleX="1.05"
|
|
ScaleY="1.05" />
|
|
<TranslateTransform />
|
|
</TransformGroup>
|
|
</Border.RenderTransform>
|
|
</Border>
|
|
|
|
<Border x:Name="BackgroundTintLayer"
|
|
CornerRadius="30"
|
|
ClipToBounds="True"
|
|
Opacity="0.20" />
|
|
|
|
<Border x:Name="BackgroundLightLayer"
|
|
CornerRadius="30"
|
|
ClipToBounds="True"
|
|
Opacity="0.66">
|
|
<Border.Background>
|
|
<LinearGradientBrush StartPoint="0,0"
|
|
EndPoint="1,1">
|
|
<GradientStop Color="#5BFFFFFF"
|
|
Offset="0" />
|
|
<GradientStop Color="#1FFFFFFF"
|
|
Offset="0.30" />
|
|
<GradientStop Color="#00000000"
|
|
Offset="0.55" />
|
|
</LinearGradientBrush>
|
|
</Border.Background>
|
|
</Border>
|
|
|
|
<Border x:Name="BackgroundShadeLayer"
|
|
CornerRadius="30"
|
|
ClipToBounds="True"
|
|
Opacity="0.78">
|
|
<Border.Background>
|
|
<LinearGradientBrush StartPoint="0,0"
|
|
EndPoint="0,1">
|
|
<GradientStop Color="#00040A16"
|
|
Offset="0.50" />
|
|
<GradientStop Color="#2E0B1C34"
|
|
Offset="1" />
|
|
</LinearGradientBrush>
|
|
</Border.Background>
|
|
</Border>
|
|
|
|
<Canvas x:Name="ParticleLayer"
|
|
IsHitTestVisible="False"
|
|
ClipToBounds="True" />
|
|
|
|
<Border x:Name="ContentPaddingBorder"
|
|
Padding="16"
|
|
Background="Transparent">
|
|
<Grid x:Name="LayoutRoot">
|
|
<Grid x:Name="ContentGrid"
|
|
RowDefinitions="Auto,*,Auto"
|
|
RowSpacing="2">
|
|
<Grid x:Name="TopRowGrid"
|
|
Grid.Row="0"
|
|
ColumnDefinitions="Auto,*">
|
|
<TextBlock x:Name="TemperatureTextBlock"
|
|
Grid.Column="0"
|
|
Text="26°"
|
|
FontSize="96"
|
|
FontWeight="Light"
|
|
FontFeatures="tnum"
|
|
VerticalAlignment="Top"
|
|
Margin="0,-1,0,0"
|
|
TextTrimming="CharacterEllipsis"
|
|
MaxLines="1" />
|
|
|
|
<Image x:Name="WeatherIconImage"
|
|
Grid.Column="1"
|
|
Width="76"
|
|
Height="76"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Top"
|
|
Stretch="Uniform" />
|
|
</Grid>
|
|
|
|
<Border x:Name="ConditionInfoBadge"
|
|
Grid.Row="1"
|
|
Background="Transparent"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Padding="0">
|
|
<StackPanel Orientation="Vertical"
|
|
Spacing="0"
|
|
VerticalAlignment="Center">
|
|
<TextBlock x:Name="ConditionTextBlock"
|
|
Text="Clear"
|
|
FontSize="44"
|
|
FontWeight="SemiBold"
|
|
TextTrimming="CharacterEllipsis"
|
|
MaxLines="1" />
|
|
|
|
<TextBlock x:Name="RangeTextBlock"
|
|
Text="20°/28°"
|
|
FontSize="46"
|
|
FontWeight="SemiBold"
|
|
FontFeatures="tnum"
|
|
TextTrimming="CharacterEllipsis"
|
|
MaxLines="1" />
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<StackPanel x:Name="BottomInfoStack"
|
|
Grid.Row="2"
|
|
VerticalAlignment="Bottom"
|
|
Spacing="0"
|
|
Margin="0,0,0,1">
|
|
<Border x:Name="CityInfoBadge"
|
|
Background="#24FFFFFF"
|
|
CornerRadius="13"
|
|
Padding="10,5"
|
|
HorizontalAlignment="Left">
|
|
<StackPanel Orientation="Horizontal"
|
|
Spacing="6"
|
|
VerticalAlignment="Center">
|
|
<fi:SymbolIcon x:Name="LocationIcon"
|
|
Symbol="Location"
|
|
FontSize="14"
|
|
IsVisible="False"
|
|
VerticalAlignment="Center" />
|
|
<TextBlock x:Name="CityTextBlock"
|
|
Text="Beijing"
|
|
FontSize="23"
|
|
FontWeight="Medium"
|
|
VerticalAlignment="Center"
|
|
TextTrimming="CharacterEllipsis"
|
|
MaxLines="1" />
|
|
</StackPanel>
|
|
</Border>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
</UserControl>
|
|
|