How to position a menu

Kinda like the Windows taskbar, I want the equivalent of the “Start” menu to appear above the bar. The menu can have a variable number of items in it so I can’t know the size beforehand. I placed the menu anchor just above the “taskbar”, but it places the menu with respect to the top of the control, not the bottom (which I want to be just above the “taskbar”) and so leaves a gap between the bottom of the menu and the top of the bar. This means I have to dynamically position my popup to basically move the menu down. How?