In code-behind, create a public property and set that instead:
public BindingListProductList { get; private set; }
Then use a binding to that property to set the property of the element:
<DataTemplate>
<this:ComboBox
ItemsSource="{Binding ProductList,
RelativeSource={RelativeSource Mode=FindAncestor,
AncestorType={x:Type this:ucStoreVisit}}}" />
</DataTemplate>
And it'll work!
No comments:
Post a Comment