Skip to content

Port Converters #2

Open
Open

Description

@michael-hawker

TODO

### Base Porting Checklist
- [x] Update namespace (to `CommunityToolkit.WinUI.Converters`)
- [ ] Merge differences from UWP main to WinAppSDK, Uno Platform fork
- [x] Import original doc or setup new doc
- [ ] Needs a refresh/update, and probably split
- [ ] https://github.com/CommunityToolkit/Windows/issues/133
- [ ] Brought over existing unit tests from main repo (**did not** compare or merge with WinUI branch **nor** update to use our helpers)
- [x] All brought over tests pass for UWP/WinAppSDK
- [ ] https://github.com/CommunityToolkit/Windows/issues/132
- [ ] Support for WASM via Uno Platform (Had trouble testing due to https://github.com/CommunityToolkit/Tooling-Windows-Submodule/issues/24)
- [ ] ResourceNameToResourceStringConverter definitely needs to be compared
- [x] `StringFormatConverter` from first sample worked fine!
## Converters
- [x] BoolNegationConverter
- [x] BoolToObjectConverter
- [x] BoolToVisibilityConverter
- [x] CollectionVisibilityConverter
- [x] ColorToDisplayNameConverter
- [x] DoubleToObjectConverter
- [x] DoubleToVisibilityConverter
- [x] EmptyCollectionToObjectConverter
- [x] EmptyObjectToObjectConverter
- [x] EmptyStringToObjectConverter
- [x] FileSizeToFriendlyStringConverter
- [x] FormatStringConverter
- [x] ResourceNameTOResourceStringConverter
- [x] StringFormatConverter
- [x] StringVisibilityConverter
- [x] TaskResultConverter
- [x] TypeToObjectConverter
- [x] VisibilityToBoolConverter

Notable Changes

  • Changed FormatStringConverter to IFormattableToStringConverter to differentiate from StringFormatConverter (too confusing to have such a similar name)
## Prerequisites
- [ ] https://github.com/microsoft/microsoft-ui-xaml/issues/8287
## Future Improvements
- [ ] P2: Central x:Bind helper class that leverages shared logic of converters?

Activity

  1. michael-hawker commented on Mar 16, 2023

    @michael-hawker
    MemberAuthor

    @niels9001 @Arlodotexe initial idea for a template for tracking ports of components, needs some work, but wanted to lay out what I've been doing with the initial test in #1

  2. Arlodotexe commented on May 30, 2025

    @Arlodotexe
    Member

    We seem to be missing ToolbarFormatActiveConverter

  3. added
    components::convertersCommonly used converters that allow the data to be modified as it passes through the binding engine.
    enhancementNew feature or request
    on Aug 7, 2025
  4. moved this to ✅ Done in Toolkit 8.xon Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority-1components::convertersCommonly used converters that allow the data to be modified as it passes through the binding engine.enhancementNew feature or request

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions