How to declare a resource from a private inner class in WPF?
converters, inner-classes, private, wpf
Solution
You can't do it if the class is private, you could make it internal instead
Regarding the declaration of an inner class in XAML, you should have a look at this discussion
Problem
I'm trying to declare a resource in a WPF UserControl, and I'd like the resource to be an instance of a private inner class. How do I do this? XAML: ``` <UserControl ...> <UserControl.Resources> <local:MyConverter x:Key="MyConverter" /> </UserControl.Resources> </UserControl> ``` Code Behind: ``` public partial class MyUserControl : UserControl { private class MyConverter : IValueConverter { // convertion code... } } ```