Nikos Tsokos
Nikos Tsokos

Reputation: 3356

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?

Upvotes: 15

Views: 2075

Answers (1)

Drew Noakes
Drew Noakes

Reputation: 310997

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

Upvotes: 28

Related Questions