This whole thing is sort of confusing. I'm more of the thinking that .NET and MAUI has more to do with this than Telerik... I was able to create a new solution and I was able to get to all of the Telerik MAUI controls. A constant problem I have had working with MAUI is the C# project is EASILY corrupted. If you add a font, most of the time, the font will just work. Other times, and it has happened to me at least three times. After you add a font, suddenly the log file is FILLED with errors about not being able to locate and load fonts. The same is true with images. Suddenly, icons do not show up on buttons and the like. This is all very frustrating.
When the above happens, I have had to create a completely new and empty solution and class by class add stuff from the old solution into the new solution. What is even more maddening is I have yet to discover what does the actual corruption as the new solution is identical to the corrupted solution, line for line, but the project is completely foobar. Then, just wait, it WILL become corrupted, too! Arg!
Just an FYI, I had updated my VS 2022 to v17.7.4 over the weekend so I have no idea if that is the cause of the latest incident. The main reason I opened this issue is that I, like I have dozens of times, used your documentation to implement some new Telerik feature and it works most of the time without fail. This last issue that sprang up the other day, was a mystery as I validated everything in the solution that I reported on and it was configured correctly. I thought that by reporting the issue, you may have seen others with the same dealio.
There was a comedian who had a bit that odd things would happen to her and she would ask, "Does this happen to you? Anyone? Anyone?" The punch line of the bit was, "No Monica, just you!" That is how I feel most of the time!!!
Go ahead and close my issue if it doesn't make sense to keep it open. I am not sure of what Antoan is referring to below. I am under an immense time crunch, so of course, if it can be screwed up for me, it most likely will be!
Cheers, Steve
2 Answers, 1 is accepted
0
Antoan
Telerik team
answered on 01 Aug 2022, 05:47 AM
Hi Sabastian,
We are aware of this issue and have a logged bug on the official .NET MAUI GitHub Repository. It seems it is a general issue when creating a custom control. Here is a link to the issue: https://github.com/dotnet/maui/issues/7503
Solution: We have found that setting a x:Name to the control fixes the issue, try it and let me know if the issue is resolved.
Regards,
Antoan
Progress Telerik
The Premier Dev Conference is back!
Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.
I am porting code from an existing Maui app into a new solution. I use Telerik all over the place in the original solution and it runs fine. When I go to run the new app, I get the above error only for the RadBorder (which like I say, I use in at least a dozen places in my old implementation).
I have included the latest version of the Telerik.UI.for.Maui (6.1.0) from NuGet
I have configured it to be used in my MauiProgram.cs file:
<!-- Profile Picture --><telerik:RadBorderx:Name="ProfilePictureBorder"Grid.Column="0"CornerRadius="32"HeightRequest="64"HorizontalOptions="Center"Margin="5,0,0,0"VerticalOptions="Center"WidthRequest="64"><!-- ReSharper disable once Xaml.PossibleNullReferenceException --><ImageAspect="AspectFill"HorizontalOptions="Center"Source="user.png"VerticalOptions="Center" /></telerik:RadBorder>
As you can see, I added a name to the control:
x:Name="ProfilePictureBorder"
It just will not build whatever I do. It builds and runs in another version of this very solution...
Ideas???
Lance | Manager Technical Support
Telerik team
commented on 18 Sep 2023, 12:51 PM
HI Stephen, there are two other reasons this can happen:
1) Did you place any Telerik styles in App.xaml?
This will have .NET MAUI attempt to register the style's target type too soon, throwing the same error. Note: This also include using any Telerik styles inside the merged dictionaries.
Hi Sebastian,
This whole thing is sort of confusing. I'm more of the thinking that .NET and MAUI has more to do with this than Telerik... I was able to create a new solution and I was able to get to all of the Telerik MAUI controls. A constant problem I have had working with MAUI is the C# project is EASILY corrupted. If you add a font, most of the time, the font will just work. Other times, and it has happened to me at least three times. After you add a font, suddenly the log file is FILLED with errors about not being able to locate and load fonts. The same is true with images. Suddenly, icons do not show up on buttons and the like. This is all very frustrating.
When the above happens, I have had to create a completely new and empty solution and class by class add stuff from the old solution into the new solution. What is even more maddening is I have yet to discover what does the actual corruption as the new solution is identical to the corrupted solution, line for line, but the project is completely foobar. Then, just wait, it WILL become corrupted, too! Arg!
Just an FYI, I had updated my VS 2022 to v17.7.4 over the weekend so I have no idea if that is the cause of the latest incident. The main reason I opened this issue is that I, like I have dozens of times, used your documentation to implement some new Telerik feature and it works most of the time without fail. This last issue that sprang up the other day, was a mystery as I validated everything in the solution that I reported on and it was configured correctly. I thought that by reporting the issue, you may have seen others with the same dealio.
There was a comedian who had a bit that odd things would happen to her and she would ask, "Does this happen to you? Anyone? Anyone?" The punch line of the bit was, "No Monica, just you!" That is how I feel most of the time!!!
Go ahead and close my issue if it doesn't make sense to keep it open. I am not sure of what Antoan is referring to below. I am under an immense time crunch, so of course, if it can be screwed up for me, it most likely will be!
Cheers, Steve