Esempio n. 1
0
        /// <summary>
        /// Called when the value of <see cref="StatefulCompositeGraphic.State"/> changes.
        /// </summary>
        /// <param name="e">An object containing data describing the specific state change.</param>
        protected override void OnStateChanged(GraphicStateChangedEventArgs e)
        {
            base.OnStateChanged(e);

            if (typeof(InactiveGraphicState).IsAssignableFrom(e.NewState.GetType()))
            {
                OnEnterInactiveState(e.MouseInformation);
            }
            else if (typeof(FocussedGraphicState).IsAssignableFrom(e.NewState.GetType()))
            {
                OnEnterFocusState(e.MouseInformation);
            }
            else if (typeof(SelectedGraphicState).IsAssignableFrom(e.NewState.GetType()))
            {
                OnEnterSelectedState(e.MouseInformation);
            }
            else if (typeof(FocussedSelectedGraphicState).IsAssignableFrom(e.NewState.GetType()))
            {
                OnEnterFocusSelectedState(e.MouseInformation);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Called when the value of <see cref="State"/> changes.
 /// </summary>
 /// <param name="e">An object containing data describing the specific state change.</param>
 protected virtual void OnStateChanged(GraphicStateChangedEventArgs e)
 {
 }