Select to view content in your preferred language

Xaml

163
2
2 weeks ago
NagaMaheshBabupolana
New Contributor

Can a grid can be clipped to the right side of the screen? We have tried to make a list inside a grid but the list is coming on the left side always. 
The code is given below

<Grid>
<Frame x:Name="ListForLogOut"
IsVisible="False"
BackgroundColor="#FF383838"
HeightRequest="200"
WidthRequest="170"
Padding="5"
CornerRadius="5"
AbsoluteLayout.LayoutFlags="PositionProportional"
AbsoluteLayout.LayoutBounds="1,0.08,AutoSize,AutoSize">
<StackLayout Spacing="10" Margin="2">
<Button Text="Add Feature"
BackgroundColor="Transparent"
TextColor="White"
HeightRequest="22"
Padding="0,5,0,0"
FontSize="12"
CornerRadius="10"
HorizontalOptions="Start"
Clicked="onAddButtonClicked"/>
<BoxView HeightRequest="0.5" Color="Gray" HorizontalOptions="FillAndExpand"/>
<Button Text="Select Editable layer"
BackgroundColor="Transparent"
TextColor="White"
HeightRequest="22"
Padding="0,5,0,0"
FontSize="12"
CornerRadius="10"
HorizontalOptions="Start"
Clicked="OnSelectEdiableLayerClicked"/>
<BoxView HeightRequest="0.5" Color="Gray" HorizontalOptions="FillAndExpand"/>
<Button Text="logout"
BackgroundColor="Transparent"
TextColor="White"
HeightRequest="22"
Padding="0,5,0,0"
FontSize="12"
CornerRadius="10"
Clicked="OnLogoutButtonClicked"
HorizontalOptions="Start"/>
<BoxView HeightRequest="0.5" Color="Gray" HorizontalOptions="FillAndExpand"/>

</StackLayout>
</Frame>


<Frame x:Name="dropdownFrame"
IsVisible="False"
BackgroundColor="#FF595959"
BorderColor="Gray"
Padding="10"
CornerRadius="5"
AbsoluteLayout.LayoutFlags="PositionProportional"
AbsoluteLayout.LayoutBounds="0.265,0.1,AutoSize,AutoSize">

<StackLayout x:Name="RadioButtonStackLayout"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand">
<!-- Radio buttons will be added here dynamically -->
</StackLayout>
</Frame>
</Grid> 

Screenshot 2024-06-29 115608.png

2 Replies
JoeHershman
MVP Regular Contributor

It is difficult to tell from what you posted.  But Grid has HorizontalOptions and Margin settings.  These work together to line up a grid on a page

Thanks,
-Joe
0 Kudos
GKmieliauskas
Esri Regular Contributor

Hi,

Set for dropdownFrame HorizontalOptions="End"

0 Kudos