阅读背景:

Visual Studio Listview绑定所选项目的两种方式MVVM

来源:互联网 

I am quite new to C sharp and all the MVVM thing, I've tried to solve my problem, but with no result after few days of searching, so I'm writing here. I have program for reserving and adding hostels. First, you can add a Hostel on one View page - it will add it to the SQLite database and then to the list of hostels. On the second View page I got formular for reserving hostels. When selecting which hostel you want to reserve I have a listview with list of the hostels. I bind the ItemSource to the List (the list of hostels) so I can see all the hostels there, but when I want to bind the SelectedItem to the NewReservation.HostelName - it won't do anything. Here's the code for the listview:I am quite new to C sharp and all the MVVM thin




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: