mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-29 22:45:44 +00:00
69 lines
No EOL
4.2 KiB
XML
69 lines
No EOL
4.2 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage
|
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
x:Class="AideDeJeu.Views.Library.DeepSearchPage"
|
|
xmlns:tools="clr-namespace:AideDeJeu.Tools"
|
|
xmlns:properties="clr-namespace:AideDeJeu.Properties"
|
|
x:Name="This"
|
|
Title="Recherche"
|
|
Icon="crystal_ball.png">
|
|
<ContentPage.Resources>
|
|
<ResourceDictionary>
|
|
<tools:IntToBooleanConverter x:Key="IntToBooleanConverter" NonZeroValue="False" NullOrZeroValue="True" />
|
|
</ResourceDictionary>
|
|
</ContentPage.Resources>
|
|
<ContentPage.ToolbarItems>
|
|
</ContentPage.ToolbarItems>
|
|
<ContentPage.Content>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<SearchBar Grid.Column="0" Grid.Row="0" x:Name="SearchBar" HeightRequest="42" SearchCommand="{Binding SearchCommand}" SearchCommandParameter="{Binding Text, Source={x:Reference SearchBar}}">
|
|
<!--Style="{StaticResource heading3}"-->
|
|
<!--<SearchBar.Behaviors>
|
|
<tools:TextChangedBehavior />
|
|
</SearchBar.Behaviors>-->
|
|
</SearchBar>
|
|
|
|
<!--<Label Grid.Column="0" Grid.Row="1" HorizontalOptions="Center" VerticalOptions="Center" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Margin="15,0,15,0" Style="{StaticResource subsubsection}" Text="Lancez une recherche pour voir ici vos résultats !\n\n(Notez que la première recherche peut être assez longue)" IsVisible="{Binding Bookmarks.Count, Converter={StaticResource IntToBooleanConverter}}" />-->
|
|
|
|
<Label Grid.Column="0" Grid.Row="1" HorizontalOptions="Center" VerticalOptions="Center" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Margin="15,0,15,0" Style="{StaticResource heading3}" Text="{x:Static properties:Resource.EmptySearchAltText}" IsVisible="{Binding Bookmarks.Count, Converter={StaticResource IntToBooleanConverter}}" />
|
|
|
|
<ListView Grid.Column="0" Grid.Row="1" x:Name="ItemsListView" ItemsSource="{Binding Items}" VerticalOptions="FillAndExpand" HasUnevenRows="true" CachingStrategy="RecycleElement" SelectedItem="{Binding SelectedItem}" ItemTapped="ItemsListView_ItemTapped">
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate>
|
|
<ViewCell AutomationProperties.IsInAccessibleTree="True" AutomationId="machin" AutomationProperties.Name="hop">
|
|
<StackLayout Padding="10" Orientation="Vertical">
|
|
<Label Text="{Binding Item.Name}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="16" />
|
|
<Label Text="{Binding Preview}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="12" />
|
|
</StackLayout>
|
|
</ViewCell>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
<ActivityIndicator
|
|
Grid.Column="0" Grid.Row="0"
|
|
VerticalOptions="StartAndExpand"
|
|
HorizontalOptions="End"
|
|
Color="{StaticResource HDRed}"
|
|
IsRunning="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}"
|
|
IsVisible="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}">
|
|
<ActivityIndicator.WidthRequest>
|
|
<OnPlatform x:TypeArguments="x:Double">
|
|
<On Platform="UWP" Value="400" />
|
|
<On Platform="iOS, Android" Value="50" />
|
|
</OnPlatform>
|
|
</ActivityIndicator.WidthRequest>
|
|
<ActivityIndicator.HeightRequest>
|
|
<OnPlatform x:TypeArguments="x:Double">
|
|
<On Platform="UWP" Value="10" />
|
|
<On Platform="iOS, Android" Value="50" />
|
|
</OnPlatform>
|
|
</ActivityIndicator.HeightRequest>
|
|
</ActivityIndicator>
|
|
</Grid>
|
|
</ContentPage.Content>
|
|
</ContentPage> |