RadPopupCloseReason difference between AutoClose and ManualClose

6 posts, 1 answers
  1. SomeName
    SomeName avatar
    19 posts
    Member since:
    Jul 2011

    Posted 19 Sep 2011 Link to this post

    Hi.

    Correct me if i am wrong but i dont see a difference between AutoClose and ManualClose (hitting the predefined CloseButton) in the RadPopupCloseReason Enum.

    I would like to suggest this feature in the next version!!!

    Is there a way to do this with the current version?
  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 22 Sep 2011 Link to this post

    Hello Somename,

    I am not sure that I can understand your inquiry. Could you please elaborate a bit more and describe your scenario in detail. Currently, there are no AutoClose and ManualClose options in RadPopupCloseReason event arguments. However, the CloseCalled option allows you to determine whether the popup was closed programmatically.

    Regards,
    Jack
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WinForms is Visual Studio 2017 Ready
  4. SomeName
    SomeName avatar
    19 posts
    Member since:
    Jul 2011

    Posted 22 Sep 2011 Link to this post

    Sry for my poor explanation.

    Lets try it this way:
    I have a RadDesktopAlert with the default CloseButton (X at TopRight Corner) and the Alert is set to AutoClose after a certain time.
    As you mentioned there is CloseCalled which is set when some "programmatically" calls the Close method.

    The problem i am facing is that there is no difference between AutoClose (Close Reason = CloseCalled) and the user hitting the CloseButton (X at TopRight Corner) this is has the same CloseReason (CloseCalled).

    What i want to know is when did the user hit the X Button and when did the Alert close automatically?

    I think the RadPopupCloseReason lack this information, so is there another way?

    I need this, because my application should think when the Alert closes automatically the user is inactive, else when the user activly hits the close button.
  5. Answer
    Jack
    Admin
    Jack avatar
    2335 posts

    Posted 27 Sep 2011 Link to this post

    Hi Somename,

    Thank you for this clarification. Now I understand the issue. This event was originally designed to be used with popup menus and here you can differentiate between keyboard, mouse or close called closing reasons. However, these conditions are not directly applicable for desktop alerts. In your scenario you can handle the MouseDown event for the close button. Here is a sample:
    alert.Popup.AlertElement.CaptionElement.TextAndButtonsElement.CloseButton.MouseDown += new MouseEventHandler(CloseButton_MouseDown);
    void CloseButton_MouseDown(object sender, MouseEventArgs e)
    {
        //...
    }

    I hope this helps.
     
    Greetings,
    Jack
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. SomeName
    SomeName avatar
    19 posts
    Member since:
    Jul 2011

    Posted 27 Sep 2011 Link to this post

    Thanks for this solution.

    Can you already say if, in the future version, there will be the difference right from the RadPopupCloseReason in the closed method.
    I think its rather common to want to distinguish those two.
  7. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 30 Sep 2011 Link to this post

    Hi,

    Thank you for writing me back.

    Currently, I cannot confirm that. We will consider a possible change in our API when planning our future version. However, you are the first one to request such a functionality and we may increase its priority when more people request the same.

    Should you have any other questions, do not hesitate to ask.
     
    Regards,
    Jack
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
UI for WinForms is Visual Studio 2017 Ready