Error XFC0000

2 Answers 1681 Views
ComboBox
Sebastian
Top achievements
Rank 1
Sebastian asked on 31 Jul 2022, 05:34 PM
When using the Telerik for MAUI libraries and trying to compile for a Windows device, the error occurs:

Error XFC0000 Cannot resolve type "http://schemas.telerik.com/2022/xaml/maui:telerik:RadComboBox".

The same Android app compiles and works.

Thanks.
Stephen
Top achievements
Rank 1
Iron
Iron
commented on 20 Sep 2023, 05:39 PM

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

2 Answers, 1 is accepted

Sort by
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.


Stephen
Top achievements
Rank 1
Iron
Iron
commented on 15 Sep 2023, 10:05 PM | edited

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???

Lance | Senior 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.

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 

Kenneth
Top achievements
Rank 1
commented on 16 Oct 2023, 06:53 PM

#1 above fixed my issues.  Was playing with global styles and had a telerik control referenced in the app.xmal.  It took all day to find this.  Removed the Style and all worked fine.
0
Andrea
Top achievements
Rank 2
Iron
answered on 20 Sep 2023, 08:57 AM
Sebastian, maybe you have a Style about the telerik:RadComboBox (ex in TelerikStyles.xaml) but you don't have any RadComboBox in your xaml pages?
Tags
ComboBox
Asked by
Sebastian
Top achievements
Rank 1
Answers by
Antoan
Telerik team
Andrea
Top achievements
Rank 2
Iron
Share this question
or