It seems the issue happens randomly -> crashes on a Windows 19 Server while running a basic Windows Maui app.
There is a public bug report: https://github.com/mono/SkiaSharp/issues/3168
When the cells are measured a NullReferenceException is thrown:
Telerik.Maui.Controls.DataGrid.DataGridTextCellArranger.PrepareTextPaintable(GridCellModel model, TextPaintable textPaintable)Description:
On iOS and MacCatalyst, when a RadButton is placed inside a RadToggleButton's ContentTemplate and bound to a command, the command does not execute when the nested button is tapped. The same setup works as expected on Windows and Android.
Workaround:
Override the toggle button's handler to adjust gesture recognizer behavior so that touches on the nested UIButton are not intercepted by the parent RadToggleButton.
private void Element_OnHandlerChanged(object? sender, EventArgs e)
{
#if IOS || MACCATALYST
var button = sender as RadToggleButton;
var handler = button!.Handler;
if (handler != null && handler.PlatformView is UIKit.UIView platformView)
{
this.Dispatcher.Dispatch(() =>
{
var recognizer = platformView.GestureRecognizers!.Last();
recognizer.ShouldReceiveTouch = (gestureRecognizer, touch) =>
{
var view = touch.View;
if (view is UIButton)
{
return false;
}
return true;
};
});
}
#endif
}
Currently when a Value is set to the RadLinearProgressBar, the inner progress-bar is being animated for about a second, grows from size 0 to the full size of the RadLinearProgressBar, but the Text remains 0% until the very end, when it turns 100%.
This feature request is to show a Text value that corresponds to the inner progress-bar, i.e. the value in the Text is also animated, synced with the animated progress-bar value.
Using latest telerik version with .net9. Following is applying and showing perfect background color of
selected items but its not working in android.
Kindly provide the fix
<telerik:RadComboBox.SelectedItemTemplate>
<DataTemplate>
<telerik:RadBorder BackgroundColor="#CACACA">
<VerticalStackLayout>
<Label Text="{Binding EmailId}"
FontSize="16"
FontAttributes="Bold"
Padding="18,14"
TextColor="{StaticResource SharkColor}"/>
</VerticalStackLayout>
</telerik:RadBorder>
</DataTemplate>
</telerik:RadComboBox.SelectedItemTemplate>
Ran into this issue - which seems to be dependent on how the content gets rendered, so it will fail 100% of the time on specific configurations, resulting in unusable applications.
I've found this issue on Android but there's no telling if the issue is cross platform - as it may depend on item sizings and layout, it may also be reproducible on other platforms, I just haven't hit it yet. The device you run it on may also influence the result, as different resolutions and scalings will impact how items are rendered on screen. I've reproduced this on a Pixel 7 (real device), Samsung A21s (real device) and Pixel 7 Pro (emulator).
Repro steps
MainPage.xaml - use this as the page content:
<ScrollView Padding="15,0,15,15">
<VerticalStackLayout Spacing="25">
<telerik:RadWrapLayout
x:Name="BrokenLayout"
Margin="-5"
SizeChanged="BrokenLayout_SizeChanged"
StretchLastChild="False">
<BindableLayout.ItemTemplate>
<DataTemplate>
<Grid
Margin="3.75"
Padding="3.75"
BackgroundColor="LightGreen">
<Label
FontAttributes="Bold"
FontSize="11"
LineBreakMode="TailTruncation"
MaxLines="2"
Text="{Binding}"
VerticalOptions="End" />
</Grid>
</DataTemplate>
</BindableLayout.ItemTemplate>
</telerik:RadWrapLayout>
</VerticalStackLayout>
</ScrollView>
MainPage.xaml.cs code
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
List<string> items = new List<string>();
items.Add("TSONE");
items.Add("N ANCETOIDO");
items.Add("ADDKNEDEGO LW");
items.Add("A EFCTTLIAH");
items.Add("OHACP HTATTO");
items.Add("AASESII NAYXB/RFKL");
items.Add("EMIQULENOCE PTCTL");
items.Add("SCNSTUGRRIOEMA TEU");
items.Add("EPEENSX");
items.Add("BRUXEROL TAA");
items.Add("TVLRETAAX ER");
items.Add("SMA SELISD");
items.Add("NIAEGOEEATIRUPR SVT");
items.Add("CTPLRCELT AO");
items.Add("REAREPTIRDQ U");
items.Add("ASEDP TUR");
items.Add("CJTEUT ORPDEAP");
items.Add(" CECCRNTARODTO");
items.Add("- FLEOUTEQRUOPWSL");
items.Add("PINTRNMEU REEQTU");
items.Add("RE LWSRANKOGIO TNT");
items.Add("KAREBTA KE");
items.Add("ITTANIW MIEG"); // comment out this one and it'll run fine. keep it and it'll fail.
BindableLayout.SetItemsSource(this.BrokenLayout, items);
}
private double _width = 0;
private double minItemWidth = 110.0;
private double maxItemWidth = 160.0;
private void BrokenLayout_SizeChanged(object sender, EventArgs e)
{
if (sender is RadWrapLayout wl
&& wl.Width > 0
&& (int)Math.Floor(wl.Width) is int widthInt
&& widthInt != this._width)
{
this._width = widthInt;
double? candidateItemWidth = null;
var itemCount = wl.Children.Count;
if (itemCount > 0 && itemCount * maxItemWidth >= widthInt)
{
var columnCount = (int)Math.Ceiling(widthInt / maxItemWidth);
candidateItemWidth = (int)Math.Floor((double)widthInt / columnCount);
if (candidateItemWidth > 1.25 * maxItemWidth)
{
columnCount += 1;
candidateItemWidth = (int)Math.Floor((double)widthInt / columnCount);
}
else if (candidateItemWidth < minItemWidth)
{
columnCount -= 1;
candidateItemWidth = (int)Math.Floor((double)widthInt / columnCount);
}
}
wl.ItemWidth = candidateItemWidth ?? maxItemWidth;
}
}
}
Error:
System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')'
0xFFFFFFFFFFFFFFFF in Android.Runtime.RuntimeNativeMethods.monodroid_debugger_unhandled_exception C#
0x1A in Android.Runtime.JNINativeWrapper._unhandled_exception at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:12,5 C#
0x26 in Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPZIIII_V at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:441,26 C#
0x8 in System.ThrowHelper.ThrowArgumentOutOfRange_IndexMustBeLessException C#
0x9 in System.Collections.Generic.List<double>.get_Item C#
0x205 in Telerik.Maui.RadWrapLayoutManager.ArrangeChildren C#