Xamarin Forms 4.1.0.618606 Frame not clipping content

AlbertKAlbertK MYMember ✭✭✭

I have upgraded from Forms 3.6 to 4.1. I have a problem where my DataTemplate for Listview that was working before and now not. Why is the Label not behind the enclosing Frame (Z-Order issue). How do I get the Label to be behind the frame ?

<?xml version="1.0" encoding="UTF-8"?>
<?xaml-comp compile="true" ?>
<ResourceDictionary xmlns="http://xamarin.com/schemas/2014/forms"
                    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                   >
    <DataTemplate x:Key="MyViewTemplate" >
    <ViewCell>

        <ViewCell.View>
           <StackLayout Margin="2,4,4,4">
           <Frame CornerRadius="20" Padding="2,2,2,2"  HasShadow="False" BorderColor="LightGray" Opacity="{Binding Opacity}">
             <StackLayout>
                <Grid  Opacity = "{Binding Opacity}">

                <Grid.ColumnDefinitions >
                    <ColumnDefinition Width="8"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="2*"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="0.15*"/>
                    <RowDefinition Height="0.7*"/>
                    <RowDefinition Height="0.15*"/>
                </Grid.RowDefinitions>

                <Label Text="" Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" BackgroundColor="{Binding ReadingColour}"/>

                <Label VerticalOptions="Center" HorizontalOptions="Center" Text="{Binding DisplayUpdateDateTime}"  FontSize="Micro" Grid.Row="2" Grid.Column="2" />

               </Grid>
              </StackLayout>                    
            </Frame>
            </StackLayout>
        </ViewCell.View>
    </ViewCell>
    </DataTemplate>
</ResourceDictionary>

Best Answer

Answers

  • AlbertKAlbertK MYMember ✭✭✭

    Beautiful, That fixed it. Thank you.

Sign In or Register to comment.