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

Events on SplitButton

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;
        }

3 Replies

VR Venkateshwaran Ramdoss Syncfusion Team March 2, 2016 04:21 PM UTC

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


DO Dov March 3, 2016 01:12 PM UTC

Thanks, It's working great!




AP Ashwini Paranthaman Syncfusion Team March 4, 2016 06:27 AM UTC

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

Loader.
Up arrow icon