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

I currently have a RadComboBox. I mainly want to use the default stylings (apart for some colors as you can see in the code), but I want to disable FontAutoScalingEnabled on every text/label items.

<telerik:RadComboBox Grid.Column="0" Grid.Row="0"
                     ItemsSource="{Binding MyItems}"
                     SelectionMode="Single"
                     Placeholder="{x:Static resx:Labels.ItemCategory}"
                     SelectedIndex="{Binding SelectedItemIndex, Mode=TwoWay}">
    <telerik:RadComboBox.Style>
        <Style TargetType="telerik:RadComboBox">
            <Setter Property="BackgroundColor" Value="{StaticResource White}"/>
            <Setter Property="TextColor" Value="{StaticResource Black}"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding SelectedItem}" Value="True" TargetType="telerik:RadComboBox">
                    <Setter Property="BackgroundColor" Value="{StaticResource Primary}"/>
                    <Setter Property="TextColor" Value="{StaticResource White}"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </telerik:RadComboBox.Style>
</telerik:RadComboBox>

How can I set FontAutoScalingEnabled  for all labels in the ComboBox (selectable Items and selectedItem).

 

Thanks in advance!

Didi
Telerik team
 answered on 14 Nov 2024
0 answers
28 views

I setup a CollectionView with grouping based on an attribute of the item.  Everything seems to be working, except in the groups with more than one item there are a couple extra items in the list.  One is the name of the group, and the other is 'Grand Total'

If I click on them the Item tapped handler receives a string.  I do not see anything to turn this behavior on/off.  My setup for the RadCollectionView is pretty basic


    <telerik:RadCollectionView x:Name="RadCollectionView"
                         BackgroundColor="Transparent" VerticalOptions="Fill"
                         ItemsSource="{Binding SymbolItems}"
                         ItemViewStyle="{StaticResource SymbolItemStyle}"
                         SelectionMode="Single"
                         SelectedItem="{Binding SelectedSymbolItem}"
                         ItemTapCommand="{Binding SymbolClickedCommand}">
      
      <telerik:RadCollectionView.GroupDescriptors>
        <telerik:PropertyGroupDescriptor PropertyName="Parent" />
      </telerik:RadCollectionView.GroupDescriptors>


      <telerik:RadCollectionView.ItemTemplate>
        <DataTemplate x:DataType="edit:SymbolItem">
          <Grid ColumnDefinitions="40, *" Margin="40,0,0,0">
            <ffImage:CachedImage Grid.Column="0" Grid.Row="0" HeightRequest="60"
                                 Source="{Binding ImageSource}"/>
            <Label Grid.Row="0" Grid.Column="1"
                   VerticalOptions="Center"
                   FontAttributes="Bold"
                   FontSize="17"
                   VerticalTextAlignment="Center"
                   Margin="10,0,0,0"
                   Text="{Binding Name}"/>
          </Grid>
        </DataTemplate>
      </telerik:RadCollectionView.ItemTemplate>
    </telerik:RadCollectionView>



      <Style x:Key="SymbolItemStyle" TargetType="telerik:RadCollectionViewItemView">
        <Setter Property="VisualStateManager.VisualStateGroups">
          <VisualStateGroupList>
            <VisualStateGroup Name="CommonStates">
              <VisualState Name="Normal">
                <VisualState.Setters>
                  <Setter Property="BackgroundColor" Value="Transparent" />
                </VisualState.Setters>
              </VisualState>
              <VisualState Name="Selected">
                <VisualState.Setters>
                  <Setter Property="BackgroundColor" Value="LightGrey" />
                  <Setter Property="BorderColor" Value="#0A3A82"></Setter>
                  <Setter Property="BorderThickness" Value="2"></Setter>
                </VisualState.Setters>
              </VisualState>
            </VisualStateGroup>
          </VisualStateGroupList>
        </Setter>
      </Style>

What is required to remove these items from the view?

Thanks -Joe

Joe
Top achievements
Rank 1
Iron
Veteran
Iron
 asked on 12 Nov 2024
1 answer
34 views

Hi folks,

 

Is there any way to print a document directly from the RadPdfViewer or even share the document (e.g., iOS Share Menu) to select the system print functionality or move the document to a different place/app?

Yana
Telerik team
 answered on 12 Nov 2024
1 answer
50 views

I have a RadListView I am setting up to replace the standard Maui ListView.

One thing I need to do is set the Selected item in the ViewModel as part of a filter so filtered item is already selected.  This seems to be an issue with doing this in the RadListView.


<telerik:RadListView x:Name="RadListView" 
                     BackgroundColor="Transparent" VerticalOptions="Fill"
                     ItemsSource="{Binding SymbolItems}"
                     SelectionMode="Single" SelectionGesture="Tap" IsGroupHeaderSticky="True"
                     SelectedItem="{Binding SelectedSymbolItem, Mode=TwoWay}" >

I setup the SelectedItem to fire off the Notify (this uses Prism base class)

public SymbolItem SelectedSymbolItem
{
	get => _selectedSymbolItem;
	set => SetProperty(ref _selectedSymbolItem, value);
}

But when I set the SelectedItem I get an exception

Value cannot be null. (Parameter 'indexPath')
   at ObjCRuntime.ThrowHelper.ThrowArgumentNullException(String argumentName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/ThrowHelper.cs:line 28
   at ObjCRuntime.NativeObjectExtensions.GetNonNullHandle(INativeObject self, String argumentName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/INativeObject.cs:line 42
   at TelerikUI.TKListView.SelectItem(NSIndexPath indexPath, Boolean animated, UICollectionViewScrollPosition scrollPosition)
   at Telerik.Maui.Controls.Compatibility.DataControlsRenderer.iOS.ListViewRenderer.SelectItem(Object item)
   at Telerik.Maui.Controls.Compatibility.DataControls.RadListView.OnSelectedItemAdded(Object item)
   at Telerik.Maui.Controls.Compatibility.DataControls.RadListView.OnSelectedItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1[[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Maui.Controls.Compatibility.DataControls.ListView.SelectedItemsCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1[[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].OnCollectionChanged(NotifyCollectionChangedAction action, Object item, Int32 index)
   at System.Collections.ObjectModel.ObservableCollection`1[[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].InsertItem(Int32 index, Object item)
   at Telerik.Maui.Controls.Compatibility.DataControls.ListView.SelectedItemsCollection.InsertItem(Int32 index, Object item)
   at System.Collections.ObjectModel.Collection`1[[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Add(Object item)
   at Telerik.Maui.Controls.Compatibility.DataControls.RadListView.UpdateSelectedItem()
   at Telerik.Maui.Controls.Compatibility.DataControls.RadListView.OnPropertyChanged(String propertyName)

The value being set is definitely not null.

Also I notice that the Setter seems to be getting invoked twice, so if I put a breakpoint my code goes in and executes the setter, and then seems like the framework does something and invokes it again which throws the exception.

Can SelectedItem in a RadListView be set be using the bound property? (like with any general TwoWay binding).  If not how could this be achieved?

Didi
Telerik team
 answered on 11 Nov 2024
1 answer
43 views

Hi!

Is it possible to add move animation when call ObservableCollection.Move method?

Standard maui CollectionView supports the move animation.

 

I attached the sample to see what i mean.

Yana
Telerik team
 answered on 08 Nov 2024
1 answer
36 views
I'm working with .net maui 8 in a mobile App and the last feature i'm working is the disable of the autofont scaling in all app because when a user set the font size higher in the accesibility settings the app doesn't react very well, so i'm disabling these feature for now in all present components but i'm can't edit certains components of telerik like ComboBox (i used a control template for this) and now the DatePicker in need to set this property on the Selector of the popup, i can fix this feature in all parts of the component except this.

This is how the date picker is showed in iOS.

I know i can edit the display label, the place holder, popup header label, the footer, the buttons, but what about the content of the popup?, i only want to set some font/text properties and i don't know how to accomplish this and i don't find any of documentation about this part.

Didi
Telerik team
 answered on 05 Nov 2024
1 answer
57 views

Hello, I have an issue in .NET MAUI 8.0 with the TabView control in the following code.

<?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"
             xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
             x:Class="TelerikMauiApp1.MainPage">

    <StackLayout>
        <telerik:RadTabView x:Name="tabView" ItemsSource="{Binding Data}">
            <telerik:RadTabView.ItemTemplate>
                <DataTemplate>
                    <telerik:TabViewItem HeaderText="{Binding Name}">
                        <telerik:TabViewItem.ContentTemplate>
                            <DataTemplate>
                                <telerik:RadItemsControl ItemsSource="{Binding Customers}">
                                    <telerik:RadItemsControl.ItemTemplate>
                                        <DataTemplate>
                                            <Grid>
                                                <telerik:RadBorder BorderColor="LightGray"
                                                           Padding="10"
                                                           Margin="10,5"
                                                           BorderThickness="1" 
                                                           CornerRadius="5">
                                                    <Grid RowDefinitions="Auto, Auto" 
                                                  RowSpacing="5">
                                                        <HorizontalStackLayout Spacing="10">
                                                            <Label Text="&#xe836;"
                                                           FontFamily="TelerikFontExamples" />
                                                            <Label Text="{Binding Name}" />
                                                        </HorizontalStackLayout>
                                                        <HorizontalStackLayout Spacing="10" 
                                                                       Grid.Row="1">
                                                            <Label Text="&#xe85d;" 
                                                           FontFamily="TelerikFontExamples" />
                                                            <Label Text="{Binding Number}" />
                                                        </HorizontalStackLayout>
                                                    </Grid>
                                                </telerik:RadBorder>
                                            </Grid>
                                        </DataTemplate>
                                    </telerik:RadItemsControl.ItemTemplate>
                                </telerik:RadItemsControl>
                            </DataTemplate>
                        </telerik:TabViewItem.ContentTemplate>
                    </telerik:TabViewItem>
                </DataTemplate>
            </telerik:RadTabView.ItemTemplate>

        </telerik:RadTabView>
    </StackLayout>

</ContentPage>

The error I get is: "DataTemplateContent property does not support values of type TabViewItem." Additionally, the tag following the first DataTemplate does not exist.

The version of Telerik I am using is 7.1.0.

Yana
Telerik team
 answered on 31 Oct 2024
1 answer
59 views

Telerik UI for MAUI 7.1, .NET 8.0

New .NET MAUI project. Added Telerik, added a DataGrid to XAML, I get the following when I try to run:

Microsoft.Maui.Controls.Element: Warning: Microsoft.Maui.Controls.SolidColorBrush is already a child of Telerik.Maui.Controls.RadBorder. Remove Microsoft.Maui.Controls.SolidColorBrush from Telerik.Maui.Controls.RadBorder before adding to Telerik.Maui.Controls.RadBorder.

Didi
Telerik team
 answered on 30 Oct 2024
1 answer
154 views

Hi,

I've updated to the latest workload and MAUI versions to target iOS 18.

When an item is added to a RadListView I get an application crash which is not recoverable. Please note that I've upgraded Telerik.UI.for.Maui from 7.0.0 to 7.1.0.

 

Below is the error

Objective-C exception thrown.  Name: NSInternalInconsistencyException Reason: Expected dequeued view to be returned to the collection view in preparation for display. When the collection view's data source is asked to provide a view for a given index path, ensure that a single view is dequeued and returned to the collection view. Avoid dequeuing views without a request from the collection view. For retrieving an existing view in the collection view, use -[UICollectionView cellForItemAtIndexPath:] or -[UICollectionView supplementaryViewForElementKind:atIndexPath:]. Dequeued view: <Telerik_Maui_Controls_Compatibility_DataControlsRenderer_iOS_ListView_UIListViewGroupHeaderCell: 0x1312df000; baseClass = UICollectionViewCell; frame = (0 0; 0 0); alpha = 0; gestureRecognizers = <NSArray: 0x30f0281d0>; backgroundColor = UIExtendedSRGBColorSpace 1 1 1 1; layer = <CALayer: 0x3078ad060>>; Collection view: <TKCollectionView: 0x11f39aa00; baseClass = UICollectionView; frame = (0 0; 0 0); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x303dab1b0>; backgroundColor = UIExtendedGrayColorSpace 0 0; layer = <CALayer: 0x3077297a0>; contentOffset: {0, 0}; contentSize: {0, 217.5}; adjustedContentInset: {0, 0, 0, 0}; layout: <TKListViewLinearLayout: 0x132300280>; dataSource: <Telerik_Maui_Controls_Compatibility_DataControlsRenderer_iOS_TKExtendedListView: 0x13201a100; frame = (0 0; 0 0); backgroundColor = UIExtendedGrayColorSpace 0 0; layer = <CALayer: 0x307729440>>>
Native stack trace:
0   CoreFoundation                      0x000000018c3887d8 1532D3D8-9B3B-3F2F-B35F-55A20DDF411B + 534488
1   libobjc.A.dylib                     0x000000018965b2e4 objc_exception_throw + 88
2   Foundation                          0x000000018b7588d8 6D0212CC-3B9E-32C9-BE20-72989CE3ACB8 + 8452312
3   UIKitCore                           0x000000018f4e4d5c 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 10456412
4   UIKitCore                           0x000000018fc244c4 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 18056388
5   UIKitCore                           0x000000018ec99254 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 1757780
6   UIKitCore                           0x000000018edf17c4 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 3168196
7   AOS.RA.Mobile                       0x000000010416bce4 -[TKCollectionView layoutSubviews] + 56
8   UIKitCore                           0x000000018eaf9688 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 54920
9   QuartzCore                          0x000000018de2fc28 D8E8E86D-85AC-3C90-B2E1-940235ECAA18 + 494632
10  QuartzCore                          0x000000018de2f7b4 D8E8E86D-85AC-3C90-B2E1-940235ECAA18 + 493492
11  QuartzCore                          0x000000018de86914 D8E8E86D-85AC-3C90-B2E1-940235ECAA18 + 850196
12  QuartzCore                          0x000000018de057c4 D8E8E86D-85AC-3C90-B2E1-940235ECAA18 + 321476
13  QuartzCore                          0x000000018de48a0c D8E8E86D-85AC-3C90-B2E1-940235ECAA18 + 596492
14  UIKitCore                           0x000000018eb8f568 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 669032
15  UIKitCore                           0x000000018eb8cb64 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 658276
16  UIKitCore                           0x000000018eb8c9d8 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 657880
17  UIKitCore                           0x000000018eb8c628 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 656936
18  UIKitCore                           0x000000018eb8d59c 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 660892
19  CoreFoundation                      0x000000018c35c328 1532D3D8-9B3B-3F2F-B35F-55A20DDF411B + 353064
20  CoreFoundation                      0x000000018c35c2bc 1532D3D8-9B3B-3F2F-B35F-55A20DDF411B + 352956
21  CoreFoundation                      0x000000018c359e24 1532D3D8-9B3B-3F2F-B35F-55A20DDF411B + 343588
22  CoreFoundation                      0x000000018c358fbc 1532D3D8-9B3B-3F2F-B35F-55A20DDF411B + 339900
23  CoreFoundation                      0x000000018c358830 CFRunLoopRunSpecific + 588
24  GraphicsServices                    0x00000001d83381c4 GSEventRunModal + 164
25  UIKitCore                           0x000000018eebeeb0 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 4009648
26  UIKitCore                           0x000000018ef6d5b4 UIApplicationMain + 340
27  AOS.RA.Mobile                       0x00000001047e4da4 xamarin_UIApplicationMain + 60
28  AOS.RA.Mobile                       0x0000000104b3dbb4 do_icall + 316
29  AOS.RA.Mobile                       0x0000000104b3c4b4 do_icall_wrapper + 348
30  AOS.RA.Mobile                       0x0000000104b30ec4 mono_interp_exec_method + 2836
31  AOS.RA.Mobile                       0x0000000104b2ea5c interp_runtime_invoke + 236
32  AOS.RA.Mobile                       0x0000000104afd634 mono_jit_runtime_invoke + 1116
33  AOS.RA.Mobile                       0x0000000104aa4cf8 mono_runtime_invoke_checked + 148
34  AOS.RA.Mobile                       0x0000000104aaaff4 mono_runtime_exec_main_checked + 116
35  AOS.RA.Mobile                       0x0000000104b02c50 mono_jit_exec + 356
36  AOS.RA.Mobile                       0x0000000104810038 xamarin_main + 2324
37  AOS.RA.Mobile                       0x0000000104b6b484 main + 64
38  dyld                                0x00000001b1d46ec8 3060D36A-16CE-3C3A-9258-3881459F5714 + 212680

 

 

The message of the exception:
Expected dequeued view to be returned to the collection view in preparation for display. When the collection view's data source is asked to provide a view for a given index path, ensure that a single view is dequeued and returned to the collection view. Avoid dequeuing views without a request from the collection view. For retrieving an existing view in the collection view, use -[UICollectionView cellForItemAtIndexPath:] or -[UICollectionView supplementaryViewForElementKind:atIndexPath:]. Dequeued view: <Telerik_Maui_Controls_Compatibility_DataControlsRenderer_iOS_ListView_UIListViewGroupHeaderCell: 0x1312df000; baseClass = UICollectionViewCell; frame = (0 0; 0 0); alpha = 0; gestureRecognizers = <NSArray: 0x30f0281d0>; backgroundColor = UIExtendedSRGBColorSpace 1 1 1 1; layer = <CALayer: 0x3078ad060>>; Collection view: <TKCollectionView: 0x11f39aa00; baseClass = UICollectionView; frame = (0 0; 0 0); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x303dab1b0>; backgroundColor = UIExtendedGrayColorSpace 0 0; layer = <CALayer: 0x3077297a0>; contentOffset: {0, 0}; contentSize: {0, 217.5}; adjustedContentInset: {0, 0, 0, 0}; layout: <TKListViewLinearLayout: 0x132300280>; dataSource: <Telerik_Maui_Controls_Compatibility_DataControlsRenderer_iOS_TKExtendedListView: 0x13201a100; frame = (0 0; 0 0); backgroundColor = UIExtendedGrayColorSpace 0 0; layer = <CALayer: 0x307729440>>>

Didi
Telerik team
 answered on 29 Oct 2024
1 answer
45 views

Hi Team,

I am using CardActionsListView to display the images.

This works fine with Android and IOS, whereas in WINUI when uploaded an image it shows duplicate images, when refreshed the list it shows only one.

 

Can you provide any fix for this.

 

Thanks & Best Regards,

Mohammed Rameez Raza (Rameez)

Yana
Telerik team
 answered on 22 Oct 2024
Top users last month
Mila
Top achievements
Rank 1
Iron
Toya
Top achievements
Rank 1
Iron
Iron
Kyle
Top achievements
Rank 1
Omar
Top achievements
Rank 3
Iron
Iron
Iron
Les Baker
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?