Skip to content

fix(converter): add Boolean2StrConverter alias class and resource key (closes #243) - #250

Closed
omid-io wants to merge 1 commit into
ghost1372:masterfrom
omid-io:fix/boolean2str-converter-alias
Closed

omid-io wants to merge 1 commit into
ghost1372:masterfrom
omid-io:fix/boolean2str-converter-alias

Conversation

@omid-io

@omid-io omid-io commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #243 where referencing Boolean2StrConverter (as documented in the documentation) fails because only Boolean2StringConverter was defined as the class name and resource key.

Root Cause

The file is named Boolean2StrConverter.cs, and the official documentation specifies Boolean2StrConverter with [str0];[str1] parameter formatting, but the class declared in Boolean2StrConverter.cs is Boolean2StringConverter. Consequently, developers following the documentation who reference Boolean2StrConverter in XAML receive a missing resource / type error.

Solution

  1. Added a backward-compatible alias class Boolean2StrConverter inheriting from Boolean2StringConverter in src/Shared/HandyControl_Shared/Tools/Converter/Boolean2StrConverter.cs:
    public class Boolean2StrConverter : Boolean2StringConverter
    {
    }
  2. Added the corresponding resource entries:
    • <converter:Boolean2StrConverter x:Key="Boolean2StrConverter"/> in Converters.xaml and Theme.xaml (Shared and Net_40).
    • Added token Boolean2StrConverter in ResourceToken.cs.

Verification

  • Built src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj with target framework net8.0-windows (0 errors, 0 warnings).
  • Built src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj with target framework net8.0-windows (0 errors, 0 warnings).

@ghost1372

Copy link
Copy Markdown
Owner

Thank you, but no need for duplication, it is a typo issue in docs, i will fix it in docs.

@ghost1372 ghost1372 closed this Sep 6, 2026
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.

2 participants