private async Task UpdateFocusZoneAsync() { try { var props = FocusZoneProps.GenerateProps(this, Id, RootElementReference); await jsRuntime.InvokeVoidAsync("BlazorFabricFocusZone.updateFocusZone", _registrationId, props); } catch (TaskCanceledException ex) { } }
public static FocusZoneProps GenerateProps(FocusZone focusZone, string id, ElementReference root) { var props = new FocusZoneProps() { AllowFocusRoot = focusZone.AllowFocusRoot, CheckForNoWrap = focusZone.CheckForNoWrap, DefaultActiveElement = new ElementReference(focusZone.DefaultActiveElement), Direction = focusZone.Direction, Disabled = focusZone.Disabled, DoNotAllowFocusEventToPropagate = focusZone.DoNotAllowFocusEventToPropagate, HandleTabKey = focusZone.HandleTabKey, Id = id, InnerZoneKeystrokeTriggers = focusZone.InnerZoneKeystrokeTriggers, IsCircularNavigation = focusZone.IsCircularNavigation, OnBeforeFocusExists = focusZone.OnBeforeFocus != null, Root = root, ShouldInputLoseFocusOnArrowKeyExists = focusZone.ShouldInputLoseFocusOnArrowKey != null }; return(props); }
private async Task <int> RegisterFocusZoneAsync() { var props = FocusZoneProps.GenerateProps(this, Id, RootElementReference); return(await jsRuntime.InvokeAsync <int>("BlazorFabricFocusZone.register", props, DotNetObjectReference.Create(this))); }
private async Task UpdateFocusZoneAsync() { Debug.WriteLine("Focuszone updating..."); var props = FocusZoneProps.GenerateProps(this, Id, RootElementReference); await jsRuntime.InvokeVoidAsync("BlazorFabricFocusZone.updateFocusZone", _registrationId, props); }