Exemple #1
0
        public void Toggle()
        {
            IsOpen = !IsOpen;
            Toggled?.Invoke(IsOpen);

            BarItem?.MenuChanged();

            StateHasChanged();
        }
Exemple #2
0
        public void Close()
        {
            var temp = IsOpen;

            IsOpen = false;

            if (temp != IsOpen)   // used to prevent toggle event call if Close() is called multiple times
            {
                Toggled?.Invoke(IsOpen);
            }

            BarItem?.MenuChanged();

            StateHasChanged();
        }