저는 프로그래밍 초보자이며 응용 프로그램에서 Windows 전화 응용 프로그램을 만들려고합니다. 연락처를 선택할 수 있기를 원합니다. 먼저 목록 상자에 넣고 완벽하게 작동하지만 Longlistselector에 넣으 려하므로 더 잘 만들고 싶습니다. 문제가 발생하는 곳입니다. 이것은 'System.Collections.Generic.List'에 'System.Collections.Generic.List'형식의 첫 번째 인수를 허용하는 'SearchCompleted'및 확장 메서드 'SearchCompleted'의 정의가 포함되어 있지 않은 오류입니다. 발견 (당신은 using 지시문 또는 어셈블리가연락처에서 검색 한 결과로 LongListSelector를 채우는 방법.
내가 더는하지 어셈블리를 참조하지 실종하지만 내가이 길을 잃지 곳. 내가 XAML에서 완벽한 긴 listlongselector이 있어요하지만 난 길을 잃지 계속 곳이다 있습니다.
namespace contacts
{
public partial class MainPage : PhoneApplicationPage
{
int TapCount = 0;
List<Contacts> contacts = new List<Contacts>();
// Constructor
public MainPage()
{
InitializeComponent();
contacts.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(contacts_SearchCompleted);
SearchContacts(String.Empty);
}
private async void SayWords(string words)
{
SpeechSynthesizer synth = new SpeechSynthesizer();
await synth.SpeakTextAsync(words);
}
void contacts_SearchCompleted(object sender, ContactsSearchEventArgs e)
{
ContactList.ItemsSource = contacts;
}
private void SearchContacts(string searchterm)
{
contacts.SearchAsync(searchterm, FilterKind.DisplayName, null);
}
}
}