dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.26k stars 1.76k forks source link

How to get the element's position of its parent element on iOS or Mac? #25797

Closed jingliancui closed 1 week ago

jingliancui commented 1 week ago
    <ScrollView>
        <Grid WidthRequest="500" HeightRequest="500" x:Name="TheGrid" BackgroundColor="Blue">
            <Frame x:Name="TheView" HorizontalOptions="End" VerticalOptions="End" BackgroundColor="Yellow" WidthRequest="30" HeightRequest="30"></Frame>
        </Grid>
    </ScrollView>

How to get the position of "TheView" which is belong to "TheGrid"? The X and Y property of "TheView" is 0 which is not my expect.