I want to output 3 controls, a Label, an ImageButton, and another Label, and have the first Label on the left of my layout and have the ImageButton and the second label on the right, but always grouped together. I have tried several ways to do this and none will maintain the left/right orientation of the Label and the ImageButton/Label. In one of my attempts I did the following:
<StackLayout>
<!-- Header -->
<headersAndFooters:MainHeaderSmall ConfigName="IdCard"/>
<!-- Body -->
<ScrollView>
<StackLayout Margin="-10, 0, -10, 0" HeightRequest="614" >
<!-- -->
<Label LineHeight="19"
Margin="24, 21, 0, 0"
Text="ID Card for 2019 Jeep Wrangler"
FontFamily="{StaticResource HBold}"
FontSize="{StaticResource Font16}"
TextColor="{StaticResource NGIC_DarkGray}"/>
<FlexLayout x:Name="Problem" Direction="Row"
Margin="24, 4, 0, 0">
<Label LineHeight="18"
Text="Back Side"
FontFamily="{StaticResource HNRegular}"
FontSize="{StaticResource Font14}"
TextColor="{StaticResource NGIC_GrayishBlue}"/>
<StackLayout Orientation="Horizontal">
<ImageButton Margin="200, 0, 0, 0" BackgroundColor="Transparent"
WidthRequest="11"
HeightRequest="11"
Aspect="AspectFit"
HorizontalOptions="Start"
VerticalOptions="Center">
<ImageButton.Source>
<FontImageSource
FontFamily="FAProSolid"
Glyph="{x:Static local:IconFontsFAProRegular.Sync}"
Size="{StaticResource Font11}"
Color="{StaticResource NGIC_Red}" />
</ImageButton.Source>
</ImageButton>
<Label Margin="3, 0,0,0"
Text="See Front"
LineHeight="16"
HorizontalTextAlignment="End"
TextDecorations="Underline"
FontFamily="{StaticResource HNRegular}"
FontSize="{StaticResource Font13}"
TextColor="{StaticResource NGIC_Red}"/>
</StackLayout>
</FlexLayout>
</StackLayout>
</ScrollView>
</StackLayout>
The output from this layout looks fine at lower device resolutions, but the ImageButton and the right side Label are not at the end of the right side.
On a wider device the ImageButton/Label don't even come close to being at the far right of the layout.
I also tried using a Grid inside of the StackLayout (the one named "Problem"), and this didn't work either. right side ImageButton/Label don't stay oriented on the right side of the layout at higher resolutions.
UPDATE:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="18*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="251*" />
<ColumnDefinition Width="73*" />
</Grid.ColumnDefinitions>
<Label Grid.Row="0"
Grid.Column="0"
LineHeight="18"
Text="Back Side"
FontFamily="{StaticResource HNRegular}"
FontSize="{StaticResource Font14}"
TextColor="{StaticResource NGIC_GrayishBlue}"/>
<ImageButton Grid.Row="0" Grid.Column="1" BackgroundColor="Transparent"
WidthRequest="11"
HeightRequest="11"
Aspect="AspectFit"
HorizontalOptions="Start"
VerticalOptions="Center">
<ImageButton.Source>
<FontImageSource
FontFamily="FAProSolid"
Glyph="{x:Static local:IconFontsFAProRegular.Sync}"
Size="{StaticResource Font11}"
Color="{StaticResource NGIC_Red}" />
</ImageButton.Source>
</ImageButton>
<Label Grid.Row="0" Grid.Column="1" Margin="3, 0,0,0"
Text="See Front"
LineHeight="16"
HorizontalTextAlignment="End"
TextDecorations="Underline"
FontFamily="{StaticResource HNRegular}"
FontSize="{StaticResource Font13}"
TextColor="{StaticResource NGIC_Red}"/>
</Grid>



