Forums - C# Corner

Forum guidelines
Amaro Manungu

Amaro Manungu

  • 1.7k
  • 32
  • 138

How to make visible/in the button inside a listview

Sep 14 2018 10:00 AM
I have a listview and inside it I have a label and a button, when the state of the label is paid the button should be visivil and when it is canceled the button should be invisi
<StackLayout Grid.Row="2" Margin="40,40,40,0">

<ListView x:Name="lstView" SeparatorColor="#1C97D5" SeparatorVisibility="Default" HasUnevenRows="True" VerticalOptions="FillAndExpand">
<ViewCell StyleId="disclosure">
<StackLayout Orientation="Horizontal" >
<StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand">
<Label Text="{Binding entityName}" TextColor="White" Font="14"/>
<Label Text="{Binding cmPaymentDate}" TextColor="White" Font="14"/>
<Label Text="{Binding statusDescr}" TextColor="White" Font="14"/>
<StackLayout HorizontalOptions="EndAndExpand">
<Button Text="Abrir" IsVisible="{Binding IsVisible}" BackgroundColor="#1C97D5"></Button>
<Label Text="{Binding paymentAmount}" TextColor="White" Font="14" HorizontalOptions="End" />

Answers (3)