<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MobilePrice.MainPage"> <ListView ItemsSource="{Binding Names}" > <ListView.ItemTemplate> <DataTemplate> <ViewCell> <Grid Padding="10"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Image Source="{Binding ImageUrl}" SemanticProperties.Description="{Binding ImageUrl}" Grid.Column="0"/> <Button Text="{Binding FirstName}" Clicked="goto_form" SemanticProperties.Description="{Binding FirstName}" Grid.Column="0"/> <Label Text="{Binding LastName}" SemanticProperties.Description="{Binding LastName}" Grid.Column="1" Padding="10,0"/> </Grid> </ViewCell> </DataTemplate> </ListView.ItemTemplate> </ListView> </ContentPage>
public void goto_form(object Sender,EventArgs args) { //what to do here }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)