views:

17

answers:

2

I have an existing XAML file with some data templates in it. One of these datatemplate can be used in different situations. Therefore, I want to bind 1 of the properties only if a certain condition is true.

What is the best way to achieve this?

+1  A: 

See this answer : http://stackoverflow.com/questions/1256429/condition-binding-attribute-not-working/1257963#1257963

Preet Sangha
Thank you for your answer. Unfortunately, Triggers is not an option for me, since the code should be able to run on Silverlight as well. And Silverlight doesn't support Triggers...
Peter van Kekem
A: 

I worked around the issue by creating another datatemplate that overrides the original. Thanks for your help.

Peter van Kekem