Introducing the Lync Controls SDK

Posted by: Clarity Blogs: ASP.NET, on 13 Sep 2010 | View original | Bookmarked: 0 time(s)

Microsoft today announced Lync Server 2010 as the official name for Communications Server 14.  A release candidate (build 7457) is also available for download at microsoft.com. 

Lync includes a new SDK called the Lync Controls SDK that includes WPF and Silverlight controls that developers can use to integrate Microsoft Lync (Communicator) functionality into their applications.  This includes controls for presence, contact lists, search, etc. 

In this blog post, youll see some of the controls that are a part of the Lync Controls SDK.  Ill focus on the presence and contact list controls.

Displaying Presence

The PresenceIndicator control is used to display the presence of the contact specified in its Source property.  You can set this value in code behind, directly in XAML, or via binding.

<controls:PresenceIndicator Source="sip:georged@fabrikam.com" />

 /></p>

<p>The <strong>PresenceIndicator</strong> control also has a <strong>PhotoDisplayMode</strong> that you can use to toggle how the contacts photo is displayed. The property can be set to <strong>Hidden</strong>, <strong>Small</strong>, or <strong>Large</strong>. </p>

<p><img src=<ListBox x:Name="accountManagers"> <ListBox.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="100"/> <ColumnDefinition Width="50"/> </Grid.ColumnDefinitions> <controls:PresenceIndicator x:Name="presenceIndicator" Source="{Binding}" Grid.Column="0" /> <TextBlock Text="{Binding DisplayName, ElementName=presenceIndicator}" Grid.Column="1"/> <TextBlock Text="{Binding ActivityStatus, ElementName=presenceIndicator}" Grid.Column="2"/> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox>

 /></p>

<h3>Displaying Lists of Contacts</h3>

<p>You can use the <strong>ContactList</strong> control to display the logged in users Microsoft Lync contact list in your application.  As simple as adding the control to your XAML.</p>

<pre class=<controls:ContactList />

 /></p>

<p>The <strong>ContactList </strong>control exposes these properties to enable you to control how it is displayed  just as how you would directly in Microsoft Lync:</p>

<ul>
  <li>ContactLayoutView 
    <ul>
      <li>OneLine </li>

      <li>TwoLines </li>
    </ul>
  </li>

  <li>ShowFriendlyName </li>

  <li>ShowFrequentContacts </li>

  <li>GroupViewBySetting 
    <ul>
      <li>Groups </li>

      <li>Relationship </li>

      <li>Status' </li>
    </ul>
  </li>

  <li>ShowPivotBar </li>
</ul>

<p>The <strong>CustomContactList</strong> control is useful when you want to display a list of contacts that doesnt map to a group that you have defined in Lync:</p>

<pre class=<controls:CustomContactList> <controls:CustomContactListItem Source="sip:georged@fabrikam.com"/> <controls:CustomContactListItem Source="sip:michaelg@fabrikam.com"/> </controls:CustomContactList>

You can of course add items to the list in code behind manually, or set the ItemsSource property of the control to a List<string> representing a list of SIP URIs.

Other Controls

There are some other very useful controls in the Lync Controls SDK, e.g., to update the current users presence and personal note, to search for and display contact search results, and to easily start conversations with contacts. 

Ill post some more interesting how to about the Lync Controls SDK after I get the RC fully running in my development environment.

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: XAML | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1472 | Hits: 8

Similar Posts

  • MPI Project Template for VS2010 more
  • Building Silverlight 2 and 3 applications with Visual Studio 2008 more
  • WPF Presence Controls for Office Communicator 2007 more
  • Silverlight 2 Beta 1 Controls Available, including Source and Unit Tests more
  • Accessing and Updating Data in ASP.NET 2.0: Customizing the Editing Interface more
  • Accessing and Updating Data in ASP.NET 2.0: Updating Basics more
  • Accessing and Updating Data in ASP.NET 2.0: Deleting Data more
  • Book Review: Workflow in Office 2007: David Mann more
  • Accessing and Updating Data in ASP.NET 2.0: Inserting Data more
  • Accessing and Updating Data in ASP.NET 2.0: Programmatically Accessing Data using the Data Source Controls more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD