How to style RadWindow that can be moved and resized but not maximized

4 posts, 1 answers
  1. Antti
    Antti avatar
    23 posts
    Member since:
    May 2011

    Posted 08 Nov 2011 Link to this post

    Hi,

    I would like to style a RadWindow so that it could be moved and resized but could not be maximized by any way.

    ResizeMode=CanResize is required to allow resizing the window. The maximize and minimize buttons can then be hidden trough the template. However, if the user double clicks the window header/title, then the window is maximized. This is the functionality that I would like to remove. I could make the window header not be HitTestVisible or remove it altogether, but then I lose the ability to reposition the window by dragging. Is there any way to get all these work at the same time?

    Regards,
    Antti 
  2. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 09 Nov 2011 Link to this post

    Hi Antti,

    I am afraid, there is no straightforward way to achieve this. In order to achieve this you have to do the following:
    - first remove the Maximize button from the template
    - then hook to the WindowStateChanged event and if the WindowState is equal to Maximized to manually set its WindowState.

    Hope this helps.

    Greetings,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. DevCraft banner
  4. Antti
    Antti avatar
    23 posts
    Member since:
    May 2011

    Posted 21 Nov 2011 Link to this post

    Hi,

    The trick you mentioned above worked. Thank you!

    Regards,
    Antti
  5. Roberto Pantalena
    Roberto Pantalena avatar
    19 posts
    Member since:
    Jul 2009

    Posted 28 Jun 2012 Link to this post

    Hi, i have updated a sample project on the Code Library under the name "Radwindow that can me moved and resized but not maximized"

    This is a project with a styled RadWindow that can be moved, resized, but non maximized.
    The resize and move actions are done manually, the header is hidden and the property "ResizeMode" of the RadWindow is set to "NoResize".

    I've just uploaded the project on the code library and needs to be approved before i can paste here the link.
    When it will be approved i post here a reply with the link.

    Waiting for feedback,
    Roberto
Back to Top