This topic has not yet been rated - Rate this topic

How to: Display a Contact's Information

[This is preliminary documentation and is subject to change.]

This topic demonstrates how to use the ContactCard control in Microsoft Lync Control applications to display contact and organization information for multiple contacts, using Microsoft Silverlight or Microsoft Windows Presentation Foundation (WPF).

For a list of prerequisites, see How to: Publish Presence.

Use a Grid as a container for a group of ContactCard controls.

To create the Silverlight walkthrough application

  1. Create a Lync Controls application using the Lync Silverlight Application template. For more information, see the topic How to: Publish Presence.

  2. In Page.xaml, replace the existing Grid control with the following example XAML text. Edit the Name and Source properties to provide valid values.

    <Grid>
     <Grid.ColumnDefinitions>
      <ColumnDefinition/>
      <ColumnDefinition/>
      </Grid.ColumnDefinitions>
     <Grid.RowDefinitions>
      <RowDefinition/>
      <RowDefinition/>
     </Grid.RowDefinitions>
     <controls:ContactCard x:Name="contact0"  IsExpanded="False" Source="sip:elise@contoso.com" Grid.Column="0" Grid.Row="0"/>
     <controls:ContactCard x:Name="contact1"  IsExpanded="False" Source="sip:robert@contoso.com" Grid.Column="0" Grid.Row="1"/>
     <controls:ContactCard x:Name="contact3"  IsExpanded="False" Source="sip:mary@contoso.com" Grid.Column="1" Grid.Row="0"/>
     <controls:ContactCard x:Name="contact4"  IsExpanded="False" Source="sip:john@contoso.com" Grid.Column="1" Grid.Row="1"/>
    </Grid>
    
    
  3. Build and run the application.

  4. In the Web page, the four contact cards appear.

Use a Grid as a container for a group of ContactCard controls.

To create the WPF walkthrough application

  1. Create a Lync Controls application using the Lync WPF Application template. For more information, see the topic How to: Publish Presence.

  2. In Window1.xaml, replace the existing Grid control with the example XAML text from step 2 in the previous procedure, edit the XAML, and then complete the remaining steps as described in that procedure.

Did you find this helpful?
(1500 characters remaining)

Community Additions

© 2013 Microsoft. All rights reserved.