为什么 StackLayout 中的文本不环绕?
Why doesn't my text inside a StackLayout wrap around?
我有这个代码出现在 <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>
谁能告诉我我可能做错了什么?
请删除方向 属性并尝试
已编辑
删除 RowHeight 如果你把 ListView 放在那里并添加 HasUnevenRows="true" 在你的 ListView
我有这个代码出现在 <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>
谁能告诉我我可能做错了什么?
请删除方向 属性并尝试
已编辑
删除 RowHeight 如果你把 ListView 放在那里并添加 HasUnevenRows="true" 在你的 ListView