<?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="ex_Localization3.MainPage"
             xmlns:ext="clr-namespace:ex_Localization3.Resources.Localization">

    <ScrollView>
        <VerticalStackLayout
            Padding="30"
            Spacing="25">
            
            <Picker Title="{ext:LocalizedString Key=PickerText}"
                    SelectedItem="{Binding Culture, Source={StaticResource Localization}}">
                <Picker.ItemsSource>
                    <x:Array Type="{x:Type x:String}">
                        <x:String>en</x:String>
                        <x:String>fr-FR</x:String>
                        <x:String>ca-ES</x:String>
                        <x:String>es-ES</x:String>
                        <x:String>it</x:String>
                    </x:Array>
                </Picker.ItemsSource>
            </Picker>

            <Entry Placeholder="{ext:LocalizedString Key=EntryPlaceholder}" />
            <Button Text="{ext:LocalizedString Key=ButtonText}" />
            <HorizontalStackLayout>
                <Label Text="{ext:LocalizedString Key=LabelText}" />
                <Label x:Name="resultLabel"/>
            </HorizontalStackLayout>
        </VerticalStackLayout>
    </ScrollView>

</ContentPage>
