protected async Task OnClick() { _isDismissed = true; await OnDismiss.InvokeAsync(null).ConfigureAwait(false); StateHasChanged(); }
public void ProcessKeyDown(string keyCode) { if (keyCode == "27") { OnDismiss.InvokeAsync(null); } }
protected async Task onclick() { IsDismissed = true; await OnDismiss.InvokeAsync(null); StateHasChanged(); }
public async void FocusHandler() { System.Diagnostics.Debug.WriteLine($"Callout {PortalId} called dismiss from FocusHandler from {this.DirectionalHint}"); await OnDismiss.InvokeAsync(true); await HiddenChanged.InvokeAsync(true); }
public async void FocusHandler() { //Need way to tie focus handler between all the callouts (linked contextualmenus) ... only dimiss when ALL of them lost focus. System.Diagnostics.Debug.WriteLine($"Callout {PortalId} called dismiss from FocusHandler from {this.DirectionalHint}"); await OnDismiss.InvokeAsync(null); //await HiddenChanged.InvokeAsync(true); }
protected void OnClick() { IsOpen = false; OnDismiss.InvokeAsync(EventCallback.Empty); BSAlertEvent = new BSAlertEvent() { Target = this }; CloseEvent.InvokeAsync(BSAlertEvent); EventQue.Add(ClosedEvent); }
protected void DismissHandler(bool isDismissed) { System.Diagnostics.Debug.WriteLine($"ContextualMenu {PortalId} tried dismiss from {this.DirectionalHint} with SubmenuActiveKey = {SubmenuActiveKey}"); if (string.IsNullOrEmpty(SubmenuActiveKey)) { System.Diagnostics.Debug.WriteLine($"ContextualMenu dismiss successful! {this.DirectionalHint} with SubmenuActiveKey = {SubmenuActiveKey}"); OnDismiss.InvokeAsync(true); } }
private async Task KeyDownHandler(KeyboardEventArgs args) { switch (args.Key) { case "Escape": await OnDismiss.InvokeAsync(args); break; } //return Task.CompletedTask; }
public Panel() { Debug.WriteLine("Panel Created"); HeaderTemplate = builder => { if (HeaderText != null) { builder.OpenElement(0, "div"); { builder.AddAttribute(1, "class", "ms-Panel-header"); builder.OpenElement(2, "p"); { builder.AddAttribute(3, "class", "xlargeFont ms-Panel-headerText"); //builder.AddAttribute(4, "id", ) builder.AddAttribute(5, "role", "heading"); builder.AddAttribute(6, "aria-level", "2"); builder.AddContent(7, HeaderText); } builder.CloseElement(); } builder.CloseElement(); } }; onPanelClick = () => { this._dismiss(); }; _dismiss = () => { OnDismiss.InvokeAsync(null); //normally, would check react synth events to see if event was interrupted from the OnDismiss callback before calling the following... // To Do this.Close(); }; }
protected void onclick() { IsOpen = false; OnDismiss.InvokeAsync(EventCallback.Empty); }
public async void ResizeHandler() { await OnDismiss.InvokeAsync(null); //await HiddenChanged.InvokeAsync(true); }
protected Task OnClose(MouseEventArgs mouseEventArgs) { return(OnDismiss.InvokeAsync(null)); }
[JSInvokable] public async void ScrollHandler() { await OnDismiss.InvokeAsync(null); //await HiddenChanged.InvokeAsync(true); }
public async void ClickHandler() { await OnDismiss.InvokeAsync(true); await HiddenChanged.InvokeAsync(true); }
[JSInvokable] public async void ResizeHandler() { await OnDismiss.InvokeAsync(true); await HiddenChanged.InvokeAsync(true); }
public Panel() { Debug.WriteLine("Panel Created"); _animationTimer = new Timer(); HeaderTemplate = builder => { if (HeaderText != null) { builder.OpenElement(0, "div"); { builder.AddAttribute(1, "class", "ms-Panel-header"); builder.OpenElement(2, "p"); { builder.AddAttribute(3, "class", "xlargeFont ms-Panel-headerText"); //builder.AddAttribute(4, "id", ) builder.AddAttribute(5, "role", "heading"); builder.AddAttribute(6, "aria-level", "2"); builder.AddContent(7, HeaderText); } builder.CloseElement(); } builder.CloseElement(); } }; onPanelClick = () => { this._dismiss(); }; _dismiss = async() => { await OnDismiss.InvokeAsync(null); //normally, would check react synth events to see if event was interrupted from the OnDismiss callback before calling the following... // To Do this.Close(); }; _clearExistingAnimationTimer = () => { if (_animationTimer.Enabled) { _animationTimer.Stop(); _animationTimer.Elapsed -= _handler; } }; _animateTo = (animationState) => { _animationTimer.Interval = 200; _handler = null; _handler = (s, e) => { InvokeAsync(() => { //Debug.WriteLine("Inside invokeAsync from animateTo timer elapsed"); _animationTimer.Elapsed -= _handler; _animationTimer.Stop(); previousVisibility = currentVisibility; currentVisibility = animationState; _onTransitionComplete(); }); }; _animationTimer.Elapsed += _handler; _animationTimer.Start(); }; _onTransitionComplete = async() => { isAnimating = false; //StateHasChanged(); await UpdateFooterPositionAsync(); if (currentVisibility == PanelVisibilityState.Open) { await OnOpened.InvokeAsync(null); } if (currentVisibility == PanelVisibilityState.Closed) { await OnDismissed.InvokeAsync(null); } StateHasChanged(); }; }
protected void Dismiss(bool dismissAll = false) { OnDismiss.InvokeAsync(dismissAll); }