Listview ItemTemplate

Ronald Rex 751 Reputation points

Hi Friends,

I was wondering how I would create a list view with three horizontal controls in the list. I need a entry, lable, and entry. Thanks !!!!

A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,386 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
8,141 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Lloyd Sheen 1,076 Reputation points

    There are two ways to do this.

    First way use a grid with ColumnDefinitions showing the width of each element Example (ColumnDefintions="2*,,*2) and then define each element and provide the Column number (starting with zero) for each of the three elements.

    Second use a HorizontalStackLayout and add each of the three elements to the HorizontalStackLayout. Then in each of the elements provide a WidthRequest.

    Personally I would use the 1st way as using the relative widths means that it will handle different sizes of the device on which the app is running.