A voir également:
- C# Binding
- Binding entities to query parameters only allowed for entities that have an identifier. ✓ - Forum PHP
- Problème de binding ✓ - Forum C#
- Binding wow - Forum Jeux vidéo
- Binding port 847 failed - Forum Internet / Réseaux sociaux
- Failed to local inject class with binding id 25744 ✓ - Forum Facebook
1 réponse
Bonjour a tous,
Voila une solution que j'ai trouvé :
Voila tout simplement
Voila une solution que j'ai trouvé :
/// <summary>
/// Lie un Label a
/// </summary>
/// <param name="dataToBind">Donnée à liée avec le Label</param>
/// <param name="propertyName">Nom de la propriété à lier</param>
/// <param name="lb">Nom du textblock</param>
/// <param name="bindingMode">Mode du binding</param>
/// <returns></returns>
public bool bindDataAndLabel(object dataToBind, string propertyName, Label lb, BindingMode bindingMode)
{
Binding myBindDef = new Binding(propertyName);
myBindDef.Mode = bindingMode;
myBindDef.Source = dataToBind;
lb.SetBinding(Label.ContentProperty, myBindDef);
return true;
}
Voila tout simplement