Component: SignaturePad
Version: Telerik UI for .NET MAUI 12.0.0 .NET: .NET 10 / .NET MAUI
Platform: Reproduced on iOS (iPad, iPhone) and Android (Samsung). Cross-platform — bug is in the shared SingleTouchSegmentProvider, not in a platform-specific touch handler.
RadSignaturePad crashes the app with an unhandled InvalidOperationException: "Sequence contains no elements" thrown from the touch event pipeline. Because the exception originates inside the native→managed touch callback, it cannot be caught by user code and propagates to AppDomain.CurrentDomain.UnhandledException, terminating the app.
The root cause is a .Last() call on an empty segment collection inside SingleTouchSegmentProvider.OnTouch. The crash occurs in both TouchesMoved and TouchesEnded paths, indicating a missing guard at the central OnTouch entry point — not in a specific touch phase.
RadSignaturePad and a separate button that invokes signaturePad.ClearCommand.→ TouchesMoved fires after ClearCommand has emptied the internal segment collection. SingleTouchSegmentProvider.OnTouch calls .Last() on the empty collection and throws.
Reproduced on:
The same crash also occurs on TouchesEnded in less deterministic scenarios — palm rejection, multi-touch cancellation, Apple Pencil hover-to-touch transitions, or a touch that begins outside the view and ends inside it. All of these can deliver a touch event without a corresponding active segment. We've observed this variant in production on iPad but could not reliably reproduce it in isolation.
System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.Last[Segment](IEnumerable`1 source)
at Telerik.Maui.Controls.SignaturePad.SingleTouchSegmentProvider.OnTouch(InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignaturePad.SegmentProvider.TouchRecognizer_Touch(Object sender, InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignatureView.OnTouch(InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignatureViewHandler.<ConnectHandler>b__3_0(InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignaturePad.SignatureViewTouchHandler.FireEvent(InteractionAction actionType, UITouch touch)
at Telerik.Maui.Controls.SignaturePad.SignatureViewTouchHandler.TouchesMoved(NSSet touches, UIEvent evt)
at Telerik.Maui.Controls.SignaturePad.SignatureViewTouchHandler.__Registrar_Callbacks__.callback_1171_..._TouchesMoved(IntPtr pobj, IntPtr sel, IntPtr p0, IntPtr p1, IntPtr* exception_gchandle)
System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.Last[Segment](IEnumerable`1 source)
at Telerik.Maui.Controls.SignaturePad.SingleTouchSegmentProvider.OnTouch(InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignaturePad.SegmentProvider.TouchRecognizer_Touch(Object sender, InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignatureView.OnTouch(InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignatureViewHandler.<ConnectHandler>b__3_0(InteractionAdapterEventArgs args)
at Telerik.Maui.Controls.SignaturePad.SignatureViewTouchHandler.FireEvent(InteractionAction actionType, UITouch touch)
at Telerik.Maui.Controls.SignaturePad.SignatureViewTouchHandler.TouchesEnded(NSSet touches, UIEvent evt)
at Telerik.Maui.Controls.SignaturePad.SignatureViewTouchHandler.__Registrar_Callbacks__.callback_1162_..._TouchesEnded(IntPtr pobj, IntPtr sel, IntPtr p0, IntPtr p1, IntPtr* exception_gchandle)
<telerik:RadSignaturePad
x:Name="signaturePad"
StrokeThickness="5"
StrokeColor="Black"
BackgroundColor="White" />
<Button Text="Clear" Clicked="OnClearClicked" />
void OnClearClicked(object s, EventArgs e)
{
if (signaturePad.ClearCommand.CanExecute(null))
signaturePad.ClearCommand.Execute(null);
}
No custom touch handlers, no SegmentProvider override, no gestures attached.
SingleTouchSegmentProvider.OnTouch should guard against an empty segment collection (e.g. .LastOrDefault() + null check, or an early return when no active segment exists). Touch events arriving after a Clear — or without a preceding TouchesBegan — should be ignored, not throw.
We disable the Clear button while a stroke is active (toggled in StrokeStarted / StrokeCompleted). This closes the deterministic repro but does not cover the non-deterministic TouchesEnded cases (palm rejection etc.), which still crash. A fix in SingleTouchSegmentProvider.OnTouch is required.
App crash on a customer-visible workflow (digital signature capture on service tickets). Affects production users on iPads, iPhones, and Android devices.
SignatureViewTouchHandler or SegmentProvider so we can guard OnTouch from user code?## Summary
On Android, an intermittent **`System.ArgumentOutOfRangeException`** crashes the app
(unhandled) during heavy UI re-layout of a page that contains Telerik `RadEntry` and
`RadButton` controls. The exception originates inside Telerik's `RadBorder` re-parenting a
`SolidColorBrush` (`RadBorder.OnBorderBrushPropertyChanging/Changed` → MAUI
`Element.SetParent` → `RemoveResourcesChangedListener`). It is consistently preceded by a
fixed sequence of framework warnings (below). It reproduces on multiple devices and is
timing/memory dependent (more frequent on lower-RAM hardware).
## Environment
- Telerik UI for .NET MAUI: **10.0.0**
- .NET MAUI (Microsoft.Maui.Controls): **9.0.90**
- .NET runtime: **9.0.16**
- Target: `net9.0-android35.0`, min Android API 26; Build configuration: **Release**
- Observed on, among others: Samsung **SM-A156E** (Android 16), **itel P10004L** (Android 14)
- Also reproduces as a **handled** (non-fatal) exception on page teardown — same stack.
## Exception & stack trace
`System.ArgumentOutOfRangeException: ArgumentOutOfRange_IndexMustBeLess Arg_ParamName_Name, index`
```
System.Collections.Generic.List<Action<object, ResourcesChangedEventArgs>>.RemoveAt(int)
System.Collections.Generic.List<Action<object, ResourcesChangedEventArgs>>.Remove(Action<...>)
Microsoft.Maui.Controls.Element.Microsoft.Maui.Controls.IElementDefinition.RemoveResourcesChangedListener(...) Element.cs:447
Microsoft.Maui.Controls.Element.SetParent(Element value) Element.cs:405
Microsoft.Maui.Controls.Element.set_Parent(Element value) Element.cs:384
Telerik.Maui.Controls.RadBorder.OnBorderBrushPropertyChanging(object oldValue) (In app — Telerik)
static RadBorder()+(BindableObject b, object o, object n) => { } (In app — Telerik)
Microsoft.Maui.Controls.BindableObject.SetValueActual(...) BindableObject.cs:640
... (style/binding apply) ...
Microsoft.Maui.Controls.Setter.Apply / Style.ApplyCore / MergedStyle.SetStyle
Telerik.Maui.Controls.RadButtonBase.set_ActualStyle(Style value) (In app — Telerik)
Telerik.Maui.Controls.RadButtonBase.UpdateActualStyle(...)
Telerik.Maui.Controls.RadButtonBase.OnStyleChanged(...) (In app — Telerik)
... BindingExpression.Apply → Dispatcher.DispatchImplementation → RunnableImplementor.Run
```
(The same stack appears both as an **unhandled** crash and, on page teardown, as a **handled**
exception.)
## Framework warnings that ALWAYS precede the crash (in order)
```
BindingDiagnostics: 'BorderColor' property not found on 'Telerik.Maui.Controls.RadEntry',
target property: 'Telerik.Maui.Controls.RadBorder.BorderColor'
Element (warning): The RealParent on Microsoft.Maui.Controls.SolidColorBrush has been
Garbage Collected. This should never happen. Please log a bug:
https://github.com/dotnet/maui
Element (warning): Microsoft.Maui.Controls.SolidColorBrush is already a child of
Telerik.Maui.Controls.RadEffectsView. Remove ... before adding ... (x many)
Element (warning): Microsoft.Maui.Controls.SolidColorBrush is already a child of
Telerik.Maui.Controls.RadBorder. Remove ... before adding ...
```
## Reproduction
1. A `ContentPage` inside a `NavigationPage` containing several Telerik `RadEntry` and
`RadButton` controls, styled via **implicit styles** that set `BorderBrush` across multiple
`VisualState`s (Normal/Focused/Invalid/ReadOnly/…). No custom `ControlTemplate` is applied;
only `BorderBrush` (and background/text) setters.
2. Interact with the page, then trigger a re-layout one of two ways:
- **Resume:** background the app (e.g. launch another app), then return →
`Window.Resumed`/`Activated` re-applies styles. → tends to be the **unhandled** crash.
- **Teardown:** navigate away from / destroy the page (`Window.Destroying`). → tends to be
the **handled** exception.
3. Intermittently (timing/memory dependent; more often on lower-RAM devices) the warning burst
above appears, immediately followed by the exception.
## Our analysis (why we believe this is in the Telerik template)
- The throw originates from `RadBorder.OnBorderBrushPropertyChanging/Changed` re-parenting a
`SolidColorBrush` (`Element.SetParent` → `RemoveResourcesChangedListener`).
- The preceding **`'BorderColor' not found on RadEntry → RadBorder.BorderColor`** binding is
*internal to the RadEntry control template* — `RadEntry` exposes `BorderBrush`, not
`BorderColor`, and we do not define a custom RadEntry template; we only set `BorderBrush` via
styles.
- The repeated **"SolidColorBrush is already a child of RadEffectsView / RadBorder"** indicates
the same brush instance is being re-parented within the Telerik visual tree on every style
re-apply, which trips the underlying MAUI weak-reference defect ("RealParent … Garbage
Collected") and corrupts the resource-changed-listener list.
## What we have ruled out
- **Not forced GC** — our only `GC.Collect()` calls are `#if DEBUG`; production has none. The
GC clearing the brush's RealParent is the *natural* GC.
- **Not the Windows/SkiaSharp/RadDataGrid variant** of the "already a child" warning — this is
Android and no `RadDataGrid` is involved.
- **Not app-side brush sharing** — our border color resources are `<Color>` (not shared
`SolidColorBrush` instances), and we set `BorderBrush`, not a custom `RadBorder`/template.
## Questions
1. Is the RadEntry template's internal `RadBorder.BorderColor` binding to a (non-existent)
`RadEntry.BorderColor` a known issue? Should it target `BorderBrush`?
2. Why does the RadEntry/RadButton template re-parent the *same* `SolidColorBrush` across
`RadEffectsView`/`RadBorder` on each style/visual-state apply (the "already a child"
warnings)? Can the template avoid re-parenting shared brushes?
3. Is there a Telerik UI for .NET MAUI 10.x release that addresses RadBorder/RadEntry brush
re-parenting on style re-apply / the listed warnings?
4. Recommended mitigation for `RadEntry`/`RadButton` styling to minimize this re-parent churn
(e.g. preferred way to set border brush per visual state)?
## Related public reports (MAUI side)
- dotnet/maui #25739, #23050, #28608 — "The RealParent on … has been Garbage Collected" — same
underlying weak-reference defect; mostly closed without a fix, hence reporting via Telerik as
the template owner.
Hello,
it would be a very useful information when subscribing to the DataBindingComplete Command of a DataGrid to know whether for example a filter, sort, grouping had changed.
Currently, it is an internal Property
Regards
When updating to Telerik MAUI 14.0.0 I got a null ref exception when using Pickers and the spinner or display string format are defined in the App.xaml
With 13.2.0 no issues.
Provide an option to set explicit style to the grouping panel, for example expose GroupingPanelStyle property.
Currently, the option is using an implicit style targeting the DataGridGroupingPanel
<Style TargetType="telerik:DataGridGroupingPanel">
<Setter Property="BackgroundColor" Value="Red"/>
<Setter Property="HeaderText" Value="Hello to group"/>
<Setter Property="CornerRadius" Value="10"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="BorderColor" Value="Blue"/>
</Style>
when adding items to the collection bound to the datagrid ItemsSource, the empty template remains visible.
this was working with 11.1.0 version
The AppointmentTapCommand is not working on Android in DayView and WeekView, only works on MonthView.
When selecting an appoinment in Day/WeekView the Scheduler scrolls to top
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="Toolbar.MainPage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Toolbar"
xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
x:DataType="local:MainPageViewModel">
<ContentPage.Resources>
<ResourceDictionary>
<Style
x:Key="ActionMenuButtonToolbarItemViewBaseStyle"
ApplyToDerivedTypes="True"
TargetType="telerik:ButtonToolbarItemView">
<Setter Property="DisplayOptions" Value="Text" />
<Setter Property="TextColor" Value="White" />
<Setter Property="FontFamily" Value="{x:Static telerik:TelerikFont.Name}" />
<Setter Property="FontSize" Value="16" />
<Setter Property="ToolTipProperties.Text" Value="click to change count" />
</Style>
</ResourceDictionary>
</ContentPage.Resources>
<ScrollView>
<VerticalStackLayout Padding="30,0" Spacing="25">
<telerik:RadToolbar x:Name="toolbarButtons" AutomationId="toolbarButtons">
<telerik:ButtonToolbarItem
Command="{Binding ButtonClickedCommand}"
Style="{StaticResource ActionMenuButtonToolbarItemViewBaseStyle}"
Text="{x:Static telerik:TelerikFont.IconUpOpen}" />
</telerik:RadToolbar>
</VerticalStackLayout>
</ScrollView>
</ContentPage>There is a slow performance when scrolling, expand/collapse items when the ListView Groups are sticky and GroupHeaderTemplate is used.
Workaround:
1. Set IsGroupHeaderStickty to false.
or
2.. Use the default group header template
The bug occurs on Android when removing an item from a group and using sticky group headers.