質問

I'm using the ContactPicker in a Windows Store application, and I need to retrieve the first name and last name separately for the selected contact. Unfortunately, the ContactInformation class only has a Name property, where both parts of the name are concatenated. The CustomFields property is empty.

I find it hard to believe that there is no way to access the first name and last name, since they are stored separately in the Contacts application...

Any idea?

役に立ちましたか?

解決

The ContactInformation class has been deprecated in Windows 8.1, and replaced by the Contact class, which provides more detailed information, including first and last name.

EDIT: actually, this doesn't work; the FirstName property contains the concatenated first and last name, and the LastName property is empty... Not sure if this is a bug in the ContactPicker API or in the Contacts app.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top