Open SoumyadipYT-OSS opened 6 days ago
Can you maybe show the full code and/or add a reproduction? There can be reasons that this is not working that are not shown in the XAML you have posted now. Like is this part of a DataTemplate maybe? Because then you cannot reference controls like this.
But you say this exact code worked in .NET 8? Is it this exact code or did you change anything besides the Border when you moved to .NET 9? Did you remove the bin & obj folders from your project and do a rebuild? Are there any other errors when you build that might cause this to happen?
@jfversluis Sir I have uploaded the xaml code there and in the xaml.cs file there are many errors coming related to CS:0103
@jfversluis Sir I have added my GitHub repository link here where you can find the code related to this topic:
Description
I am unable to bind the value from API to xaml UI rendering.
My xamlpage looks like this:
Now, see carefully the LblCity and LblDescription part where I am using the x:Name to display the value from the .cs file.
Now xaml.cs file looks like this:
But it is showing error, CS0103: LblCity context does not exist.
In .NET 9 it is not working, like Frame is removed in .NET 9, so if there is new way to implement the rendering please tell. Issue is open.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
9.0.10 SR1
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
8.0.0-rc.1.9171
Affected platforms
Android, Windows, macOS, iOS, Other (Tizen, Linux, etc. not supported by Microsoft directly)
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output