RibbonWindow hides taskbar on Windows XP

Aug 28, 2009 at 8:03 PM

On a Windows XP machine, when I maximize the RibbonWindow, it covers the Windows taskbar.  This does not occur on Vista or Win7.

Aug 28, 2009 at 9:13 PM

Hi burton,

This is a known issue and will be addressed in V1 of the Ribbon.  To my knowledge, I don't believe that there's a simple workaround that you can implement in the CTP.


Aug 28, 2009 at 9:18 PM
Edited Aug 28, 2009 at 9:18 PM

Thanks!  Just wanted to make sure somebody was aware of it.


Dec 4, 2009 at 8:15 PM

I was waiting patiently for a new CTP, but since that hasn't come yet, I have derived this workaround.  This requires references to System.Windows.Forms and System.Drawing.  Window1 is a RibbonWindow.

Imports System.Windows.Forms

Class Window1
    Private Sub Window1_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged
    End Sub

    Private Sub Window1_StateChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.StateChanged
    End Sub

    Private Sub WindowsXPMaximizeBug()
        ' In Ribbon CTP1, on Windows XP, maximizing the window covers the Windows Task Bar.
        ' If we're on XP, get the client area, convert it to WPF units and set the MaxHeight of the Window.
        If Environment.OSVersion.Version.Major < 6 Then
            Dim source = PresentationSource.FromVisual(Me)
            If source IsNot Nothing Then
                Dim todevice = source.CompositionTarget.TransformToDevice
                Dim workingarea = Screen.GetWorkingArea( _
                    New System.Drawing.Point(Me.Left * todevice.M11, Me.Top * todevice.M22))
                Dim heightdips = workingarea.Height * source.CompositionTarget.TransformFromDevice.M22
                Me.MaxHeight = heightdips + (SystemParameters.ResizeFrameVerticalBorderWidth * 2)
            End If
        End If
    End Sub
End Class

May 26, 2010 at 4:29 AM

Hi There, 

Great workaround, it works well when the user minimises the window then maximises but when they maximise the window straight off it still covers the taskbar. To avoid this I need to call Me.Hide, Me.Show to refresh the window with the new values. 

Thanks again Burton.