Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImprove BitmapImage.SetSource() #2698
Conversation
|
I don't know what's wrong with the checks ("Pull Request Labeler" failed). Did I name the PR wrong? |
|
Thanks for your submission! You'll need to add a UI Test to validate the behavior. You can add a control here: |
|
Thank you for your contribution! You'll need to add a UI test control here: https://github.com/unoplatform/uno/tree/master/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ImageTests In the constructor or a loaded event, your can add reference an image and call Once there, you can add a UI Tests here: That will validate that the size of the image is the appropriate one. Note that the UI Test will need to be disabled for Wasm ( You can get more information on how to create uitests here.
|
|
|
||
| Stream = streamSource; | ||
|
|
||
| if (streamSource != null) |
carldebilly
Apr 16, 2020
Member
Code convention here: when you have a else block, please try to avoid a not equal != had write the equal == first.


GitHub Issue (If applicable): #2377
PR Type
What kind of change does this PR introduce?
What is the current behavior?
BitmapImage.SetSource Needs Access to the provided stream, Which makes it difficult to handle. It should be in line with SetSourceAsync.
What is the new behavior?
BitmapImage.SetSource makes a local copy of the provided stream and therefore manges it in ist own.
PR Checklist
Please check if your PR fulfills the following requirements:
Other information
Internal Issue (If applicable):