im trying to creat buttom to show all ocntacts on the phone
with this code :
private async void SearchContactButtom_click(object sender, RoutedEventArgs e)
{
await SearchContacts();
}
private async Task SearchContacts()
{
var contactsStore = await ContactManager.RequestStoreAsync();
IReadOnlyList<Contact> contacts = await contactsStore.FindContactsAsync();
var dlg = new Windows.UI.Popups.MessageDialog("found " + contacts.Count + "contacts :D");
await dlg.ShowAsync();
ContactsListView.ItemsSource = contacts;
}
and this xaml code
<Page.Resources>
<DataTemplate x:Key="ContactDataTemplate">
<StackPanel>
<TextBlock Text="{Binding Dispatcher}" />
</StackPanel>
</DataTemplate>
</Page.Resources>
<Grid>
<Button Name="SearchContactsButtom"
Content="Button"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Click="SearchContactButtom_click"
/>
<ListView Name="ContactsListView" Margin="-10,73,10,-73"/>
</Grid>
but i have error package could not be registerd
and i think there is mistake i did at the datatemplate tage on the xaml code at the binding line
any ideas ??
Thx