/*** Page Events *******************************************************************************************************/

        /// <summary>
        /// Set buttons on page to same size.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            _ = sender;     // Discard unused parameter.
            _ = e;          // Discard unused parameter.
            // Hide XAML layout rectangles by setting their color to RelativePanel Background color;
            RectLayoutCenter.Fill = Rpanel.Background;
            RectLayoutLeft.Fill   = Rpanel.Background;
            RectLayoutRight.Fill  = Rpanel.Background;
            LibMPC.ButtonVisibility(mainPage.mainPageButAbout, false);
            LibMPC.ButtonVisibility(mainPage.mainPageButBack, true);
            LibMPC.ButtonVisibility(mainPage.mainPageButSettings, false);
            // Set size of buttons on About page to same size.
            List <Button> listButtonsThisPage = new List <Button>()
            {
                ButEmail,
                ButRateApp,
                ButCryptoLink1,
                ButCryptoLink2,
                ButCryptoLink3,
                ButCryptoLink4
            };

            LibMPC.SizePageButtons(listButtonsThisPage);
            LibMPC.OutputMsgSuccess(TblkPageTitle, mainPage.resourceLoader.GetString("AB_TblkPageTitle"));
            LibMPC.OutputMsgSuccess(TblkPayment, mainPage.resourceLoader.GetString("AB_TblkPayment"));
            LibMPC.OutputMsgNormal(TblkProgrammer, LibMPC.JoinListString(Translate.TRS_AB_List_TblkProgrammer_Text, EnumStringSeparator.OneSpace)); // Do not assemble string until needed to save memory.
            LibMPC.OutputMsgNormal(TblkLink, mainPage.resourceLoader.GetString("AB_TblkLink"));
            LibMPC.OutputMsgBright(TblkPageMsg, LibMPC.JoinListString(Translate.TRS_AB_List_TblkPageMsg_Text, EnumStringSeparator.TwoNewlines));    // Do not assemble string until needed to save memory.
            LibMPC.ButtonEmailXboxDisable(ButEmail);
            //Setup scrolling for this page.
            LibMPC.ScrollViewerOn(mainPage.mainPageScrollViewer, horz: ScrollMode.Disabled, vert: ScrollMode.Auto, horzVis: ScrollBarVisibility.Disabled, vertVis: ScrollBarVisibility.Auto, zoom: ZoomMode.Disabled);
            ButRateApp.Focus(FocusState.Programmatic);
        }
Exemple #2
0
        /*** Page Events *******************************************************************************************************/

        /// <summary>
        /// Initialize settings for this page and set visibility of title bar items.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            _ = sender;     // Discard unused parameter.
            _ = e;          // Discard unused parameter.
            LibMPC.OutputMsgNormal(TblkPageMsg, $"Application by Paul Ghilino.  Version: {mainPage.stringAppVersion}");
            LibMPC.ButtonVisibility(mainPage.mainPageButAbout, false);
            LibMPC.ButtonVisibility(mainPage.mainPageButBack, true);
            // Set size of buttons on About page to same size.
            List <Button> listButtonsThisPage = new List <Button>()
            {
                ButRateApp,
                ButSMPTE,
                ButLearnMore,
                ButEmail
            };

            LibMPC.SizePageButtons(listButtonsThisPage);
            LibMPC.ButtonEmailXboxDisable(ButEmail);
            // Setup scrolling for this page.
            LibMPC.ScrollViewerOn(mainPage.mainPageScrollViewer, horz: ScrollMode.Disabled, vert: ScrollMode.Auto, horzVis: ScrollBarVisibility.Disabled, vertVis: ScrollBarVisibility.Auto, zoom: ZoomMode.Disabled);
            ButRateApp.Focus(FocusState.Programmatic);      // Set focus to first button on page.
        }