<Page
    x:Class="AmbientSounds.Views.ShellPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:c="using:AmbientSounds.Converters"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="using:AmbientSounds.Views"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:strings="using:AmbientSounds.Strings"
    xmlns:toolkit="using:Microsoft.Toolkit.Uwp.UI.Controls"
    xmlns:winui="using:Microsoft.UI.Xaml.Controls"
    x:Name="RootPage"
    Background="{ThemeResource ContentBackgroundBrush}"
    mc:Ignorable="d">
    <Grid>
        <toolkit:ImageEx
            x:Name="BackgroundImage"
            x:Load="{x:Bind ViewModel.ShowBackgroundImage, Mode=OneWay}"
            IsCacheEnabled="True"
            Source="{x:Bind ViewModel.BackgroundImagePath, Mode=OneWay}"
            Stretch="UniformToFill" />

        <Frame x:Name="MainFrame" />

        <StackPanel
            Margin="0,12,0,0"
            HorizontalAlignment="Center"
            VerticalAlignment="Top"
            Orientation="Horizontal">
            <Image Height="18" Source="ms-appx:///Assets/logo.png" />
            <TextBlock
                Margin="8,0,0,0"
                VerticalAlignment="Center"
                FontSize="12"
                Text="Ambie" />
        </StackPanel>

        <winui:TeachingTip
            Title="{x:Bind strings:Resources.HelloAgain}"
            ActionButtonClick="TeachingTip_ActionButtonClick"
            ActionButtonContent="{x:Bind RateUs}"
            CloseButtonClick="TeachingTip_CloseButtonClick"
            CloseButtonContent="{x:Bind strings:Resources.Dismiss}"
            IsOpen="{x:Bind ViewModel.IsRatingMessageVisible, Mode=OneWay}"
            PreferredPlacement="BottomRight"
            Subtitle="{x:Bind strings:Resources.RateUsMessage}" />
    </Grid>
</Page>
