I have a row that contains a label and an entry. I want the entry to fill all remaining free space so I have it set as HorizontalOptions="FillAndExpand"
. However if the entry contains a very long text it just shrinks the label. How can I prevent that? I want the entry to expand but without changing the label width (the label should be as wide as the text in it). The labels are dynamic so I can't set a fixed width.
Here is a simplified version of the layout I have:
<ListView ItemsSource="{Binding Items}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal">
<Label Text="{Binding Label}" LineBreakMode="NoWrap" />
<Entry Text="{Binding Value}" HorizontalOptions="FillAndExpand" />
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
The actual layout is a bit more complex so I can't use an EntryCell...