Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Nested Controls in Absolute Layout

$
0
0

I'd like to nest a frame inside another control, while using AbsoluteLayout.
However, it seems that the control always takes the layout options of the parent.
Am I doing something incorrectly, or is this unsupported?

``

                <Frame 
                    AbsoluteLayout.LayoutBounds="30,30,.3,.3" AbsoluteLayout.LayoutFlags="SizeProportional"
                    HeightRequest="40"
                    WidthRequest="40"
                    BackgroundColor="White"
                    />
        </Frame>
        <Label 
            AbsoluteLayout.LayoutBounds="0,1,1,.5" AbsoluteLayout.LayoutFlags="All"
            BackgroundColor="Lime"
            Text="Just a Test" TextColor="Black" />
</AbsoluteLayout>

``

Other failed attempts:
(1) I tried to do this with a "StackLayout" as the parent, which also did not work.
However, I know StackLayout is a managed layout, so the behavior might be expected.
(2) Additionally, I get the same result with or without the HeightRequest and WidthRequest parameters.

See attached screenshot.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>