Hide "X" close button on Window

11 posts, 0 answers
  1. Todd
    Todd avatar
    14 posts
    Member since:
    Feb 2009

    Posted 24 Feb 2009 Link to this post

    Using the RadWindow control, is there a way to hide the "X" button in the upper right hand corner?

    Thanks in advance,

    Todd
  2. Hristo Borisov
    Admin
    Hristo Borisov avatar
    298 posts

    Posted 25 Feb 2009 Link to this post

    Hi Todd,

    Yes, you can achieve this by configuring the CloseMode property. The enumerator gives you the following functionality.

    Close - RadWindow closes if the user clicks the close button.
    Hide - RadWindow hides.
    None - RadWindow doesn't have close button.

    Thank you for contacting us, I hope this will resolve your problem.

    Best wishes,
    Hristo Borisov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. Kavi
    Kavi avatar
    25 posts
    Member since:
    Aug 2009

    Posted 03 Aug 2010 Link to this post

    Also is there a way to hide the titlebar too?

    Silverlight version: 2010.1.422.1030
  5. Salim
    Salim avatar
    10 posts
    Member since:
    Apr 2012

    Posted 06 Jan in reply to Hristo Borisov Link to this post

    What's the code ? I have  page that I open as a window and I want to hidethe x (close button)
  6. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 07 Jan Link to this post

    Hello Salim,

    In order to hide the Close button of RadWindow the CanClose property needs to be set to false. Please, check the following article from our help documentation that provides a detailed information how to achieve this:
    http://docs.telerik.com/devtools/silverlight/controls/radwindow/features/closing

    Hope this helps.

    Regards,
    Nasko
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  7. Luke Daugherty
    Luke Daugherty avatar
    19 posts
    Member since:
    Jun 2011

    Posted 19 Jan in reply to Nasko Link to this post

    I actually just did this. Setting CanClose  to false works, but it does not prevent the Esc key from closing the dialog which is annoying. It should.
  8. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 22 Jan Link to this post

    Hello Luke,

    You are probably referring to one of the predefined dialogs that have a built in functionality to close when the Escape button gets pressed. If that is the case in order to disable that functionality you could use an attached property and subscribe to the KeyDown event for the dialogs and handle that event - thus the dialogs won't be closed when Escape gets pressed. For RadAlert you need also to modify the Style because it has an input binding to the Escape key - that input binding needs to be removed.

    We have created a sample project that demonstrates the described above approach and you could run and evaluate it.

    We hope this will help you.

    Regards,
    Nasko
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  9. Luke Daugherty
    Luke Daugherty avatar
    19 posts
    Member since:
    Jun 2011

    Posted 22 Jan in reply to Nasko Link to this post

    Thanks. I had already figured this out. The point is if you set CanClose to false one would assume that would prevent the user from closing the dialog through ALL default actions (x button AND Esc). Also, I am not using a pre-defined dialog. It is my own control that implements RadWindow, displayed using ShowDialog.
  10. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 25 Jan Link to this post

    Hi Luke,

    The observed by you behavior is not an expected one when RadWindow is used - it does not have an implemented internal logic for closing when Escape gets pressed, because of that we assume you were using one of the predefined windows. Please, check the attached video that demonstrates that.

    Could you please, try to isolate the observed by you behavior in a sample and send it to us - thus we could be able to continue our investigation?

    We are looking forward to hearing from you.

    Regards,
    Nasko
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  11. Luke Daugherty
    Luke Daugherty avatar
    19 posts
    Member since:
    Jun 2011

    Posted 25 Jan in reply to Nasko Link to this post

    On further investigation this behavior was not due to the RadWindow. Sorry for the confusion. Feel free to remove my posts from this topic to avoid confusion for others reading this topic.
  12. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 25 Jan Link to this post

    Hi Luke,

    We are glad to hear that you were able to resolve your issue and now everything is working as expected.

    If you have any additional questions or concerns regarding Telerik controls, please do not hesitate to contact us.

    Regards,
    Nasko
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
DevCraft banner