New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visual of a UIElement is not sized? #10
Comments
The preview API ElementCompositionPreview.GetElementVisual() currently returns a Visual with a size of 0,0 by design. Our recommendation is to use transforms instead of size animations where possible since transforms can be independently animated to provide a smooth visual experience. As with XAML Storyboards, the size of XAML elements can’t be animated independently because it’s dependent on XAML layout and potentially app code running on the UI thread. We are looking at options in the future to expand interop between XAML and composition APIs in this area. |
Thanks @sernaj . Just want to clarify, the transforms you mentioned are |
Correct. |
Thanks for the clarification. |
What I've noticed is the following piece of code will always return a
Size
of(0,0)
for anyUIElement
.Output
Is this by design? I wonder what if I want to animate the
Size
of the element using Composition Animations?The text was updated successfully, but these errors were encountered: