Visual Studio XAML mobile app, ZIndex is not working

Peter Rung 0 Reputation points
2024-05-21T02:40:35.4266667+00:00

I am working in XAML. I have a page the sets a rectangle with a black background a pixel; border about as wide as a mobile phone. I am trying to place a label in the upper left of the rectangle with a black background and white text. What is occurring is that the rectangle color is bleeding into the white letters of the label. The image is attached.

The XAML is:

<Frame

Margin="10"

Padding="0,0,0,0"

BackgroundColor="Transparent"

BorderColor="{StaticResource DefaultPurple}"

ZIndex="0"

HeightRequest="52"

CornerRadius="20"

<Grid>

<Grid.RowDefinitions>

    <RowDefinition Height="Auto" />

    <RowDefinition Height="*" />

</Grid.RowDefinitions>

<Frame HeightRequest="20"

    Padding="0"

    Margin="0,-9"

    ZIndex="1"

    WidthRequest="120"

    VerticalOptions="Start"

    HorizontalOptions="Start"

    BorderColor="Black"

    BackgroundColor="Black"

>

I've tried ZIndex="100" making no difference.

Any help would be appreciated...

XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
778 questions
0 comments No comments
{count} votes