Bonjour,
J'ai un treeview bindé à une hiérarchie d'objets. J'aimerai barrer le texte d'un nœud un fonction de la valeur d'une propriété booléenne de l'objet auquel le noeud est lié. Dans la balise TextBox de mon HierrarchicalDataTemplate, je pensais binder la propriété TextDecorations à ma propriété booléenne (par l'intermédiaire d'un IValueConverter), mais j'obtiens l'erreur suivante :
Cannot add instance of type 'BindingExpression' to a collection of type 'TextDecorationCollection'. Only items of type 'TextDecoration' are allowed.
Savez vous pourquoi ? Sinon Auriez-vous une meilleure solution à mon problème ?
Merci d'avance pour vos suggestions.
mathmax
Partager