Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I pass multiple parameters to a params array in a WPF MarkupExtension?

Tags:

wpf

I need to create a MarkupExtension for my WPF application that will need to be able to take an arbitrary number of parameters that will be used for token replacement in internationalized strings. Our internationalization code uses a params array to take these parameters. Since I want these to be passable from XAML, is there a way to specify these parameters without explicitly creating an x:Array in XAML?

like image 730
Brent Schooley Avatar asked Oct 15 '22 17:10

Brent Schooley


1 Answers

I think you have to use the x:Array, I don't know any other way (and can't even think of any other way that will be compatible with the markup extension {} syntax).

like image 152
Nir Avatar answered Oct 20 '22 15:10

Nir