小编Анд*_*нов的帖子

Xamarin.Forms。Collectionview 在其内容后添加了很多额外的空白

我希望集合视图的内容后面没有空白区域。

\n

我尝试将按钮放在页脚中,但后来遇到了问题,属性 isenabled = false 没有在我后面的代码中应用到它。\n这是我的 xaml 文件:

\n
<ContentPage.Content>\n    <RefreshView x:DataType="local:QuestionViewModel" Command="{Binding LoadCommand}" IsRefreshing="{Binding IsBusy, Mode=TwoWay}">\n        <ScrollView>\n            <StackLayout>\n                <views:MyTextView LaTeX="{Binding Formulation}" HorizontalOptions="Center" Margin="15, 10, 15, 0"/>\n                <!--<RefreshView x:DataType="local:QuestionViewModel" Command="{Binding LoadCommand}" IsRefreshing="{Binding IsBusy, Mode=TwoWay}">-->\n                    <CollectionView\n                        ItemsSource="{Binding Answers, Mode=TwoWay}"\n                        SelectedItems="{Binding SelectedAnswers, Mode=TwoWay}"\n                        SelectionMode="Multiple"\n                        x:Name="collectionView"\n                        SelectionChanged="collectionView_SelectionChanged"\n                        >\n                        <CollectionView.ItemsLayout>\n                            <LinearItemsLayout Orientation="Vertical"/>\n                        </CollectionView.ItemsLayout>\n                    <CollectionView.ItemTemplate>\n                        <DataTemplate x:DataType="model:Answer">\n                            <StackLayout Padding="10">\n                                <VisualStateManager.VisualStateGroups>\n                                    <VisualStateGroup Name="CommonStates">\n                                        <VisualState Name="Normal">\n                                            <VisualState.Setters>\n                                                <Setter TargetName="frame" Property="Frame.BackgroundColor" Value="{Binding AnswerColor}"/>\n                                            </VisualState.Setters>\n                                        </VisualState>\n                                        <VisualState Name="Selected">\n                                            <VisualState.Setters>\n                                                <Setter TargetName="frame" Property="Frame.BackgroundColor" Value="{DynamicResource MainColor}"/>\n                                                <Setter TargetName="label" Property="views:MyTextView.TextColor" Value="White"/>\n …
Run Code Online (Sandbox Code Playgroud)

xaml collectionview xamarin xamarin.forms

3
推荐指数
1
解决办法
2510
查看次数

标签 统计

collectionview ×1

xamarin ×1

xamarin.forms ×1

xaml ×1