public static void ShowCollection() { // TODO : use a factory instead CollectionPageViewModel viewModel = new CollectionPageViewModel(audioStationSession); var page = new CollectionPage(viewModel); //if (_sampleData == null) _sampleData = new SampleDataSource(page.BaseUri); //page.Items = _sampleData.GroupedCollections.Select((obj) => (Object)obj); Window.Current.Content = page; }
public CollectionPage(CollectionPageViewModel viewModel) { SettingsPane pane = SettingsPane.GetForCurrentView(); SettingsCommand cmd = new SettingsCommand(KnownSettingsCommand.Preferences, (a) => { SettingPanel.Margin = ThicknessHelper.FromUniformLength(0); viewModel.ViewIsShowingCharm = true; }); pane.ApplicationCommands.Add(cmd); InitializeComponent(); DataContext = viewModel; BackButton.IsEnabled = false; }