Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
379
How to maximize content panes programmatically
posted

Since v11.1 XamDockManager has "AllowMaximizeFloatingWindows".

This is much appreciated but the doubleclick behavior is not exactly what I am looking for.

I would like to intercept the doubleclick on the contentpane's titlebar and toggle the fullscreen property instead of the docking property (like in VS2010). So my questions are:

- How to detect the docking state of a contentpane e.g. docked, floating?

- How to detect the window state of a contentpane e.g. minimized, normal, maximized?

- How to change the docking and window state?

 

Parents
  • 54937
    Offline posted

    LCIGmbH said:
    would like to intercept the doubleclick on the contentpane's titlebar and toggle the fullscreen property instead of the docking property (like in VS2010).

     First it is important to note that this is not a one-to-one relationship between a floating window and a single ContentPane. 1 or more ContentPane instances are hosted within a PaneToolWindow when their PaneLocation is Floating or FloatingOnly. Note too that there is no fullscreen property in xamDockManager as that is essentially a mode in VS where by toolwindows (i.e. non-documents) are hidden and only documents are shown (which in the case of XDM would all be hosted within the DocumentContentHost).

    With regards to intercepting the double click, there is no event surfaced for this so at best you would have to derive a class from PaneToolWindow, override the OnDoubleClickCaption and do your processing there. To use your derived PaneToolWindow you would need to derive from XamDockManager as well and override the CreatePaneToolWindow factory method.

    LCIGmbH said:
    How to detect the docking state of a contentpane e.g. docked, floating?

    The PaneLocation indicates the location of a ContentPane.

    LCIGmbH said:
    How to detect the window state of a contentpane e.g. minimized, normal, maximized?

    There is no window state of a ContentPane. 1 or more ContentPanes are hosted within a PaneToolWindow when their PaneLocation is Floating or FloatingOnly. The PaneToolWindow is what has a WindowState property. You may get the containing ToolWindow of a ContentPane using the ToolWindow.GetToolWindow static method and check its WindowState.

    LCIGmbH said:
    How to change the docking and window state?

    The WindowState of a PaneToolWindow is a public property on the ToolWindow class (PaneToolWindow is a derived ToolWindow) so once you get the PaneToolWindow you can set the WindowState property.

    There is no docking state property for a ContentPane as its state is based on where it is located and moving it requires setting up where it will be placed. The only exposed means of changing a pane's location are via it's available ContentPaneCommands - e.g. TogglePinnedState (flips the IsPinned property), ToggleDockedState (toggles between the docked and floating dockable states), ChangeToFloatingOnly (puts the pane into floating window that does not participate in the docking), etc. Aside from that you would need to remove the ContentPane from it's parent and parent it where you wanted it placed.

Reply Children