You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2024. It is now read-only.
Configure a DrawingView control with an input of a line with a single point (i.e. via binding)
Execute the app
Expected Behavior
The initial Lines and SinglePoints should be drawn when the control is created
Actual Behavior
Nothing is drawn. The canvas remains empty
Basic Information
Version with issue: 2.0.5
Last known good version: N/A
IDE: VS2022 17.3.6
Platform Target Frameworks:
UWP: 19041
Nuget Packages:
Xamarin.CommunityToolkit v2.0.5
Xamarin.Forms v5.0.0.2515
Xamarin.Essentials v1.7.3
Workaround
For the initial lines loading, edit the UWP renderer to force a LoadLines at creation time, if there are lines to draw:
protectedoverridevoidOnElementChanged(ElementChangedEventArgs<Xamarin.CommunityToolkit.UI.Views.DrawingView>e){
...if(Control==null&&Element!=null){
...//FIX1: Force a LoadLines, if there are Lines available at creation timeif(Element.Lines.Count>0){LoadLines();}}
...}
For the Singlepoint drawing, in the method LoadLines of the UWP renderer, when dealing with a single point line, add a second point with the same coordinates as the first: