private Rect ItemsPanelRect() { Point locationFromScreen = tabPanel.PointToScreen(new Point(0, 0)); return(new Rect( locationFromScreen.X, locationFromScreen.Y, tabPanel.ActualWidth, tabPanel.ActualHeight)); }