xamarin/Xamarin.Forms

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

開放

#8,369 建立於 2019年11月4日

 (1 則留言) (0 個反應) (0 位負責人)C# (1,926 個分叉)batch import
a/visuale/3 :clock3:help wantedp/Androidt/bug :bug:up-for-grabs

倉庫指標

星標
 (5,644 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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.

貢獻者指南