Skip to content

Fix ResourceNameToResourceString converter#181

Open
ajpinedam wants to merge 1 commit intounofrom
ajpm/fix.resource.converter
Open

Fix ResourceNameToResourceString converter#181
ajpinedam wants to merge 1 commit intounofrom
ajpm/fix.resource.converter

Conversation

@ajpinedam
Copy link
Copy Markdown

Fixes #180

Using the ResourceNameToResourceString with key bound returns empty string.

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Using the ResourceNameToResourceString with key bound returns empty string.

What is the new behavior?

Key in Resource file is returned when it does exist.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • New component
    • Pull Request has been submitted to the documentation repository instructions. Link:
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
    • If control, added to Visual Studio Design project
  • 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

Other information

/// </summary>
public sealed class ResourceNameToResourceStringConverter : IValueConverter
{
private readonly ResourceLoader _resourceLoader = new ResourceLoader();
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.

Looks like we should be fixing uno instead (there's an issue opened IIRC). If I recall properly, ResourceLoader.GetForViewIndependentUse(); is not available under WinAppSDK.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It seems it's available now. I checked the base repository implementation, and this is how they fixed it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ResourceNameToResourceString converter does not find the resource altough it exists.

2 participants