XAML on top of Custom Renderer - Xamarin iOS

Hi,
I've written a simple custom page renderer for Camera in iOS and designed some XAML Controls in XAML page.
In Android, The camera is rendererd below the XAML controls, but in iOS, Camera is rendered on top of XAML controls.

Is there anyway to bring the XAML layout on top of custom renderer in iOS?

Posts

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Z order is order of control creation.
    Are you sure you aren't making them in a different order for iOS?

  • PrasanthKumarPrasanthKumar INMember ✭✭

    Damn sure there is no explicit mention of Z-Order in XAML or in custom renderer. Don't understand why custom renderer page in Android is below the XAML views.
    But, the same custom renderer is on top of XAML view in Xamarin iOS

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Damn sure there is no explicit mention of Z-Order in XAML

    Right. I agree. Z-order is automatic in the order the UI elements are added to the view

    The Label will be on top of the Button

    <Grid>
       <Button> {...}
       <Label>
    {...}
    

    The Button will be on top of the Label

    <Grid>
       <Label> {...}
       <Button>
    {...}
    

    So if you have something on your layout such as <On Platform> where you are adding your controls in one order for Android and another order for iOS that could be the cause.

    If you don't have something like that causing the problem, doing it might be the answer to your issue. You might have to explicitly change the order the controls are added, in order to overcome a difference in the two OSes.

Sign In or Register to comment.