Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

SampleApp fix. BitmapFileFormat moved assemblies. - #3785

Merged
michael-hawker merged 3 commits into
masterfrom
sampleAppMediaFix
Mar 11, 2021
Merged

SampleApp fix. BitmapFileFormat moved assemblies.#3785
michael-hawker merged 3 commits into
masterfrom
sampleAppMediaFix

Conversation

@azchohfi

Copy link
Copy Markdown
Contributor

Fixes Sample App

Sample app was failing to load .bind files that used, for example, the AlphaMode enum.

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Using AlphaMode on .bind files doesn't load the sample properly.

What is the new behavior?

Using AlphaMode on .bind files now works.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

@ghost

ghost commented Feb 24, 2021

Copy link
Copy Markdown

Thanks azchohfi for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost
ghost requested review from Kyaa-dost and michael-hawker February 24, 2021 21:21
@azchohfi
azchohfi requested a review from Rosuavio February 24, 2021 21:21
@Rosuavio

Rosuavio commented Feb 24, 2021

Copy link
Copy Markdown
Contributor

Interesting, I am not noticing an issue with the SampleApp. I see that RadialGradientBrush, CameraHelper and CameraPreview are the only samples using that enum and I see no issues with those samples on master.

The existing implementation should allow the function to search threw Microsoft.Toolkit.Uwp.UI.Controls.Media where the type lives already. Even though it uses BitmapFileFormat.Bmp, both BitmapFileFormat and AlphaMode exists in the Microsoft.Toolkit.Uwp.UI.Controls.Media assembly. Personally I would like to look for a way to reference the assembly directly.

@michael-hawker michael-hawker added this to the 7.0 milestone Mar 2, 2021
@michael-hawker

Copy link
Copy Markdown
Member

Talked to @azchohfi about this. This may stem from the fact that we had references to Win2D before everywhere across the packages. So what we probably need is both values one for the Uwp.UI.Controls.Media package and one for the Uwp.UI.Media package?

Comment thread Microsoft.Toolkit.Uwp.SampleApp/Models/Sample.cs Outdated
azchohfi and others added 2 commits March 10, 2021 20:20
Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>

@michael-hawker michael-hawker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this in my local bits for 7.0.0, doesn't hurt, wasn't sure which samples were failing specifically, but no harm in having both.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants