I want to get the final size of the popupMenu to appear. It''s hosted in a parentBarItem, but not in a popupControlContainer. I just want to display the popupMenu at the top of a button. To achieve this, I need the total height of the popupMenu. How can I do this?
Thanks in advance
ADAdministrator Syncfusion Team April 27, 2004 04:51 PM
There is no direct API indicating the size of the PopupMenu. I have contacted the development team for their inputs on this issue and will update you with more information as soon as I hear from them. We appreciate your patience and cooperation.
MMMichael MannMay 10, 2004 04:46 AM
any API updates regarding the problem?
ADAdministrator Syncfusion Team May 11, 2004 12:40 PM
Please refer to the PopupsInDepth sample in the directory ...\Syncfusion\Essential Suite\126.96.36.199\Tools\Samples\Editors Package\PopupControlContainer\Advanced\PopupsInDepth. This shows how a PopupMenu can be displayed at a desired position and with a desired alignment. I have modified the sample to show the PopupMenu on top of the source control. Please refer to the code in GetLocationForPopupAlignment method.
public Point GetLocationForPopupAlignment(PopupRelativeAlignment prevAlignment,
out PopupRelativeAlignment newAlignment)
Rectangle bounds = this.Bounds;
// This utility method takes a rectangle and returns the 8 positions around
// it 1 at a time. It will start with the alignment specified in the 3rd argument.
Point pos = PopupUtils.ComputeDefaultPopupAlignment(prevAlignment, out newAlignment,
PopupRelativeAlignment.TopLeft, PopupRelativeAlignment.TopLeft, bounds);
I have attached the modified sample here. Let me know if you need further assistance. We appreciate your continued interest in Syncfusion products.