How to obtain the ActualWidth of a WPF Popup
Asked Answered
A

1

15

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?

Arst answered 30/7, 2009 at 12:11 Comment(0)
R
27

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

Registration answered 30/7, 2009 at 12:39 Comment(1)
Down-voted because the actual width of the child element is 0.Cleisthenes

© 2022 - 2024 — McMap. All rights reserved.