xamarin - 为什么我的 StackLayout 内的文本不环绕?

标签 xamarin xamarin.forms xamarin.forms-styles

我的代码出现在 <TableSection>

<?xml version="1.0" encoding="UTF-8"?>
<ViewCell 
    xmlns="http://xamarin.com/schemas/2014/forms" 
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
    x:Class="Japanese.CategoryGroupCommentViewCell">
    <StackLayout 
        Orientation="Horizontal"
        Padding="20,10"
        BackgroundColor="#EAEAF1">
        <Label
            Style="{DynamicResource ListItemDetailTextStyleStyle}"
            TextColor="#59595F" 
            LineBreakMode="WordWrap" 
            Text="Click on the Category Groups and then select one or more Categories from the page that appears"
            VerticalOptions="Center"/>
    </StackLayout>
    </ViewCell>

当它显示时,我看到以下文字:

Click on the Category Groups and then select

其余部分被切断。

我也试过了,效果是一样的:

<ViewCell 
    xmlns="http://xamarin.com/schemas/2014/forms" 
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
    x:Class="Japanese.CategoryGroupCommentViewCell">
    <Grid 
        VerticalOptions="CenterAndExpand"
        Padding="20,10"
        BackgroundColor="#EAEAF1">
        <Label
            Style="{DynamicResource ListItemDetailTextStyleStyle}"
            TextColor="#59595F" 
            Text="Click on the Category Groups and then select one or more Categories from the page that appears"
            HorizontalOptions="FillAndExpand"
            VerticalOptions="CenterAndExpand"/>
    </Grid>
</ViewCell>

谁能告诉我我可能做错了什么?

最佳答案

请删除方向属性并尝试

已编辑

删除 ListView 中的 RowHeight(如果您放置在那里)并在 ListView 中添加 HasUnevenRows="true"

关于xamarin - 为什么我的 StackLayout 内的文本不环绕?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45830581/

相关文章:

xamarin - 以 Xamarin 形式对齐标签和开关

c# - EF 核心 : Foreign key returns null value

c# - 找不到 Prism.Navigation.TabbedPages 命名空间

xamarin - 如何在 Xamarin 表单中更改 Picker 字体颜色和大小?

c# - 如何从 Xamarin.Forms 使用 Azure 移动服务?

c# - 从 iOS TabBar 移除着色

mvvm - Xamarin Forms 自定义可绑定(bind)命令类型不匹配

xaml - Xamarin ImageButton 单击后不可见

android - 如何使用 visual studio 2013 登录 Xamarin 组件商店