New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Collections

RadSocialShare offers two inner tags that are used to declare the list of buttons that are shown to the user. These are the MainButtons and CompactButtons collections. They both contain the <telerik:RadSocialButton /> items which are the actual buttons.

<telerik:RadSocialShare RenderMode="Lightweight" runat="server" ID="RadSocialShare1" UrlToShare="https://www.telerik.com/products/aspnet-ajax.aspx">
    <MainButtons>
        <telerik:RadSocialButton SocialNetType="ShareOnFacebook" />
        <telerik:RadSocialButton SocialNetType="ShareOnTwitter" />
        <telerik:RadSocialButton SocialNetType="SendEmail" />
        <telerik:RadCompactButton />
    </MainButtons>
    <CompactButtons>
        <telerik:RadSocialButton SocialNetType="LinkedIn" />
        <telerik:RadSocialButton SocialNetType="Delicious" />
        <telerik:RadSocialButton SocialNetType="Digg" />
    </CompactButtons>
</telerik:RadSocialShare>

The buttons which are declared in the MainButtons collection are always visible on the page and are on the main bar of the RadSocialShare.

The buttons from the CompactButtons collection are shown in a RadWindow which also provides a search box to filter the available buttons by their name. In order to trigger the popup you need the <telerik:RadCompactButton /> in the MainButtons collection.

If CompactButtons collection is left empty all the Styled Buttons that are not in the MainButtons collection will be automatically populated in the popup.

The in the MainButtos collection opens the popup centered and sized to that it fits the contents (the available buttons).It also has the properties from the Styled Buttons so that you can choose a different position and size.

There is another option to show the CompactButtons collection - by declaring a whose SocialNetType property is set to CompactButton. In that case the popup takes the dimensions and position set for the rest of the social network popups and does not autosize to fit the contents.

See this help article for more information on the structure of the RadSocialShare.

See Also

In this article