This is a migrated thread and some comments may be shown as answers.

Floating ToolWindows

4 Answers 176 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 22 Jun 2012, 07:13 PM
When you double click on an email in Outlook, it open a floating window for the email, and the floating email contains its own Ribbon bar and also it shows in the windows taskbar.  Could you provide suggestions how can we implement the behavior with RadControls?

We are using RadControl for WPF 2012.2.0607.40 with Prism (MVVM).  The layout of our application is very similar to Outlook, and the main window is RadRibbonWindow, which contains a RadRibbonView, and a RadDocking is within the RadRibbonView. and, of course, RadDocking.DocumentHost host all documents.  We would like each document has its own RibbonView IF THE DOCUMENT IS FLOATING, also we would like all floating ToolWidnows show in Window TaskBar.

Thanks.

4 Answers, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 28 Jun 2012, 07:52 AM
Hello Chris,

In order to achieve this you will have to write lots of custom code - a custom ToolWindow class and a custom DialogFactory for the RadDocking. You can find attached a sample project demonstrating how this can be accomplished.

Regards,
Ivo
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Chris
Top achievements
Rank 1
answered on 28 Jun 2012, 05:42 PM
Exellcent!
Thanks a lot, Ivo.
0
Chris
Top achievements
Rank 1
answered on 28 Jun 2012, 10:56 PM
The solution you provided is great, floating ToolWindows are now showing on the TaskBar, but those floating ToolWindows don't display in Alt+Tab list.  I cannot switch floating ToolWindows by using Alt+Tab.

Any suggestion?

Thanks again.
0
Ivo
Telerik team
answered on 29 Jun 2012, 07:33 AM
Hi Chris,

In order to show the ToolWindows into the Alt+Tab list you will have to write some code that will cause some performance issues and also will make the ToolWindows TopMost. If this is acceptable for your scenario here is the sample code that you will have to add.
public class CustomWindow : ToolWindow
{
    ....
    public CustomWindow()
    {
        this.IsTopmost = true;
        RadWindowInteropHelper.SetAllowTransparency(this, false);
        this.Loaded += new RoutedEventHandler(OnToolWindowLoaded);
    }
 
    private void OnToolWindowLoaded(object sender, System.Windows.RoutedEventArgs e)
    {
        this.window = this.ParentOfType<Window>();
        if (window != null)
        {
            this.window.WindowStyle = WindowStyle.SingleBorderWindow;
            this.window.ShowInTaskbar = true;
            ...
        }
    }  
 
    ...
    protected override System.Windows.Controls.ContentControl GetWindowOwner()
    {
        return null;
    }
}


Kind regards,
Ivo
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Docking
Asked by
Chris
Top achievements
Rank 1
Answers by
Ivo
Telerik team
Chris
Top achievements
Rank 1
Share this question
or