저는 Windows Phone 8.1 개발에 익숙합니다. 나는 다음과 같은 문제가있다. 전화에서 연락처 목록을 가져와 일부 ListBox (wpf)에 표시하려고합니다. Microsoft의 샘플을 보았지만 운이 없었습니다. 누구나 C#에서 연락처 목록을 가져올 수있는 방법이 있습니까?연락처 목록보기 8.1 Windows Phone
확인 후 :
내가 CLIK에 버튼 이벤트를하고 해당 이벤트에 내가 다음 코드를 사용하여 :
ContactStore contactStore = await ContactManager.RequestStoreAsync();
IReadOnlyList<Contact> contacts = null;
// Find all contacts
contacts = await contactStore.FindContactsAsync();
foreach (var item in contacts)
{
if (!string.IsNullOrEmpty(item.FirstName) && !string.IsNullOrEmpty(item.LastName))
{
var acontact = new Contact() { Name = item.FirstName + " " + item.MiddleName + " " + item.LastName, };
myContacts.Add(acontact);
}
}
을 그리고 난이 오류를 얻을 :
An exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.ni.dll but was not handled in user code
Additional information: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
당신은 행운을 가지고 샘플을 시도했음을 의미합니까? 어떤 샘플? 그들에게 무슨 문제가 있습니까? –
나는 바인딩 바인딩 샘플을 시도했지만 작동하지 않습니다. –
'작동하지 않습니다. '그래서 고쳐주세요. 그게 가장 구체적인 조언에 대해서 당신이 * 어떻게 * 작동하지 않거나 어떤 코드를 보여주지 설명하지 않을 경우 ... –