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" />
<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>
<controls:ContactList />
<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.