question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting tooltip using attached method syntax in resw no longer works in WinUI 3 Preview 3

See original GitHub issue

Describe the bug Setting tooltip using attached method syntax in resw no longer works in WinUI 3 Preview 3

Steps to reproduce the bug

  1. Start with WinUI 3 Desktop app template

  2. Declare some UI element with Uid:

<Button x:Uid="button1" />
  1. Create Resources.resw under Strings\en, and add a <PRIResource Include=Strings\**\*.resw to the project.

  2. Add tooltip in the resource file. According to UWP doc, the syntax for the key should be button1.[using:Microsoft.UI.Xaml.Controls]ToolTipService.ToolTip.

  3. Run the app. The app will fail with XamlParseException.

Expected behavior The app should work with tooltip set from the localized resource. It worked in preview 2. This is a regression in preview 3.

Version Info

NuGet package version:

Microsoft.WinUI 3.0.0-preview3.201113.0

Windows app type:

UWP Win32
Yes
Windows 10 version Saw the problem?
20H2(19042) Yes
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
evelynwu-msftcommented, Oct 7, 2021

@JosHuybrighs Because ToolTipService.ToolTip is an attached property, the correct syntax to use is MyButton.[using:Microsoft.UI.Xaml.Controls]ToolTipService.ToolTip (see this article for more details).

0reactions
evelynwu-msftcommented, Jun 15, 2023

@Maddog2412 Please open a new issue to track the problem you’re encountering. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ToolTip Class - Windows App SDK
In XAML, use the ToolTipService. Tooltip attached property to assign the ToolTip to an owner.
Read more >
Using TooltipService.Tooltip Keyword in a Resource ...
There's special syntax for referencing attached properties for Uid. In XAML (as normal):. <Button x:Uid="MyControl"/>. Then in your resw ...
Read more >
Reflection IT Blog
I'm in the process of learning the new Windows SDK Preview. This SDK has made it possible to set the Kind property of...
Read more >
Migrating the authentication UI
The LoginForm is the enabled, allowing interaction with the controls, the busy state is set to false and then the Bindings.Update method is...
Read more >
WinUI – The modern native UI platform of Windows
Another issue from a technical pov is that XAML, MVVM and 2-way data binding are outdated. MVVM introduced 2-way data binding to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found