WPF Presence Controls for Office Communicator 2007

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

We recently built a set of WPF presence controls to use with Office Communicator 2007 applications.

The WPF presence controls are now available for download on MSDN.

We've used these controls in several WPF applications, including the Microsoft Office Communicator Vista Gadget project that we just published on CodePlex.

The MSDN download includes the complete source code of the presence controls, along with a sample application that shows the various ways of using them.

Note: The MSI installs the source code into a directory under C:\Program Files\ by default. Visual Studio doesn't seem to play nice with solutions that live there. Before attempting to compile the solution, I recommend moving the files to another location, and changing them so that they're not read-only.

Configurability / Extensibility

An important goal when building these controls was to expose their properties to the developer as configurable options. We wanted to ensure that the developer could tailor the use of the controls specifically to their application. All of these properties are exposed as WPF Dependency Properties.

Additionally, the controls are built in such a way so that a developer can use them as building blocks for other controls. We followed that mantra ourselves when building the controls, e.g. the PersonaList and MyPersona controls are built on top of the Persona control.

Presence Controls

The project includes three controls:

  • Persona
  • PersonalList
  • MyPersona

Persona

The Persona control is used to display the presence and availability of a single user.

 /> </p>
<p>The Persona control exposes the following properties: </p>
<ul>
<li><strong>SipUri</strong> 
<ul>
<li>The Sip URI of the contact to bind the Persona control to</li></ul>
<li><strong>ShowContextMenu</strong> 
<ul>
<li>Show the Persona control's context menu via right-click 
<li>The context menu provides options for communicating with the contact</li></ul>
<li><strong>ShowDisplayName</strong> 
<ul>
<li>Show the display name of the contact with the given Sip URI</li></ul>
<li><strong>ShowAvailability</strong> 
<ul>
<li>Show the availability (availability != presence) of the contact</li></ul>
<li><strong>ShowToolTip</strong> 
<ul>
<li>Show a summary tooltip when hovering over the control</li></ul>
<li><strong>ShowDetailedToolTip</strong> 
<ul>
<li>Show a more detailed tooltip (includes some calendar information) when hovering over the control</li></ul>
<li><strong>UseLargePNGPresenceImages</strong> 
<ul>
<li>When set to true, the Persona control uses 24x24 images to display presence 
<li>If not set, the control uses the small 16x16 images to display presence</li></ul>
<li><strong>UseXAMLPresenceImages</strong> </li>
<ul>
<li>The control displays presence using vector images instead of PNGs</li></ul>
<li><strong>CustomMenuItemList</strong></li>
<ul>
<li>Allows you to extend the control's context menu with custom menu items 
<li>Can only be set in code behind</li></ul></ul>
<p>As you can see, some of these properties are mutually exclusive. For example if set to True, <em>UseXAMLPresenceImages </em>would override <em>UseLargePNGPresenceImages</em>.</p>
<p>Most of the properties can be set either declaratively in XAML, or in the code behind. </p>
<p>By default, when you drop a Persona control into your XAML, none of its properties are specified (they default to false). </p>
<p><img src=

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: WPF | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1997 | Hits: 18

Similar Posts

  • Building a Custom List using the Persona WPF Presence Control more
  • TechEd 2008 Happenings more
  • WPF for Line of Business applications more
  • Will Silverlight Controls Become More WPF Like - A Personal Opinion more
  • Silverlight 2 Beta 1 Controls Available, including Source and Unit Tests more
  • DotNetBar for WPF more
  • Asynchronous Data Binding in Windows Presentation Foundation more
  • Host WPF Controls in Windows Forms more
  • Using WPF, Virtual Earth, and WPF/E together... more
  • Custom Controls in ASP.NET (Part 1) 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