telerik:RadButton not available when targeting .net7.0

1 Answer 199 Views
Button
Richard
Top achievements
Rank 1
Richard asked on 02 Dec 2022, 11:56 AM | edited on 02 Dec 2022, 12:19 PM

In my MAUI app I target 

  • net7.0   
  • net7.0-android
  • net7.0-ios

I'm building a custom control and when I try to use the telerik:RadButton I get the following when building for iOS

Cannot resolve type "http://schemas.telerik.com/2022/xaml/maui:telerik:RadButton"

See below code as an example, it works fine for other controls but not the button.

<?xml version="1.0" encoding="utf-8" ?>
<ContentView
	x:Class="MyApp.Control"
	xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
	xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
	xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
	x:Name="this">

	<StackLayout>
		<telerik:RadBusyIndicator BackgroundColor="Red" />
		<telerik:RadButton BackgroundColor="Red" Text="Hello" />
	</StackLayout>

</ContentView>

I've tried touse the Telerik namespace instead of the schema as well but no luck.

1 Answer, 1 is accepted

Sort by
0
Accepted
Didi
Telerik team
answered on 02 Dec 2022, 12:13 PM

Hi Richard,

The issue occurs when custom controls (controls that are not provided from Microsoft .NET MAUI). The issue is logged here: https://github.com/dotnet/maui/issues/7503

We have a troubleshooting article how to resolve the issue: https://docs.telerik.com/devtools/maui/knowledge-base/telerik-schema-error-cannot-resolve-type

Mainly add an x:Name to the controls you use. For example in your case add an x:Name to the RadButton control.

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Richard
Top achievements
Rank 1
commented on 02 Dec 2022, 12:23 PM

Thank you SO much for the quick feedback! You saved my weekend.
Tags
Button
Asked by
Richard
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or