-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using x:Uid in the ContentDialog
main properties produces a compilation error
#18322
Comments
@jeromelaban (As discussed in Discord) A sample app is provided above. FYI, it is not a blocker since I put my code in code behind. |
I have the same issue. I don't know what was already said on Discord but I can add that this happens for Without base.Content =
...
.GenericApply(__that, __nameScope, ((c1, __that, __nameScope) =>
{
global::Uno.UI.FrameworkElementHelper.SetBaseUri(c1, __baseUri_ContentDialog1_a00c984faab7524673d06862ec9846d0, "file:///D:/source/repos/cengelha//Presentation/Dialogs/ContentDialog1.xaml", 13, 4);
c1.CreationComplete();
}
))
;
this
.GenericApply(__that, __nameScope, ((c2, __that, __nameScope) =>
{
// Source ..\..\..\..\Presentation\Dialogs\ContentDialog1.xaml (Line 1:2)
// WARNING Property c2.base does not exist on {http://schemas.microsoft.com/winfx/2006/xaml/presentation}ContentDialog, the namespace is http://www.w3.org/XML/1998/namespace. This error was considered irrelevant by the XamlFileGenerator
c2.DefaultButton = global::Microsoft.UI.Xaml.Controls.ContentDialogButton.Close;
c2.Title = @"TITLE";
c2.PrimaryButtonText = "Button1";
c2.SecondaryButtonText = "Button2";
}
))
... With base.Content =
...
.GenericApply(__that, __nameScope, ((c6, __that, __nameScope) =>
{
global::Uno.UI.FrameworkElementHelper.SetBaseUri(c6, __baseUri_ContentDialog1_5b96bc6f2fa933199356f7b36a0c5f57, "file:///D:/source/repos/cengelha//Presentation/Dialogs/ContentDialog1.xaml", 21, 4);
c6.CreationComplete();
}
))
Title = global::Uno.UI.Helpers.MarkupHelper.GetResourceStringForXUid("ContentDialog", "ContentDialog1/Title");
SecondaryButtonText = global::Uno.UI.Helpers.MarkupHelper.GetResourceStringForXUid("ContentDialog", "ContentDialog1/SecondaryButtonText");
PrimaryButtonText = global::Uno.UI.Helpers.MarkupHelper.GetResourceStringForXUid("ContentDialog", "ContentDialog1/PrimaryButtonText");
CloseButtonText = global::Uno.UI.Helpers.MarkupHelper.GetResourceStringForXUid("ContentDialog", "ContentDialog1/CloseButtonText");
;
this
.GenericApply(__that, __nameScope, ((c7, __that, __nameScope) =>
{
// Source ..\..\..\..\Presentation\Dialogs\ContentDialog1.xaml (Line 2:2)
// WARNING Property c7.base does not exist on {http://schemas.microsoft.com/winfx/2006/xaml/presentation}ContentDialog, the namespace is http://www.w3.org/XML/1998/namespace. This error was considered irrelevant by the XamlFileGenerator
c7.DefaultButton = global::Microsoft.UI.Xaml.Controls.ContentDialogButton.Close;
}
))
... |
@cengelha FYI, I was just reporting the bug via discord. What you provided above is great, you went beyond of what I provided. This will help the Uno team. Thanks. |
Thanks for letting me know! At Uno team: It may also worth mentioning that it only happens if there is any custom content as otherwise the |
ContentDialog
main properties produces a compilation error
Current behavior
I have this error:
ContentDialog1_4b00c2cae815e453e645ca862e00c968.cs(74,6,74,6): error CS1002: ; expected
when I use x:Uid="EngineeringPropertySerialNumbersDialog" in a ContentDialog main properties.
Moving this x:Uid to a Page control works.
Expected behavior
No compilation error.
How to reproduce it (as minimally and precisely as possible)
AppUid.zip
Workaround
No response
Works on UWP/WinUI
No
Environment
No response
NuGet package version(s)
5.4.5
Affected platforms
Skia (WPF), Skia (Linux X11), Skia (macOS), Windows (WinAppSDK)
IDE
Visual Studio 2022
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: