Selected Items won't bind to observable Collec

2019-09-09 02:45发布

I am trying to populate an Observable Collection Based on What items are selected from the AutoCompleteBox. May I get some guidance towards where I am going wrong. It's not Binding the way I would like it to.
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" />

ViewModel:

    public ObservableCollection<int> amortDates;

    public ObservableCollection<int> AmortDates
    {
        get { return amortDates; }
        set
        {
            amortDates = value;
            RaisePropertyChanged("AmortDates");
        }
    }

标签: c# mvvm
0条回答
登录 后发表回答