Example #1
0
        /// <summary>
        /// Toggles the sound option by the given on state.
        /// </summary>
        /// <param name="toggleOn">A value indicating whether to toggle sound on.</param>
        /// <returns>
        /// The <see cref="SettingsPage"/>.
        /// </returns>
        public SettingsPage ToggleSoundOption(bool toggleOn)
        {
            ToggleSwitch soundToggle = this.WindowsApp.FindElement(this.soundToggleQuery);

            if (toggleOn)
            {
                soundToggle.ToggleOn();
            }
            else
            {
                soundToggle.ToggleOff();
            }

            return(this);
        }
Example #2
0
        /// <summary>
        /// Toggles the simple switch.
        /// </summary>
        /// <param name="on">
        /// A value indicating whether to toggle on.
        /// </param>
        /// <returns>
        /// The <see cref="ToggleSwitchPage"/>.
        /// </returns>
        public ToggleSwitchPage ToggleSimpleSwitch(bool on)
        {
            ToggleSwitch toggle = this.WindowsApp.FindElement(this.simpleToggleSwitch);

            if (on)
            {
                toggle.ToggleOn();
            }
            else
            {
                toggle.ToggleOff();
            }

            return(this);
        }