|
Ok, here's the resource declaration of the ObjectDataProviders (ODPs) in question (may look familair to some of you)
<ObjectDataProvider x:Key="PreOpen" ObjectType="{x:Type src:SingleValueBinder}" /> <ObjectDataProvider ObjectInstance="{StaticResource PreOpen}" MethodName="set_SettingName" x:Key="PreOpenInstance"> <ObjectDataProvider.MethodParameters> <sys:String>PreOpen</sys:String> </ObjectDataProvider.MethodParameters> </ObjectDataProvider>
Here is the XAML that binds to the control
<CheckBox Margin="10,10,10,10" Content="Pre-Open"> <CheckBox.IsChecked> <Binding Path="Value" Source="{StaticResource PreOpenInstance}" > </CheckBox.IsChecked> </CheckBox>
When I execute my app., the Method executes on PreOpenInstance as expected. However, I don't see any source data because the control is bound to the second ODP, whereas the data source resides in the object associated with the first ODP.
I get the BindingExpression from the control (element) and call UpdateTarget, but there is nothing reflected in the UI, presumably because it pointing at the second ODP.
How do I Iink the BindingExpression to the correct source object (ODP 1)
Thanks
Recovering MSFT-SDE |