Tabs customization question

Docking/MDI for WPF Forum

Posted 10 years ago by Dariusz Wąsacz
Version: 13.1.0583
Avatar

I looked at your docking demo: "Buttons on selected tabs" and tried to implement similar behavior in my program. The feature I don't like is the look of floating windows in this example:

  1. When there's only a single tab in a floating window, I see empty window title and the tab below. I have two closing buttons, the maximize button on the title bar, and options button on the tab.
  2. Where there are more tabs in a single floating window, the situation is slightly better, however again I have empty title bar.

The desired behavior in my case is:

  1. For a single tab in a floating window I'd like to have similar look as in regular, not modified docking (i.e. as in "Features (in-line)" demo
  2. For more tabs in a floating window I'd like to get rid of empty title bar. I managed to achieve such situation changing "raftingWindow.TitleBarVisibility = RaftingWindowTitleBarVisibility.Visible;" to "raftingWindow.TitleBarVisibility = RaftingWindowTitleBarVisibility.Hidden;" in MyDockSite.cs, however in this case I couldn't move the floating window anymore. I wish I could move the window by dragging the empty space on the right of tabs.

Can I achieve the above using available settings? I tried to do it myself, but I failed :-(

Comments (5)

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

Hi Dariusz,

How about if you used these settings:

<sample:MyDockSite x:Name="dockSite" AutoHidePerContainer="False" ToolWindowsSingleTabLayoutBehavior="Show">

And removed this line from MyDockSite.cs:

raftingWindow.TitleBarVisibility = RaftingWindowTitleBarVisibility.Visible;

That setup gets things looking pretty good in general. 


Actipro Software Support

Posted 10 years ago by Dariusz Wąsacz
Avatar

One of the most important features I wanted to achieve is the placement of tabs - I wanted to have them on top (in such case I save vertical space and its very important in my case). So the proposed settings don't solve my problem :-(

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

Hi Dariusz,

I think the closest thing to what you want would be to leave the sample as-is but change the MyDockSite code-behind to do RaftingWindowTitleBarVisibility.Auto instead (or just take out that line since Auto is the default).

The only negative of this is that if two or more tabs are in the same container, you can't drag the container.  Grabbing a tab will only drag the tab.  But it handles all other scenarios well.


Actipro Software Support

Posted 10 years ago by Dariusz Wąsacz
Avatar

That's true - it's the closest solutions to my needs.

Maybe I could write some event handlers myself to allow for dragging the container? Could you provide me with some tips how to start?

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

Hi Dariusz,

We don't really expose any special events that would help in this scenario so you might need to use the base ones like PreviousMouseDown, etc. 

The "Docking Window Capabilities" topic in the documentation talks about some programmatic dragging features you can take advantage of, once you find a good event handler scenario to use.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.