<Page
    x:Class="uplink.NET.Sample.Shared.Pages.BucketListPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:uplink.NET.Sample.Shared.Pages"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="using:Uno.UI.Toolkit"
	xmlns:ios="http://nventive.com/ios"
    xmlns:not_android="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:android="http://nventive.com/android"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <ScrollViewer>
        <StackPanel>
            <CommandBar Background="{StaticResource StorjBlue}" OverflowButtonVisibility="Collapsed">
                <CommandBar.Content>
                    <TextBlock Text="Your buckets" Foreground="White" FontSize="25" Margin="10,0"/>
                </CommandBar.Content>
                <AppBarButton Label="Add bucket..." Foreground="White" Command="{Binding CreateBucketCommand}">
                    <AppBarButton.Icon>
                        <BitmapIcon UriSource="ms-appx:///Assets/storj_add.png"/>
                    </AppBarButton.Icon>
                </AppBarButton>
                <AppBarButton Label="Logout" Foreground="White" Command="{Binding LogoutCommand}">
                    <AppBarButton.Icon>
                        <BitmapIcon UriSource="ms-appx:///Assets/storj_logout.png"/>
                    </AppBarButton.Icon>
                </AppBarButton>
            </CommandBar>
            <StackPanel Visibility="{x:Bind Path=_vm.Loading, Converter={StaticResource BooleanToVisibilityConverter},Mode=OneWay}">
                <ProgressRing IsActive="True" Foreground="{StaticResource StorjBlue}" Margin="50"/>
            </StackPanel>
            <ListView ItemsSource="{x:Bind _vm.Buckets, Mode=OneWay}" ItemTemplate="{StaticResource BucketInfo}" HorizontalAlignment="Left" SelectionMode="None">
            </ListView>
        </StackPanel>
    </ScrollViewer>
</Page>
