我正在尝试根据从AutoCompleteBox中选择的项目来填充Observable Collection。我可以得到一些指导,告诉我哪里出错了。这不是我想要的方式 XAML:
<telerik:RadAutoCompleteBox x:Name="RadAmortAutoBox" HorizontalAlignment="Left" Grid.Column="1" Grid.Row="6" VerticalAlignment="Top" SelectedItems="{Binding AmortDates, Mode=OneWay}"
ItemsSource="{Binding Payments}" DisplayMemberPath="PaymentNo" TextSearchPath="PaymentNo" Width="708" />
视图模型:
public ObservableCollection<int> amortDates;
public ObservableCollection<int> AmortDates
{
get { return amortDates; }
set
{
amortDates = value;
RaisePropertyChanged("AmortDates");
}
}