Floating ToolWindows

5 posts, 0 answers
  1. Chris
    Chris avatar
    23 posts
    Member since:
    May 2011

    Posted 22 Jun 2012 Link to this post

    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.
  2. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 28 Jun 2012 Link to this post

    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 >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Chris
    Chris avatar
    23 posts
    Member since:
    May 2011

    Posted 28 Jun 2012 Link to this post

    Exellcent!
    Thanks a lot, Ivo.
  5. Chris
    Chris avatar
    23 posts
    Member since:
    May 2011

    Posted 28 Jun 2012 Link to this post

    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.
  6. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 29 Jun 2012 Link to this post

    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 >>

Back to Top
UI for WPF is Visual Studio 2017 Ready