xamarin/Xamarin.Forms

[Bug] Visual="material" is disabling all controls after the first one in a StackLayout inside a Grid

Ouverte

#8 369 ouverte le 4 nov. 2019

 (1 commentaire) (0 réaction) (0 personne assignée)C# (1 926 forks)batch import
a/visuale/3 :clock3:help wantedp/Androidt/bug :bug:up-for-grabs

Métriques du dépôt

Stars
 (5 644 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Description

In Xamarin.Forms Shell everything (after 1st item) put into a StackLayout inside of a grid behaves like it is disabled if you combine that with Visual. Entries don´t pop up the keyboard and buttons are flat.

Steps to Reproduce

  1. Do a File new project from template, update every nuget (or look at my repo).

  2. Add this code to the NewItemPage.xaml page.

    <ContentPage.Content>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="80" />
                <RowDefinition Height="80" />
                <RowDefinition Height="80" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="10" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="10" />
            </Grid.ColumnDefinitions>

            <StackLayout Grid.Row="0" Grid.Column="1">
                <Entry
                    Grid.Row="1"
                    Grid.Column="1"
                    Placeholder="This one works but not perfectly" />
                <Entry
                    Grid.Row="2"
                    Grid.Column="1"
                    Placeholder="This never opens up the keypad" />
                <Button
                    Grid.Row="3"
                    Text="Button always disabled... " />
            </StackLayout>
        </Grid>
    </ContentPage.Content>
  1. Add
Visual="Material"

to the the top xml of NewItemPage.xaml

Now run the app and see that the second entry and the button are disabled (no interaction). Basically everything after the first one.

Expected Behavior

All controls under the first one should just work normally.

Actual Behavior

Every control under the first one in the stacklayout is behaving like disabled.

Basic Information

  • IDE: Visual Studio (16.3.7 and 16.4-prev3)
  • Platform Target Frameworks:
    • Android: Just tried this on Android
  • Android Support Library Version:
  • Affected Devices:

If you missed it I created a project with this reproduced and put it on my git.

Guide contributeur