Наследование: BindableBase, IDisposable
Пример #1
0
        public MainPageViewModel()
        {
            LastViewedVM = new LastViewedViewModel();
            PickVideo = new PickVideoCommand();
            PlayNetworkMRL = new PlayNetworkMRLCommand();

            _toggleNetworkAppBarCommand =
                new ActionCommand(() => { IsNetworkAppBarShown = !IsNetworkAppBarShown; });

            _showAppBarCommand = new ActionCommand(() => { IsAppBarOpen = true; });

            // TODO: For Windows 8.1 build, use ResourceLoader.GetForCurrentView(); 

            var resourceLoader = new ResourceLoader();
            Panels.Add(new Panel(resourceLoader.GetString("Home"), 0, 1));
            Panels.Add(new Panel(resourceLoader.GetString("Videos"), 1, 0.4));
            Panels.Add(new Panel(resourceLoader.GetString("Music"), 2, 0.4));

            SecondaryPanels.Add(new Panel(resourceLoader.GetString("ExternalStorage"), 3, 0.4));
            SecondaryPanels.Add(new Panel(resourceLoader.GetString("MediaServers"), 4, 0.4));
            _setDefaultFolderForIndexingVideoCommand = new SelectDefaultFolderForIndexingVideoCommand();
            _goToPanelCommand = new GoToPanelCommand();
        }
Пример #2
0
        public MainPageViewModel()
        {
            LastViewedVM   = new LastViewedViewModel();
            PickVideo      = new PickVideoCommand();
            PlayNetworkMRL = new PlayNetworkMRLCommand();

            _toggleNetworkAppBarCommand =
                new ActionCommand(() => { IsNetworkAppBarShown = !IsNetworkAppBarShown; });

            _showAppBarCommand = new ActionCommand(() => { IsAppBarOpen = true; });

            // TODO: For Windows 8.1 build, use ResourceLoader.GetForCurrentView();

            var resourceLoader = new ResourceLoader();

            Panels.Add(new Panel(resourceLoader.GetString("Home"), 0, 1));
            Panels.Add(new Panel(resourceLoader.GetString("Videos"), 1, 0.4));
            Panels.Add(new Panel(resourceLoader.GetString("Music"), 2, 0.4));

            SecondaryPanels.Add(new Panel(resourceLoader.GetString("ExternalStorage"), 3, 0.4));
            SecondaryPanels.Add(new Panel(resourceLoader.GetString("MediaServers"), 4, 0.4));
            _setDefaultFolderForIndexingVideoCommand = new SelectDefaultFolderForIndexingVideoCommand();
            _goToPanelCommand = new GoToPanelCommand();
        }