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.
SAE_2.01_-_Developpement_du.../Sources/Vues/SearchMob.xaml

79 lines
4.7 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"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
xmlns:shape="Microsoft.Maui.Controls.Shapes"
x:Class="Vues.SearchMob">
<!--BackgroundImageSource="backcollection.jpg"-->
<Grid ColumnDefinitions="Auto, *">
<Grid RowDefinitions="Auto, *" RowSpacing="25" WidthRequest="300">
<HorizontalStackLayout Grid.Row="0">
<ImageButton Source="exit.png" WidthRequest="20"/>
<SearchBar Placeholder="Rechercher un monstre"
PlaceholderColor="DimGray"
CancelButtonColor="DimGray"/>
</HorizontalStackLayout>
<ListView x:Name="ListViewMonsters" ItemsSource="{Binding ListMonsters}" Grid.Row="1" ItemTapped="OnClick">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<VerticalStackLayout>
<Image Source="{Binding ImageLink}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="PointerOver">
<VisualState.Setters>
<Setter Property="Opacity" Value="1" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="Opacity" Value="0.9" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</VisualStateManager.VisualStateGroups>
</Image>
</VerticalStackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
<ScrollView Grid.Column="1">
<Grid RowDefinitions="Auto,*,*,*" BindingContext="{Binding SelectedItem, Source={x:Reference ListViewMonsters}}">
<Grid Grid.Row="0" ColumnDefinitions="*,Auto" Padding="25" BackgroundColor="LightBlue">
<!-- Infos du monstre BUG AVEC LES FRAMES, ESSAYE DE VOIR POUR QUE CE SOIT BEAU ET QUE LE TEXTE SOIT PAS COUPE + MODIFIE LE BINDING-->
<VerticalStackLayout Grid.Column="0">
<HorizontalStackLayout>
<Label Text="Déjà vu ?" FontSize="20" TextColor="White" Margin="7"/>
<CheckBox Color="{StaticResource BleuFonce}"/>
</HorizontalStackLayout>
<Frame Margin="0" HorizontalOptions="Center" >
<Label BackgroundColor="White" FontSize="Medium"
Text="{Binding Description, StringFormat=Description : \{0\}}"/>
</Frame>
<Frame Margin="0">
<Label BackgroundColor="White" FontSize="Medium"
Text="{Binding Description, StringFormat=Caractéristiques : \{0\}}"/>
</Frame>
<Frame Margin="0">
<Label BackgroundColor="White" FontSize="Medium"
Text="{Binding Description, StringFormat=Apparences : \{0\}}"/>
</Frame>
<Frame Margin="0">
<Label BackgroundColor="White" FontSize="Medium"
Text="{Binding Description, StringFormat=Conseils : \{0\}}"/>
</Frame>
</VerticalStackLayout>
<!-- Image du mob -->
<Image Grid.Column="1" Source="{Binding CardLink}" HeightRequest="600"/>
</Grid>
</Grid>
</ScrollView>
</Grid>
</ContentPage>