<telerik:RadComboBox ItemsSource="{Binding Path=Sectors}" SelectedIndex="{Binding Path=SelectedPath,Mode=TwoWay}" SelectedValue="{Binding Path=SelectedSector,Mode=TwoWay}" IsEnabled="{Binding Path=IsPathEnabled}" Width="120" Height="25" VerticalAlignment="Center" Margin="5,0,2,0" x:Name="cbxPaths"> <i:Interaction.Triggers> <i:EventTrigger EventName="DropDownOpened"> <commands:EventToCommand Command="{Binding Path=DropDownOpenedCommand}" ></commands:EventToCommand> </i:EventTrigger> </i:Interaction.Triggers> </telerik:RadComboBox> How to get selecetedindex value from combobox private int selectedPath = -1; public int SelectedPath { get { return selectedPath; } set { selectedPath = value; RaisePropertyChanged("SelectedPath"); } } if(selectedpath == cbxPaths.SelectedIndex) { //some code Here } If i run the program i got null exception value(cbxPaths.SelectedIndex). Object reference not set to an instance of an object. Any Idea?
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)