Tôi không thể sử dụng EventToCommand trong Ứng dụng Windows Phone 8.1 của mình.Windows Phone 8.1 - MVVMLight - Tại sao EventToCommad không hoạt động?
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP8"
tôi đã cố gắng nó cũng với lắp ráp = GalaSoft.MvvmLight.Extras.WP81 ...
<controls:PivotItem Name="pivotItem">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<cmd:EventToCommand Command="{Binding SelectServiceCommand}"
CommandParameter="{Binding SelectedIndex, ElementName=pivotItem}"/>
</i:EventTrigger>
<!-- other stuff -->
</i:Interaction.Triggers>
tôi nhận được erros sau:
- Các thành viên " Trình kích hoạt "không được nhận dạng hoặc không thể truy cập được.
- Unknown gõ 'EventTrigger' trong không gian tên XML 'clr-namespace: System.Windows.Interactivity; lắp ráp = System.Windows.Interactivity'
- Lỗi 2 Thuộc tính gắn thêm 'Triggers' không được tìm thấy trong loại 'Tương tác'. ...
Ai đó có thể giúp tôi không?
Bạn có biết các giải pháp liên quan đến tình hình đầu tiên (nhắm mục tiêu Silverlight 8.1)? Tôi tạo ra một dự án WP 8.1 mới và thêm mvvm máng nhẹ máng nước NuGet nhưng "EventToCommand" từ "GalaSoft.MvvmLight.Command" không được tìm thấy. Cảm ơn! –