Esempio n. 1
0
        public async Task ToggleCollapse()
        {
            this.Collapsed = !this.Collapsed;
            await OnCollapse.InvokeAsync(Collapsed);

            OnCollapsed?.Invoke(this.Collapsed);
        }
Esempio n. 2
0
        public async Task WatchMatchMedia()
        {
            if (string.IsNullOrEmpty(Breakpoint))
            {
                return;
            }

            bool matchBelow = await JsInvokeAsync <bool>(JSInteropConstants.matchMedia, $"(max-width: {_dimensionMap[Breakpoint]})");

            this.Below     = matchBelow;
            this.Collapsed = matchBelow;
            await this.OnCollapsedChange.InvokeAsync(matchBelow);

            OnCollapsed?.Invoke(this.Collapsed);
        }