Beispiel #1
0
        /// <summary>
        /// Unregisters the specified <see cref="HamburgerMenuButton"/> control.
        /// </summary>
        /// <param name="hamburgerMenuButton">The <see cref="HamburgerMenuButton"/> control.</param>
        internal void UnregisterHamburgerMenuButton(HamburgerMenuButton hamburgerMenuButton)
        {
            lock (_registeredControlsLock)
            {
                hamburgerMenuButton.Click -= HamburgerMenuButton_Click;

                _registeredHamburgerMenuButtons.Remove(hamburgerMenuButton);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Registers the specified <see cref="HamburgerMenuButton"/> control.
        /// </summary>
        /// <param name="hamburgerMenuButton">The <see cref="HamburgerMenuButton"/> control.</param>
        internal void RegisterHamburgerMenuButton(HamburgerMenuButton hamburgerMenuButton)
        {
            lock (_registeredControlsLock)
            {
                _registeredHamburgerMenuButtons.Add(hamburgerMenuButton);

                hamburgerMenuButton.Click += HamburgerMenuButton_Click;
            }

            if (hamburgerMenuButton.NavigationSourcePageType != null && this.CurrentSourcePageType != null)
            {
                hamburgerMenuButton.IsChecked = hamburgerMenuButton.NavigationSourcePageType == this.CurrentSourcePageType;
            }
        }
        /// <summary>
        /// Registers the specified <see cref="HamburgerMenuButton"/> control.
        /// </summary>
        /// <param name="hamburgerMenuButton">The <see cref="HamburgerMenuButton"/> control.</param>
        internal void RegisterHamburgerMenuButton(HamburgerMenuButton hamburgerMenuButton)
        {
            lock (_registeredControlsLock)
            {
                _registeredHamburgerMenuButtons.Add(hamburgerMenuButton);

                hamburgerMenuButton.Click += HamburgerMenuButton_Click;
            }

            if (hamburgerMenuButton.NavigationSourcePageType != null && this.CurrentSourcePageType != null)
            {
                hamburgerMenuButton.UpdateCheckedState(this.CurrentSourcePageType, _currentParameter);
            }
        }
        /// <summary>
        /// Unregisters the specified <see cref="HamburgerMenuButton"/> control.
        /// </summary>
        /// <param name="hamburgerMenuButton">The <see cref="HamburgerMenuButton"/> control.</param>
        internal void UnregisterHamburgerMenuButton(HamburgerMenuButton hamburgerMenuButton)
        {
            lock (_registeredControlsLock)
            {
                hamburgerMenuButton.Click -= HamburgerMenuButton_Click;

                _registeredHamburgerMenuButtons.Remove(hamburgerMenuButton);
            }
        }
        /// <summary>
        /// Registers the specified <see cref="HamburgerMenuButton"/> control.
        /// </summary>
        /// <param name="hamburgerMenuButton">The <see cref="HamburgerMenuButton"/> control.</param>
        internal void RegisterHamburgerMenuButton(HamburgerMenuButton hamburgerMenuButton)
        {
            lock (_registeredControlsLock)
            {
                _registeredHamburgerMenuButtons.Add(hamburgerMenuButton);

                hamburgerMenuButton.Click += HamburgerMenuButton_Click;
            }

            if (hamburgerMenuButton.NavigationSourcePageType != null && this.CurrentSourcePageType != null)
            {
                hamburgerMenuButton.UpdateCheckedState(this.CurrentSourcePageType, _currentParameter);
            }
        }