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.
Unfortunately, activation email could not send to your email. Please try again.

Events on SplitButton

Thread ID:

Created:

Updated:

Platform:

Replies:

123253 Mar 1,2016 11:04 AM Mar 4,2016 01:27 AM WPF 3
loading
Tags: Ribbon
Dov
Asked On March 1, 2016 11:04 AM

Hi,

I've created a TabPanelItem with 4 SplitButton's each one has 3 RibbonCheckBox's.

I'm trying to create MouseEnter and MouseLeave events so that the SplitButton will DropDown on MouseEnter and will close on MouseLeave.

Each event is working great and firing separately, they just won't work together for some reason, if I'm using both events I need to click on the mouse in order to fire the MouseLeave event.

Is there a way to close DropDown when I leave the button without clicking on the mouse?

Thanks!

XAML: (I left just one SplitButton, other 3 are the same)
 
            <syncfusion:Ribbon.TabPanelItem >
                <syncfusion:ButtonPanel >
  
                    <!--CH1-->
                    <syncfusion:SplitButton Label="CH1" x:Name="CH1" SizeForm="Small" IsSmallImageVisible="False" MouseEnter="CH1_MouseEnter" MouseLeave="CH1_MouseLeave" >                   
                        <syncfusion:RibbonCheckBox Name="CH1_Output" Content="Output"></syncfusion:RibbonCheckBox>
                        <syncfusion:RibbonCheckBox Name="CH1_Active" Content="Active"></syncfusion:RibbonCheckBox>
                        <syncfusion:RibbonCheckBox Name="CH1_View" Content="View"></syncfusion:RibbonCheckBox>                        
                    </syncfusion:SplitButton>
    
                </syncfusion:ButtonPanel>
            </syncfusion:Ribbon.TabPanelItem>

CB:
 
        private void CH1_MouseEnter( object sender, MouseEventArgs e )
        {
            CH1.IsDropDownOpen = true;
        }
        private void CH1_MouseLeave( object sender, MouseEventArgs e )
        {
            CH1.IsDropDownOpen = false;
        }

Venkateshwaran Ramdoss [Syncfusion]
Replied On March 2, 2016 11:21 AM

Hi Dov,

We have created a work around sample based on your requirement. In this sample, we have added MouseEnter event and MouseLeave Event of SplitButton border to open and close the DropDown of SplitButton respectively. Please download the sample from below attachment.

Regards,
Venkateshwaran V.R.


Attachment: SplitButtonSample_c575c04d.zip

Dov
Replied On March 3, 2016 08:12 AM

Thanks, It's working great!



Ashwini Paranthaman [Syncfusion]
Replied On March 4, 2016 01:27 AM

Hi Dov,
We are glad that the issue has been fixed.
Please let us know if you need any other assistance.
Regards,
Ashwini P.

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.

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.

;