I am developing an application using Xamarin forms. I have List view in which I have a grid within a stack layout. I want to access the grid from code behind and set the 'HeightRequest' to 0.
I could do that on the Xaml page but how do i do it on code behind c#.
<ListView x:Name="lvPendingDockets" HasUnevenRows="True">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout x:Name="slPendingDocket" Padding="5" Orientation="Vertical" >
<Grid x:Name="dActions" HeightRequest="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button x:Name="btnReject" Text="Reject" Grid.Column="1" Style="{StaticResource SButtonGreen}"/>
<Button x:Name="btnInterested" Text="Interested" Grid.Column="0" Style="{StaticResource SButtonGreen}"/>
</Grid>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
From code behind. How do I set the HeightRequest for the 'dActions' grid
<Grid x:Name="dActions" HeightRequest="0">
Thanks for your help Rao