Sdílet prostřednictvím


Walkthrough: Display a Customized List of Team Members

This walkthrough shows how to use the CustomContactList control in Microsoft Lync 2010 Control applications to display an arbitrary customized list of contacts, by 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.

    <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 webpage 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, and then follow steps 3 and 4 in that procedure.

See Also

Other Resources

Lync 2010 Controls Walkthroughs