private void Rdc_Loaded(object sender, RoutedEventArgs e) { rdc.DataContext = PasswordRecordViewModel.CreateFromRecord(AddDefaultEntry(new Record() { Id = Guid.NewGuid().ToString(), DisplayName = string.Empty })); rdc.Frame = Frame; rdc.showeditpanel(); }
private void MasterListView_ItemClick(object sender, ItemClickEventArgs e) { var clickedItem = (PasswordRecordViewModel)e.ClickedItem; _lastSelectedItem = clickedItem; if (AdaptiveStates.CurrentState == NarrowState) { // Use "drill in" transition for navigating from master list to detail view Frame.Navigate(typeof(RecordDetailPage), clickedItem.ItemId, new DrillInNavigationTransitionInfo()); } else { // Play a refresh animation when the user switches detail items. EnableContentTransitions(); } }
private void Load() { if (records == null) { records = TmpData.PasswordKeeper.Records; } CharacterGroupings groupings = new CharacterGroupings(); observablerecords = new RangedObservableCollection <PasswordRecordViewModelGroup>(records.Select(a => PasswordRecordViewModel.CreateFromRecord(a)) .OrderBy(a => a.DisplayName).GroupBy((a) => groupings.Lookup(a.DisplayName)) .Select(a => new PasswordRecordViewModelGroup(a.Key, ct(a)))); UpdateForVisualState(AdaptiveStates.CurrentState); // Don't play a content transition for first item load. // Sometimes, this content will be animated as part of the page transition. DisableContentTransitions(); }