Exemplo n.º 1
0
        public void Toggle()
        {
            IsOpen = !IsOpen;
            Toggled?.Invoke(IsOpen);

            BarItem?.MenuChanged();

            StateHasChanged();
        }
Exemplo n.º 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();
        }