Пример #1
0
        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            Global.gamesLists = await API.getGamesFromLocalDatabase();



            //             using Windows.UI.ViewManagement;
            Windows.ApplicationModel.Core.CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = false;
            var titleBar = ApplicationView.GetForCurrentView().TitleBar;

            // Set active window colors
            titleBar.ForegroundColor              = Windows.UI.Colors.White;
            titleBar.BackgroundColor              = Windows.UI.Colors.Black;
            titleBar.ButtonForegroundColor        = Windows.UI.Colors.White;
            titleBar.ButtonBackgroundColor        = Windows.UI.Colors.Black;
            titleBar.ButtonHoverForegroundColor   = Windows.UI.Colors.White;
            titleBar.ButtonHoverBackgroundColor   = Windows.UI.Colors.DodgerBlue;
            titleBar.ButtonPressedForegroundColor = Windows.UI.Colors.Gray;
            titleBar.ButtonPressedBackgroundColor = Windows.UI.Colors.DarkBlue;

            //             Set inactive window colors
            titleBar.InactiveForegroundColor       = Windows.UI.Colors.Gray;
            titleBar.InactiveBackgroundColor       = Windows.UI.Colors.Black;
            titleBar.ButtonInactiveForegroundColor = Windows.UI.Colors.Gray;
            titleBar.ButtonInactiveBackgroundColor = Windows.UI.Colors.Black;


            //            Set appropriate list types
            Wishlist.setFilter(new GameFilter(Global.ListType.WishList));
            Wishlist.List.addGames(Global.gamesLists.Find(x => x.Filter.listType.Equals(Global.ListType.WishList)));
            PlayingList.setFilter(new GameFilter(Global.ListType.PlayingList));
            PlayingList.List.addGames(Global.gamesLists.Find(x => x.Filter.listType.Equals(Global.ListType.PlayingList)));
            FinishedList.setFilter(new GameFilter(Global.ListType.FinishedList));
            FinishedList.List.addGames(Global.gamesLists.Find(x => x.Filter.listType.Equals(Global.ListType.FinishedList)));

            Wishlist.updateList();
            PlayingList.updateList();
            FinishedList.updateList();
        }