How to keep Tooltip open in WinUI3? - xaml

How can I force a tooltip to stay open or at least increase the duration in winui3?
Most examples I found are either for wpf or uwp and none of seems to work.

I am afraid there is no property that lets you keep the ToolTip visible for more than a short period of time in UWP or WinUI 3.
What you can do is to replace the ToolTip with a Popup and control its visibility programmatically by setting the IsOpen property.

Related

How to set focus to Grid UIElement in winrt?

A Grid UIElement in winrt is receiving the GotFocus and LostFocus events, which are useful - but apparently Focus() is not a method available to Grid. How can the element be capable of having focus but not be capable of setting it? I am trying to restore keyboard focus to the main Grid of the app's UI when it is lost due to other interactions. Does anyone know how one might programmatically restore focus to a Grid that has just reported losing it? Thanks.

Controlling the AutoScroll behavior on Panel

I have a set of controls inside of a Panel and set the AutoScroll property of the panel to True so I get the Vertical ScrollBar but when I slide the bar is not smooth and if some of the upper controls inside the panel have the focus the bar return to the top.
I read some about and found a solution on
smooth scroll with autoscroll
Which work Ok but uses a lot of resources, I see it on Windows Task Manager, one of the processors goes about 60%, so I think is something wrong with this.
There's another way to met the same goal?
I tried to put my own VerticalScrollBar unsuccessfully. :(

How do I scroll with the scrollbar?

I am currently working on a project in VB.NET and I have a fixed-border form with the AutoScroll property set to True. Under the Load event, I have some loops that add a bunch of controls to the form, so I have AutoScroll create the scrollbar for me automatically.
Now when I open up this form, all the controls load up with no problem, it focuses on my first text box, and the scroll bar shows up. However, the mouse wheel does not do anything whatsoever.
So my question is, how do I, no matter where my focus or mouse is, scroll with the AutoScroll property enabled, in VB.NET?
as far as i know, scrolling is only enabled when focusing the appropriate element. but should be able to trigger scrolling by catching onmouseover() or similar...
this is somthing similar (just for a datagrid) scrolling datagridview without get focus

Using Popup control in Window 8

Is there any property of pop up , wherein we can dim the window app.
As in metro app there is no Child Window control available , so using
popup in place of it but the problem in popup is when it is open the
user can still interact with other control on window app.
So is there an workaround to make the window app dim when pop is open.
I'm not sure to understand what your trying to do. You can put a Border as first child of the popup which exposes the Background property. So if you specify a not null Background (Transparent for instance) the popup will catch every interactions.
It sounds like you want the MessageDialog class. The popup is meant to be non-modal, letting the user close it by just clicking away from it. The MessageDialog is a regular modal popup that does not let the user interact with the rest of the app when it is displayed.
If you really insist on using the popup control, here is a simple workaround:
Make the popup use all the screen (using a grid or border), then set that background to Black with opacity 0.1 (or any other color you see fit, this is to give a "dim" effect), then inside this popup, place another container with the size and margins that you want to act as your "real" popup.
Because the popup takes the whole screen it will prevent the user from clicking anywhere in the screen.

how to change scrollbar theme in vb.net?

Do you know anyway to change the style and theme of a scroll bar in a vb.net application? I need code or program that changes all scroll bars of the form.
I've been searching the web and found programs to change color of scroll bar but they were mostly designed for websites and written in CSS or JavaScript code. I would be so thankful if you have a solution for it.
Thanks
There isn't any property or feature to change the style of scrollbar of WinForm control. You should have to choose WPF instead of WinForm.