Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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;
        }