Size of a templated Control and ArrangeOverride of its Parent

I have 2 templated controls A : Control and B: ItemsControl. Size of A is set in its template ONLY.

B needs to apply a custom layout to its A items, for which I'm overriding its ArrangeOverride.

The problem is, A size is double.NaN for both Width & Height when checked from B ArrangeOverride. (I kind of know why - Arrange for A gets called after the one for B)

Could anyone suggest how do I get A Width & Height during layout of B or what is foundamentally wrong with my approach otherwise?

Thanks

P.S. A.Arrange() doesn't seem to be an elegant way of achieving that, does it?

[641 byte] By [Alan_Brodwick] at [2008-1-6]

Visual Studio Orcas

Site Classified