PresenceIndicator Control
The PresenceIndicator control displays one of several icons that indicate the presence of a given user. It is a stand-alone control representing a single contact, and enables access to the quick connect menu and the contact card for the user. The control can also display a photo for the given user. The following images display different options for the PhotoDisplayMode property. When the Source property is not set, or when no photo is available, a stock silhouette image appears in the UI.
Quick Connect Menu
The control reacts to two user actions: hover and click. When a user hovers over the icon, after about one second the quick connect menu appears. The quick connect menu displays the contact’s presence, starts IM, e-mail, or audio calls, and can be expanded to show detailed contact information. The quick connect menu disappears if it is not used. The user can keep the quick connect menu open by pinning it.
Members
Notable PresenceIndicator control public properties that are related to unified communications appear in the following table. For more information, see Lync 2010 Class Libraries References.
Property |
Description |
---|---|
Gets or sets the contact to display. Valid types include Contact and DistributionGroup objects, and String.
|
|
Gets the presence status string for the contact. For example, In a meeting or Away. For groups this is an empty string. |
|
Gets the contact’s display name. |
|
Gets or sets a data structure which contains information used to customize the information that accompanies messages. For more information about the use of contextual information, see Lync Extensibility API Contextual Conversations (Lync 2010 SDK). |
|
Reserved for internal use. When you edit templates, this property may appear in XAML text. To preserve control functionality it should remain static. |
|
AvailabilityState |
Gets an enumerated value that represents the contact’s availability. The type is a ContactAvailability enumeration. Possible values:
|
Gets or sets an enumeration value that determines the contact card display mode when the pointer rests over the presence icon. The default value is ShowContactBrief. |
|
Gets or sets an enumeration value that determines the contact card display mode after the presence icon is clicked. The default value is ShowContactDetails. |
|
PhotoDisplayMode |
Gets or sets an enumeration value that determines the presence photo display mode. The default value is Hidden. |
Code Example
Sample code for Microsoft Silverlight and Microsoft Windows Presentation Foundation (WPF) appears in the following section.
<StackPanel>
<controls:PresenceIndicator Source="sip:mary@contoso.com"/>
</StackPanel>