How to remove the header of XPTaskBarBox in an XPTaskBar

18 Nov 20181 minute to read

For this, you need to derive XPTaskBarBox class, and override DetermineHeaderHeight method as follows.

public class CustomTaskBar: XPTaskBarBox

{

    public CustomTaskBar()

        : base()

    {

 

    }

 

    protected override int DetermineHeaderHeight(Graphics g)

    {

        return 0; // set the height as 0 here

    }

 

}
Public Class CustomTaskBar : Inherits XPTaskBarBox

    Public Sub New()

        MyBase.New()

    End Sub

 

    Protected Overrides Function DetermineHeaderHeight(ByVal g As Graphics) As Integer

        Return 0 ' set the height as 0 here

    End Function

End Class