请参阅下面的我的数据模型和 XAML 代码(我没有可以放置生成的屏幕图像的站点)
namespace Notes.Models
{
public class Note
{
public enum NoteStatus { suspended, alive }
public string Description { get; set; }
public NoteStatus Status { get; set; }
}
public class NotesContainer
{
public string Name { get; set; }
public DateTime LastModified { get; set; }
public ObservableCollection<Note> ListOfNotes { get; set; }
}
}
Run Code Online (Sandbox Code Playgroud)
<CollectionView x:Name="notesContainers" SelectionMode="Single" EmptyView="No items currently exist !">
<CollectionView.ItemTemplate>
<DataTemplate>
<Frame BorderColor="Red" BackgroundColor="Beige" CornerRadius="3" HasShadow="False" Padding="5">
<StackLayout …Run Code Online (Sandbox Code Playgroud)