You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PocketBook/src/BookApp/MainPage.xaml

67 lines
2.6 KiB

<?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="BookApp.MainPage">
<ContentPage.ToolbarItems>
<ToolbarItem Command="{Binding SetLowBrightnessCommand}">
<ToolbarItem.Text Text="Add" Clicked="Add_Clicked">
Addd
</ToolbarItem.Text>
<ToolbarItem.IconImageSource>
<FontImageSource
FontFamily="MaterialIconsOutlined-Regular"
Glyph="&#xe51c;"/>
</ToolbarItem.IconImageSource>
</ToolbarItem>
</ContentPage.ToolbarItems>
<StackLayout>
<Label>Mes livres</Label>
<CollectionView ItemsSource="{Binding MyCollections}">
<CollectionView.ItemTemplate>
<DataTemplate>
<Border>
<Grid RowDefinitions="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding Icone}"
HeightRequest="35"
WidthRequest="35" />
<Label Grid.Column="1" Text="{Binding Name}"
FontAttributes="Bold" />
<Label Grid.Column="2" Text="{Binding Name}"
FontAttributes="Bold" />
<Button Grid.Column="3" ImageSource="chevron_right.svg"
HeightRequest="35"
WidthRequest="35" BackgroundColor="White"/>
<!-- Si veiw cela vaudra peut-être le coup de faire une content view (équiavalent de user control) -->
</Grid>
</Border>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<Button Text="Click to Rotate Text!"
VerticalOptions="Center"
HorizontalOptions="Center"
Clicked="OnButtonClicked" />
</StackLayout>
<!--Pour l'opti on peut préciser le type du bind en aller tout en haut du fichier et faisent x:class ...-->
</ContentPage>