protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); // Set the data context of the listbox control to the sample data if (DataContext == null) DataContext = App.ViewModel; }