I am trying to make an info pane with an image on the left side and the remainder being a title text with a status button in the top right:
The problem that you can see there is that the button is forced onto two lines and I have not for the life of me been able to stop that from happening.
This is my xaml as I have it now:
<StackLayout Orientation="Horizontal">
<Image Source="jamespaulprofileicon.jpg" HeightRequest="70" WidthRequest="70" Margin="10,15,10,0" HorizontalOptions="Start" VerticalOptions="Start"/>
<StackLayout HorizontalOptions="StartAndExpand" VerticalOptions="FillAndExpand" Orientation="Vertical">
<StackLayout Orientation="Horizontal" HorizontalOptions="EndAndExpand" BackgroundColor="Red">
<Label Text="This is a test title with a normal amount of text " Font="17" TextColor="Black" HorizontalOptions="Start" Margin="0" BackgroundColor="Yellow" />
<Frame BackgroundColor="Green" CornerRadius="14" Padding="0,0,0,0" Margin="0,0,0,0" HorizontalOptions="EndAndExpand" VerticalOptions="Start" HasShadow="False">
<Label Text="Pending" Font="12" TextColor="White" HorizontalOptions="FillAndExpand" Margin="0,0,0,0"/>
</Frame>
</StackLayout>
</StackLayout>
</StackLayout>
<BoxView Margin="10,0,10,0" HeightRequest="2" WidthRequest="1700" VerticalOptions="Start" HorizontalOptions="StartAndExpand" BackgroundColor="#10A220" />
I have my frame and text of the status set to expand, with the title text set not to do this. I've tried every horizontal option but I cannot get it to keep the text on the expanding container/label on one line. The only way I can achieve this is to reduce the length of the title but that is useless since I'll be dealing with longer titles.
Why are the horizontal options bot being respected in my code here? Why is it that the first label set only to Start is the one that expands and pushes the second container to be character-wrapped? I have also tried changing the lineBreakMode but that doesn't change the way it's drawn and so the end of the text is clipped.
I do not want to manually set the width of the status button since this layout will be used for a second shell which will be placing a price there and the length of that could be $1 or much higher, it needs to expand to meet the length of the content I put in there.
Any help would be appreciated here, I feel like I'm going mad trying to figure out why none of this will work.