Converters publicly accessable #3723
Replies: 3 comments
-
@JorisCleVR We have been favoring your proposal in the recent PRs, but have not gone through and updated everywhere. So I think creating a PR with such updates would be much appreciated. Caution: It can potentially be a "breaking change" if a consumer is currently relying on the general availability of the converter. There are of course simple ways to resolve that, but I think @Keboo should decide whether to bring it in without bumping major version or not. |
Beta Was this translation helpful? Give feedback.
-
Sounds good, then I will try to find some time to create a PR. |
Beta Was this translation helpful? Give feedback.
-
Yes please send a PR. Converters done like that is likely just a mistake (one I am guilty of making). I think in this case even though it technically is a breaking change, I think just leaving something public where people can re-define a resource with the same key if needed is perfectly reasonable. We will just document it in the release notes. |
Beta Was this translation helpful? Give feedback.
-
In the current implementation of the styles (e.g. MaterialDesignTheme.PopupBox.xaml) the converters are declared directly above the used style. This has as a disadvantage that this style is available throughout the whole application. In my case this means that there are converters available like BooleanToVisibilityConverter and NullVisibilityConverter.
These work differently than the converters I created years back and now cause confusion within my theme on which to use.
My proposal would be that we define these converters using Style.Resources as is done for the MaterialDesignPopupBox, where the FirstNonNullConverter is defined in this way.
Before I am creating a PR for this (which is kind of a lot of work) I want to know if there are objections to moving them to Style.Resources.
Beta Was this translation helpful? Give feedback.
All reactions