-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Invalidate() does not invoke Draw() when GraphicsView is inside a Grid. #12560
Comments
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Debugging the code seems to be an issue related with a layout sizing issue. The Invalidate method use internally-calculated area based on the View height and width. The height is zero and for that reason the invalidated area is wrong. Works using the deprecated method invalidate(Rect) with a specific height (for example, 1000). Added the Layout label to the issue. |
Hi @jsuarezruiz thanks for that information. With those details have been able to construct a work around, which is to specify a HeightRequest and WidthRequest on the Graphics View. |
Your work around doesn't seem to work for me. Did you specify your WidthRequest and HeightRequest in XAML or where did you apply it? |
Hi @Greg-Bates-Trimble. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Verified this issue with Visual Studio Enterprise 17.7.0 Preview 3.0(net8). Not repro on Android platform with sample project. GraphicsView_Not_Redrawing/tree/main |
Description
Cannot redraw a graphics view when the view is inside either a grid or stacklayout. E.g. calling Invalidate will not go and call Draw().
Steps to Reproduce
Link to public reproduction project repository
https://github.com/Greg-Bates-Trimble/GraphicsView_Not_Redrawing/tree/main
Version with bug
6.0.312
Last version that worked well
6.0.312
Affected platforms
Android
Affected platform versions
Android 12 and up
Did you find any workaround?
Have not found a workaround as this is required for a page with lots of elements.
Have not tried on iOS
Relevant log output
No response
The text was updated successfully, but these errors were encountered: