Intercepts for value converters in Silverlight

Some UserControls use transducers that typically look like this:

<UserControl.Resources>
    <Converters:CurrentDataConverter x:Key="CurrentDataConverter"/>
</UserControl.Resources>

I would like to have a basic user control for intercepting transformers, for example, using dependency injection. It would be possible? Thank.

+3
source share
1 answer

Converters (or any resource) can be declared at any level of the Xaml hierarchy, so the best place to implement them is the global collection of application resources (which is used to search for keys last).

/, Xaml. , IOC .

+1

Source: https://habr.com/ru/post/1767315/


All Articles