mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-21 16:14:28 +08:00
149 lines
7.0 KiB
XML
149 lines
7.0 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="640"
|
|
d:DesignHeight="320"
|
|
x:Class="LanMountainDesktop.Views.Components.CnrDailyNewsWidget">
|
|
|
|
<Border x:Name="RootBorder"
|
|
CornerRadius="34"
|
|
Background="Transparent"
|
|
ClipToBounds="True"
|
|
BorderThickness="0"
|
|
Padding="0">
|
|
<Grid>
|
|
<Border x:Name="CardBorder"
|
|
Background="#FCFCFD"
|
|
CornerRadius="34"
|
|
BorderBrush="Transparent"
|
|
BorderThickness="0"
|
|
Padding="16,14,16,14">
|
|
<Grid RowDefinitions="Auto,Auto,Auto,Auto"
|
|
RowSpacing="8">
|
|
<Grid Grid.Row="0"
|
|
ColumnDefinitions="*,Auto"
|
|
ColumnSpacing="10">
|
|
<StackPanel Orientation="Horizontal"
|
|
Spacing="0"
|
|
VerticalAlignment="Center">
|
|
<TextBlock x:Name="BrandPrimaryTextBlock"
|
|
Text="央广网"
|
|
Foreground="#D6272E"
|
|
FontSize="28"
|
|
FontWeight="Bold"
|
|
TextTrimming="CharacterEllipsis" />
|
|
<TextBlock x:Name="BrandSecondaryTextBlock"
|
|
Text="·头条"
|
|
Foreground="#202327"
|
|
FontSize="28"
|
|
FontWeight="Bold"
|
|
TextTrimming="CharacterEllipsis" />
|
|
</StackPanel>
|
|
|
|
<Button x:Name="RefreshButton"
|
|
Grid.Column="1"
|
|
Width="116"
|
|
Height="42"
|
|
CornerRadius="21"
|
|
Background="#F0F0F0"
|
|
BorderBrush="Transparent"
|
|
BorderThickness="0"
|
|
Padding="10,0"
|
|
Focusable="False">
|
|
<StackPanel Orientation="Horizontal"
|
|
Spacing="4"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center">
|
|
<fi:SymbolIcon x:Name="RefreshGlyphIcon"
|
|
Symbol="ArrowClockwise"
|
|
IconVariant="Regular"
|
|
Foreground="#52575F"
|
|
FontSize="19"
|
|
VerticalAlignment="Center" />
|
|
<TextBlock x:Name="RefreshLabelTextBlock"
|
|
Text="换一换"
|
|
Foreground="#202327"
|
|
FontSize="25"
|
|
FontWeight="SemiBold"
|
|
VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
</Button>
|
|
</Grid>
|
|
|
|
<Grid x:Name="NewsItem1Grid"
|
|
Grid.Row="1"
|
|
ColumnDefinitions="*,Auto"
|
|
ColumnSpacing="12"
|
|
PointerPressed="OnNewsItem1PointerPressed">
|
|
<TextBlock x:Name="News1TitleTextBlock"
|
|
Text="Headline"
|
|
Foreground="#202327"
|
|
FontSize="21"
|
|
FontWeight="SemiBold"
|
|
TextWrapping="Wrap"
|
|
TextTrimming="CharacterEllipsis"
|
|
MaxLines="2"
|
|
VerticalAlignment="Top"
|
|
LineHeight="24" />
|
|
|
|
<Border x:Name="News1ImageHost"
|
|
Grid.Column="1"
|
|
Width="160"
|
|
Height="90"
|
|
CornerRadius="16"
|
|
ClipToBounds="True"
|
|
Background="#E6E6E6">
|
|
<Image x:Name="News1Image"
|
|
Stretch="UniformToFill" />
|
|
</Border>
|
|
</Grid>
|
|
|
|
<Grid x:Name="NewsItem2Grid"
|
|
Grid.Row="2"
|
|
ColumnDefinitions="*,Auto"
|
|
ColumnSpacing="12"
|
|
PointerPressed="OnNewsItem2PointerPressed">
|
|
<TextBlock x:Name="News2TitleTextBlock"
|
|
Text="Headline"
|
|
Foreground="#202327"
|
|
FontSize="21"
|
|
FontWeight="SemiBold"
|
|
TextWrapping="Wrap"
|
|
TextTrimming="CharacterEllipsis"
|
|
MaxLines="2"
|
|
VerticalAlignment="Top"
|
|
LineHeight="24" />
|
|
|
|
<Border x:Name="News2ImageHost"
|
|
Grid.Column="1"
|
|
Width="160"
|
|
Height="90"
|
|
CornerRadius="16"
|
|
ClipToBounds="True"
|
|
Background="#E6E6E6">
|
|
<Image x:Name="News2Image"
|
|
Stretch="UniformToFill" />
|
|
</Border>
|
|
</Grid>
|
|
|
|
<StackPanel x:Name="ExtraNewsItemsPanel"
|
|
Grid.Row="3"
|
|
Spacing="6"
|
|
IsVisible="False" />
|
|
</Grid>
|
|
</Border>
|
|
|
|
<TextBlock x:Name="StatusTextBlock"
|
|
IsVisible="False"
|
|
Text="Loading"
|
|
Foreground="#6A6F77"
|
|
FontSize="16"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center" />
|
|
</Grid>
|
|
</Border>
|
|
</UserControl>
|