Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

how change a lable text in row bottom clicked

$
0
0

hi
i have list counter , i want when click on counter++ change label counter text
how access to lable counter in the same row botton clicked?

<ContentPage.Content>
        <ListView x:Name="listView" ItemSelected="OnItemSelected" RowHeight="50" >
            <ListView.ItemTemplate>
                <DataTemplate>
                    <ViewCell   >
                        <StackLayout  > 
                            <StackLayout Padding="0,0,0,0" HorizontalOptions="StartAndExpand" Orientation="Horizontal">
                                <StackLayout Padding="10,5,0,0" HorizontalOptions="Start" VerticalOptions="Center" WidthRequest="250" >
                                    <Label TextColor="#65bd77" Text="{Binding .}" YAlign="Center" Font="Medium" />
                                    <Label x:Name="counter" TextColor="#65bd77" Text="0000" YAlign="Center" XAlign="Center" Font="Small"  />
                                </StackLayout>
                                <Button Text="counter++"
                                    TextColor="#65bd77" 
                                    CommandParameter="{Binding .}" 
                                    Clicked="OnCellClicked" />
                            </StackLayout>  
                        </StackLayout>
                    </ViewCell>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
    </ContentPage.Content>

Viewing all articles
Browse latest Browse all 58056

Trending Articles