protected override void OnMouseUp(MouseButtonEventArgs e)
        {
            base.OnMouseUp(e);

            WindowManagerCompartmentViewModel viewModel = this.DataContext as WindowManagerCompartmentViewModel;

            if (viewModel != null)
            {
                if (viewModel.Position.Top == 0 && viewModel.Position.Left == 0)
                {
                    viewModel.Position = Position;
                }

                viewModel.OnCompartmentClicked(new WindowManagerCompartmentClickedEventArgs(Position));
            }

            e.Handled = true;
        }
        private static object GetItemContent()
        {
            viewModel   = new WindowManagerCompartmentViewModel();
            compartment = new WindowManagerCompartment();

            viewModel.Visible             = true;
            viewModel.Icon                = KnownMonikers.DockPanel;
            viewModel.CompartmentClicked += ShowContextMenu;
            string shortcutKeys = GetWindowToolsShortcut();

            viewModel.ToolTip = @"Tool Windows" + shortcutKeys;

            compartment.Width = 20;
            compartment.HorizontalAlignment = HorizontalAlignment.Stretch;
            compartment.VerticalAlignment   = VerticalAlignment.Stretch;
            compartment.DataContext         = viewModel;

            return(compartment);
        }