Is is possible to change DockSite.FloatingWindowShowInTaskBarMode dynamically?

Docking/MDI for WPF Forum

Posted 2 years ago by Yuki
Version: 23.1.0
Avatar

Hello,

I'd like to change DockSite.FloatingWindowShowInTaskBarMode dynamically.

Is it possible?

For the testing, I changed it dynamically.
The mode of existing(displaying) floating windows was not changed.
How to apply the changing to existing floating windows?

Comments (8)

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Since it affects all WPF Windows that host floating DockHosts, it's not really meant to be a property that can change dynamically, so it's not coded to update things on the fly upon changes.  You should generally know at app design time which mode you wish to use and stick with one mode.


Actipro Software Support

Posted 2 years ago by Yuki
Avatar

Hello,

Thank you for your reply.

I understand it, but our customer seems to want to change it dynamically.

If possible, would you please consider it?

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

I assume this request is in reference to the other forum thread posted recently.  Can you describe in detail the scenario behind this request?

I wonder if you would be better served simply using a tool window instead of a document window.  Tool windows can be placed in the tabbed MDI area too, but when floated, they are designed to remain on top of the main application window.


Actipro Software Support

Posted 2 years ago by Yuki
Avatar

I assume this request is in reference to the other forum thread posted recently.

In that time, I asked if there is any way to set specific document window on top or not.

I uderstood there is no way.

Can you describe in detail the scenario behind this request?

We are developing application like Visual Studio.

I'm thinking document editor window should be document window, not tool window.

Customer sometimes need to display floating document window on top, and sometimes no need.

I'm thinking the following implementation.

How to judge if window is Actipro floating document window or not?

private void SwitchShowInTaskBarModeMode()
{
    MainDockSite.FloatingWindowShowInTaskBarMode = (MainDockSite.FloatingWindowShowInTaskBarMode == FloatingWindowShowInTaskBarMode.Never)
        ? FloatingWindowShowInTaskBarMode.Default
        : FloatingWindowShowInTaskBarMode.Never;

    foreach (var w in Application.Current.Windows)
    {
        if (w is not Actipro floating document window)  // How to judge this?
        {
            continue;
        }

        w.Owner = (MainDockSite.FloatingWindowShowInTaskBarMode == FloatingWindowShowInTaskBarMode.Never)
            ? Application.Current.MainWindow
            : null;
    }
}

[Modified 2 years ago]

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

For your question, the Window.Content should be a DockHost for the WPF Windows that host floating windows.


Actipro Software Support

Posted 2 years ago by Yuki
Avatar

Hello,

Thank you for your reply.

For your question, the Window.Content should be a DockHost for the WPF Windows that host floating windows.

It also includes ToolWindow.

If there is any way to narrow down to only floating document window, please teach me.

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

The child of a tool window that was just floated would be a ToolWindowContainer, and the child of a document window that was just floated would be a Workspace.


Actipro Software Support

Posted 2 years ago by Yuki
Avatar

Hello,

Thank you for your reply.

My Question was solved.

The latest build of this product (v24.1.3) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.