예제 #1
0
 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();
 }
예제 #2
0
        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();
        }