update XAML namespace references and converters. #661
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request primarily refactors how value converters are referenced and registered in XAML files, moving from CLR/using namespaces to URI-based XML namespaces and consolidating converter registration. It also removes unused or redundant converter implementations in favor of shared or updated ones, and updates the package reference for
Irihi.Avalonia.Shared. These changes improve maintainability, consistency, and integration with shared resources.Converter Refactoring and Namespace Updates:
All XAML files now use the
https://irihi.tech/semiXML namespace (aliased assemi) for referencing converters, replacing previousclr-namespaceorusingreferences. This includes updating all converter usages inCarousel.axaml,ProgressBar.axaml, andSemiPopupAnimations.axaml. [1] [2] [3] [4] [5] [6] [7] [8]The assembly info now adds a new XML namespace definition for
Semi.Avalonia.Convertersunderhttps://irihi.tech/semi, making all converters in that namespace accessible via the URI.Converter Implementation Updates:
The custom
KeyToPathConverterandTreeViewItemIndentConverterimplementations have been removed from the codebase, and their usages in XAML replaced with shared or alternative converters (e.g.,ResourceConverter). [1] [2] [3] [4]PlacementToRenderTransformOriginConverterandPositionToAngleConverterhave been refactored to inherit fromMarkupValueConverter(fromIrihi.Avalonia.Shared.Converters) and simplified using C# switch expressions. [1] [2]Dependency and Project File Updates:
Irihi.Avalonia.Sharedversion0.3.1(up from0.3.0), and removes the now-unusedKeyToPathConverter.csfrom compilation.Avalonia XAML Resource Updates:
ManagedFileChooser.axamlnow use theirinamespace andResourceConverterfor icon resources, aligning with the new converter and namespace conventions. [1] [2]These changes collectively modernize and standardize how converters are used and referenced throughout the project, leveraging shared resources and simplifying maintenance.