开发者

Is UIElement.RenderTransform used by TransformToAncestor?

开发者 https://www.devze.com 2023-02-16 15:06 出处:网络
When a TransformToAncestor is called what Matrices are used to build up the resultant GeneralTransform?When step into the pdb all I see is a TransformField with a signature like:

When a TransformToAncestor is called what Matrices are used to build up the resultant GeneralTransform? When step into the pdb all I see is a TransformField with a signature like:

pr开发者_如何学编程ivate static readonly UncommonField<Transform> TransformField = new UncommonField<Transform>();

being used in the resultant GeneralTransform


Nothing beats Reflector. Especially while it's still free ;)

The code is hairy enough but can be followed. Basically it walks up the visual tree and groups the transforms but the entire thing is much more complicated and I never really had an interest to dig that deep into it. Look into Visual.TrySimpleTransformToAncestor for the gory details.

To answer the question, UIElement is never used explicitly of course; the transform is retrieved through an Effect (the UncommonField you mentioned), so I'm guessing that transforms in general are applied as effects, hence you can get them through this shortcut from anywhere, but that's just infrastructure and implementation details and I'm most likely wrong :)

0

精彩评论

暂无评论...
验证码 换一张
取 消