Export (0) Print
Expand All

Sharing Control

Ff750438.note(en-us,MSDN.10).gifNote:
Current information about Live Connect is now available in the Windows Live Developer Center. The information in the following sections is provided for legacy purposes only.

The Sharing control provides a way for users to share a brief message with many contacts at the same time. It is represented in markup by the share tag.

The Sharing control is often displayed as a graphical link labeled "Share." When a signed-in user clicks the control, the user selects each of the contacts who will receive the message, and then sends the message. If a user is not signed in, a Sign In dialog box opens.

The following example shows how to insert the Sharing control into a webpage.

<wl:share
   message="Visit http://www.example.com/specials to see our special deals for the week!"
   picker-label="Share Weekly Specials!" >
</wl:share>

The following table lists the attributes for the Sharing control.

Name Type Required Default Value Description

bar-enabled

Boolean

No

true

Creates the Messenger Web Bar Control on your site, if it does not already exist there.

button-label

String

No

none

Sets the caption of the Sharing button on the dialog box. Setting this attribute is useful in scenarios where a verb other than share is used to indicate what happens when the user clicks the button.

hide-messenger-contacts

Boolean

No

false

Sets whether the user's Messenger contact list is displayed in the Sharing control dialog box. Setting this attribute to true is useful in scenarios where an application renders the user's application-specific contact list.

hide-unavailable-contacts

Boolean

No

false

Sets whether only available contacts are rendered in the Sharing control dialog box.

max-selection-count

Int

No

15

Indicates the maximum number of contacts that can be selected within the Sharing control dialog box. To indicate that the selection is unbounded, the value -1 should be used.

message

String

Yes

none

Sets the message that is sent to the selected contacts when the user clicks the Share button. The maximum length for the message is 400 characters.

on-shared

Function Callback

No

none

Sets the event handler that is raised when a contact is selected in the Sharing control. The on-shared event fires when a user selects a contact, and the handler specified by this attribute will run. The first parameter for the handler is ContactSelectedEventArgs.

picker-label

String

Yes

none

Sets the caption that is displayed in the Sharing control dialog box. Use short, descriptive captions to indicate why the user needs to select contacts.

The following screen shots show the Sharing control button, followed by the Sharing control dialog box.

Sharing Control button
Sharing Control dialog box
Show:
© 2014 Microsoft