daniel-luberda / dltoolkit.forms.controls Goto Github PK
View Code? Open in Web Editor NEWXamarin.Forms Custom Controls
License: Apache License 2.0
Xamarin.Forms Custom Controls
License: Apache License 2.0
If I put IsGroupingEnabled="true" then it doesn't seem to hit my TemplateSelector. Is this something I'm doing wrong or it doesn't support?
Each of the column should be 1/3 of the available width.
[ ][ ][ ]
[ ][ ][ ]
[ ][ ][ ]
[ ][ ]
For example :
In my cell I have a short text and after tapped on it the text comes longer.
Result : the text overlaps the next cell on iOS.
Is it possible to manage cell height automatically with the FlowListView?
Hi Daniel...
I think that the default behavior of the FlowColumnExpand = Nome is not working properly.
I have a flow with FlowColumnCount = 3 and the ItemsSource have 5 items.
The last 2 on second row expand equal and proportionally, occupying the entire line.
On the previous release the behavior worked properly and the last 2 itens had same width of the previous row item.
Can you confirm if its the corret value to set on this property for that it back work again, or if its a bug on this release?
Regards
Nelson Santos
I'm looking to create a library that I can reference from a new Xamarin.Forms project. There will be a number of controls in the library, and FlowListView would be part of some of those controls; however on iOS 10.1 simulator (Haven't tried device or any other iOS versions) in both debug and release modes, when I try to run the app, all I get is a blank white screen. If I update the library to use a simple ListView instead of FlowListView, the app runs fine.
I have no problem using FlowListView directly in a project (not bundled in a custom library) and the library I created also works fine with FlowListView on an Android Simulator.
The library consists of 4 projects: Forms, iOS, and Android library projects, as well as a PCL for the Models and View Models.
Hi Daniel,
Having a little issue with height of rows in the FlowListView plugin.
Here is my XAML.
`
<flv:FlowListView FlowItemsSource="{Binding Listings2}" HasUnevenRows="True" RowHeight="-1">
<flv:FlowListView.FlowColumnTemplate>
<DataTemplate>
<Label VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" LineBreakMode="WordWrap" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit."></Label>
</DataTemplate>
</flv:FlowListView.FlowColumnTemplate>
</flv:FlowListView>`
Unfortunately when viewing this in android all i get is the first word displayed repeatedly. I had hoped setting unevenrows to true and rowheight to -1 that these would stretch automatically. Am I missing something obvious?
Here is a screenshot of the output.
Thanks,
Dave.
i have set the FlowTappedBackgroundColor to red color, but when I tapped my item, the Background color seems to be remain the same default color. Any idea?
How to view Flow View List data without using Navigation menu?
Hi,
I try to use the TagEntryView in a Xaml page. I use the Cross-platform Xamarin Forms with MVVM pattern and Xaml page.
I add :
When I run, I have this exception : System.IO.FileNotFoundException: Could not load file or assembly 'DLToolkit.Forms.Controls.TagEntryView' or one of its dependencies
How can I solve this issue please ?
My XAML looks like this
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:behaviors="clr-namespace:Teedl.Mobile.Behaviors"
x:Class="Teedl.Mobile.Views.ConnectionsView"
xmlns:dltoolkit="clr-namespace:DLToolkit.Forms.Controls;assembly=DLToolkit.Forms.Controls.TagEntryView"
Title="Connection Request">
<ContentPage.Content>
<ScrollView VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<StackLayout Orientation="Vertical" Padding="2">
<dltoolkit:TagEntryView TagTappedCommand="{Binding RemoveTagCommand}" TagItems="{Binding ConnectionType}" Spacing="2" />
...
Hi,
Just want to know if win phone 8 (not sliverlight) will be supported in the future. Thanks :)
Is it possible to add a BackgroundImage property to the FlowListView InternalCell?
Any chance you could add a few additional samples that show other types of configurations?
Thoughts on scenarios
After updating to 2.0.0:
I managed to solve my problem. Solution:
nugget.exe locals all -clear
Solution:
?
Is there a way to implement selecting multiple images for deletion?
Can I custom the template about GroupHeader for FlowListView?
Hi im noob here... can you provide how to do a gallery grouping sample
thanks...
Button b2 = new Button();
b2.Text = "Change Cell";
b2.Clicked += (sender, e) =>
{
DataTemplate dt2 = new DataTemplate(typeof(Cell2));
flowlistview.FlowColumnTemplate = dt2;
};
Help!
Thanks
Is there any way to implement Caching Strategy in FlowListView? Thanks in advance! :)
Switching from landscape to portrait doesn't work when using RecycleElement for the ListViewCachingStrategy.
For example if you're in portrait and are four columns wide, when you rotate to landscape the column count should recalculate and increase, but remains at four.
What's with the PageFactory and setting an ItemsSource ?
Could you please put up an example that does not require PageFactory or a BasePageModel for setting an items list ?
I used this code to disable row highlight. However I don't think it works, or is it just for disabling item's highlighted background color when selected?
The way I structured FlowListView in my code is similar to this: https://github.com/daniel-luberda/DLToolkit.Forms.Controls/blob/master/Samples/DLToolkitControlsSamples/SamplesFlowListView/SimpleGalleryPage.xaml
When users tap on the first item it responds immediately. However, 2nd tap on an item (either another item or the same item) in the same row, occasionally the row gets highlighted quickly (flash) but tap command is not called. On 3rd tap then it behaves normally.
In ListView, I can do this:
((ListView)sender).SelectedItem = null; // clears the 'selected' background
This will allow me to re-select the same item immediately (without it I had to tap on another item, then I can re-select the previous item). Is there a similar technique for FlowListView?
There is problem with rendering first row on WinRT platform (desktop). On Android it works ok.
Items in first row (in this case buttons) does not display Text property. After rotating device text appears but it is not centered as expected.
XAML CODE:
<flv:FlowListView x:Name="flowList">
<flv:FlowListView.FlowColumnsTemplates>
<flv:FlowColumnSimpleTemplateSelector ViewType="{x:Type controls:MainMenuButton}"/>
</flv:FlowListView.FlowColumnsTemplates>
</flv:FlowListView>
CONTROL CODE (simple button):
<Button xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MZMT.View.Controls.MainMenuButton"
BackgroundColor="Green"
Text="{Binding .}">
</Button>
SETTING DATA SOURCE:
flowList.FlowItemsSource = new List<string>() { "aaaaaaaaa", "bbbbbbbb", "cccccc", "dd", "asfasfasfafafas"};
And a question: how to make FlowListView to wrap content? As I understand it is created for it, but I cannot manage to do it. I would like to create list of buttons with constant size, display them one next to other and wrap if not fit to screen.
Hi Daniel,
I have a FlowListView that is binded from a list of items, the list column number is set to 2, but I want to insert an extra item (ads) after each 4 items.
What I wanted to do is to column span that ad item dynamically but it didn't work with FlowColumnExpand property.
Appreciate your help on this matter.
Thanks!
Regards.
Not sure why, but running the repo on latest forms version 2.3.2.127 will result in a exception when trying to open the TagEntryView example from the example app.
Other flow views are working...
Hi there
Just wanted to implement the FlowView it looks great. But broswing through your Examples, it's depending on the PageFactory Framework. At our project I can't affort to spend the time to reimplement everything via the PageFactory.
Any possibilties to use it without that dependency?
The links to demo classes TagEntryViewPage.cs and TagEntryViewViewModel.cs are missing along with the android tenderer. Its not available in the solution as well.
I am working on demo project for my application, in this i added a page
public class Page1 : ContentPage
{
public Page1()
{
ObservableCollection<ItemModel> List = new ObservableCollection<ItemModel>();
string[] images = {
"https://farm9.staticflickr.com/8625/15806486058_7005d77438.jpg",
"https://farm5.staticflickr.com/4011/4308181244_5ac3f8239b.jpg",
"https://farm8.staticflickr.com/7423/8729135907_79599de8d8.jpg",
"https://farm3.staticflickr.com/2475/4058009019_ecf305f546.jpg",
"https://farm6.staticflickr.com/5117/14045101350_113edbe20b.jpg",
"https://farm2.staticflickr.com/1227/1116750115_b66dc3830e.jpg",
"https://farm8.staticflickr.com/7351/16355627795_204bf423e9.jpg",
"https://farm1.staticflickr.com/44/117598011_250aa8ffb1.jpg",
"https://farm8.staticflickr.com/7524/15620725287_3357e9db03.jpg",
"https://farm9.staticflickr.com/8351/8299022203_de0cb894b0.jpg",
};
int number = 0;
for (int n = 0; n < 20; n++)
{
for (int i = 0; i < images.Length; i++)
{
number++;
var item = new ItemModel()
{
ImageUrl = images[i],
FileName = string.Format("image_{0}.jpg", number),
};
List.Add(item);
}
}
FlowListView listView = new FlowListView()
{
FlowColumnTemplate = new DataTemplate(typeof(ListCell)),
SeparatorVisibility = SeparatorVisibility.None,
HasUnevenRows = true,
FlowColumnMinWidth = 110,
FlowItemsSource = List,
};
listView.FlowItemTapped += (s, e) =>
{
var item = (ItemModel)e.Item;
if (item != null)
{
App.Current.MainPage.DisplayAlert("Alert", "Tapped {0} =" + item.FileName, "Cancel");
}
};
Content = new StackLayout
{
Children = {
listView
}
};
}
}
the model winch used seems like this
public class ItemModel
{
public string ImageUrl { get; set; }
public string FileName { get; set; }
}
and the template for FlowListView..
public class ListCell : View
{
public ListCell()
{
CachedImage IconImage = new CachedImage
{
HeightRequest = 100,
Aspect = Aspect.Fill,
DownsampleHeight = 100,
DownsampleUseDipUnits = false,
LoadingPlaceholder = "image_loading.png",
ErrorPlaceholder = "image_error.png"
};
IconImage.SetBinding(CachedImage.SourceProperty, "ImageUrl");
Label NameLabel = new Label
{
Opacity = 0.5,
HorizontalOptions = LayoutOptions.Fill,
HorizontalTextAlignment = TextAlignment.Center,
VerticalOptions = LayoutOptions.End,
};
NameLabel.SetBinding(Label.TextProperty, "FileName");
Grid grd = new Grid
{
Padding = 3,
ColumnDefinitions = {
new ColumnDefinition { Width = new GridLength (1, GridUnitType.Star) },
},
RowDefinitions = {
new RowDefinition { Height=GridLength.Star},
},
};
grd.Children.Add(IconImage,0,0);
grd.Children.Add(NameLabel, 0, 1);
}
}
What i am facing that it doesn't showing List which i'm rendering on page could you please help me with this..
Thank You,
I am new to GitHub. I downloaded the code and tried to build the solution to go through some of the example but example projects are failing to get build as few types like FlowColumnTemplateSelector are missing. Could you please let me know if I am missing any step?
Hello,
is it available to add pagination functionality to your supported list instead of scrolling down please?
Hi, thanks for this component.
Could you provide a full XAML sample? (FlowListView)
I'm trying to understand the code behind by is very difficult.
<controls1:FlowStackCell Orientation="Horizontal"> <controls1:FlowStackCell.Children> <Label Text="{Binding Name}"></Label> </controls1:FlowStackCell.Children> </controls1:FlowStackCell>
Hi,
I'm currently trying to get off the row highlight on WinRT platform.
I'm seeing that there's no example of how to do it, and after few tries of different methods of changing the Cell Template and the Transitions for my control i can't find the right way to do it.
Do you have a solution for that ?
Thanks a lot,
Thanks for your excellent Flow ListView.
How do I add an event to xaml in the cell?
Example:
<ListView x:Name="listView">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Vertical">
<Button clicked="handler_click" Text="ClickMe" />
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Thanks for any suggestions
Hi!
After installing DLToolkit.Forms.Controls.FlowListView, I can no longer install/update any other package. I get this error in the package manager console:
Unable to read package from path "DLToolkit.Forms.Controls.FlowListView.1.0.7\DLToolkit.Forms.Controls.FlowListView.1.0.7.nupkg". File contains corrupted data.
I am using VS2015 14.0.2542400.00 Update 3.
Is it possible to add Autocompletition drop down to the TagEntryView component?
Hi Daniel,
thanks a lot for the great project. it's very easy to use and it looks great.
However, I'm currently facing one big issue I'm not sure how to solve. Any pointers will be greatly appreciated.
Current FlowListView work great with a few columns, however when there are a lot of columns, it squeeze them all in one page width, and make it impossible to read.
So, is there any chance of scrolling x and y so it can cope with many columns?
Thanks in advance.
I have a Xamarin forms app and I am getting the following error using the simple page example everytime I build:
Error Failed to resolve "System.Object Xamarin.Forms.ElementTemplate::CreateContent()" reference from "Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" yuu.iOS
I have nuget package version 2.0.0
When I set the Items property on my view model and navigate to the page that contains the flowlistview, it does not work, and even freeze the application.
If I remove the binding the page load.
How can I change the height of items in the list view?
Originally, I had a stacklayout in my template with two labels. When I add a new label, the last one is not shown, I only see the first two. Neither HeightRequest nor MinimumHeightRequest seems to work, whether on the contentview or the stacklayout inside.
In my app I use FlowListView component. It is rendering fine with custom cell:
<flv:FlowListView.FlowColumnTemplate>
<DataTemplate>
<StackLayout Spacing="8" Orientation="Vertical" VerticalOptions="Center" HorizontalOptions="FillAndExpand" BackgroundColor="Transparent">
<StackLayout Spacing="10" Padding="5,7,8,7" Orientation="Horizontal" VerticalOptions="Center" HorizontalOptions="FillAndExpand" BackgroundColor="Transparent">
<controls:CircleImage Source="{ Binding ProfileImageUrl }" WidthRequest="56" HeightRequest="56"
HorizontalOptions="Center" VerticalOptions="Center" Aspect="AspectFill"/>
<StackLayout Spacing="0" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" BackgroundColor="Transparent">
<Label Text="{ Binding ListName }" Style="{StaticResource listItemTitle}" />
<Label Text="{ Binding ListDescription }" Style="{StaticResource listItemDescription}" />
</StackLayout>
</StackLayout>
</StackLayout>
</DataTemplate>
</flv:FlowListView.FlowColumnTemplate>
But because of a memory leak issue from the ListView on UWP I need to use native cell:
<flv:FlowListView.FlowColumnTemplate>
<DataTemplate>
<contentViews:NativeCell ListName="{Binding ListName}" ListDescription="{Binding ListDescription}" ProfileImageUrl="{Binding ProfileImageUrl}" />
</DataTemplate>
</flv:FlowListView.FlowColumnTemplate>
With the code above I get blank list. If I add StackLayout:
<flv:FlowListView.FlowColumnTemplate>
<DataTemplate>
<StackLayout >
<contentViews:NativeCell ListName="{Binding ListName}" ListDescription="{Binding ListDescription}" ProfileImageUrl="{Binding ProfileImageUrl}" />
</StackLayout>
</DataTemplate>
</flv:FlowListView.FlowColumnTemplate>
I get the below error message:
Unable to cast object of type 'MyApp.Core.ContentViews.NativeCell' to type 'Xamarin.Forms.VisualElement'.
Is there any way to make FlowListView work with Native cell? I checked and a plain ListView works fine with my native cell.
And this is my NativeCell:
public class NativeCell : ViewCell
{
public static readonly BindableProperty ListNameProperty =
BindableProperty.Create("ListName", typeof(string), typeof(NativeCell), "");
public string ListName
{
get { return (string)GetValue(ListNameProperty); }
set { SetValue(ListNameProperty, value); }
}
public static readonly BindableProperty ListDescriptionProperty =
BindableProperty.Create("ListDescription", typeof(string), typeof(NativeCell), "");
public string ListDescription
{
get { return (string)GetValue(ListDescriptionProperty); }
set { SetValue(ListDescriptionProperty, value); }
}
public static readonly BindableProperty ProfileImageUrlProperty =
BindableProperty.Create("ProfileImageUrl", typeof(string), typeof(NativeCell), "");
public string ProfileImageUrl
{
get { return (string)GetValue(ProfileImageUrlProperty); }
set { SetValue(ProfileImageUrlProperty, value); }
}
}
First of all, this is a great library, great job!
This problem doesn't show up when I use Xamarin.Forms.ListView , but with the FlowListView I can't get to update a specific Item on the ObservableCollection of the FlowItemsSource!
My environment is like this:
DLToolkit.Forms.Controls.FlowListViev == v.2.0.2 / Xamarin.Forms == v.2.3.3.163-pre3
I've got an ItemModel Object, which implements INotifyPropertyChanged
I have a ViewModel which binds data to the FlowListView:
public ExtendedObservableCollection<ItemModel> ListItems
{
get { return _ListItems; }
set
{
_ListItems= value;
OnPropertyChanged("ListItems");
}
}
The 'ExtendedObservableCollection' is basically an extension of the ObservableCollection which notifies when an Item on that ObservableCollection changes.
My FlowListView :
<flv:FlowListView
x:Name="FriendsListView"
FlowColumnCount="3"
SeparatorVisibility="None"
HasUnevenRows="true"
FlowItemTappedCommand="{Binding ItemTappedCommand}"
FlowLastTappedItem="{Binding ItemTapped}"
FlowItemsSource="{Binding ListItems}"
FlowColumnMinWidth="100"
RowHeight="-1">
<flv:FlowListView.FlowColumnTemplate>
<DataTemplate>
<StackLayout
Orientation="Vertical"
HeightRequest="120"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"
Padding="5">
<Label
Text="{Binding Name}"
TextColor="White"
FontSize="20"
LineBreakMode="TailTruncation"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"/>
</StackLayout>
</DataTemplate>
</flv:FlowListView.FlowColumnTemplate>
</flv:FlowListView>
On my ViewModel I edit an Item which reflects the changes and everything works great, done testing/debug and the 'FlowItemsSource' updates the item, but the FlowListView doesn't update the view (I don't see changes).
No errors on the log or anything! Everything looking smooth.
Am I missing something, or the FlowItemsSource needs to be repopulated each time a change occurs(which costs a lot!) ?
Thanks in advance,
MalokuS
Looks like something happened either during creation of the 1.0.7 nuget package, or on upload, as we receive the following error any time we open nuget package manager or try to update/install packages:
An error occurred while retrieving package metadata for 'DLToolkit.Forms.Controls.FlowListView.1.0.7'
This was reproducible on multiple machines using Visual Studio 2015 with the latest nuget package manager (tested with command line client as well).
The workaround for us, for the time being, was toe re-compress the nupkg file in our packages directory using a zip utility. I figured this out by running the nuget command line utility with the -Verbosity detailed
flag and found this error in the output:
System.IO.FileFormatException: File contains corrupted data
So something in the zip headers is throwing off the nuget client.
Not sure if a re-upload of 1.0.7 will resolve this, or if there's a deeper issue with the nuget client you used to package this.
With a Xamarin ListView the HasUnevenRows property works but not with FlowListView I dont understand why.
My label overlaps other cells with the FlowListView, it works with simple ListView.
Can I replace FlowListViewInternalCell with my custom view cell not a custom contentview like in your example ?
Thank you very much for your help.
the code below :
Page
using System;
using System.Collections.Generic;
using System.Diagnostics;
using DLToolkit.Forms.Controls;
using Xamarin.Forms;
namespace XamTest
{
public partial class FlowListViewPage : ContentPage
{
public FlowListViewPage()
{
InitializeComponent();
var lorem = "Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un peintre anonyme assembla ensemble des morceaux de";
var list = new List<Person>() {
new Person { Age = 52, Name = "test"},
new Person { Age = 45, Name = lorem},
new Person { Age = 45, Name = lorem},
new Person { Age = 55, Name = "tes"},
new Person { Age = 51, Name = "t6u"},
};
var columnsTemplates = new List<FlowColumnTemplateSelector>();
columnsTemplates.Add(new FlowColumnSimpleTemplateSelector() { ViewType = typeof(FlowCellContentView) });
flView.FlowColumnsTemplates = columnsTemplates;
flView.FlowItemsSource = list;
}
}
}
Page Xaml
<?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:views="clr-namespace:XamTest;assembly=XamTest"
xmlns:flv="clr-namespace:DLToolkit.Forms.Controls;assembly=DLToolkit.Forms.Controls.FlowListView"
x:Class="XamTest.FlowListViewPage">
<ContentPage.Content>
<flv:FlowListView x:Name="flView" HasUnevenRows="true">
</flv:FlowListView>
</ContentPage.Content>
</ContentPage>
FlowCellContentView (not really a ViewCell)
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Xamarin.Forms;
namespace XamTest
{
public partial class FlowCellContentView : ContentView
{
public FlowCellContentView()
{
InitializeComponent();
}
}
}
FlowCellContentView Xaml
<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="XamTest.FlowCellContentView">
<ContentView.Content>
<StackLayout BackgroundColor="Blue">
<Label Text="{Binding Name}"/>
</StackLayout>
</ContentView.Content>
</ContentView>
Hi!
I've just added the FlowListView to my project but I can't get it to work.
I get a FileNotFoundException
on DLToolkit.Forms.Controls.FlowListView as you can see below. Any ideas?
I'm using Xamarin.Forms 2.0.0.6487 in XAML.
I've cleaned & rebuilt my solution multiple times but to no avail.
2016-01-05 19:22:05.542 KembitBPAiOS[19902:4922186]
Unhandled Exception:
FreshTinyIoC.TinyIoCResolutionException: Unable to resolve type: Kembit.BPA.Pages.ChoosePizzaPage ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'DLToolkit.Forms.Controls.FlowListView' or one of its dependencies
File name: 'DLToolkit.Forms.Controls.FlowListView'
at System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef, System.Security.Policy.Evidence assemblySecurity) [0x00081] in /Users/builder/data/lanes/2377/73229919/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System/AppDomain.cs:746
at System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef) [0x00000] in /Users/builder/data/lanes/2377/73229919/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System/AppDomain.cs:714
If I set the FlowAutoColumnCount property to true on iOS, the app crashes immediately when the first element is added to the item source.
The FlowListView is inited at the app start, and the app crashes even if I implement the example (SimpleExamplePage) with the autocolumncount.
This is the error description in the HockeyApp crashlog:
" *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 21.5]' "
var view = (View)Activator.CreateInstance(columnTypes[i]);
I'm having trouble creating an image gallery using your library. It works well but there are some cosmetic issues that have been problematic..
On first page load, the "Station List" looks good, but is truncated at 6 items (2 rows of pictures). If I navigate back and reload the same page, the "Station List" is fully loaded, but the ListView background extends far down the page (like 3 or 4 'pages' of black nothingness). I've added a black background so that it's obvious what's happening, but I can't figure out how to correct the issue. It's possible that I'm constructing the template ContentView incorrectly, but I'd like to defer to your expertise.
Here is the relevant XAML on the page that loads the FlowListView:
<flv:FlowListView HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="Black"
FlowItemsSource="{Binding Stations}" SeparatorVisibility="None" HasUnevenRows="false" RowHeight="150"
FlowItemTappedCommand="{Binding NavigateStationCommand}" FlowAutoColumnCount="true" FlowColumnDefaultMinimumWidth="125">
<flv:FlowListView.FlowColumnsTemplates>
<flv:FlowColumnSimpleTemplateSelector ViewType="{x:Type local:StationListView}"/>
</flv:FlowListView.FlowColumnsTemplates>
</flv:FlowListView>
And here is the ContentView XAML:
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="My.App.StationListView"
HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<ContentView.Content>
<Image Source="{Binding ImageUrl}" Aspect="Fill"></Image>
</ContentView.Content>
</ContentView>
Hi Daniel,
First of all I'm sorry for my English.
I'm new on Xamarin.
I'm using FlowListView. I'm trying to make auto load more when user scroll to bottom.
How can I detect when flowlistview scrolled, is it the end of the list or not? I've tried to use FlowItemAppearing but there is no act. I'm writing part of code below.
<flv:FlowListView x:Name="lstFlowList" FlowColumnCount="3" SeparatorVisibility="None"
HasUnevenRows="true" FlowItemsSource="{Binding .}"
FlowColumnMinWidth="100" FlowItemTapped="onItemTapped"
FlowItemAppearing="flvItemAppearing">
<flv:FlowListView.FlowColumnTemplate>
<DataTemplate>
<StackLayout Orientation="Vertical" Spacing="3" VerticalOptions="FillAndExpand">
<ffimageloading:CachedImage Aspect="AspectFit" DownsampleUseDipUnits="false"
LoadingPlaceholder="{local:ImageResource cf_cover.png}"
ErrorPlaceholder="{local:ImageResource cf_cover.png}" Source="{Binding ImageURL}" />
<Label Text="{Binding Name}" HorizontalTextAlignment="Center" FontSize="12"></Label>
<Label Text="{Binding ShortDesc}" HorizontalTextAlignment="Center" FontSize="12"></Label>
</StackLayout>
</DataTemplate>
</flv:FlowListView.FlowColumnTemplate>
</flv:FlowListView>
--
private void flvItemAppearing(object sender, ItemVisibilityEventArgs e)
{
if ((myModelType)e.Item == model[model.Count - 1])
{
//LoadData(_model);
DisplayAlert("Warning", "End of the List", "Ok");
}
}
How can I prevent column expanding if there is no other? Suppose it's should be easy, but I just can't do it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.