<?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="Banquale.Views.MessageListPage"
             Title="MessageListPage"
             Shell.NavBarIsVisible="True">

    <VerticalStackLayout>

        <ListView ItemsSource="{Binding Consultant.MessagesList}"
                  SelectionMode="None"
                  RowHeight="100">

            <ListView.ItemTemplate>

                <DataTemplate>

                    <ViewCell>
                        <!--Limiter le subject à un nombre de caractère -->
                        <Grid RowDefinitions="auto, auto">

                            <Label
                                Text="{Binding Subject}"
                                FontSize="Title"
                                Padding="10"/>
                            <Label
                                Text="{Binding Description}"
                                Grid.Row="1"/>

                        </Grid>

                    </ViewCell>

                </DataTemplate>

            </ListView.ItemTemplate>

        </ListView>

    </VerticalStackLayout>
</ContentPage>
