Maximized RadWindow

4 posts, 0 answers
  1. Davide
    Davide avatar
    17 posts
    Member since:
    Mar 2013

    Posted 08 Oct 2014 Link to this post

    Hi, 
    I'm using a RadWindow as Mainwindow for my project.
    I wanted to know if it is possible to send the window to fullscreen covering the window taskbar and occuping the all monitor area 

    Thx in advance

    Davide
  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 09 Oct 2014 Link to this post

    Hello Davide,

    You can achieve that only by setting a few properties of the control:

    IsTopmost="True"
    IsRestricted="True"
    ResizeMode="NoResize"
    WindowStartupLocation="CenterScreen"
    WindowState="Normal"

    and the needed size in the code behind:

    this.Width = System.Windows.SystemParameters.PrimaryScreenWidth;
    this.Height = System.Windows.SystemParameters.PrimaryScreenHeight;

    However please not you would also need to modify the Template of the control a little bit to remove the dropping shadow for example. I have attached a sample project demonstrating the exact scenario, compared with the regular WPF Window. 

    Hope this helps.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Davide
    Davide avatar
    17 posts
    Member since:
    Mar 2013

    Posted 09 Oct 2014 in reply to Kalin Link to this post

    Hi Kalin ...

    i tried your example but it is not what i was looking for :-(
    The problem is that my MainWindow is a RadWindow, this must be resizable and when you press the maximize icon at the top right of the radwindow I would like it to expand in the current screen and go over the taskbar

    Thx

    Davide


  5. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 14 Oct 2014 Link to this post

    Hi Davide,

    I'm afraid that the desired scenario is not supported from RadWindow. However I can suggest you a possible solution - you can add a fake maximize button in the header of the Window, that will execute the logic demonstrated in the attached sample project. You would need to keep the last size and position before the button was pressed, so whenever is pressed again to restore the Window to the needed location. You would also need to remove the very outer margin of the Window when maximizing - this can be done using the following snippet:

    var outerBorder = this.Template.FindName("WindowOuterBorder", this) as Border;
    outerBorder.Margin = new Thickness(0);

    Hope this will help you to achieve the desired.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top