コード例 #1
0
 static NavigationViewItemBase()
 {
     IsExpandedProperty.Changed.AddClassHandler <NavigationViewItemBase>(
         (x, e) =>
     {
         if (x.IsExpanded == true)
         {
             var o_e = new RoutedEventArgs(OpenedEvent);
             x.RaiseEvent(o_e);
         }
         else if (x.IsExpanded == false)
         {
             var c_e = new RoutedEventArgs(ClosedEvent);
             x.RaiseEvent(c_e);
         }
     });
     OpenedEvent.AddClassHandler <NavigationViewItemBase>((x, e) => x.OnOpened(x, e));
     ClosedEvent.AddClassHandler <NavigationViewItemBase>((x, e) => x.OnClosed(x, e));
     IsSelectedProperty.Changed.AddClassHandler <NavigationViewItemBase>
         ((x, e) =>
     {
         if (x.IsSelected)
         {
             x.OnSelected(x, e);
         }
         else if (!x.IsSelected)
         {
             x.OnDeselected(x, e);
         }
     });
     IsOpenProperty.Changed.Subscribe(e => OnIsOpenChanged(e));
 }
コード例 #2
0
ファイル: Form.cs プロジェクト: fiar/com.kernel.ui
        private IEnumerator OpenAsync()
        {
            if (_tweens.Count > 0)
            {
                foreach (var tween in _tweens)
                {
                    if (tween != null && tween.isActiveAndEnabled && tween.StartAction != TweenStartAction.DoNothing)
                    {
                        tween.Open();
                    }
                }

                foreach (var tween in _tweens)
                {
                    if (tween != null && tween.isActiveAndEnabled)
                    {
                        while (tween.IsTweening)
                        {
                            yield return(null);
                        }
                    }
                }
            }

            _state          = FormState.Opened;
            _processRoutine = null;
            OnOpened();
            if (OpenedEvent != null)
            {
                OpenedEvent.Invoke();
            }
        }
コード例 #3
0
 protected void OpenedEventInvoke()
 {
     _state = UITweenState.Opened;
     if (OpenedEvent != null)
     {
         OpenedEvent.Invoke(this);
     }
 }
コード例 #4
0
 remove => RemoveHandler(OpenedEvent, value);
コード例 #5
0
 add => AddHandler(OpenedEvent, value);
コード例 #6
0
ファイル: Window.cs プロジェクト: MUDV587/StratusFramework
 /// <summary>
 /// Once the window is done opening, enable input
 /// </summary>
 /// <param name="e"></param>
 void OnOpenedEvent(OpenedEvent e)
 {
     this.SelectFirstLink();
 }
コード例 #7
0
 internal void Opened()
 {
     GameManager.OpenedPack(generation, cardInThisPack);
     OpenedEvent?.Invoke(generation);
 }