Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
61ce485
Add SwipeItem.IconColor to make swipe item icon tinting explicit
Copilot Jul 28, 2026
eec2172
fix and test code update
praveenkumarkarunanithi Jul 30, 2026
0f2127a
Merge branch 'net11.0' into swipeitem-icon-tint-api
kubaflo Aug 1, 2026
1f3ba33
Remove duplicate PublicAPI.Unshipped.txt entries on iOS/MacCatalyst
Copilot Aug 1, 2026
34abbed
Merge branch 'net11.0' into swipeitem-icon-tint-api
kubaflo Aug 2, 2026
f6328ad
Keep SwipeItem icon tint and text color in sync on runtime changes
Copilot Aug 2, 2026
ee053d5
Refine SwipeItem icon-refresh trigger and correct IconColor tinting docs
Copilot Aug 2, 2026
3279b35
Address SwipeItem review: font-icon invalidation + doc precedence
Copilot Aug 2, 2026
2c767ad
Merge remote-tracking branch 'origin/net11.0' into HEAD
Copilot Aug 2, 2026
796e1d8
Use mapper view parameter instead of handler.VirtualView in SwipeItem…
Copilot Aug 2, 2026
a3a04fc
Merge branch 'net11.0' into swipeitem-icon-tint-api
praveenkumarkarunanithi Aug 3, 2026
ce20aba
Avoid double SwipeItem mapper updates and fix IconColor doc references
Aug 3, 2026
dd34713
Add discriminating test for IFontImageSource icon-tint guard
Artarmonx5iz Aug 3, 2026
6f81414
Mutate Android swipe-item drawable before tinting
Artarmonx5iz Aug 5, 2026
50d8927
Fix SwipeItem color handler regressions
Copilot Aug 6, 2026
39cb717
Use mapper view for Tizen SwipeItem background
Copilot Aug 6, 2026
a0d4ac2
Preserve custom SwipeItem image loading when tinted
Copilot Aug 7, 2026
5a142ef
Address SwipeItem image service review feedback
Copilot Aug 7, 2026
9b58e93
Address SwipeItem platform review feedback
Copilot Aug 7, 2026
c8f0001
Preserve custom Windows font image services
Copilot Aug 7, 2026
f860120
Avoid redundant font tint wrappers
Copilot Aug 7, 2026
fa79dcf
Clear SwipeItem font state on disconnect
Copilot Aug 7, 2026
87d27a7
Address SwipeItem icon tint review feedback
Copilot Aug 8, 2026
9d5d99d
Fix SwipeItem tint clearing and test waits
Copilot Aug 8, 2026
168f9b9
Fix iOS SwipeItem retint redraw
Aug 10, 2026
167affe
Merge net11.0 into SwipeItem color API
Aug 12, 2026
588e554
Merge remote-tracking branch 'origin/net11.0' into HEAD
Aug 12, 2026
15974ee
Merge net11.0 into SwipeItem color API
Aug 12, 2026
f0aabd2
Address SwipeItem icon review feedback
Aug 12, 2026
de335c6
Merge net11.0 and fix Apple PublicAPI entries
Aug 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -294,3 +294,9 @@ virtual Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutTemplatedConte
~static readonly Microsoft.Maui.Controls.ToolbarItem.BadgeTextProperty -> Microsoft.Maui.Controls.BindableProperty
~virtual Microsoft.Maui.Controls.Platform.Compatibility.ShellItemRenderer.UpdateShellSectionBadge(Microsoft.Maui.Controls.ShellSection shellSection, int index) -> void
~virtual Microsoft.Maui.Controls.Platform.Compatibility.ShellToolbarAppearanceTracker.SetColors(AndroidX.AppCompat.Widget.Toolbar toolbar, Microsoft.Maui.Controls.Platform.Compatibility.IShellToolbarTracker toolbarTracker, Microsoft.Maui.Graphics.Color foreground, Microsoft.Maui.Controls.Brush background, Microsoft.Maui.Graphics.Color title) -> void
~Microsoft.Maui.Controls.SwipeItem.IconColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.SwipeItem.IconColor.set -> void
~static readonly Microsoft.Maui.Controls.SwipeItem.IconColorProperty -> Microsoft.Maui.Controls.BindableProperty
~Microsoft.Maui.Controls.SwipeItem.TextColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.SwipeItem.TextColor.set -> void
~static readonly Microsoft.Maui.Controls.SwipeItem.TextColorProperty -> Microsoft.Maui.Controls.BindableProperty
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,9 @@ virtual Microsoft.Maui.Controls.LongPressingEventArgs.GetPosition(Microsoft.Maui
~static readonly Microsoft.Maui.Controls.ToolbarItem.BadgeColorProperty -> Microsoft.Maui.Controls.BindableProperty
~static readonly Microsoft.Maui.Controls.ToolbarItem.BadgeTextColorProperty -> Microsoft.Maui.Controls.BindableProperty
~static readonly Microsoft.Maui.Controls.ToolbarItem.BadgeTextProperty -> Microsoft.Maui.Controls.BindableProperty
~Microsoft.Maui.Controls.SwipeItem.IconColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.SwipeItem.IconColor.set -> void
~static readonly Microsoft.Maui.Controls.SwipeItem.IconColorProperty -> Microsoft.Maui.Controls.BindableProperty
~Microsoft.Maui.Controls.SwipeItem.TextColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.SwipeItem.TextColor.set -> void
~static readonly Microsoft.Maui.Controls.SwipeItem.TextColorProperty -> Microsoft.Maui.Controls.BindableProperty
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,9 @@ virtual Microsoft.Maui.Controls.LongPressingEventArgs.GetPosition(Microsoft.Maui
~static readonly Microsoft.Maui.Controls.ToolbarItem.BadgeColorProperty -> Microsoft.Maui.Controls.BindableProperty
~static readonly Microsoft.Maui.Controls.ToolbarItem.BadgeTextColorProperty -> Microsoft.Maui.Controls.BindableProperty
~static readonly Microsoft.Maui.Controls.ToolbarItem.BadgeTextProperty -> Microsoft.Maui.Controls.BindableProperty
~Microsoft.Maui.Controls.SwipeItem.IconColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.SwipeItem.IconColor.set -> void
~static readonly Microsoft.Maui.Controls.SwipeItem.IconColorProperty -> Microsoft.Maui.Controls.BindableProperty
~Microsoft.Maui.Controls.SwipeItem.TextColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.SwipeItem.TextColor.set -> void
~static readonly Microsoft.Maui.Controls.SwipeItem.TextColorProperty -> Microsoft.Maui.Controls.BindableProperty
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,10 @@ Microsoft.Maui.Controls.Xaml.Diagnostics.HotReloadSkippedEventArgs.Timestamp.get
Microsoft.Maui.Controls.Xaml.Diagnostics.HotReloadSkippedEventArgs.UpdatedTypes.get -> System.Collections.Generic.IReadOnlyList<System.Type!>!
~override Microsoft.Maui.Controls.SwipeItems.OnPropertyChanged(string propertyName = null) -> void
Microsoft.Maui.Controls.Label.~Label() -> void
~Microsoft.Maui.Controls.SwipeItem.IconColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.SwipeItem.IconColor.set -> void
~static readonly Microsoft.Maui.Controls.SwipeItem.IconColorProperty -> Microsoft.Maui.Controls.BindableProperty
~Microsoft.Maui.Controls.SwipeItem.TextColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.SwipeItem.TextColor.set -> void
~static readonly Microsoft.Maui.Controls.SwipeItem.TextColorProperty -> Microsoft.Maui.Controls.BindableProperty
~static Microsoft.Maui.Controls.Brush.HasTransparency(Microsoft.Maui.Controls.Brush background) -> bool
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@ Microsoft.Maui.Controls.Xaml.Diagnostics.HotReloadSkippedEventArgs.UpdatedTypes.
override Microsoft.Maui.Controls.Handlers.Items.CarouselViewHandler.UpdateEmptyViewVisibility() -> void
~override Microsoft.Maui.Controls.SwipeItems.OnPropertyChanged(string propertyName = null) -> void
Microsoft.Maui.Controls.Label.~Label() -> void
~Microsoft.Maui.Controls.SwipeItem.IconColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.SwipeItem.IconColor.set -> void
~static readonly Microsoft.Maui.Controls.SwipeItem.IconColorProperty -> Microsoft.Maui.Controls.BindableProperty
~Microsoft.Maui.Controls.SwipeItem.TextColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.SwipeItem.TextColor.set -> void
~static readonly Microsoft.Maui.Controls.SwipeItem.TextColorProperty -> Microsoft.Maui.Controls.BindableProperty
~static Microsoft.Maui.Controls.Brush.HasTransparency(Microsoft.Maui.Controls.Brush background) -> bool
static Microsoft.Maui.Controls.Platform.FormattedStringExtensions.UpdateInlines(this Microsoft.UI.Xaml.Controls.TextBlock! textBlock, Microsoft.Maui.IFontManager! fontManager, Microsoft.Maui.Controls.FormattedString! formattedString, double defaultLineHeight, Microsoft.Maui.TextAlignment defaultHorizontalAlignment, Microsoft.Maui.Font? defaultFont, Microsoft.Maui.Graphics.Color? defaultColor, Microsoft.Maui.TextTransform defaultTextTransform, double defaultCharacterSpacing) -> void
static Microsoft.Maui.Controls.Platform.FormattedStringExtensions.ToRunAndColorsTuples(this Microsoft.Maui.Controls.FormattedString! formattedString, Microsoft.Maui.IFontManager! fontManager, double defaultLineHeight, Microsoft.Maui.TextAlignment defaultHorizontalAlignment, Microsoft.Maui.Font? defaultFont, Microsoft.Maui.Graphics.Color? defaultColor, Microsoft.Maui.TextTransform defaultTextTransform, double defaultCharacterSpacing) -> System.Collections.Generic.IEnumerable<System.Tuple<Microsoft.UI.Xaml.Documents.Run!, Microsoft.Maui.Graphics.Color!, Microsoft.Maui.Graphics.Color!>!>!
Expand Down
6 changes: 6 additions & 0 deletions src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,10 @@ virtual Microsoft.Maui.Controls.LongPressedEventArgs.GetPosition(Microsoft.Maui.
virtual Microsoft.Maui.Controls.LongPressingEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point?
~override Microsoft.Maui.Controls.SwipeItems.OnPropertyChanged(string propertyName = null) -> void
Microsoft.Maui.Controls.Label.~Label() -> void
~Microsoft.Maui.Controls.SwipeItem.IconColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.SwipeItem.IconColor.set -> void
~static readonly Microsoft.Maui.Controls.SwipeItem.IconColorProperty -> Microsoft.Maui.Controls.BindableProperty
~Microsoft.Maui.Controls.SwipeItem.TextColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.SwipeItem.TextColor.set -> void
~static readonly Microsoft.Maui.Controls.SwipeItem.TextColorProperty -> Microsoft.Maui.Controls.BindableProperty
~static Microsoft.Maui.Controls.Brush.HasTransparency(Microsoft.Maui.Controls.Brush background) -> bool
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,10 @@ virtual Microsoft.Maui.Controls.LongPressedEventArgs.GetPosition(Microsoft.Maui.
virtual Microsoft.Maui.Controls.LongPressingEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point?
~override Microsoft.Maui.Controls.SwipeItems.OnPropertyChanged(string propertyName = null) -> void
Microsoft.Maui.Controls.Label.~Label() -> void
~Microsoft.Maui.Controls.SwipeItem.IconColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.SwipeItem.IconColor.set -> void
~static readonly Microsoft.Maui.Controls.SwipeItem.IconColorProperty -> Microsoft.Maui.Controls.BindableProperty
~Microsoft.Maui.Controls.SwipeItem.TextColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.SwipeItem.TextColor.set -> void
~static readonly Microsoft.Maui.Controls.SwipeItem.TextColorProperty -> Microsoft.Maui.Controls.BindableProperty
~static Microsoft.Maui.Controls.Brush.HasTransparency(Microsoft.Maui.Controls.Brush background) -> bool
55 changes: 53 additions & 2 deletions src/Controls/src/Core/SwipeView/SwipeItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,20 @@ namespace Microsoft.Maui.Controls
/// <summary>
/// Represents a menu item displayed in a <see cref="SwipeView"/> when the view is swiped.
/// </summary>
public partial class SwipeItem : MenuItem, Controls.ISwipeItem, Maui.ISwipeItemMenuItem
public partial class SwipeItem : MenuItem, Controls.ISwipeItem, Maui.ISwipeItemMenuItem, Maui.ISwipeItemMenuItemIconColor
{
/// <summary>Bindable property for <see cref="BackgroundColor"/>.</summary>
public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(SwipeItem), null);
public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(SwipeItem), null, propertyChanged: OnBackgroundColorChanged);

/// <summary>Bindable property for <see cref="IsVisible"/>.</summary>
public static readonly BindableProperty IsVisibleProperty = BindableProperty.Create(nameof(IsVisible), typeof(bool), typeof(SwipeItem), BooleanBoxes.TrueBox, propertyChanged: OnIsVisibleChanged);

/// <summary>Bindable property for <see cref="IconColor"/>.</summary>
public static readonly BindableProperty IconColorProperty = BindableProperty.Create(nameof(IconColor), typeof(Color), typeof(SwipeItem), null);

/// <summary>Bindable property for <see cref="TextColor"/>.</summary>
public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(SwipeItem), null);

/// <summary>
/// Gets or sets the background color of the swipe item. This is a bindable property.
/// </summary>
Expand All @@ -37,10 +43,55 @@ public bool IsVisible

public event EventHandler<EventArgs> Invoked;

/// <summary>
/// Gets or sets the color used to tint <see cref="MenuItem.IconImageSource"/>. This is a bindable property.
/// </summary>
/// <remarks>
/// When unset, a font icon is tinted by its own <see cref="FontImageSource.Color"/>, then by
/// <see cref="TextColor"/>, then by a color contrasting <see cref="BackgroundColor"/>; image icons such as
/// PNG and SVG render with their original colors. When set, this property tints font icons and image icons on
/// Android, iOS, and MacCatalyst (including stream-based sources, since the resolved platform image is
/// tinted), and font and packaged file icons on Windows, and can be bound with
/// <see cref="AppThemeBinding"/> to follow the current theme. On Windows, packaged file icons use
/// the color as a monochrome mask; URI, rooted, and stream-based image icons render with their original colors.
/// All icons on Tizen currently render with their original colors regardless of this property.
/// </remarks>
public Color IconColor
{
get { return (Color)GetValue(IconColorProperty); }
set { SetValue(IconColorProperty, value); }
}

/// <summary>
/// Gets or sets the color used for the swipe item's label text. This is a bindable property.
/// </summary>
/// <remarks>
/// When unset, the label falls back to a color contrasting <see cref="BackgroundColor"/>, except when the
/// item's icon is a <see cref="FontImageSource"/> that already specifies its own
/// <see cref="FontImageSource.Color"/>, or when no <see cref="BackgroundColor"/> is set; in those cases the
/// label keeps the platform default. When set, that color is used as the label color, and it can be bound
/// with <see cref="AppThemeBinding"/> to follow the current theme.
/// </remarks>
public Color TextColor
Comment thread
kubaflo marked this conversation as resolved.
{
get { return (Color)GetValue(TextColorProperty); }
set { SetValue(TextColorProperty, value); }
}

Paint ISwipeItemMenuItem.Background => new SolidPaint(BackgroundColor);

Color ISwipeItemMenuItemIconColor.IconColor => IconColor;

Color ITextStyle.TextColor => TextColor;

Visibility ISwipeItemMenuItem.Visibility => this.IsVisible ? Visibility.Visible : Visibility.Collapsed;

static void OnBackgroundColorChanged(BindableObject bindable, object oldValue, object newValue)
{
var swipeItem = (SwipeItem)bindable;
swipeItem.Handler?.UpdateValue(nameof(ISwipeItemMenuItem.Background));
}

static void OnIsVisibleChanged(BindableObject bindable, object oldValue, object newValue)
{
var swipeItem = (SwipeItem)bindable;
Expand Down
Loading
Loading