こんにちは、Catel MVVM モデルのビュー モデル間でデータを送信するプロセスに苦労しています。クリックすると新しいウィンドウを開き、新しく開いたウィンドウにデータ (オブジェクト) を送信するボタンがあります。しかし、私はこれを自分で解決することができないので、私を助けてもらえますか?
私の最初のView Modelには次のものがあります。
private readonly IShowStopInfo stopInfo;
//Main constructor of the class
public StopViewModel(IGrtrService grtrService, IShowStopInfo stopInfo)
{
this.stopInfo = stopInfo;
Argument.IsNotNull(() => grtrService);
_grtrService = grtrService;
AllStops = _grtrService.LoadStop();
Stop_Line = _grtrService.LoadLines();
ShowSelectedValue = new Command(OnStopsInfo);
}
public Command ShowSelectedValue { get; private set; }
private void OnStopsInfo()
{
stopInfo.ShowStopInfo();
}
//Getting Selected Stop from the list
public Stop SelectedStop
{
get { return GetValue<Stop>(SelectedStopProperty); }
set { SetValue(SelectedStopProperty, value); }
}
public static readonly PropertyData SelectedStopProperty = RegisterProperty("SelectedStop", typeof(Stop));
私の場合、「SelectedStop」メソッドから結果を送信したいのですが、どうすればよいですか?