Predefined Style Example

Classic Button

@ShareThisHelper.Classic()

@ShareThisHelper.Classic("Share MVCSocialHelper With Friends!!!")

Horizontal Counter

@ShareThisHelper.HorizontalCounters()

Vertical Counter

@ShareThisHelper.VerticalCounters()

Multi Channel

@ShareThisHelper.MultiChannel()

Customization Overview

Button Selection

@{
    ShareThisBuilder shareThisButtonSelection = new ShareThisBuilder();
    shareThisButtonSelection.AddButton(ShareThisButton.Email, "Email To Friends");
    shareThisButtonSelection.AddButton(ShareThisButton.Blogger);
    shareThisButtonSelection.AddButton(ShareThisButton.Delicious);
    shareThisButtonSelection.AddButton(ShareThisButton.Digg);
    shareThisButtonSelection.AddButton(ShareThisButton.LinkedIn);
    shareThisButtonSelection.AddButton(ShareThisButton.Google_Reader);
    shareThisButtonSelection.AddButton(ShareThisButton.ShareThis);
}

@ShareThisHelper.Render(shareThisButtonSelection)

Small Button Style

@{
    ShareThisBuilder shareThisButtonSelection = new ShareThisBuilder();
    shareThisButtonSelection.AddButton(ShareThisButton.Email, "Email To Friends");
    shareThisButtonSelection.AddButton(ShareThisButton.Blogger);
    shareThisButtonSelection.AddButton(ShareThisButton.Delicious);
    shareThisButtonSelection.AddButton(ShareThisButton.Digg);
    shareThisButtonSelection.AddButton(ShareThisButton.LinkedIn);
    shareThisButtonSelection.AddButton(ShareThisButton.Google_Reader);
    shareThisButtonSelection.AddButton(ShareThisButton.ShareThis);
    
    shareThisButtonSelection.ButtonStyle = ShareThisButtonStyle.Small_16X16;
}

@ShareThisHelper.Render(shareThisButtonSelection)

Small Button Style With Label

@{
    ShareThisBuilder shareThisButtonSelection = new ShareThisBuilder();
    shareThisButtonSelection.AddButton(ShareThisButton.Email, "Email To Friends");
    shareThisButtonSelection.AddButton(ShareThisButton.Blogger);
    shareThisButtonSelection.AddButton(ShareThisButton.Delicious);
    shareThisButtonSelection.AddButton(ShareThisButton.Digg);
    shareThisButtonSelection.AddButton(ShareThisButton.LinkedIn);
    shareThisButtonSelection.AddButton(ShareThisButton.Google_Reader);
    shareThisButtonSelection.AddButton(ShareThisButton.ShareThis);
    
    shareThisButtonSelection.ButtonStyle = ShareThisButtonStyle.Small_16X16;
    shareThisButtonSelection.ShowLabel = true;
}

@ShareThisHelper.Render(shareThisButtonSelection)

Rectangle Button Style

@{
    ShareThisBuilder shareThisButtonSelection = new ShareThisBuilder();
    shareThisButtonSelection.AddButton(ShareThisButton.Email, "Email To Friends");
    shareThisButtonSelection.AddButton(ShareThisButton.Blogger);
    shareThisButtonSelection.AddButton(ShareThisButton.Delicious);
    shareThisButtonSelection.AddButton(ShareThisButton.Digg);
    shareThisButtonSelection.AddButton(ShareThisButton.LinkedIn);
    shareThisButtonSelection.AddButton(ShareThisButton.Google_Reader);
    shareThisButtonSelection.AddButton(ShareThisButton.ShareThis);

    shareThisButtonSelection.ButtonStyle = ShareThisButtonStyle.Rectangle;
}

@ShareThisHelper.Render(shareThisButtonSelection)

Last edited Oct 4, 2011 at 10:03 PM by NandipMakwana, version 2

Comments

dashang Jul 31, 2012 at 1:01 PM 
how to add this and where to add... I am using ASP.NET MVC4