Patrick Klug
Patrick Klug

Reputation: 14391

When writing a UserControl, when and where can I access the ActualWidth property

What is the correct place to execute code that requires the ActualWidth property.

Upvotes: 0

Views: 184

Answers (1)

Andreas
Andreas

Reputation: 3999

Short answer assuming your question relates to the control's lifecycle:

When it is rendered.

As you may have noticed, the Actual(Width|Height) properties are set to zero when accessing them before the control is loaded.

Upvotes: 1

Related Questions