UWP InitialShowDelay on ToolTipService - c#

I'm working on an UWP application and I have buttons on it. I added a simply ToolTipService:
But when I hover the mouse on the button, the tooltip takes almost 2 seconds for being show, and I'd like this to be instant. I looked for solutions, but all I find is about WPF and these solutions DON'T WORK. For example:
Change the ToolTip InitialShowDelay Property Globally
This doesn't work,
Than You!
ToolTip Class:

It canĀ“t be done the way I proposed, so as #MoDu mentioned, the best way is to show/hide a control handling onPointerEntered() event

Related

Resize Columns Width on button click trigger in XAML - without code-behind

Im trying to resize Columns width in XAML using button click without code-behind,when the button is pressed new data is loaded but till now no automatic resizing (which im trying now) ive tried several ways but every time i face a different problem, the solution must be Code-behind free!
the latest solution was to make style-event for the button, but the problem was within the Event i can not reach the columns width value, using TargetName for example, (GridViewColumn.width defined as dataGridView2) or even (GridView defined as dataGridView1), it would give an error.
i have tried to make a Style for the GridView or GridViewColumn but also it did not work too, i made a style-event for the ListView but the button events (IsPressed etc..) were not recognized inside it (when you tap TargetName and Property) and gave an error!
Thank you in advance for your answers!
XAML:Code
Add it to code behind, that is the precise instance where you actually need code behind. Where you need code behind. i.e. when you deal with strictly controls it is acceptable and easy to have code behind handle things like sizing etc. Keep it simple.

Custom control creating

How can I make a custom button like in the image below? I searched on Google about custom control, but this is more special, is animated...
I know that on StackOoverflow are more questions like mine, but it is not a duplicate, I want to learn more about this particular button.
It is a button for WinForms.
you can create these buttons with GDI+ in C#,for example look at this one
On Windows form these buttons are made using the BackgroundImage Property of Button Control.
All you need is to toggle the background image on events like Click,OnMouseEnter etc.
This is not a custom control, this is CSS
Have a look at this, http://www.dynamicdrive.com/style/csslibrary/item/css_square_buttons/
You should possibly read something about gif-animation, jquery animation or css3 transitions to be able to animate backgrounds of such element

create custom tooltip C#

I want to create a custom tooltip, with a different style so that when I click on a control (for example a label or a user-control) it appears.
Something similar to what Google does in Google Maps for coordinates.
I tried to create a user-control and show it when user clicked on a label, but it didn't work well.
It is WinForms!
I attached a picture of what I want. Thank you in advance!
Use a standard ToolTip but override the painting method so it can appear as you want it, while still behaving like a normal tool tip.
Haven't done this before so I can't provide an example.
EDIT: here is an example: http://cboard.cprogramming.com/csharp-programming/119414-custom-tooltip.html

How can I change the color of a disabled tab control

I have my current program disabling a tabControl on startup until a button is pressed. However I don't like the way that the tab looks when it is grayed out.
I want it to look just the same but still have it disabled. Is there a way that I can do this?
You'll need to draw the TabControl yourself to achieve this. Here's a tutorial on CodeProject.com.
Unfortunately, it takes some time to achieve it but that's up to you of course.
Instead of drawing the TabControl yourself, maybe you could disable the controls on the TabPage instead?
If you're using WPF, you can use templates to customize your disabled style. Please see:
http://msdn.microsoft.com/en-us/library/ms754137.aspx
Notice the visual states for disabled controls, etc.

How do I move a tooltip?

I'm using the CellToolTipTextNeeded event of a DataGridView, and the tooltip is being shown under the mouse. I can get the ToolTip object out via reflection, but I don't have any control over where it's positioned since I'm not the one calling Show(). How do I move a tooltip?
How about a custom one?
I think the short answer is: you can't, not yet anyway. I would probably think about building a custom one like 'unknown (yahoo)' suggested.
You'll have to control the tooltip yourself using the Show and Hide methods if you want any control over how and where it is positioned using the 2.0 framework unless you want to get into Window's API calls.
Unfortunately, it looks like the tooltip position is set very, very early on in its creation. The tooltip only has 3 events to handle, and we aren't very interested in Dispose in this case.
The Draw event is fired after the Popup event and it seems as if the position has already been set as the Bounds property in the PopupEventArgs is readonly.
Here's a link to one of many articles (at the time of this post) on creating a custom control:
http://andrusdevelopment.blogspot.com/2007/10/implementing-custom-tooltip-in-c.html
And the MSDN documentation on using the tooltip's Show and Hide methods is actually fairly decent:
http://msdn.microsoft.com/en-us/library/44atyhsa(VS.80,printer).aspx
Sorry, but it just doesn't look like there is a quick and easy answer to this one. Hopefully someone will prove me wrong for both are sakes.
Scott
There is a good answer at this link that uses a Tooltip object.
How to override default tooltip behavior of a C# datagridview to increase the tooltip delay for particular cells

Categories