<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="Northwind.Maui.Client.CategoriesPage"
             Background="{StaticResource rainbow}"
             Title="Kategorie">
    <VerticalStackLayout>

        <Button Text="Kliknij mnie" WidthRequest="110"
            x:Name="ClickMeButton"
            Clicked="ClickMeButton_Clicked"/>

        <Label Margin="10">
            Przesuń suwak, aby obrócić kwadrat
        </Label>

        <Label BindingContext="{x:Reference Name=sliderRotation}"
           Text="{Binding Path=Value, StringFormat='{0:N0} stopni'}" 
           FontSize="30" HorizontalTextAlignment="Center" />

        <Slider Value="0" Minimum="0" Maximum="180" 
            x:Name="sliderRotation" Margin="10,0" />

        <Rectangle HeightRequest="200" WidthRequest="200" 
               Fill="{StaticResource rainbow}"
               BindingContext="{x:Reference Name=sliderRotation}"
               Rotation="{Binding Path=Value}" />

    </VerticalStackLayout>
</ContentPage>