Custom Tooltip (Popup) does not stay open when Ribbon Is Collapsed - wpf

I created a custom tooltip that stays open when the mouse hovers over a button by using a popup. My solution is here. You can see the following attachment that displays the popup working correctly. By the way, any mouse event will be triggered on the popup in this state, such as MouseEnter:
For simplicity, hovering a mouse over the popup will trigger the MouseEnter event:
<Popup MouseEnter="TT_Popup_Control_MouseEnter"></Popup>
The issue is when the Child Ribbon Buttons collapse. When I click on the collapsed Parent Ribbon Button to expand the Child Buttons, and hover over the Child Button, I get something like this:
Again for simplicity, hovering a mouse over the popup will no longer trigger the MouseEnter event:
<Popup MouseEnter="TT_Popup_Control_MouseEnter"></Popup>
So when I hover over the popup, the popup no longer stays open in this state. Since the popup mouse events are no longer triggered, I believe this is the issue, but I don't know why this is the issue. Did I discover a bug in the .NET framework? Or is there something I am missing here?

Related

WPF How to prevent interaction with controls in background when Popup is open

When I display a Popup all other controls in the background appears to be not active (i.e. when I hover over a button for example it does not change a style). When I click somewhere to dismiss the Popup and it just happens to be a button where I clicked, that button takes a hit. This is very confusing, because one would assume that they can click anywhere to dismiss the popup and not just the empty space.
How to prevent interaction with controls in background when Popup is open?
OR
How to make controls in background react to the mouse hover even when Popup is open (like ToolTip)?
Setting IsHitTestVisible either to true or false seems to have no effect.

WPF: (SplitButton) MouseLeave won't fire without a click

I working on a WPF Ribbon application using a third party source (Syncfusion).
In my application I have a SplitButton with several CheckBoxes in it, I'm trying to implement MouseHover like action to my SplitButton so that on MouseEnter the DropDown will open and on MouseLeave the DropDown will close.
MouseEnter works great.
MouseLeave works great on a regular button (for changing the background for example) but on SplitButton it won't fire unless I press on the mouse (left or right button - it doesn't matter).
Any chance I could close the DropDown upon leaving the SplitButton without clicking on the mouse? Maybe by using another event?
Any help would be appreciated.

XAML Disabling Events on Child Elements when moving Parent

I have an ItemsControl that Contains a few buttons, My Items control is movable, you can move it around by dragging it. the issue is when I click and drag my control to move it, and leave the mouse on top of a button inside the control, it fires the click event of the button which I dont' want/
So While I am moving the control around I want to disable any events on the child buttons, I used IsDisabled = true but that changes the appearance of the buttons too which I dont want.
you can set IsHitTestVisible property of button to false
IsHitTestVisible="False"

WinForm button click methods are being renewed. with button onclick_1

I just finished completing my winforms app. Suddenly when I was changing background color of gridview. When I started my app for final tests the buttons were not working. I checked their on click code and it was correct. Then I double clicked the button it created new button onClick_1 method. SO now all the buttons are doing it :( I dont' know what to do. Please help
Looks like your events are no longer coupled to your code.
Do this for each of your buttons:
Open your designer
Click on your button
Open your properties tab
In this menu, click on the events button
You'll find your "Click" event.
Click on the arrow and select the correct event.

How can I float buttons on top of controls when the mouse enters (WPF)?

I want to make a control which will work like the tab header in Visual Studio 2010.
When you have a few tabs open (MainWindow.xaml, MainWindow.xaml.cs, etc.) only the active tab has a close button visible, but when you hover the mouse over an inactive tab the close button appears, which means you can close any tab with one click.
It probably will be a border with text under the floated buttons.
All WPF controls are containers, you can put a button inside a button for example. You can have a layout manager to a control with the items you want in it.
For what you are asking about you could have a user control that has a TextArea and a Button in a StackPanel. Then hide the button. You then have the user control register for its MouseEnter and MouseLeave events and when the mouse is over you make the button visible, and when it leaves you hide it again.

Resources