Put your ViewModel in your .Resources and bind to it?
<UserControl .... xmlns:local="Project"> <UserControl.Resources> <local:ProjectInfo x:key="ProjectInfo"/> </UserControl.Resources> <UserControl.DataContext> <XmlObjectDataProvider ... /> </UserControl.DataContext> <ComboBox ItemsSource="{Binding}" SelectedValuePath="Country" SelectedValue="{Binding CompanyCountry,Source={StaticResource ProjectInfo}}"/>
NTN. Basically, you have two data sources: one in the datacontext, and the other in your resources.
EDIT: you can switch two if necessary, it doesn't really matter. Your resources can have as many data sources as you like.
source share