public async Task Init() { if (!TocItems.Any()) { ITocItem root = await Book.QueryToc(null, null); ListChildren(root); } }
public bool Back() { if (TocItems.Any() && TocItems.First().Level > 1) { ListChildren(TocItems.First().Parent.Parent); return(true); } return(false); }
private void ListChildren(ITocItem item) { TocItems.ReplaceRange(item.HasChildren ? item.Children : new ITocItem[] { item }); OnPropertyChanged(nameof(TocItems)); }