この方法で MainWindow クラスからプロパティを取得するために使用するコンバーターがあります。
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
MainWindow mainWindow = (MainWindow)Application.Current.MainWindow;
ObservableCollection<string[]> selectedItems = mainWindow.SelectedLayerItems; // A collection of layer items
しかし今、私の MainWindow は別のプロジェクトとマージされ、'MapView' と呼ばれる mvvm オブジェクトに再編成され、さまざまな用途のために構築することができます。私の質問は、コンバーターから MapView オブジェクトにアクセスして MapView.SelectedLayerItems を取得するにはどうすればよいですか?