Pending Review
Last Updated: 14 Oct 2026 13:53 by JMB
JMB
Created on: 14 Oct 2026 13:53
Category: UI for .NET MAUI
Type: Bug Report
0
iOS: RadBorder / RadTemplatedButton lose their Background brush with .NET MAUI 11 rc.2 (RadBorderHandler BackgroundColor mapping overwrites it)

Product / versions

Telerik UI for .NET MAUI 15.1.0 (also reproduced with 15.0.0)
.NET MAUI 11.0.0-rc.2.26505.5 (SDK 11.0.100-rc.2.26504.105), iOS 26.5 and iOS 27.0 (simulator, Xcode 27.0)
Works with .NET MAUI 11.0.0-rc.1.26451.6; Android is not affected

Symptom
On iOS, any RadBorder, RadEffectsView or RadTemplatedButton whose fill comes from Background (a SolidColorBrush, e.g. Background="Orange") renders with no fill. Setting BackgroundColor instead still works. Since RadTemplatedButtonStyle sets Background, templated buttons lose their fill too.

Root cause (from decompiling both assemblies)

RadBorderHandler.BorderMapper (iOS) maps "BackgroundColor" to MapBackgroundColor, which calls RadBorderExtensions.UpdateBackgroundColor:
tkBorder.BackgroundColor = RadMauiCoreHelper.ToUIColor(border.BackgroundColor);
When only Background is set, border.BackgroundColor is null, so this clears UIView.BackgroundColor.
The "Background" key, inherited from ViewHandler.ViewMapper, runs earlier in the same property pass. UIView.UpdateBackground paints a SolidPaint by setting the same UIView.BackgroundColor, which step 1 then wipes.
Up to MAUI rc.1, Controls remapped "BackgroundImageSource" to handler.UpdateValue("Background"). That ran later in the pass and repainted the brush, which hid the problem. In rc.2 (VisualElement.MapBackgroundImageSourceForControls) the redirect is skipped once "Background" has already run in the bulk pass (PropertyMapperPassScope.IsRedundantBulkPassRedirect), so the overwrite now sticks.

On Android, UpdateBackground and UpdateBackgroundColor both rebuild the same BorderDrawable from the whole IRadBorder, so the order of the keys does not matter there.

Repro

<telerik:RadBorder Background="Orange" HeightRequest="80" CornerRadius="8" />
<telerik:RadTemplatedButton Content="Login" Background="Orange" />


Run on iOS with MAUI 11 rc.2: both are transparent. With BackgroundColor="Orange" they render correctly.

Suggested fix
In the iOS MapBackgroundColor (or UpdateBackgroundColor), do not overwrite the native background when IView.Background is a non-empty paint. Alternatively, resolve both properties in one place, as the Android handler does.

Workaround we use


#if IOS
RadBorderHandler.BorderMapper.AppendToMapping(
    nameof(VisualElement.BackgroundColor),
    static (handler, border) =>
    {
        if (border.Background is SolidPaint)
        {
            Microsoft.Maui.Platform.ViewExtensions.UpdateBackground(handler.PlatformView, border);
        }
    });
#endif

Possibly related (pre-existing, also on rc.1)
TKBorderView derives from MauiView, not LayoutView/ContentView. So UIView.UpdateBackground(null) returns early without clearing UIView.BackgroundColor. If Background goes from a brush to null at runtime while BackgroundColor is null, the old fill stays on screen.

0 comments