We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've run into exceptions when instantiating an SvgImage as follows:
sampleButton = new SvgImage { IsVisible = false, SvgAssembly = typeof(App).GetTypeInfo().Assembly, HeightRequest = 44, WidthRequest = 44, };
And, at a later point in time:
sampleButton.IsVisible = true; sampleButton.SvgPath = "MyPath.MyImage.svg";
The SvgImage.RenderSvgToCanvas() method is invoked even though the SvgImage is initially invisible. The method fails because LoadedGraphic is null:
public IImageCanvas RenderSvgToCanvas (...) { var originalSvgSize = LoadedGraphic.Size; // Exception because LoadedGraphic = null var finalCanvas = createPlatformImageCanvas (outputSize, finalScale); ... }
A possible solution might be:
public IImageCanvas RenderSvgToCanvas (...) { var finalCanvas = createPlatformImageCanvas(outputSize, finalScale); if (LoadedGraphic == null) { return finalCanvas; } var originalSvgSize = LoadedGraphic.Size; ... }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I've run into exceptions when instantiating an SvgImage as follows:
And, at a later point in time:
The SvgImage.RenderSvgToCanvas() method is invoked even though the SvgImage is initially invisible. The method fails because LoadedGraphic is null:
A possible solution might be:
The text was updated successfully, but these errors were encountered: