Esempio n. 1
0
 public void PreventAutoHide()
 {
     if (IsAutoHideEnabled && IsVisible)
     {
         AutoHideSubject.OnNext(0);
     }
 }
Esempio n. 2
0
        private async void Show()
        {
            using (var releaser = await _AnimationGenerateLock.LockAsync())
            {
                if (this.AssociatedObject == null)
                {
                    return;
                }

                Debug.WriteLine($"{_CurrentAnimation?.State}");

                _CurrentAnimation?.Dispose();
                _CurrentAnimation = null;

                if (IsAnimationEnabled)
                {
                    _CurrentAnimation = AssociatedObject.Fade(1.0f, Duration.TotalMilliseconds);

                    _CurrentAnimation?.StartAsync().ConfigureAwait(false);

                    if (IsAutoHideEnabled)
                    {
                        AutoHideSubject.OnNext(0);
                    }

                    Debug.WriteLine($"{nameof(VisiblityFadeChanger)}: 表示アニメーション開始 (自動非表示:{IsAutoHideEnabled})");
                }
                else
                {
                    AssociatedObject.Opacity = 1.0;
                    Debug.WriteLine($"{nameof(VisiblityFadeChanger)}: 表示");
                }
            }
        }
Esempio n. 3
0
        private void Show()
        {
            if (this.AssociatedObject == null)
            {
                return;
            }

            StopAnimation();

            if (IsAnimationEnabled)
            {
                var ct = CreateAnimationCancellationToken();
                _ = AnimationBuilder.Create().Opacity(1.0).StartAsync(this.AssociatedObject, ct);

                if (IsAutoHideEnabled)
                {
                    AutoHideSubject.OnNext(0);
                }
            }
            else
            {
                AssociatedObject.Opacity = 1.0;
            }
        }