public void Toggle() { IsOpen = !IsOpen; Toggled?.Invoke(IsOpen); BarItem?.MenuChanged(); StateHasChanged(); }
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(); }