FlowListView
Hey Guys Today We are gonna learn about Horizontal Listview. During designing of any App we most probably use the ListView Control.
ListView Control is very Useful An Important control while developing any App.
We Face many issues during working with ListView.But we have solutions too - > Check Here
Now Check The Following Code
This Flowlist contains many properties and is very suitable for MVVM pattern.You just have to give it time and patience.
For Any Queries And Suggestions. Please Write Us In the Comments
ListView Control is very Useful An Important control while developing any App.
We Face many issues during working with ListView.But we have solutions too - > Check Here
Horizontal Listview
First and foremost download the following nuget in your xamarin forms project
Install-Package DLToolkit.Forms.Controls.FlowListView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="BinnyXamConcepts2017.HorizontalListView.DemoPage" | |
xmlns:controls="clr-namespace:DLToolkit.Forms.Controls;assembly=DLToolkit.Forms.Controls.FlowListView"> | |
<StackLayout> | |
<controls:FlowListView x:Name="myList" | |
FlowColumnCount="3" | |
SeparatorVisibility="None" | |
HasUnevenRows="false" | |
FlowItemTapped="FlowListView_OnFlowItemTapped" | |
BackgroundColor="White" > | |
<controls:FlowListView.FlowColumnTemplate> | |
<DataTemplate> | |
<StackLayout> | |
<Label HorizontalOptions="Fill" | |
VerticalOptions="Fill" | |
Text="{Binding }"/> | |
</StackLayout> | |
</DataTemplate> | |
</controls:FlowListView.FlowColumnTemplate> | |
</controls:FlowListView> | |
</StackLayout> | |
</ContentPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class DemoPage : ContentPage | |
{ | |
public DemoPage() | |
{ | |
InitializeComponent(); | |
myList.FlowItemsSource = new List<string> | |
{ | |
"Usa","India","Brazil","Germany","England","France","Argentina" | |
"Columbia","Usa","India","Brazil","Germany","England","France","Argentina" | |
"Columbia","Usa","India","Brazil","Germany","England","France","Argentina" | |
"Columbia","Usa","India","Brazil","Germany","England","France","Argentina" | |
"Columbia","Usa","India","Brazil","Germany","England","France","Argentina" | |
"Columbia","Usa","India","Brazil","Germany","England","France","Argentina" | |
"Columbia","Usa","India","Brazil","Germany","England","France","Argentina" | |
"Columbia", | |
}; | |
myList.FlowUseAbsoluteLayoutInternally = true; | |
myList.FlowColumnCount = 5; | |
myList.FlowRowBackgroundColor=Color.Green; | |
myList.FlowColumnExpand=FlowColumnExpand.Proportional; | |
} | |
private void FlowListView_OnFlowItemTapped(object sender, ItemTappedEventArgs e) | |
{ | |
DisplayAlert("_OnFlowItemTapped", "_OnFlowItemTapped", "ok"); | |
var grourp = e.Group; | |
var xyz = e.Item; | |
} | |
private void FlowListView_OnFlowItemAppearing(object sender, ItemVisibilityEventArgs e) | |
{ | |
DisplayAlert("OnFlowItemAppearing", "OnFlowItemAppearing", "ok"); | |
} | |
private void FlowListView_OnFlowItemDisappearing(object sender, ItemVisibilityEventArgs e) | |
{ | |
DisplayAlert("OnFlowItemDisappearing", "OnFlowItemDisappearing", "ok"); | |
} | |
} |
This Flowlist contains many properties and is very suitable for MVVM pattern.You just have to give it time and patience.
For Any Queries And Suggestions. Please Write Us In the Comments
Install-Package DLToolkit.Forms.Controls.FlowListView
ReplyDeleteI cant install this for Android project