Hi, I'm trying to tackle localization of a WPF project using Custom
MarkupExtensions. For resource strings that contain format specifiers({0}
{1} etc...), I would like to implement these arguments as properties on the
Custom MarkupExtension so they are accessible via Xaml as well. For
example:
If I had the resource string: "Design {0}", then
MyMarkupExtension.FirstArgument would be a property that sets {0}.
I thought it would be really neat to be able to data bind
MyMarkupExtension.FirstArgument, but ran into a slag because the
MarkupExtension class does not inherit from DependencyObject, so I cannot
implement the arguments as Dependency Properties. Has anyone ran into this
before? To generalize the question, is it possible to use a CLR property as
the data binding target at all? This doesn't seem to be the case based on
what I have read, but does anyone know of a good workaround for what I am
trying to accomplish?
Thanks
|