Skip to content
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

Exception method not found in Composition #57

Open
mixturify opened this issue Feb 24, 2019 · 2 comments
Open

Exception method not found in Composition #57

mixturify opened this issue Feb 24, 2019 · 2 comments

Comments

@mixturify
Copy link

mixturify commented Feb 24, 2019

Hi,

I wanted to use the method WriteableBitmapRenderExtensions.Render(xxx), but trown an method not found exception:

Method not found: 'Windows.Foundation.Rect WinRTXamlToolkit.Controls.Extensions.VisualTreeHelperExtensions.GetBoundingRect(Windows.UI.Xaml.FrameworkElement, Windows.UI.Xaml.FrameworkElement)'

It's for an UWP app.

I don't know if this library still maintained but would be cool to fix that issue. Until them, I have to render inside xaml visual tree with some trick :)

Thanks !

@xyzzer
Copy link
Owner

xyzzer commented Feb 24, 2019 via email

@mixturify
Copy link
Author

With RenderTargetBitmap I can do a bitmap rendering of an XAML component (visible in the tree) but if I want to do the same by code (so in off screen), it doesn't work despite using the methods .Measure() .Arrange() and especially .UpdateLayout(). Throw, the annoying exception "Value does not fall within the expected range." from RenderAsync().

So I looked for an alternative that could allow me to capture XAML components created via the code and I came across the WriteableBitmapRenderExtensions.

It's not a big issue (I use the trick of hiding the xaml from the visible UI) but that could have had more flexibility to instance xaml elements when needed.

Anyway, thank you for your quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants