Telerik Forums
UI for .NET MAUI Forum
0 answers
45 views
Hello,

I'm using Telelik entry control but, I can't type Korean when I use it. Please check if there's any way to solve it and let me know.
fyi, i'm using Mac OS now.


hyunkyoo
Top achievements
Rank 1
 updated question on 13 Feb 2024
1 answer
73 views

Hi There,

I want to load the DayTemplate according to the month displayed in the current calendar.

The DayTemplate xaml codes: 

 <local:ReminderTemplateSelector.TaskTemplate>
     <DataTemplate>
         <telerik:CalendarBorderLabel Text="{Binding Text}"
                                      TextColor="{StaticResource AccentColor4}"
                                      HorizontalTextAlignment="Center"
                                      VerticalTextAlignment="Center"
                                      FontAttributes="Bold">
             <Label FontFamily="TelerikFontExamples"
                    Text="&#xe80b;"
                    TextColor="{StaticResource AccentColor4}"
                    HorizontalTextAlignment="Center"
                    VerticalTextAlignment="End"
                    Margin="{OnPlatform Default=0, WinUI='0, 0, 0, 4'}" />
         </telerik:CalendarBorderLabel>
     </DataTemplate>
 </local:ReminderTemplateSelector.TaskTemplate>

ReminderTemplateSelector :

public class ReminderTemplateSelector : DataTemplateSelector
{

    public static readonly BindableProperty TasksProperty = BindableProperty.Create(nameof(Tasks), typeof(ReminderTemplateSelector), typeof(ReminderTemplateSelector), null);

    private List<DateTime> tasks;
    public ReminderTemplateSelector()
    {
      
    }

    public DataTemplate TaskTemplate { get; set; }

    public List<DateTime> Tasks
    {
        get => this.tasks;
        set
        {
            this.tasks = value;
        }
    }

    protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
    {
        var node = item as CalendarNode;
        var date = node.Date.Value;
          
        bool hasTaskReminder = false;
        if (this.tasks != null)
        {
            hasTaskReminder = this.tasks.Contains(date);
        }
         

        if (hasTaskReminder)
        {
            return this.TaskTemplate;
        }
         
        return null;
    }
}

I am trying to reload the "Task"  by month on OnDisplayDate event,  but OnSelectTemplate executed before the date change.

It is unable to load the correct DayTemplate based on the current month changes. How should I do it?

        private async void OnDisplayDateChanged(object sender, ValueChangedEventArgs<System.DateTime> e)
        {

            this.ReminderTemplateSelector.Tasks = LoadTask(e.NewValue);
        }


Yana
Telerik team
 answered on 12 Feb 2024
1 answer
34 views
hello, please can you help me fix the background color issue for the Android
Style can't help me fix the issue.
Didi
Telerik team
 answered on 12 Feb 2024
1 answer
49 views

HI,

I'm really struggling with customizing the conversational UI, there does not seem to be an example for changing the SuggestedActionsItem.

I know i need to define a temple for the SuggestedActionsTemplate on the ChatItemTemplateSelector, but how am i supposed to know what values are available? or what i am targetting.

A simple example of changing the background of each action would be nice :)

thanks

Yana
Telerik team
 answered on 09 Feb 2024
0 answers
44 views

i have a radsidedrwaer and i get System.ArgumentNullException: 'Value cannot be null. (Parameter 'view')' get 

on app center i get 

ElementExtensions.ToHandler (IElement view, IMauiContext context) D:\a\_work\1\s\src\Core\src\Platform\ElementExtensions.cs:58
ElementExtensions.ToPlatform (IElement view, IMauiContext context) D:\a\_work\1\s\src\Core\src\Platform\ElementExtensions.cs:127
Telerik.Maui.RadSideDrawerExtensions.UpdateDrawerContent(RadSideDrawer nativeSideDrawer, IRadSideDrawer sideDrawer)
Telerik.Maui.Handlers.RadSideDrawerHandler.MapDrawerContent(RadSideDrawerHandler handler, IRadSideDrawer virtualElement)
PublicKeyToken=5803cfa389c90ce7]].<Add>b__0 (IElementHandler h, IElement v) D:\a\_work\1\s\src\Core\src\PropertyMapper.cs:172
PropertyMapper.UpdatePropertyCore (String key, IElementHandler viewHandler, IElement virtualView) D:\a\_work\1\s\src\Core\src\PropertyMapper.cs:47
PropertyMapper.UpdateProperties (IElementHandler viewHandler, IElement virtualView) D:\a\_work\1\s\src\Core\src\PropertyMapper.cs:82
ElementHandler.SetVirtualView (IElement view) D:\a\_work\1\s\src\Core\src\Handlers\Element\ElementHandler.cs:79
PublicKeyToken=5803cfa389c90ce7]].SetVirtualView (IView view) D:\a\_work\1\s\src\Core\src\Handlers\View\ViewHandlerOfT.cs:53
PublicKeyToken=5803cfa389c90ce7]].SetVirtualView (IElement view) D:\a\_work\1\s\src\Core\src\Handlers\View\ViewHandlerOfT.cs:56
Element.SetHandler (IElementHandler newHandler) D:\a\_work\1\s\src\Controls\src\Core\Element\Element.cs:921
Element.set_Handler (IElementHandler value) D:\a\_work\1\s\src\Controls\src\Core\Element\Element.cs:863
IElement.set_Handler (IElementHandler value) D:\a\_work\1\s\src\Controls\src\Core\VisualElement\VisualElement.cs:2031
ElementExtensions.ToHandler (IElement view, IMauiContext context) D:\a\_work\1\s\src\Core\src\Platform\ElementExtensions.cs:96
ElementExtensions.ToPlatform (IElement view, IMauiContext context) D:\a\_work\1\s\src\Core\src\Platform\ElementExtensions.cs:127
LayoutHandler.SetVirtualView (IView view) D:\a\_work\1\s\src\Core\src\Handlers\Layout\LayoutHandler.Android.cs:41
PublicKeyToken=null]].SetVirtualView (IElement view) D:\a\_work\1\s\src\Core\src\Handlers\View\ViewHandlerOfT.cs:56
Element.SetHandler (IElementHandler newHandler) D:\a\_work\1\s\src\Controls\src\Core\Element\Element.cs:921
Element.set_Handler (IElementHandler value) D:\a\_work\1\s\src\Controls\src\Core\Element\Element.cs:863
IElement.set_Handler (IElementHandler value) D:\a\_work\1\s\src\Controls\src\Core\VisualElement\VisualElement.cs:2031
ElementExtensions.ToHandler (IElement view, IMauiContext context) D:\a\_work\1\s\src\Core\src\Platform\ElementExtensions.cs:96
ElementExtensions.ToPlatform (IElement view, IMauiContext context) D:\a\_work\1\s\src\Core\src\Platform\ElementExtensions.cs:127
ContentViewHandler.UpdateContent (IContentViewHandler handler) D:\a\_work\1\s\src\Core\src\Handlers\ContentView\ContentViewHandler.Android.cs:42
ContentViewHandler.MapContent (IContentViewHandler handler, IContentView page) D:\a\_work\1\s\src\Core\src\Handlers\ContentView\ContentViewHandler.Android.cs:47
PublicKeyToken=null]].<Add>b__0 (IElementHandler h, IElement v) D:\a\_work\1\s\src\Core\src\PropertyMapper.cs:172
PropertyMapper.UpdatePropertyCore (String key, IElementHandler viewHandler, IElement virtualView) D:\a\_work\1\s\src\Core\src\PropertyMapper.cs:47
PropertyMapper.UpdateProperties (IElementHandler viewHandler, IElement virtualView) D:\a\_work\1\s\src\Core\src\PropertyMapper.cs:82
ElementHandler.SetVirtualView (IElement view) D:\a\_work\1\s\src\Core\src\Handlers\Element\ElementHandler.cs:79
PublicKeyToken=null]].SetVirtualView (IView view) D:\a\_work\1\s\src\Core\src\Handlers\View\ViewHandlerOfT.cs:53
ContentViewHandler.SetVirtualView (IView view) D:\a\_work\1\s\src\Core\src\Handlers\ContentView\ContentViewHandler.Android.cs:26
PublicKeyToken=null]].SetVirtualView (IElement view) D:\a\_work\1\s\src\Core\src\Handlers\View\ViewHandlerOfT.cs:56
Element.SetHandler (IElementHandler newHandler) D:\a\_work\1\s\src\Controls\src\Core\Element\Element.cs:921
Element.set_Handler (IElementHandler value) D:\a\_work\1\s\src\Controls\src\Core\Element\Element.cs:863
IElement.set_Handler (IElementHandler value) D:\a\_work\1\s\src\Controls\src\Core\VisualElement\VisualElement.cs:2031
ElementExtensions.ToHandler (IElement view, IMauiContext context) D:\a\_work\1\s\src\Core\src\Platform\ElementExtensions.cs:96
ElementExtensions.ToPlatform (IElement view, IMauiContext context) D:\a\_work\1\s\src\Core\src\Platform\ElementExtensions.cs:127
MauiContextExtensions.ToPlatform (IView view, IMauiContext fragmentMauiContext, Context context, LayoutInflater layoutInflater, FragmentManager childFragmentManager) D:\a\_work\1\s\src\Core\src\Platform\Android\MauiContextExtensions.cs:96
NavigationViewFragment.OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) D:\a\_work\1\s\src\Core\src\Platform\Android\Navigation\NavigationViewFragment.cs:56
Fragment.n_OnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_inflater, IntPtr native_container, IntPtr native_savedInstanceState) C:\a\_work\1\s\generated\androidx.fragment.fragment\obj\Release\net6.0-android\generated\src\AndroidX.Fragment.App.Fragment.cs:2031
JNINativeWrapper.Wrap_JniMarshal_PPLLL_L (_JniMarshal_PPLLL_L callback, IntPtr jnienv, IntPtr klazz, IntPtr p0, IntPtr p1, IntPtr p2) /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:367 

The sidedrawer:

<Grid>
        <telerik:RadSideDrawer x:Name="drawer" DrawerLength="250">
            <telerik:RadSideDrawer.MainContent>
                <tools:KeyboardView>
                    <AbsoluteLayout x:Name="mainLayout">
                        <StackLayout x:Name="mainStackLayout" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0, 0, 1, 1" Spacing="0">
                            <StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand" HeightRequest="50">
                                <Grid Style="{StaticResource BottomGrid}" >
                                    <Grid.RowDefinitions>
                                         <RowDefinition Height="50"/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="70*" />
                                        <ColumnDefinition Width="15*" />
                                        <ColumnDefinition Width="15*" />
                                    </Grid.ColumnDefinitions>
                                    <StackLayout Grid.Row="0" Grid.Column="0" Margin="-10, 0, 0, 0">
                                        <SearchBar x:Name="SearchBox" TextChanged="SearchBox_TextChanged" SearchButtonPressed="SearchBox_SearchButtonPressed" Style="{StaticResource SearchBar}" />
                                    </StackLayout>
                                    <StackLayout Grid.Row="0" Grid.Column="1">
                                        <Button x:Name="BtnTopologies" Grid.Row="0" Grid.Column="1" Style="{StaticResource Icon}" ImageSource="TreeView.png" Clicked="BtnTopologies_Clicked"/>
                                    </StackLayout>
                                    <StackLayout Grid.Row="0" Grid.Column="2">
                                        <Image Source="barcodeBtn.png">
                                            <Image.GestureRecognizers>
                                                <TapGestureRecognizer Tapped="BtnBarcode_Clicked" NumberOfTapsRequired="1" />
                                            </Image.GestureRecognizers>
                                        </Image>
                                    </StackLayout>
                                </Grid>
                            </StackLayout>
                            <StackLayout Orientation="Horizontal">
                                <telerik:RadComboBox x:Name="sortByField" IsClearButtonVisible="False" SelectionChanged="sortByField_SelectionChanged" VerticalOptions="Center" WidthRequest="150" TextColor="{StaticResource LightBlueColor}"/>
                                <Image x:Name="sortingImg" Source="arrow.png">
                                    <Image.GestureRecognizers>
                                        <TapGestureRecognizer Tapped="OrderTapped" NumberOfTapsRequired="1" />
                                    </Image.GestureRecognizers>
                                </Image>
                            </StackLayout>
                            <StackLayout x:Name="listViewDynamic">
 
                            </StackLayout>
                            <telerik:RadListView x:Name="AssetsList" 
                                                             Grid.Row="1"
                                                             SelectionMode="Single" 
                                                             SelectionGesture="Tap"            
                                                             SwipeOffset="50, 0, 50, 0" 
                                                             SwipeThreshold="10"
                                                             HeightRequest="30"
                                                             SelectionChanged="AssetsList_ItemTapped"
                                                             RefreshRequested="AssetsList_RefreshRequested"
                                                             IsPullToRefreshActive="True"
                                                             IsPullToRefreshEnabled="True"
                                                             VerticalOptions="FillAndExpand"
                                                             BackgroundColor="LightGray" >
                                <telerik:RadListView.ItemStyle>
                                    <telerik:ListViewItemStyle BackgroundColor="Transparent"
                                           BorderColor="Transparent"
                                           BorderLocation="None"
                                           BorderWidth="0"/>
                                </telerik:RadListView.ItemStyle>
                                <telerik:RadListView.ItemTemplate >
                                    <DataTemplate>
                                        <telerik:ListViewTemplateCell >
                                            <telerik:ListViewTemplateCell.View>
                                                <telerik:RadBorder BorderColor="#268ecd" Margin="3,6" BorderThickness="0" CornerRadius="18" >
                                                    <StackLayout Orientation="Horizontal" 
                                                                 Style="{StaticResource ListItem}" 
                                                                 VerticalOptions="Start" 
                                                                 Padding="0" 
                                                                 BackgroundColor="White">                                                        
                                                        <StackLayout Orientation="Vertical" HorizontalOptions="FillAndExpand" Spacing="0" Padding="10, 15, 0, 15">
                                                            <StackLayout Orientation="Vertical" HorizontalOptions="StartAndExpand" Spacing="5">
                                                                <Label Text="{Binding Code}" Style="{StaticResource ListHeader}" TextColor="{StaticResource BlueColor}" />
                                                                <Label Text="{Binding Description}" Style="{StaticResource ListInfo}" TextColor="{StaticResource LightBlueColor}" />
                                                                <Label MaxLines="2" LineBreakMode="TailTruncation" Text="{Binding FullPath}" Style="{StaticResource ListInfo}" TextColor="{StaticResource LightGreyColor}" />
                                                            </StackLayout>
                                                        </StackLayout>
                                                    </StackLayout>
                                                </telerik:RadBorder>
                                            </telerik:ListViewTemplateCell.View>
                                        </telerik:ListViewTemplateCell>
                                    </DataTemplate>
                                </telerik:RadListView.ItemTemplate>
                            </telerik:RadListView>
                        </StackLayout>
                    </AbsoluteLayout>
                </tools:KeyboardView>
            </telerik:RadSideDrawer.MainContent>
        </telerik:RadSideDrawer>
    </Grid>

 

Ioannis
Top achievements
Rank 1
Iron
 asked on 09 Feb 2024
1 answer
79 views

How to get AutoComplete / filtering functionality for RadComboBox so that the list gets smaller as a user types?

<telerik:RadComboBox x:Name="TankComboBox"
                     IsEditable="True"
                     DisplayMemberPath="TankName"
                     ItemsSource="{Binding TanksObs}"
                     SelectedItem="{Binding SelectedTank, Mode=TwoWay}"
                     TextSearchPath="TankName"
                     Placeholder="Select tank...">
    <telerik:RadComboBox.FilterDescriptors>
        <telerik:FilterDescriptor PropertyName="TankName"
                                  Operator="Contains"
                                  IsCaseSensitive="False"/>
    </telerik:RadComboBox.FilterDescriptors>
</telerik:RadComboBox>
Didi
Telerik team
 answered on 06 Feb 2024
1 answer
89 views

I couldn't figure out how to clean up ListView items after changing the item-source or leaving a page.

Let's take your TemplateCell Example from

https://docs.telerik.com/devtools/maui/controls/listview/cells/template-cell

If i use a custom view instead of the grid it doesn't get a unloaded event or disposed or something else.
This prevents me to do a native view cleanup in my custom view.  Consequently i can't disconnect Handlers resulting in memory leaks.

Am I missing something here? Something in the documentation?
Is there an example?

Didi
Telerik team
 answered on 02 Feb 2024
1 answer
62 views

When images are pasted from a clipboard into MAUI RichTextEditor on iOS/macOS then they're added to the html as series of entries like this:

<img src="blob:null/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx">

How to get a real content of these images?

Or maybe there's a way for forcing embedding these images as a `data:image/...,base64` as on Android?

Didi
Telerik team
 answered on 29 Jan 2024
1 answer
105 views

Edit: RadTabView also leaks. Attached new sample app.

We have found leaks in these controls. I have attached a sample app that demonstrates the problem.

I have logged a support ticket but is anyone else experience similar leaks with these controls?

From the included readme.md:-


Description

Memory leaks when using

  • Telerik RadDataGrid
  • Telerik RadCalendar
  • Telerik RadAutoComplete
  • Telerik RadTabView

Configuration

  • Dotnet 8
  • Telerik.UI.for.Maui 6.6 (also happens with 6.5)
  • Windows 10

Steps to reproduce

Build and run application

  1. Run publish.ps1 to build the application in release mode
  2. Run _temp/publish/Maui-Memleaks.exe

Leaks for every instance (RED buttons)

  1. Click a RED button.
  2. Close the "Close" button
  3. Click the "GC.Collect" button. Note that the "Alive" count will keep increasing every time you click a RED button (ie memory leak)

Leaks for last instance (ORANGE buttons)

  1. Click a ORANGE button.
  2. Close the "Close" button
  3. Click the "GC.Collect" button. Note that the "Alive" count will only increase the first time (ie memory leak), on subsequent clicks the "Release" count will increase.

No leaks (GREEN buttons)

  1. Click a GREEN button.
  2. Close the "Close" button
  3. Click the "GC.Collect" button. Note that the "Release" count will always increase (ie no leaks)
Yana
Telerik team
 answered on 23 Jan 2024
1 answer
58 views

Hi,

i have a scenario where I as loggedIn user belongs to some Organization and in UsersView I can see all users and also one of the columns is Organization. I would like to set filter of this column to same Organization as Im in. So I see only users from my organization by default.

 

so my question is how to set this filter from code or can i somehow bind it from xaml to some property ?

Didi
Telerik team
 answered on 19 Jan 2024
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?