Xamarin.Forms UWP中不显示输入文本

问题描述 投票:0回答:1

我在Xamarin应用程序中具有以下代码结构。

<StackLayout>

        <Entry Text="XYZ"/>

        <ScrollView>
            <StackLayout VerticalOptions="Start">
                <Grid>

                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>

                    <BoxView HeightRequest="1" BackgroundColor="Black"/>

                    <Entry Grid.Row="1" Text="ABCD" VerticalOptions="Center"/>

                    <BoxView Grid.Row="2" HeightRequest="1" BackgroundColor="Aqua"/>

                    <BoxView Grid.Row="3" HeightRequest="1" BackgroundColor="Blue"/>

                    <Label Grid.Row="4" Text="12" TextColor="Red" VerticalOptions="Start"/>

                </Grid>
            </StackLayout>
        </ScrollView>

    </StackLayout>

输入文本“ ABCD”未在UWP中显示,但在android中工作正常。

请找到屏幕截图enter image description here

xamarin xamarin.forms xamarin.uwp
1个回答
0
投票

参见:https://github.com/xamarin/Xamarin.Forms/issues/10137

尝试移除外部ScrollView。为我修复了此问题(但如果不重新设计UX,则无法使用长格式)。

© www.soinside.com 2019 - 2024. All rights reserved.