Standard MDI Difference - upgrading from 4.5.487 to 9.1.503

Docking/MDI for WPF Forum

Posted 15 years ago by FinallyInSeattle
Version: 9.1.0503
Avatar
We're currently using Standard MDI and are forcing our DocumentWindows to be Maximized. The XAML for the StandardMdiHost follows along with the code that is invoked whenever we activate a new DocumentWindow. In 4.5.487, our DocumentWindows had just a Close button. In 9.1.503, I'm seeing both a Restore button and a Close button. What do I need to do to get rid of the Restore button - we're trying to force the DocumentWindow to stay maximized.

        <!--Document Workspace-->
        <docking:Workspace Name="workSpace" AutomationProperties.AutomationId="workSpace">
          <docking:StandardMdiHost Name="standardMdiHost" WindowsHaveMinimizeButtons="False" AutomationProperties.AutomationId="standardMdiHost"
                                     SelectionChanged="internalWindowHost_SelectionChanged">
            <docking:StandardMdiHost.Resources>
              <Style TargetType="docking:WindowControl">
                <Setter Property="HasRestoreButton" Value="False"/>
                <Setter Property="HasMaximizeButton" Value="False"/>
                <Setter Property="ResizeMode" Value="NoResize"/>
                <Setter Property="HasDropShadow" Value="False"/>
              </Style>
            </docking:StandardMdiHost.Resources>
          </docking:StandardMdiHost>
        </docking:Workspace>

          //  Activate the window.
          internalWindow.Activate(true);
          StandardMdiHost.SetStandardMdiWindowState(internalWindow, WindowState.Maximized);

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
In the recent builds, we added support for magnetism to the standard MDI. By doing this they use a new StandardMdiWindowControl (inherits WindowControl) in the DocumentWindow template for standard MDI. So just change your style to target StandardMdiWindowControl instead and it should work.


Actipro Software Support

The latest build of this product (v24.1.1) was released 22 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.