2017-05-23 9 views
0

このExtendedPickerを変更して、ユーザーが選択データを変更したときにViewModelでMyCode()を呼び出す方法はありますか?XAML ExtendedPicker - ViewModelでコードを呼び出す

<controls:ExtendedPicker 
     Style="{StaticResource FormEntry}" 
     x:Name="carTypePicker" 
     Picker.Title="{i18n:Translate SelectCar}" 
     ItemsSource="{Binding carTypes}" 
     DisplayProperty="Name" SelectedItem="{Binding SelectedCarType, Mode=TwoWay}"> 
</controls:ExtendedPicker> 

答えて

1

は、あなただけのSelectedCarTypeプロパティのセッターからMyCode()を呼び出すことはできません?:

private YourType _selectedCarType; 
public YourType SelectedCarType 
{ 
    get { return _canFilterByOrderId; } 
    set { _selectedCarType = value; MyCode(); } 
} 
関連する問題