Databinding ListView with Custom Class

Databinding ListView with Custom Class

I would like to databind a custom class when displayed in xmal, but I'm getting nothing displayed in the list view. Any pointers to what I'm missing would be much appreciated.

I would like to databind a custom class when displayed in xmal, but I'm getting nothing displayed in the list view. Any pointers to what I'm missing would be much appreciated.

  public Transactional()
    {

    string oCustomerLoggedIn = Preferences.Get("uLoginUsername", "default_value");

    int oCustomerLoggedInId = GetCustomerId(oCustomerLoggedIn);



    List<TransactionsList> custTransactions  = ViewCustomerTransactions(oCustomerLoggedInId);




    InitializeComponent();



    listView.SetBinding(ListView.ItemsSourceProperty, new Binding("."));
    listView.BindingContext = custTransactions;
}

<ListView x:Name="listView" ItemSelected="OnItemSelected"> <ListView.ItemTemplate> <DataTemplate> <ViewCell> <ViewCell.ContextActions> <MenuItem Clicked="OnMore" CommandParameter="{Binding .}" Text="More" /> <MenuItem Clicked="OnDelete" CommandParameter="{Binding .}" Text="Delete" IsDestructive="True" /> </ViewCell.ContextActions> <StackLayout HorizontalOptions="StartAndExpand" Orientation="Horizontal"> <StackLayout Padding="5,0,0,0" VerticalOptions="StartAndExpand" Orientation="Vertical"> <Label Text="{Binding .}" VerticalTextAlignment="Center" FontSize="Medium" /> </StackLayout> </StackLayout> </ViewCell> </DataTemplate> </ListView.ItemTemplate> </ListView>


c-sharp xaml xamarin

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

C. C++. C#. 차이점 알려드림. 5분 순삭. Explain C.C++.C#. Like I'm Five

C. C++. C#. 차이점 알려드림. 5분 순삭. Explain C.C++.C#. Like I'm Five. 아시죠? C는 C++.C# 줄인말이 아니라는거?

Consuming GraphQL in C#

In this episode, Brandon show us how to consume a GraphQL endpoint from a C# client, specifically an iOS + Android written in C# using Xamarin.

Learn how to perform CRUD operations using C Sharp

QuickStart: CRUD Operations in C Sharp. Learn how to perform CRUD operations using C Sharp for MongoDB databases.

Loops in C++ | For, While, and Do While Loops in C++

In this Video We are going to see how to use Loops in C++. We will see How to use For, While, and Do While Loops in C++.

Using isdigit() in C/C++

In this article, we'll take a look at using the isdigit() function in C/C++. This is a very simple way to check if any value is a digit or not. Let's look