Telerik Forums
UI for .NET MAUI Forum
1 answer
411 views

This is in a Maui Embedded Project.  Other Telerik Controls are working. 

Xaml:

<telerik:RadComboBox AutomationId="staticItemsComboBox">
    <telerik:RadComboBox.ItemsSource>
        <x:Array Type="{x:Type x:String}">
            <x:String>USA</x:String>
            <x:String>Uganda</x:String>
            <x:String>Ukraine</x:String>
            <x:String>Canada</x:String>
            <x:String>France</x:String>
            <x:String>Italy</x:String>
            <x:String>United Kingdom</x:String>
            <x:String>China</x:String>
            <x:String>Japan</x:String>
        </x:Array>
    </telerik:RadComboBox.ItemsSource>
</telerik:RadComboBox>

StackTrace:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.TypeInitializationException: The type initializer for 'Telerik.Maui.Controls.RadComboBox' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'Telerik.Maui.Controls.ComboBoxConstants' threw an exception.
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Maui.Controls.ComboBoxConstants..cctor()
   --- End of inner exception stack trace ---
   at Telerik.Maui.Controls.RadComboBox..cctor()
   --- End of inner exception stack trace ---
   at System.Reflection.ConstructorInvoker.InterpretedInvoke(Object obj, Span`1 args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.RuntimeType.CreateInstanceMono(Boolean nonPublic, Boolean wrapExceptions)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at Microsoft.Maui.Controls.Xaml.CreateValuesVisitor.Visit(ElementNode node, INode parentNode) in D:\a\_work\1\s\src\Controls\src\Xaml\CreateValuesVisitor.cs:line 102
   at Microsoft.Maui.Controls.Xaml.ElementNode.Accept(IXamlNodeVisitor visitor, INode parentNode) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlNode.cs:line 159
   at Microsoft.Maui.Controls.Xaml.ElementNode.Accept(IXamlNodeVisitor visitor, INode parentNode) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlNode.cs:line 155
   at Microsoft.Maui.Controls.Xaml.ElementNode.Accept(IXamlNodeVisitor visitor, INode parentNode) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlNode.cs:line 155
   at Microsoft.Maui.Controls.Xaml.RootNode.Accept(IXamlNodeVisitor visitor, INode parentNode) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlNode.cs:line 212
   at Microsoft.Maui.Controls.Xaml.XamlLoader.Visit(RootNode rootnode, HydrationContext visitorContext, Boolean useDesignProperties) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlLoader.cs:line 207
   at Microsoft.Maui.Controls.Xaml.XamlLoader.Load(Object view, String xaml, Assembly rootAssembly, Boolean useDesignProperties) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlLoader.cs:line 78
   at Microsoft.Maui.Controls.Xaml.XamlLoader.Load(Object view, String xaml, Boolean useDesignProperties) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlLoader.cs:line 53
   at Microsoft.Maui.Controls.Xaml.XamlLoader.Load(Object view, Type callingType) in D:\a\_work\1\s\src\Controls\src\Xaml\XamlLoader.cs:line 49
   at Microsoft.Maui.Controls.Xaml.Extensions.LoadFromXaml[StopList](StopList view, Type callingType) in D:\a\_work\1\s\src\Controls\src\Xaml\ViewExtensions.cs:line 37
   at TransportACE_Maui.Source.UI.StopList.InitializeComponent() in C:\apacheta_git\TransportACE_HME\TransportACE_Maui\Microsoft.Maui.Controls.SourceGen\Microsoft.Maui.Controls.SourceGen.CodeBehindGenerator\Source_Views_StopList.xaml.sg.cs:line 26
   at TransportACE_Maui.Source.UI.StopList..ctor(StopListViewModel viewModel) in C:\apacheta_git\TransportACE_HME\TransportACE_Maui\Source\Views\StopList.xaml.cs:line 13
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext, Microsoft.Extensions.DependencyInjection, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].VisitCallSiteMain(ServiceCallSite callSite, RuntimeResolverContext argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext, Microsoft.Extensions.DependencyInjection, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].VisitCallSite(ServiceCallSite callSite, RuntimeResolverContext argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeServiceProviderEngine.<>c__DisplayClass4_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
   at Microsoft.Maui.MauiContext.WrappedServiceProvider.GetService(Type serviceType) in D:\a\_work\1\s\src\Core\src\MauiContext.cs:line 68
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[StopList](IServiceProvider provider)
   at TransportACE.Droid.StopsListMaui.OnCreate(Bundle bundle) in C:\apacheta_git\TransportACE_HME\TransportACE_Maui\Platforms\Android\Source\UITasks\StopsListMaui.cs:line 199

Maria
Telerik team
 answered on 04 Apr 2023
1 answer
143 views

Hi Team,

any suggestion for me if I want to make Telerik popup like the following way: modal popup and wait for user input, then do next step based on user choose?

Lance | Senior Manager Technical Support
Telerik team
 answered on 28 Mar 2023
1 answer
272 views

Unable to set selected item text propery from viewmodel unless IsEditable="True" but not IsEditable="{Binding boolvar}"

The below code will show the text property but editable. How to make the combo box non-editable and programmatically set the selected item and selected text

                <telerik:RadComboBox  x:Name="MAccountHead" DisplayMemberPath="{Binding SelectedType.TypeDesc, Mode=TwoWay}"  SelectedItem="{Binding SelectedType, Mode=TwoWay}"
                                   HighlightTextColor="Blue" ItemsSource="{Binding Typ}" Text="{Binding SelectedType.TypeDesc, Mode=TwoWay}"
                                HeightRequest="45"  PlaceholderColor="LightGray" Placeholder="Main Head"
                                  Grid.Row="4" Grid.Column="1" BorderThickness="0,0,0,1"  IsEditable="True">
                    <telerik:RadComboBox.Triggers>
                        <DataTrigger TargetType="telerik:RadComboBox"
                                 Binding="{Binding FormVal.TypeErrorVisible}"
                                 Value="true">
                            <Setter Property="BackgroundColor" Value="Bisque"/>
                        </DataTrigger>
                    </telerik:RadComboBox.Triggers>
                </telerik:RadComboBox>

 

Maria
Telerik team
 answered on 27 Mar 2023
1 answer
270 views

Hello,

 

I seem to be having an issue with the Telerik .NET MAUI SideDrawer control. I can see the MainContent view, however, I have no means to open the DrawerContent.

 

Below is my ContentPage markup and a screenshot of the result.

 

Is my markup correct? Is it just my device causing the issue?

 

ContentPage Markup

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="SynergyMobile4.Views.TestReport.TR_Index"
             xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
             xmlns:tr="clr-namespace:SynergyMobile4.ViewModels.TestReport"
             Title="Test Report">
    <VerticalStackLayout>

        <telerik:RadSideDrawer x:Name="drawer" 
                                DrawerLength="200">
            <telerik:RadSideDrawer.MainContent>
                <Label Text="Main content" />
            </telerik:RadSideDrawer.MainContent>
            <telerik:RadSideDrawer.DrawerContent>
                <VerticalStackLayout Spacing="10"
                                    BackgroundColor="Red"
                                        Padding="10, 10, 0, 0">
                    <Button Text="Mail" />
                    <Button Text="Calendar" />
                    <Button Text="People" />
                    <Button Text="Tasks" />
                </VerticalStackLayout>
            </telerik:RadSideDrawer.DrawerContent>
        </telerik:RadSideDrawer>
    </VerticalStackLayout>

</ContentPage>

 

Result (screenshot from Galaxy S22 physical device)

 

Edit:

If I hardcode the [IsOpen] property to "True" in the XAML, the drawer opens and I can see the items, but I still have no button or control to open it naturally.

Didi
Telerik team
 answered on 27 Mar 2023
0 answers
154 views

Hello, 

is there possibility to use telerik maui controls with material design?

 

thanks in advance

Aram
Top achievements
Rank 1
 asked on 22 Mar 2023
0 answers
308 views
Getting handler not found error when xaml has a RadSegmentedControl in it on Android.  It is working in iOS and other Telerik controls are working in Android but not RadSegmentedControl.  Is RadSegmentedConrol supported on Android? 
Jon
Top achievements
Rank 1
 asked on 21 Mar 2023
0 answers
368 views

I have just implemented a MAUI ContentPage with an completely empty RadDataGrid definition.  In my "using" section of the xaml page, I have this entry:

xmlns:dataGrid="http://schemas.telerik.com/2022/xaml/maui"

In the root grid, I have this entry:

<dataGrid:RadDataGrid
	Grid.Row="1">
</dataGrid:RadDataGrid>

When the application is run, I get the following XAML binding errors:

NotificationsViewModel	ActualWidth	RadBorder.MinimumWidthRequest	Double	'ActualWidth' property not found on 'MobyClient.ViewModels.NotificationsViewModel', target property: 'Telerik.Maui.Controls.RadBorder.MinimumWidthRequest'
NotificationsViewModel	HeaderText	Label.Text				String	'HeaderText' property not found on 'MobyClient.ViewModels.NotificationsViewModel', target property: 'Microsoft.Maui.Controls.Label.Text'			

A key point is that when I added 'ActualWidth' and 'HeaderText' observable properties, the errors go away. In fact, when I run the Telerik MAUI code examples, I see the same errors in the examples "First Look" data grid example:

Telerik.Maui.Controls.Compatibility.DataControlsRenderer.UWP.ExtendedListViewItem	HandleIconPath	Microsoft.UI.Xaml.Controls.BitmapIcon.UriSource, Name='PART_ReorderHandle'	Uri	BindingExpression path error: 'HandleIconPath' property not found on 'Telerik.Maui.Controls.Compatibility.DataControlsRenderer.UWP.ExtendedListViewItem'			
FirstLookViewModel	ActualWidth	RadBorder.MinimumWidthRequest	Double	'ActualWidth' property not found on 'QSF.Examples.DataGridControl.FirstLookExample.FirstLookViewModel', target property: 'Telerik.Maui.Controls.RadBorder.MinimumWidthRequest'			
FirstLookViewModel	HeaderText	Label.Text				String	'HeaderText' property not found on 'QSF.Examples.DataGridControl.FirstLookExample.FirstLookViewModel', target property: 'Microsoft.Maui.Controls.Label.Text'
Obviously, I either missing something in the Telerik MAUI control setup or there is a bug. Is this a setup issue or a bug? I am also seeing similar binding errors in the RadListView. As a general rule, I do NOT like any binding errors, so this bugs me. Any ideas?
Stephen
Top achievements
Rank 1
Iron
Iron
 updated question on 18 Mar 2023
1 answer
105 views

I may be missing it, but is GridLines documented? It took me quite a while to figure out how to turn off the white lines between rows (WinUI). Was this recently added? Anyway,

        <Setter Property="GridLinesVisibility" Value="None" />

is what I needed. Thanks.

Maria
Telerik team
 answered on 16 Mar 2023
0 answers
148 views

It doesn't seem this is possible, correct? Could it be added as a feature request?

For example, I may want to use the footer row as a type of status message and would like to have the entire grid width to work with.

Thanks,

-ldl-

Larry
Top achievements
Rank 1
Iron
Iron
Veteran
 asked on 14 Mar 2023
2 answers
129 views

We did some investigating about PropertySortDescriptor, it seems that we need target 'sort column' be a part of our grid columns, we tried it in Telerik sample project and it will give no response without the target 'sort column'.  So we would like to know that we have to have a column for target property to use it as a property sort descriptor, right?

please check more details in this document:  .NET MAUI DataGrid Documentation - Sorting - Telerik UI for .NET MAUI

The difference between the DelegateSortDescriptor and the PropertySortDescriptor is that the DelegateSortDescriptor sorts data by a custom key, while the PropertySortDescriptor sorts by a defined key, which is a property from the model.

 

Teddy
Top achievements
Rank 1
 answered on 13 Mar 2023
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?