private void SetupTagSelection() { tagInforViewModel = new TagInformationViewModel(collection, collection.NewNote()); includeTags.ViewModel = tagInforViewModel; includeTags.LabelVisibility = Visibility.Collapsed; includeTags.Placement = FlyoutPlacementMode.Bottom; includeTags.TagFlyoutClosedEvent += TagFlyoutClosedEventHandler; }
public static void AppendTags(StringBuilder tags, string prefix, TagInformationViewModel viewModel) { foreach (var tag in viewModel.CurrentNote.Tags) { tags.Append(prefix); tags.Append(tag); tags.Append(" "); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); mainPage = e.Parameter as MainPage; if (mainPage == null) { throw new Exception("Wrong parameter type!"); } collection = mainPage.Collection; ViewModel = new TagInformationViewModel(collection, collection.NewNote()); HookAllEvents(); }
private void CramModeCheckedHandler(object sender, RoutedEventArgs e) { cramNumberBox.Number = 1; cramNumberBox.MinNumber = 1; var deckIds = collection.Deck.Children(currentDeckId).Values.ToList(); deckIds.Add(currentDeckId); cramNumberBox.MaxNumber = collection.CardCount(deckIds); standardOptionsRoot.Visibility = Visibility.Collapsed; cramModeRoot.Visibility = Visibility.Visible; if (includeTagsViewModel == null) { includeTagsViewModel = new TagInformationViewModel(collection, collection.NewNote()); excludeTagsViewModel = new TagInformationViewModel(collection, collection.NewNote()); includeTags.ViewModel = includeTagsViewModel; excludeTags.ViewModel = excludeTagsViewModel; } studyOption = CustomStudyOption.CramMode; }
private void SetupTagsView() { tagsViewModel = new TagInformationViewModel(collection, currentNote); tagsView.ViewModel = tagsViewModel; }