silverlightpopupsizeactualwidthactualheight

getting the size of the combobox's popup at runtime


I am trying to get the width and height of a Silverlight ComboBox's dropdown window. Unfortunately ActualWidth and ActualHeight are returning 0 always.


Solution

  • I found a solution to this by myself: you have to set the popup's "IsOpen" to true before measuring, and then set it back to false. It's the only way I could make it work.