예제 #1
0
파일: App.xaml.cs 프로젝트: salfab/Synotune
        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;
        }
예제 #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;
        }