Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content inside a Frame layout is not visible. #7139

Closed
uragonda-rajesh opened this issue May 13, 2022 · 4 comments
Closed

Content inside a Frame layout is not visible. #7139

uragonda-rajesh opened this issue May 13, 2022 · 4 comments
Labels
legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@uragonda-rajesh
Copy link

Description

Label inside a frame layout is not visible.

Steps to Reproduce

Run this.

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:VT.Views"
             xmlns:resources="clr-namespace:VT.Resources"
             x:Class="VT.Views.Demo">
    <ContentPage.Resources>
        <Style x:Key="Demostyle"
           TargetType="Label">
            <Setter Property="FontSize"
                Value="Medium" />
            <Setter Property="HorizontalOptions"
                Value="Center"/>
            <Setter Property="VerticalOptions"
                Value="Center"/>
            <Setter Property="HorizontalTextAlignment"
                Value="Center"/>
        </Style>
    </ContentPage.Resources>

    <ContentPage.Content>
        <ScrollView VerticalOptions="FillAndExpand"
                    VerticalScrollBarVisibility="Always">
            <StackLayout BackgroundColor="Red" Padding="16,16,16,16" Orientation="Vertical" VerticalOptions="FillAndExpand">
                <Label HorizontalOptions="FillAndExpand"
                       Text="Sample label"
                       Margin="10,10,10,10"
                       TextColor="White"
                       VerticalOptions="CenterAndExpand">
                    <!--// remove VerticalOptions="CenterAndExpand" line to resolve-->
                </Label>
                <Frame Margin="10,10,10,10">
                    <Label Text="Sample button" Padding="14,0,14,0" HorizontalOptions="FillAndExpand" Style="{StaticResource Demostyle}"/>

                    <Frame.GestureRecognizers>
                        <TapGestureRecognizer Command="{Binding LoginCommand}"/>
                    </Frame.GestureRecognizers>
                </Frame>
            </StackLayout>
        </ScrollView>
    </ContentPage.Content>
</ContentPage>
namespace VT.Views
{
    public partial class Demo : ContentPage
    {
        public Demo()
        {
            InitializeComponent();
        }
    }
}

Frame

Version with bug

Release Candidate 3 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 10

Did you find any workaround?

Need to remove VerticalOptions="CenterAndExpand" of the Label above the Frame layout to make the Label inside the Frame visible.

Relevant log output

No response

@uragonda-rajesh uragonda-rajesh added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels May 13, 2022
@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed and removed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels May 13, 2022
@XamlTest
Copy link

Verified this issue with Visual Studio Enterprise 17.3.0 Preview 1.0 [32427.455.main]. Repro on Android12. Sample Project: MauiApp10.zip

@Eilon Eilon added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 13, 2022
@mobycorp
Copy link

mobycorp commented Jun 15, 2022

I apologize for getting snarky, but the Frame element has been a problem child for MONTHS!! The layout inside a frame has NEVER worked!!! Please fix this ASAP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Here is a layout on Android (I am getting layout inside of a Frame):

AndroidFrame

Here is the same rendering on Windows:

WindowsFrame

I am using VS Version 17.3.0 Preview 2.0

@mobycorp
Copy link

To confirm: I did employ a workaround using a Rectangle in place of the frame with a lower Zindex so that it would be guaranteed to be behind the VerticalStackLayout that contains the other controls I wanted framed...

@PureWeen
Copy link
Member

Verified this issue with Visual Studio Enterprise 17.3.0 Preview 1.0 [32427.455.main]. Repro on Android12. Sample Project: MauiApp10.zip

This appears to be fixed
image

If you're still seeing this once SR2 comes out let me know

@ghost ghost locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants