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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SplitButton - Style

Thread ID:

Created:

Updated:

Platform:

Replies:

118042 Jan 23,2015 04:40 PM UTC Jan 30,2015 06:52 PM UTC WinForms 3
loading
Tags: SplitButton
Frank Piplak
Asked On January 23, 2015 04:40 PM UTC

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

Saravanan T [Syncfusion]
Replied On 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



Frank Piplak
Replied On 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

Saravanan T [Syncfusion]
Replied On 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: http://help.syncfusion.com/ug/windows%20forms/default.htm#!documents/customizingthesplitb.htm

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

Regards,

Saravanan T



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;