<Page
    x:Class="AmbientSounds.Views.ScreensaverPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:AmbientSounds.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="using:AmbientSounds.Views"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    x:Name="RootPage"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
    mc:Ignorable="d">

    <Grid>
        <Button
            x:Uid="BackButton"
            Margin="40,28,0,0"
            VerticalAlignment="Top"
            Canvas.ZIndex="1"
            Click="GoBack"
            RequestedTheme="Dark"
            Style="{StaticResource RoundButtonStyle}"
            Visibility="{x:Bind ShowBackButton}">
            <FontIcon FontFamily="{StaticResource FluentUIGlyphs}" Glyph="&#xE921;" />
        </Button>

        <controls:Screensaver x:Name="ScreensaverControl" x:Load="False" />

        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup>
                <VisualState x:Name="DarkScreensaverState">
                    <VisualState.Setters>
                        <Setter Target="RootPage.Background" Value="Black" />
                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="Normal" />
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</Page>
