question

RichardZhang-MSFT avatar image
0 Votes"
RichardZhang-MSFT asked ·

ToolTip Border/Background Color

Source Link: MSDN


Hi ,

Please suggest how to remove hover background color for tootip UWP,after some seconds hovering with background white will appear

uwpuwp-xaml
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RichardZhang-MSFT avatar image
0 Votes"
RichardZhang-MSFT answered ·

Hi,

From your description, maybe your application is not well adjusted ApplicationTheme.

In UWP, if the theme of the app is not explicitly set, the theme of the app follows the system. You can try explicitly specifying the RequestedTheme property in the App constructor of App.xaml.cs.

 public App()
 {
     this.InitializeComponent();
     this.Suspending += OnSuspending;
     RequestedTheme = ApplicationTheme.Dark;
 }

At this time, the background color of Tooltip will turn black.


If you want to customize the display style of ToolTip, you can modify the default template of ToolTip

Default Style

Imgur

Use

Imgur

Tips

If you specify ToolTipService.ToolTip directly to the control, you cannot apply styles. You must create a ToolTip control.


xaml code please see the txt file provided in the attachment

Regarding the inability to insert XML Code, check out this linked solution

Best regards.


xaml-code.txt (2.4 KiB)
· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.