Trying to determine if it is possible to bind the SelectedValue of a ComboBox to the inputs of multiple ObjectDataProviders with XAMAL Bindings.
I looked at MultiBinding but that appears to be grouping multiple controls together, not exactly what I'm looking to day.
I'd like to be able to have the ComboBox (locations) change the TextBlock (deviance) which it does AND to call the ObjectDataProvider (CommentProvider) to update the TextBox (locationComments).
This is fairly straightforward in a code-behind but would prefer to not go this route as a learning experience.
XAMAL CODE
<Window.Resources>
<ObjectDataProvider x:Key="LocationProvider"
ObjectType="{x:Type srv:ServiceClient}"
IsAsynchronous="True"MethodName="GetAssignedLocations" />
<ObjectDataProvider
x:Key="DevianceProvider"
ObjectType="{x:Type srv:ServiceClient}"
IsAsynchronous="True" MethodName="GetPercentChange">
<ObjectDataProvider.MethodParameters>
<system:String>Location1</system:String>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ObjectDataProvider
x:Key="CommentProvider"
ObjectType="{x:Type srv:ServiceClient}"
IsAsynchronous="True"
MethodName="GetCommentByBusinessUnit">
<ObjectDataProvider.MethodParameters>
<system:String>Location1</system:String>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
</Window.Resources>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="12,12,0,0" Name="locations" VerticalAlignment="Top" ItemsSource="{Binding Source={StaticResource LocationProvider}}"
DisplayMemberPath="BuName" SelectedValuePath="BuKey"
SelectionChanged="locations_SelectionChanged">
<ComboBox.SelectedValue>
<Binding Source="{StaticResource DevianceProvider}"
Path="MethodParameters[0]"
BindsDirectlyToSource="True"
Mode="OneWayToSource" />
</ComboBox.SelectedValue>
<TextBlock Name="deviance" Height="23" Margin="0,0,645,17" Width="40" Text="{Binding Source={StaticResource DevianceProvider}}" IsEnabled="False" />
<TextBox Height="23" Margin="0,0,181,17" Name="locationComments" Width="350" />