I have a simple user control which wraps some logic around an AutoCompleteBox. This question could apply to any ItemsControl control like a dropdown or listbox though.
<UserControl>
<Grid Background="White">
<sdk:AutoCompleteBox Name="myACB" ItemsSource="{Binding myData}" />
</Grid>
</UserControl>
I want expose the SelectedItem
property of the AutoCompleteBox in a parent where the control is used. My user control is using a view model as its data context though. Otherwise, I think I could just bind the SelectedItem to a dependency property of the user control.
I need to be able to have the parent detect when the child autocompletebox selected item changes. How can I go about this?