Replies: 9 comments 1 reply
-
Where does it say that this should be possible? |
Beta Was this translation helpful? Give feedback.
-
I don't know but having the same language support available from code-behind as from xaml seems like a no-brainer to me. Why shouldn't this be possible? |
Beta Was this translation helpful? Give feedback.
-
@Balkoth The WinUI3Localizer might fit your requirements. It uses its own var awesomeButton = new Button();
Uids.SetUid(awesomeButton, "AwesomeButton"); (Disclaimer: I'm the author.) |
Beta Was this translation helpful? Give feedback.
-
xUid is a xaml property. This is not actually a bug, but an expectation. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
(What I should have asked earlier) Could you please provide some examples of your code? It helps a lot to see what you're doing exactly. The first example is "are you using Also, are you building with .NET WASK or WPF? Note that those are different frameworks. |
Beta Was this translation helpful? Give feedback.
-
This issue happens when building apps with .NET C# WindowsAppSDK WinUI3. Coming from a WPF app where some controls are created in code-behind and |
Beta Was this translation helpful? Give feedback.
-
I have converted this to a discussion for now, as this is not something that WinUI promises to support. We will move it to a feature proposal if it turns out to be a commonly needed scenario or receives significant community interest. @Balkoth also could you please provide a minimal repro to help us understand your scenario. |
Beta Was this translation helpful? Give feedback.
-
No because if you don't care to support this either way i am not putting any more work into this. Everything needed to understand the scenario is visible in this thread. As i said this is a show stopper for porting a WPF app to WinAppSDK. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
You can not create controls in code-behind cs-files and attach x:Uid and get automatic language string support.
Steps to reproduce the bug
Try creating any Xaml-Control in a code-behind file and set x:Uid on it.
NuGet package version
1.7.250513003
Windows version
Windows 11 23H2
Beta Was this translation helpful? Give feedback.
All reactions