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 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(); }