How to change TextBlock accordingly with Combobox

I would like to change the value of a textblock (Text property) accordingly with the selected item of a combobox. Below i show you my XAML code to design of the combobox and the textblock elements. I’m trying to use a datatrigger in the combobox but it’s not working… The reason to do this is that i need to know in my code what is the selected item of the combobox but i don’t want to use events on ViewModel. Thanks in advance!

<ComboBox x:Name=“DeviceID”
ItemsSource="{Binding Path=Data.DeviceID, Mode=TwoWay}"
Text=“Device Nr”
SelectedItem="{Binding Path=Data.DeviceID[0], Mode=TwoWay}" <span =“Apple-tab-span” style=“white-space:pre”> SelectionChanged=“DeviceID_SelectionChanged” >
<DataTrigger Binding="{Binding ElementName=DeviceID, <span =“Apple-tab-span” style=“white-space:pre”> Path=SelectedIndex}" Value=“6”>
<Setter TargetName=“DeviceIDSelected” Property=“TextBlock.Text” <span =“Apple-tab-span” style=“white-space:pre”> Value=“OLA”/>


Can’t you data-bind the TextBlock.Text directly to the ComboBox, instead of using a trigger on the ComboBox?

Hi Walter. Is as you say. I must do binding of the SelectedItem property of Combobox. I don’t need to use triggers. ItemsSource property is binded to an ObservableCollection and SelectedItem property to an integer:
<span =“Apple-tab-span” style=“white-space:pre”>

Thanks for your help!