Skip to content

Instantly share code, notes, and snippets.

@gurvinderbini
Last active June 5, 2018 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gurvinderbini/4515e8f4f66ec699a8f8cbc3259af1c6 to your computer and use it in GitHub Desktop.
Save gurvinderbini/4515e8f4f66ec699a8f8cbc3259af1c6 to your computer and use it in GitHub Desktop.
<ListView x:Name="ListName" ItemsSource="{Binding Name}"
SeparatorVisibility="None" HasUnevenRows="True">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout>
<Grid x:Name="Item">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Label Text="{Binding Name}" Grid.Column="0"/>
<Button Text="Click Me" Command="{Binding ClickCommand}" Grid.Column="1"
BindingContext="{Binding Source={x:Reference ListName}, Path=BindingContext}"
Command="{Binding ClickCommand}" CommandParameter="{Binding Source={x:Reference Item},
Path=BindingContext}"/>
</Grid>
</StackLayut>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment