protected override void OnNavigatedTo( bool cancelled, NavigationEventArgs e) { if (cancelled || _entry != null) { return; } var database = Cache.Database; if (database == null) { this.BackToDBs(); return; } _entry = CurrentEntry.Entry; foreach (var field in _entry.GetFields().Take(3)) { var local = field; var item = new ApplicationBarMenuItem(local.Name); item.Click += (s, _) => SetValue(local.Value); ApplicationBar.MenuItems.Add(item); } }
protected override void OnNavigatedTo( bool cancelled, NavigationEventArgs e) { if (cancelled) { return; } var database = Cache.Database; if (database == null) { this.BackToDBs(); return; } _entry = CurrentEntry.Entry; _fields = new ObservableCollection <FieldBinding>(_entry.GetFields() .Select(x => new FieldBinding(x))); lstFields.ItemsSource = _fields; }