We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SplitButton - Style

Hello,

I want to use the SplitButton in my project but I can't find a possibility to change the style to metro, office2010 etc.?!
 
Do you have a tip for me? Many thanks.

Best regards,
Frank

3 Replies

ST Saravanan T Syncfusion Team January 26, 2015 11:00 AM UTC

Hi Frank,

Thank you for using Syncfusion products.

We would like to let you know that in SplitButton, visual style can be changed by using its “Style” property. And for your reference, SplitButton support Default and Metro style the following code snippet is to demonstrate the same.

C#

//To set SplitButton default style

this.splitButton1.Style = Syncfusion.Windows.Forms.Tools.SplitButtonVisualStyle.Default;

//To set SplitButton Metro style

this.splitButton1.Style = Syncfusion.Windows.Forms.Tools.SplitButtonVisualStyle.Metro;

Screenshot:

Sample: http://www.syncfusion.com/downloads/support/directtrac/118042/SplitButton314151155.zip

Please let us know if you need any further assistance on this,

Regards,

Saravanan T




FP Frank Piplak January 29, 2015 03:40 PM UTC

Hello,

ok but is it also possibility to change the style to the other themes (office2010, office2007, vs2010... etc.?!
 

Best regards,
Frank


ST Saravanan T Syncfusion Team January 30, 2015 06:52 PM UTC

Hi Frank,

Thank you for your update,

We would like to let you know that, currently we don’t have a direct support for changing different Visual style in SplitButton. But alternately, SplitButton visual style can be customized by using ISplitButtonRenderer. To customize the SplitButton appearance, we need to create new custom renderer class and implement each of the members declared in ISplitButtonRenderer

Following code snippet is to demonstrate the same.

Code Snippet [C#]:

//create new custom renderer

public class CustomRenderer : ISplitButtonRenderer

{

    //Implements the members that is declared in ISplitButtonRenderer

}

CustomRenderer renderer = new CustomRenderer();

//To set SplitButton custom style

this.splitButton1.Renderer = renderer;

Screenshot:

We have also prepared a work around sample to achieve your requirement and it can be downloaded from the following link.

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/118042/SplitButton_CustomStyle-646845093.zip

UG Link: https://help.syncfusion.com/windowsforms/split-button/appearance-customization

Please let us know if you need any further assistance on this,

Regards,

Saravanan T



Loader.
Live Chat Icon For mobile
Up arrow icon