|
| 1 | +<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> |
| 2 | +<Page x:Class="ShimmerExperiment.Samples.ShimmerSample" |
| 3 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 4 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 6 | + xmlns:labs="using:CommunityToolkit.Labs.WinUI" |
| 7 | + xmlns:local="using:ShimmerExperiment.Samples" |
| 8 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 9 | + mc:Ignorable="d"> |
| 10 | + |
| 11 | + <StackPanel Spacing="16"> |
| 12 | + <StackPanel Width="240" |
| 13 | + Padding="16" |
| 14 | + Background="{ThemeResource CardBackgroundFillColorDefaultBrush}" |
| 15 | + BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" |
| 16 | + BorderThickness="1" |
| 17 | + CornerRadius="4" |
| 18 | + Spacing="12"> |
| 19 | + |
| 20 | + <Grid Width="96" |
| 21 | + Height="96" |
| 22 | + CornerRadius="96"> |
| 23 | + <Border x:Name="Picture" |
| 24 | + Visibility="{x:Bind HasLoaded, Mode=OneWay}"> |
| 25 | + <Border.Background> |
| 26 | + <ImageBrush ImageSource="ms-appx:///Assets/Owl.jpg" /> |
| 27 | + </Border.Background> |
| 28 | + </Border> |
| 29 | + <labs:Shimmer Visibility="{x:Bind local:ShimmerSample.ReverseVisibility(Picture.Visibility), Mode=OneWay}" /> |
| 30 | + </Grid> |
| 31 | + |
| 32 | + <Grid Width="80" |
| 33 | + Height="20" |
| 34 | + HorizontalAlignment="Center"> |
| 35 | + <TextBlock x:Name="Title" |
| 36 | + FontWeight="SemiBold" |
| 37 | + Text="This is a title" |
| 38 | + Visibility="{x:Bind HasLoaded, Mode=OneWay}" /> |
| 39 | + <labs:Shimmer Visibility="{x:Bind local:ShimmerSample.ReverseVisibility(Title.Visibility), Mode=OneWay}" /> |
| 40 | + </Grid> |
| 41 | + <Grid Width="120" |
| 42 | + Height="20" |
| 43 | + HorizontalAlignment="Center"> |
| 44 | + <TextBlock x:Name="Description" |
| 45 | + HorizontalAlignment="Center" |
| 46 | + Text="This is a description" |
| 47 | + Visibility="{x:Bind HasLoaded, Mode=OneWay}" /> |
| 48 | + <labs:Shimmer Visibility="{x:Bind local:ShimmerSample.ReverseVisibility(Description.Visibility), Mode=OneWay}" /> |
| 49 | + </Grid> |
| 50 | + <Grid Width="60" |
| 51 | + Height="32" |
| 52 | + HorizontalAlignment="Center"> |
| 53 | + <Button x:Name="Install" |
| 54 | + Content="Install" |
| 55 | + Style="{StaticResource AccentButtonStyle}" |
| 56 | + Visibility="{x:Bind HasLoaded, Mode=OneWay}" /> |
| 57 | + <labs:Shimmer Visibility="{x:Bind local:ShimmerSample.ReverseVisibility(Install.Visibility), Mode=OneWay}" /> |
| 58 | + </Grid> |
| 59 | + </StackPanel> |
| 60 | + </StackPanel> |
| 61 | +</Page> |
0 commit comments