Quantcast
Channel: User Yura Babiy - Stack Overflow
Viewing all articles
Browse latest Browse all 39

Answer by Yura Babiy for Strange behavior of Grid row height auto property

$
0
0

For those, who could face with something, like I did, that worked for me. I manually change column width:

<controls:FlowListView x:Name="ReposList"                         HorizontalOptions="FillAndExpand"                         VerticalOptions="FillAndExpand"                         FlowItemsSource="{Binding PrivateNews.Result}"                         HasUnevenRows="True"                         FlowColumnCount="1"                         Margin="15, 15, 15, 0"><controls:FlowListView.FlowColumnTemplate><DataTemplate><Grid VerticalOptions="Start"              HorizontalOptions="Start"              Margin="0, 0, 0, 20"              ColumnSpacing="0"              RowSpacing="5"><Grid.ColumnDefinitions><ColumnDefinition Width="33"/><ColumnDefinition Width="20"/><ColumnDefinition Width="{Binding Source={x:Reference Name=ReposList}, Path=BindingContext.ColumnWidth}"/></Grid.ColumnDefinitions><Grid.RowDefinitions><RowDefinition Height="Auto"/><RowDefinition Height="20"/></Grid.RowDefinitions><Image x:Name="Avatar"                 Source="{Binding ImageUrl}"                 HeightRequest="30"                 WidthRequest="30"                 Grid.Column="0"                 Grid.Row="0"                 Grid.RowSpan="2"                 VerticalOptions="Start"                 HorizontalOptions="Start"                 Margin="0, 5, 5, 0"/><StackLayout  Grid.Column="1"                        Grid.Row="0"                        Grid.ColumnSpan="2"                        VerticalOptions="FillAndExpand"                        HorizontalOptions="FillAndExpand" BackgroundColor="Aqua"><Label x:Name="Title"                   FormattedText="{Binding CustomFormattedText}"                   TextColor="Black"                   LineBreakMode="CharacterWrap"/></StackLayout><customClasses:FontIcon x:Name="ActionTypeIcon"                                  Text="{Binding ActionTypeFontIcon}"                                  TextColor="Gray"                                  FontSize="16"                                  FontFamily="Octicons"                                  Grid.Column="1"                                  Grid.Row="1"                                  VerticalOptions="Center"                                  HorizontalOptions="StartAndExpand"                                  Margin="0, 0, 5, 0"/><Label x:Name="PublishedTime"                 Text="{Binding Published}"                 FontSize="14"                 Grid.Column="2"                 VerticalOptions="Center"                 HorizontalOptions="FillAndExpand"                 Grid.Row="1"/></Grid></DataTemplate></controls:FlowListView.FlowColumnTemplate></controls:FlowListView>

How to get screen width and other stuff you can find on the internet.


Viewing all articles
Browse latest Browse all 39

Trending Articles