.NETMAUI Collection View未显示Windows
我在Windows中的CollectionView有问题。 XAML是 <?xml version="1.0" encoding="utf-8" ?> <ContentPage x:Class="LibraryAppM.Views.EnquiryPage" xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:library="clr-namespace:LibraryM;assembly=LibraryM" xmlns:local="clr-namespace:LibraryAppM.ViewModels.Enquiry" xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit" x:Name="enquiry" Title="Richard's Library System" x:DataType="local:EnquiryViewModel"> <ContentPage.BindingContext> <local:EnquiryViewModel /> </ContentPage.BindingContext> <ContentPage.Behaviors> <toolkit:EventToCommandBehavior BindingContext="{Binding Path=BindingContext, Source={x:Reference enquiry}, x:DataType=ContentPage}" Command="{Binding GetAuthorsCommand}" EventName="Appearing" /> </ContentPage.Behaviors> <Grid Padding="10,0,10,0" RowDefinitions="Auto,Auto,Auto,Auto,*" RowSpacing="10"> <Image Grid.Row="0" Aspect="AspectFit" HeightRequest="185" SemanticProperties.Description="A picture of library shelves" Source="lib_pic.jpg" /> <Label Grid.Row="1" FontSize="20" Text="Enquiry Page" /> <toolkit:Expander Grid.Row="2" IsExpanded="{Binding IsOpened}"> <toolkit:Expander.Header> <HorizontalStackLayout MaximumHeightRequest="42"> <Label FontSize="16" HorizontalOptions="Start" Text="{Binding SelectedText}" /> <Label HorizontalOptions="Start" Text="▼" VerticalOptions="Center" /> </HorizontalStackLayout> </toolkit:Expander.Header> <CollectionView HeightRequest="190" ItemsSource="{Binding DataList}" SelectedItem="{Binding SelectedItem}" SelectionChangedCommand="{Binding SelectionCommand}" SelectionMode="Single"> <CollectionView.ItemTemplate> <DataTemplate x:DataType="library:Author"> <Label FontSize="16" Text="{Binding FullName}" /> </DataTemplate> </CollectionView.ItemTemplate> </CollectionView> </toolkit:Expander> <Grid Grid.Row="3" ColumnDefinitions="5*,10,Auto" RowDefinitions="Auto"> <Label Grid.Column="0" HorizontalOptions="Start" Text="Title" /> <Label Grid.Column="2" HorizontalOptions="Center" Text="Return Date" /> </Grid> <CollectionView Grid.Row="5" ItemsSource="{Binding BookList}" VerticalScrollBarVisibility="Never"> <CollectionView.ItemsLayout> <LinearItemsLayout ItemSpacing="3" Orientation="Vertical" /> </CollectionView.ItemsLayout> <CollectionView.ItemTemplate> <DataTemplate x:DataType="library:Book"> <Grid ColumnDefinitions="Auto,*,Auto"> <Label Grid.Column="0" HorizontalOptions="Start" Text="{Binding Title}" /> <Label Grid.Column="2" HorizontalOptions="End" Text="{Binding ReturnDate}" /> </Grid> </DataTemplate> </CollectionView.ItemTemplate> </CollectionView> </Grid> </ContentPage> 清单卷轴,但最后几个项目丢失了。如果我现在在第二个CollectionView中的网格中添加填充(例如,出现了一些缺少的项目。此视图在Android中无需修改填充。我在vs 17.13.3和Windows11. 对我来说,解决方案是在ContentPage定义中添加高度。例如<Grid ColumnDefinitions="Auto,*,Auto" Padding="20">
有一种方法可以告诉预先委托(pre-commit.com)仅将修复程序应用于修改后的文本而不是触摸的整个文件?我们想在API模型上设置拼写检查(使用错别字),...
我有一个问题,即例外类是否应包含业务规则,例如,假设我有几种例外方法,在这些例外方法中,我最终填充了实体
我使用以下pip3用法来安装我的主机: pip3安装托克斯-i http:// myhost/sample+ - 信任主持人 我下载了一个沼泽代码。它使用托克斯来安装模块。 我怎么...
反应 - 本地 - 如何在Android的scollview中滚动网络浏览?
我想在scrollview中使用WebView作为我的React Native应用程序。但是,如果我这样做,除非我禁用scrollview上的滚动,否则我将无法滚动我的网络浏览。但是,我都需要两个scroll
最好的方法是什么?如何为应用程序设置配置文件? 我希望该应用程序能够查看SD卡上的文本文件,并选择某些信息
因此,我正在建立一个网站,用户可以上传手表视频。 我正在使用标准的HTML5视频播放器(...) 目前,我使用多个来源:MP4,OGG和Web ...