Setting tooltip using attached method syntax in resw no longer works in WinUI 3 Preview 3
See original GitHub issueDescribe the bug Setting tooltip using attached method syntax in resw no longer works in WinUI 3 Preview 3
Steps to reproduce the bug
-
Start with WinUI 3 Desktop app template
-
Declare some UI element with Uid:
<Button x:Uid="button1" />
-
Create
Resources.resw
underStrings\en
, and add a<PRIResource Include=Strings\**\*.resw
to the project. -
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
. -
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:
- Created 3 years ago
- Reactions:1
- Comments:16 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@JosHuybrighs Because
ToolTipService.ToolTip
is an attached property, the correct syntax to use isMyButton.[using:Microsoft.UI.Xaml.Controls]ToolTipService.ToolTip
(see this article for more details).@Maddog2412 Please open a new issue to track the problem you’re encountering. Thanks!