This topic demonstrates how to use the CustomContactList control in Microsoft Lync Control applications to display an arbitrary customized list of contacts, using Microsoft Silverlight or Microsoft Windows Presentation Foundation (WPF). Each item in the contacts list is provided by a CustomContactListItem control.

Prerequisites

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

Creating the Silverlight Application

To create the Silverlight walkthrough application

  1. Use the Lync Silverlight Application template to create a new Microsoft Silverlight Lync Control application. For more information, see Walkthrough: Presence Hello World .

  2. In Page.xaml, replace the contents of the Grid control with the following XAML.

      Copy imageCopy Code
    <StackPanel>
      <controls:CustomContactList Height="300"
    ContactLayoutView="TwoLines">
    	<controls:CustomContactListItem
    Source="sip:elise@contoso.com"/>
    	<controls:CustomContactListItem
    Source="tel:12065550100"/>
    	<controls:CustomContactListItem
    Source="administrators@contoso.com"/>
      </controls:CustomContactList>
    </StackPanel>
    
  3. Edit the Source properties on the CustomContactListItem controls to provide valid values.

  4. Build and run the application. The Web page displays three contacts.

Creating the WPF Application

To create the WPF walkthrough application

  1. Use the Lync WPF Application template to create a new WPF Lync Control application. For more information, see Walkthrough: Presence Hello World .

  2. Edit the Window1.xaml page as described in step 2 in the previous procedure, then follow steps 3 and 4 in that procedure.

See Also

Other Resources