I'm trying to use databinding for the Label property of Field and UnboundFields (for localization purposes), but cannot seem to get it to work.
<igDP:UnboundField ... Label="{Binding Foo,Mode=OneWay,diagnostics:PresentationTraceSources.TraceLevel=High}" >
System.Windows.Data Warning: 52 : Created BindingExpression (hash=21491730) for Binding (hash=41525666)System.Windows.Data Warning: 54 : Path: 'Foo'System.Windows.Data Warning: 57 : BindingExpression (hash=21491730): Default update trigger resolved to PropertyChangedSystem.Windows.Data Warning: 58 : BindingExpression (hash=21491730): Attach to Infragistics.Windows.DataPresenter.UnboundField.Label (hash=46461814)System.Windows.Data Warning: 60 : BindingExpression (hash=21491730): Use Framework mentor <null>System.Windows.Data Warning: 63 : BindingExpression (hash=21491730): Resolving source System.Windows.Data Warning: 65 : BindingExpression (hash=21491730): Framework mentor not foundSystem.Windows.Data Warning: 61 : BindingExpression (hash=21491730): Resolve source deferredSystem.Windows.Data Warning: 63 : BindingExpression (hash=21491730): Resolving source System.Windows.Data Warning: 65 : BindingExpression (hash=21491730): Framework mentor not foundSystem.Windows.Data Warning: 63 : BindingExpression (hash=21491730): Resolving source System.Windows.Data Warning: 65 : BindingExpression (hash=21491730): Framework mentor not foundSystem.Windows.Data Warning: 63 : BindingExpression (hash=21491730): Resolving source (last chance)System.Windows.Data Warning: 65 : BindingExpression (hash=21491730): Framework mentor not foundSystem.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Foo; DataItem=null; target element is 'UnboundField' (HashCode=46461814); target property is 'Label' (type 'Object')
Ultimately I'd like to get it to work using a markup extension, but a normal binding would be good enough.
Hello,
Can you please provide more information about what you are trying to bind to.
The exception shows that the DataItem is null and the target is not found either.
Thanks,
Alex.
In my page where my grid is located the DataContext is set to my viewmodel instance.