Listview ItemTemplate

Ronald Rex 1,666 Reputation points
2023-05-16T15:31:50.1+00:00

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 !!!!

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,144 questions
C#
C#
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.
11,543 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Lloyd Sheen 1,486 Reputation points
    2023-05-16T16:11:06.1666667+00:00

    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.