I am working on a Custom MarkupExtension within a WPF application. Every documented example I have seen uses string parameters from XAML to construct the new object. Is it possible to use a non-string parameter?
In other words, how can I do something like this?
[MarkupExtensionReturnType(typeof(Uri))]
public class RefPackUriExtension : MarkupExtension
{
object _assembly = null;
public RefPackUriExtension() { }
public RefPackUriExtension(object assembly)
{
this._assembly = assembly;
}
public override object ProvideValue(IServiceProvider serviceProvider)
{
//return an object by using the "_assembly" member somehow
}
}