Beispiel #1
0
 /// <summary>
 /// Raises the ExpandIconHoverState changed event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">A HoverStateChangeEventArgs that contains the event data.</param>
 protected override void OnExpandIconHoverStateChanged(object sender, HoverStateChangeEventArgs e)
 {
     Invalidate(this.RectangleExpandIcon);
     base.OnExpandIconHoverStateChanged(sender, e);
 }
Beispiel #2
0
 /// <summary>
 /// Raises the CloseIconHoverStat changed event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">A HoverStateChangeEventArgs that contains the event data.</param>
 protected override void OnCloseIconHoverStateChanged(object sender, HoverStateChangeEventArgs e)
 {
     Invalidate(this.RectangleCloseIcon);
     base.OnCloseIconHoverStateChanged(sender, e);
 }
Beispiel #3
0
 /// <summary>
 /// Raises the CloseIconHoverState changed event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">A HoverStateChangeEventArgs that contains the event data.</param>
 protected virtual void OnCloseIconHoverStateChanged(object sender, HoverStateChangeEventArgs e)
 {
     if (e.HoverState == HoverState.Hover)
     {
         if (this.Cursor != Cursors.Hand)
         {
             this.Cursor = Cursors.Hand;
         }
         if (string.IsNullOrEmpty(this.m_strToolTipTextCloseIcon) == false)
         {
             this.m_toolTip.SetToolTip(this, this.m_strToolTipTextCloseIcon);
         }
     }
     else
     {
         if (this.Cursor == Cursors.Hand)
         {
             this.m_toolTip.SetToolTip(this, string.Empty);
             this.m_toolTip.Hide(this);
             this.Cursor = Cursors.Default;
         }
     }
     if (this.CloseIconHoverStateChanged != null)
     {
         this.CloseIconHoverStateChanged(sender, e);
     }
 }
Beispiel #4
0
 /// <summary>
 /// Raises the ExpandIconHoverState changed event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">A HoverStateChangeEventArgs that contains the event data.</param>
 protected virtual void OnExpandIconHoverStateChanged(object sender, HoverStateChangeEventArgs e)
 {
     if (e.HoverState == HoverState.Hover)
     {
         if (this.Cursor != Cursors.Hand)
         {
             this.Cursor = Cursors.Hand;
             if (this.Expand == true)
             {
                 if (this is IPanel)
                 {
                     if (string.IsNullOrEmpty(this.m_strToolTipTextExpandIconPanelExpanded) == false)
                     {
                         this.m_toolTip.SetToolTip(this, this.m_strToolTipTextExpandIconPanelExpanded);
                     }
                 }
             }
             else
             {
                 if (string.IsNullOrEmpty(this.m_strToolTipTextExpandIconPanelCollapsed) == false)
                 {
                     this.m_toolTip.SetToolTip(this, this.m_strToolTipTextExpandIconPanelCollapsed);
                 }
             }
         }
     }
     else
     {
         if (this.Cursor == Cursors.Hand)
         {
             this.m_toolTip.SetToolTip(this, string.Empty);
             this.m_toolTip.Hide(this);
             this.Cursor = Cursors.Default;
         }
     }
     if (this.ExpandIconHoverStateChanged != null)
     {
         this.ExpandIconHoverStateChanged(sender, e);
     }
 }
Beispiel #5
0
 /// <summary>
 /// Raises the CaptionBarHoverState changed event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">A HoverStateChangeEventArgs that contains the event data.</param>
 protected virtual void OnCaptionBarHoverStateChanged(object sender, HoverStateChangeEventArgs e)
 {
     if (this is XPanderPanel)
     {
         if (e.HoverState == HoverState.Hover)
         {
             if ((this.ShowCloseIcon == false) && (this.ShowExpandIcon == false))
             {
                 if (this.Cursor != Cursors.Hand)
                 {
                     this.Cursor = Cursors.Hand;
                 }
             }
         }
         else
         {
             if (this.Cursor == Cursors.Hand)
             {
                 this.Cursor = Cursors.Default;
             }
         }
         this.Invalidate(CaptionRectangle);
     }
     if (this.CaptionBarHoverStateChanged != null)
     {
         this.CaptionBarHoverStateChanged(sender, e);
     }
 }