HI,
without knowing your code it's impossible to solve your problem. Try following demo. Select line in upper ComboBox change the displaying Text in Label and update the lower ComboBox.
XAML
<Window x:Class="Window90"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1"
mc:Ignorable="d"
Title="Window90" Height="450" Width="800">
<Window.DataContext>
<local:Window90VM/>
</Window.DataContext>
<StackPanel>
<ComboBox Margin="4 0 2 0"
ItemsSource="{Binding YAxes}"
SelectedItem="{Binding SelectedYAxis, Mode=TwoWay}"
DisplayMemberPath="AxisTitle"
SelectedValuePath="AxisTitle"/>
<Label Content="{Binding SelectedYAxis.AxisTitle}" Height="100"/>
<ComboBox Margin="4 0 2 0"
ItemsSource="{Binding YAxes}"
SelectedItem="{Binding SelectedYAxis, Mode=TwoWay}"
DisplayMemberPath="AxisTitle"
SelectedValuePath="AxisTitle"/>
</StackPanel>
</Window>
And ViewModel and data class:
Imports System.Collections.ObjectModel
Imports System.ComponentModel
Imports System.Runtime.CompilerServices
Public Class Window90VM
Implements INotifyPropertyChanged
Public Sub New()
For i = 1 To 10
col.Add(New Data With {.AxisTitle = $"Titel {[i]}"})
Next
cvs.Source = col
End Sub
Private cvs As New CollectionViewSource
Private col As New ObservableCollection(Of Data)
Public ReadOnly Property YAxes As ICollectionView
Get
Return cvs.View
End Get
End Property
Private _selectedYAxis As Data
Public Property SelectedYAxis As Data
Get
Return Me._selectedYAxis
End Get
Set(value As Data)
Me._selectedYAxis = value
OnPropertyChanged()
End Set
End Property
#Region " PropertyChanged"
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
Friend Sub OnPropertyChanged(<CallerMemberName> Optional propName As String = "")
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
End Sub
#End Region
Public Class Data
Public Property AxisTitle As String
End Class
End Class