<ui:Page
    x:Class="ModernWpf.SampleApp.ControlPages.StatusBarPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ui="http://schemas.modernwpf.com/2019"
    xmlns:sc="clr-namespace:SamplesCommon;assembly=SamplesCommon"
    mc:Ignorable="d">

    <ui:SimpleStackPanel Style="{StaticResource ControlPageContentPanelStyle}">
        <sc:ControlExample HeaderText="A StatusBar.">
            <StatusBar
                x:Name="statusBar"
                VerticalAlignment="Bottom">
                <StatusBarItem>
                    <TextBlock>Downloading File</TextBlock>
                </StatusBarItem>

                <StatusBarItem>
                    <ProgressBar
                        Width="100"
                        Height="20"
                        x:Name="progressBar1">
                        <ProgressBar.Triggers>
                            <EventTrigger RoutedEvent="Loaded">
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetProperty="Value"
                                            From="0"
                                            To="100"
                                            Duration="0:0:5" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger>
                        </ProgressBar.Triggers>
                    </ProgressBar>
                </StatusBarItem>

                <Separator />

                <StatusBarItem>
                    <TextBlock>Online</TextBlock>
                </StatusBarItem>

                <StatusBarItem HorizontalAlignment="Right">
                    <ui:FontIcon
                        FontSize="12"
                        Glyph="&#xE897;" />
                </StatusBarItem>
            </StatusBar>

            <sc:ControlExample.Options>
                <CheckBox
                    Content="IsEnabled"
                    IsChecked="{Binding ElementName=statusBar, Path=IsEnabled}" />
            </sc:ControlExample.Options>
        </sc:ControlExample>
    </ui:SimpleStackPanel>
</ui:Page>
