Error XFC0000 Cannot resolve type "http://schemas.telerik.com/2022/xaml/maui:telerik:RadComboBox".
The same Android app compiles and works.
Thanks.
2 Answers, 1 is accepted
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
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:
_ = builder
.UseTelerik ()
.UseMauiApp<App> ()
.ConfigureFonts (fonts => {
I have added the namespace wherever Telerik controls will be placed:
xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
The use of the border is pretty straightforward:
<!-- Profile Picture -->
<telerik:RadBorder
x: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 -->
<Image
Aspect="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???
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.
2) Do you have XAML Compilation enabled?
Make sure you have XamlC set to Compile. I personally like to set this on the assembluy level in MauiProgram.cs, see this real-world example => https://github.com/LanceMcCarthy/DevOpsExamples/blob/main/src/MAUI/MauiDemo/MauiProgram.cs#L17
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