The problem was that this popup is stretched to fit the entire screen. I've added a few lines of code to set the maximum size of this popup and it works fine. However, for the first click, popup is aligned to the left corner of the screen. I tried to set Location property of DropDownMenu and DropDownMenu.PopupElement, but it didn't help.