Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to obtain the ActualWidth of a WPF Popup

I am trying to place a Popup element in a specific position, relative to the Placement control.

In order to achieve that I need to find out the ActualWidth of the popup control. But trying to get this value before or after displaying the popup (IsOpen = True) it always returns 0.

Unfortunately I cannot hard code the size of the popup.

How can I determine the ActualWidth?

like image 907
Nikos Tsokos Avatar asked Jul 30 '09 12:07

Nikos Tsokos


1 Answers

Have you tried getting the ActualWidth of the popup's child element?

like image 52
Drew Noakes Avatar answered Sep 22 '22 01:09

Drew Noakes