public IAsyncAction HideAsync() { return(AsyncAction.FromTask(async ct => { CoreDispatcher.CheckThreadAccess(); UIApplication.SharedApplication.StatusBarHidden = true; Hiding?.Invoke(this, null); })); }
public IAsyncAction ShowAsync() { return(AsyncAction.FromTask(async ct => { CoreDispatcher.CheckThreadAccess(); _isShown = true; UpdateSystemUiVisibility(); Showing?.Invoke(this, null); })); }
private async void RefreshImageAsync(Windows.Foundation.Rect drawRect) { CoreDispatcher.CheckThreadAccess(); var cd = new CancellationDisposable(); _refreshPaint.Disposable = cd; await RefreshImage(cd.Token, drawRect); }
/// <summary> /// Gets the status bar for the current window (app view). /// </summary> /// <returns>The status bar for the current window (app view).</returns> public static StatusBar GetForCurrentView() { CoreDispatcher.CheckThreadAccess(); if (_statusBar == null) { _statusBar = new StatusBar(); } return(_statusBar); }
public IVectorView <object> GetView() { IVectorView <object> spResult; CoreDispatcher.CheckThreadAccess(); // CheckThread(); spResult = new TrackerView <object>(); (spResult as TrackerView <object>).SetCollection(this); return(spResult); }
private async void OpenImageAsync(ImageSource newValue) { CoreDispatcher.CheckThreadAccess(); using var cd = new CancellationDisposable(); _imageScheduler.Disposable = cd; var image = await Task.Run(() => newValue.Open(cd.Token), cd.Token); if (cd.Token.IsCancellationRequested) { return; } SetImage(image); }
public T GetDeferral() { _deferralsCount++; var isCompleted = false; return(_deferralFactory(OnDeferralCompleted)); void OnDeferralCompleted() { #if !__WASM__ // Disable check on WASM until threading is supported CoreDispatcher.CheckThreadAccess(); #endif if (isCompleted) { throw new InvalidOperationException("Deferral already completed."); } isCompleted = true; DeferralCompleted(); } }
public void ExitFullScreenMode() { CoreDispatcher.CheckThreadAccess(); UpdateFullScreenMode(false); }
public bool TryEnterFullScreenMode() { CoreDispatcher.CheckThreadAccess(); UpdateFullScreenMode(true); return(true); }
public void ExitFullScreenMode() { CoreDispatcher.CheckThreadAccess(); UIApplication.SharedApplication.StatusBarHidden = false; }
public bool TryEnterFullScreenMode() { CoreDispatcher.CheckThreadAccess(); UIApplication.SharedApplication.StatusBarHidden = true; return(UIApplication.SharedApplication.StatusBarHidden); }
private void CheckThread() => CoreDispatcher.CheckThreadAccess();
// BEGIN UNO Specific protected void CheckThread() => CoreDispatcher.CheckThreadAccess();