Export (0) Print
Expand All

Walkthrough: Display Contact Information

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

For a list of prerequisites, see Walkthrough: Presence Hello World.

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

To create the Silverlight walkthrough application

  1. Create a Lync Controls application by using the Lync Silverlight Application template. For more information, see Walkthrough: Presence Hello World.

  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 webpage, 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 by using the Lync WPF Application template. For more information, see the topic Walkthrough: Presence Hello World.

  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.

Show:
© 2014 Microsoft