Binding for Converter Parameter


I have come across the situation where I need to do some Binding for ConverterParameter. Something like

I have done lots of research, and I found out that its impossible to do binding for ConverterParameter.
So I came up with the Solution. I created the Converter but inherited from FrameworkElement

public class ShowDeleteServiceConverter : FrameworkElement, IValueConverter

In the converter class, I created a dependency property

Now, I can do the Binding as usual

And

It might not be the best solution, but it works for me so far. If you have any idea, feel free to drop me comments.

Cheers,

Advertisements

2 thoughts on “Binding for Converter Parameter

  1. hey,

    i might be looking exactly for this, but the code is impossible to read in these scaled GIFs šŸ˜¦

    could you please update them to legible ones, or even better paste it in as text or still better use some code snippet plugin to format?

    thanks a lot!

  2. Hi Brandon,

    Great solution, pretty original :).
    Can you post the code? I can’t see the images so the code would help to see how have you implemented this solution.

    Thanks!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s