DLToolkit.Forms.Controls
DLToolkit.Forms.Controls copied to clipboard
DLToolkit.Forms.Controls.FlowListView not working in UWP
Hello,
FlowListView is bugging in UWP platform
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:abstractions="clr-namespace:CarouselView.FormsPlugin.Abstractions;assembly=CarouselView.FormsPlugin.Abstractions"
xmlns:iconize="clr-namespace:Plugin.Iconize;assembly=Plugin.Iconize"
xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"
xmlns:effect="clr-namespace:AiForms.Effects;assembly=AiForms.Effects"
xmlns:controls="clr-namespace:DLToolkit.Forms.Controls;assembly=DLToolkit.Forms.Controls.FlowListView"
xmlns:behaviors="clr-namespace:DSForce.Behaviors"
xmlns:converter="clr-namespace:DSForce.Converters"
mc:Ignorable="d"
x:Class="DSForce.Pages.HomePage">
<ContentPage.ToolbarItems>
<ToolbarItem Icon="heart.png" Command="{Binding GotoWishlistCommand}"/>
<ToolbarItem Icon="shoppingcart.png"
Command="{Binding GotoCartCommand}"/>
</ContentPage.ToolbarItems>
<ContentPage.Resources>
<ResourceDictionary>
<converter:SelectedToColorConverter x:Key="cnvInvert"/>
</ResourceDictionary>
</ContentPage.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="150"/>
<RowDefinition Height="150"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackLayout HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
<abstractions:CarouselViewControl x:Name="CarouselViewMakeup"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
Position="0"
ShowIndicators="True"
ShowArrows="True"
ItemsSource="{Binding Items}">
<abstractions:CarouselViewControl.ItemTemplate>
<DataTemplate>
<StackLayout VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand">
<ffimageloading:CachedImage x:Name="makeupimage" Source="{Binding ThumnailURL}"/>
</StackLayout>
</DataTemplate>
</abstractions:CarouselViewControl.ItemTemplate>
</abstractions:CarouselViewControl>
</StackLayout>
<StackLayout Grid.Row="1"
BackgroundColor="#2196f3"
Padding="10"
Margin="0,-7,0,0">
<SearchBar Margin="5,0,5,0" Text="{Binding SearchFilter}" Placeholder="Cherche brand or product" HeightRequest="40"
BackgroundColor="#fff">
<SearchBar.Behaviors>
<behaviors:EventToCommandBehavior EventName="TextChanged" Command="{Binding SearchFilter}"/>
</SearchBar.Behaviors>
</SearchBar>
<StackLayout Orientation="Horizontal" Margin="0,5,0,0"
HorizontalOptions="FillAndExpand">
<iconize:IconImage Icon="fa-tag" IconSize="16" IconColor="#fff"
HorizontalOptions="Start"/>
<Label Text="Tags" TextColor="#fff" VerticalTextAlignment="Center"
HorizontalOptions="Start"/>
<StackLayout Orientation="Horizontal"
HorizontalOptions="EndAndExpand"
effect:AddCommand.On="True"
effect:AddCommand.EnableRipple="True"
effect:AddCommand.EffectColor="#3742fa"
effect:AddCommand.Command="{Binding ShowCategoriesCommand}">
<iconize:IconImage Icon="fa-ellipsis-h" IconSize="16" IconColor="#fff"
Margin="0,5,10,0"/>
<Label Text="More" TextColor="#fff" VerticalTextAlignment="Center"
Margin="0,5,10,0"/>
</StackLayout>
</StackLayout>
<controls:FlowListView FlowItemsSource="{Binding ItemsTags}"
FlowColumnCount="3"
HasUnevenRows="True"
HorizontalOptions="FillAndExpand"
x:Name="lvTags">
<controls:FlowListView.FlowColumnTemplate>
<DataTemplate>
<ScrollView Orientation="Horizontal"
HorizontalOptions="FillAndExpand">
<Label Text="{Binding Tagname,StringFormat='#{0}'}"
TextColor="#fff"
FontSize="12"
HorizontalOptions="FillAndExpand"
Margin="10,5,10,0">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding Path=BindingContext.SelectTagCommand,Source={x:Reference lvTags}}"
CommandParameter="{Binding .}"/>
</Label.GestureRecognizers>
</Label>
</ScrollView>
</DataTemplate>
</controls:FlowListView.FlowColumnTemplate>
</controls:FlowListView>
</StackLayout>
<StackLayout Grid.Row="2"
BackgroundColor="#FFFFFF"
Margin="0,-10,0,0">
<Label Text="Futured Products" TextColor="Black"
FontSize="12"
Opacity="0.7"
Margin="10,10,0,0"/>
<controls:FlowListView FlowColumnCount="3" SeparatorVisibility="None" HasUnevenRows="false"
FlowItemTappedCommand="{Binding ItemTappedCommand}" FlowLastTappedItem="{Binding LastTappedItem}"
FlowItemsSource="{Binding Items}" x:Name="ProductList">
<controls:FlowListView.FlowColumnTemplate>
<DataTemplate>
<StackLayout BackgroundColor="#fff" Margin="5" Padding="10"
HeightRequest="150">
<iconize:IconImage Icon="fa-heart"
IconSize="16"
IconColor="{Binding selected,Converter={StaticResource cnvInvert}}"
HorizontalOptions="End">
<iconize:IconImage.GestureRecognizers>
<TapGestureRecognizer Command="{Binding Path=BindingContext.AddToWishlistCommand, Source={x:Reference MakeupList}}"
CommandParameter="{Binding .}"/>
</iconize:IconImage.GestureRecognizers>
</iconize:IconImage>
<ffimageloading:CachedImage
Grid.Column="0"
Source="{Binding ThumnailURL}"
CacheType="Disk"
CacheDuration="30"
DownsampleToViewSize="True"
Style="{StaticResource CustomerImageStyle}">
<ffimageloading:CachedImage.LoadingPlaceholder>
<OnPlatform
x:TypeArguments="ImageSource"
iOS="loading"
Android="loading"
WinPhone="Assets/ic_refresh_white_24dp.png"/>
</ffimageloading:CachedImage.LoadingPlaceholder>
</ffimageloading:CachedImage>
<Label HorizontalOptions="Fill"
Text="{Binding Title}"
FontSize="12"
TextColor="Black"
Opacity="0.7"/>
<StackLayout Orientation="Horizontal">
<StackLayout Orientation="Horizontal" BackgroundColor="#f9ca24"
Padding="3">
<Label Text="{Binding Weight}"
TextColor="#fff"
FontSize="12"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"/>
<iconize:IconImage Icon="fa-star" IconColor="#fff"
IconSize="14"/>
</StackLayout>
<Label Text="{Binding PriceSupplierPurchase,StringFormat='$ {0}'}"
TextColor="#5352ed"
FontSize="13"
HorizontalOptions="EndAndExpand"/>
</StackLayout>
</StackLayout>
</DataTemplate>
</controls:FlowListView.FlowColumnTemplate>
</controls:FlowListView>
</StackLayout>
</Grid>
</ContentPage>