Browse Source

ControlCatalog: use the Accelerate demo hero banner verbatim on the home page

Replaces the gradient/glyph hero with a 1:1 copy of AvaloniaProDemo's
DashboardView banner: banner-bg backdrop, the four 3D logos floating at
the original positions/durations, and the centered Avalonia wordmark.
Assets copied from the Accelerate repo (~4.8 MB of PNGs).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pull/21771/head
Mike James 3 months ago
parent
commit
e83cff7773
  1. BIN
      samples/ControlCatalog/Assets/banner-bg.png
  2. BIN
      samples/ControlCatalog/Assets/banner-logo.png
  3. BIN
      samples/ControlCatalog/Assets/logo1.png
  4. BIN
      samples/ControlCatalog/Assets/logo2.png
  5. BIN
      samples/ControlCatalog/Assets/logo3.png
  6. BIN
      samples/ControlCatalog/Assets/logo4.png
  7. 75
      samples/ControlCatalog/Pages/HomePage.xaml
  8. 8
      samples/ControlCatalog/Pages/HomePage.xaml.cs

BIN
samples/ControlCatalog/Assets/banner-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 KiB

BIN
samples/ControlCatalog/Assets/banner-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
samples/ControlCatalog/Assets/logo1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

BIN
samples/ControlCatalog/Assets/logo2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 KiB

BIN
samples/ControlCatalog/Assets/logo3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 KiB

BIN
samples/ControlCatalog/Assets/logo4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 KiB

75
samples/ControlCatalog/Pages/HomePage.xaml

@ -1,7 +1,6 @@
<ContentPage Theme="{StaticResource ScrollPage}" <ContentPage Theme="{StaticResource ScrollPage}"
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ControlCatalog"
xmlns:viewModels="using:ControlCatalog.ViewModels" xmlns:viewModels="using:ControlCatalog.ViewModels"
x:Class="ControlCatalog.Pages.HomePage" x:Class="ControlCatalog.Pages.HomePage"
x:DataType="viewModels:MainWindowViewModel" x:DataType="viewModels:MainWindowViewModel"
@ -60,51 +59,41 @@
<StackPanel Spacing="28" Margin="0,0,15,20" HorizontalAlignment="Stretch"> <StackPanel Spacing="28" Margin="0,0,15,20" HorizontalAlignment="Stretch">
<!-- Hero banner --> <!-- Hero banner (1:1 from the Accelerate demo dashboard) -->
<Border CornerRadius="16" ClipToBounds="True" Height="220" HorizontalAlignment="Stretch"> <Border CornerRadius="20" ClipToBounds="True" HorizontalAlignment="Stretch" Height="220">
<Border.Background>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,100%">
<GradientStop Offset="0" Color="#6D28D9" />
<GradientStop Offset="0.55" Color="#4338CA" />
<GradientStop Offset="1" Color="#2563EB" />
</LinearGradientBrush>
</Border.Background>
<Grid ClipToBounds="True"> <Grid ClipToBounds="True">
<!-- Floating control glyphs, animated from code-behind --> <Image Source="/Assets/banner-bg.png"
Stretch="UniformToFill" />
<Canvas IsHitTestVisible="False"> <Canvas IsHitTestVisible="False">
<PathIcon x:Name="FloatIcon1" <Image x:Name="BannerLogo1"
Data="{x:Static local:Icons.CursorClick}" Source="/Assets/logo1.png"
Foreground="#26FFFFFF" Width="230"
Width="120" Height="120" Stretch="Uniform"
Canvas.Left="-30" Canvas.Bottom="-25" /> Canvas.Left="-60"
<PathIcon x:Name="FloatIcon2" Canvas.Bottom="-50" />
Data="{x:Static local:Icons.Palette}" <Image x:Name="BannerLogo2"
Foreground="#21FFFFFF" Source="/Assets/logo2.png"
Width="96" Height="96" Width="150"
Canvas.Left="200" Canvas.Top="-30" /> Stretch="Uniform"
<PathIcon x:Name="FloatIcon3" Canvas.Left="240"
Data="{x:Static local:Icons.Calendar}" Canvas.Top="-60" />
Foreground="#26FFFFFF" <Image x:Name="BannerLogo3"
Width="110" Height="110" Source="/Assets/logo3.png"
Canvas.Right="-25" Canvas.Top="-20" /> Width="210"
<PathIcon x:Name="FloatIcon4" Stretch="Uniform"
Data="{x:Static local:Icons.Toggle}" Canvas.Right="-70"
Foreground="#21FFFFFF" Canvas.Top="-50" />
Width="130" Height="130" <Image x:Name="BannerLogo4"
Canvas.Right="170" Canvas.Bottom="-40" /> Source="/Assets/logo4.png"
Width="170"
Stretch="Uniform"
Canvas.Right="40"
Canvas.Bottom="-60" />
</Canvas> </Canvas>
<!-- Centered lockup --> <Image Source="/Assets/banner-logo.png"
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="10"> Width="220"
<Image Source="/Assets/Icon.png" Height="64" /> HorizontalAlignment="Center"
<TextBlock Text="Avalonia Control Catalog" VerticalAlignment="Center" />
FontSize="26" FontWeight="Bold"
Foreground="White"
HorizontalAlignment="Center" />
<TextBlock Text="Explore every control, on every platform, in every theme"
FontSize="13"
Foreground="#B3FFFFFF"
HorizontalAlignment="Center" />
</StackPanel>
</Grid> </Grid>
</Border> </Border>

8
samples/ControlCatalog/Pages/HomePage.xaml.cs

@ -25,10 +25,10 @@ namespace ControlCatalog.Pages
if (DataContext is not MainWindowViewModel) if (DataContext is not MainWindowViewModel)
DataContext = this.FindAncestorOfType<MainView>()?.DataContext; DataContext = this.FindAncestorOfType<MainView>()?.DataContext;
StartFloatingAnimation(FloatIcon1, 12, 8, TimeSpan.FromSeconds(12)); StartFloatingAnimation(BannerLogo1, 12, 8, TimeSpan.FromSeconds(12));
StartFloatingAnimation(FloatIcon2, -14, 8, TimeSpan.FromSeconds(10)); StartFloatingAnimation(BannerLogo2, -14, 8, TimeSpan.FromSeconds(10));
StartFloatingAnimation(FloatIcon3, -12, -12, TimeSpan.FromSeconds(14)); StartFloatingAnimation(BannerLogo3, -12, -12, TimeSpan.FromSeconds(14));
StartFloatingAnimation(FloatIcon4, 12, -8, TimeSpan.FromSeconds(11)); StartFloatingAnimation(BannerLogo4, 12, -8, TimeSpan.FromSeconds(11));
} }
private static void StartFloatingAnimation(Control target, double dx, double dy, TimeSpan duration) private static void StartFloatingAnimation(Control target, double dx, double dy, TimeSpan duration)

Loading…
Cancel
Save