diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ImageSourceInitializesCorrectly.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ImageSourceInitializesCorrectly.png
new file mode 100644
index 000000000000..7c397c537c83
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ImageSourceInitializesCorrectly.png differ
diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue24916.xaml b/src/Controls/tests/TestCases.HostApp/Issues/Issue24916.xaml
new file mode 100644
index 000000000000..e83adeea4538
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue24916.xaml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue24916.xaml.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue24916.xaml.cs
new file mode 100644
index 000000000000..21ae9c300b13
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue24916.xaml.cs
@@ -0,0 +1,12 @@
+namespace Maui.Controls.Sample.Issues
+{
+ [XamlCompilation(XamlCompilationOptions.Compile)]
+ [Issue(IssueTracker.Github, 24916, "Image Source in Button initializes correctly", PlatformAffected.All)]
+ public partial class Issue24916 : ContentPage
+ {
+ public Issue24916()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/tests/TestCases.HostApp/Resources/Images/blue.png b/src/Controls/tests/TestCases.HostApp/Resources/Images/blue.png
new file mode 100644
index 000000000000..35dbe7e50477
Binary files /dev/null and b/src/Controls/tests/TestCases.HostApp/Resources/Images/blue.png differ
diff --git a/src/Controls/tests/TestCases.HostApp/Resources/Images/green.png b/src/Controls/tests/TestCases.HostApp/Resources/Images/green.png
new file mode 100644
index 000000000000..2c3c9f445d51
Binary files /dev/null and b/src/Controls/tests/TestCases.HostApp/Resources/Images/green.png differ
diff --git a/src/Controls/tests/TestCases.HostApp/Resources/Images/red.png b/src/Controls/tests/TestCases.HostApp/Resources/Images/red.png
new file mode 100644
index 000000000000..3587e2727c39
Binary files /dev/null and b/src/Controls/tests/TestCases.HostApp/Resources/Images/red.png differ
diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue24916.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue24916.cs
new file mode 100644
index 000000000000..4c2e29be2d5d
--- /dev/null
+++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue24916.cs
@@ -0,0 +1,21 @@
+using NUnit.Framework;
+using UITest.Appium;
+using UITest.Core;
+
+namespace Microsoft.Maui.TestCases.Tests.Issues
+{
+ public class Issue24916 : _IssuesUITest
+ {
+ public Issue24916(TestDevice testDevice) : base(testDevice){}
+
+ public override string Issue => "Image Source in Button initializes correctly";
+
+ [Test]
+ [Category(UITestCategories.Button)]
+ public void ImageSourceInitializesCorrectly()
+ {
+ App.WaitForElement("label");
+ VerifyScreenshot();
+ }
+ }
+}
diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ImageSourceInitializesCorrectly.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ImageSourceInitializesCorrectly.png
new file mode 100644
index 000000000000..2d00ea561c19
Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ImageSourceInitializesCorrectly.png differ
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ImageSourceInitializesCorrectly.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ImageSourceInitializesCorrectly.png
new file mode 100644
index 000000000000..92f49b85193f
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ImageSourceInitializesCorrectly.png differ
diff --git a/src/Core/tests/DeviceTests/Handlers/Button/ButtonHandlerTests.cs b/src/Core/tests/DeviceTests/Handlers/Button/ButtonHandlerTests.cs
index 8db8e6f47f52..28e958b56a10 100644
--- a/src/Core/tests/DeviceTests/Handlers/Button/ButtonHandlerTests.cs
+++ b/src/Core/tests/DeviceTests/Handlers/Button/ButtonHandlerTests.cs
@@ -65,27 +65,6 @@ public async Task ClickEventFires()
Assert.True(clicked);
}
- [Theory(DisplayName = "ImageSource Initializes Correctly")]
- [InlineData("red.png", "#FF0000")]
- [InlineData("green.png", "#00FF00")]
- [InlineData("black.png", "#000000")]
- public async Task ImageSourceInitializesCorrectly(string filename, string colorHex)
- {
- var image = new ButtonStub
- {
- Background = new SolidPaintStub(Colors.Black),
- ImageSource = new FileImageSourceStub(filename),
- };
-
- await AttachAndRun(image, async (handler) =>
- {
- await AssertEventually(() => ImageSourceLoaded(handler));
-
- var expectedColor = Color.FromArgb(colorHex);
- await handler.PlatformView.AssertContainsColor(expectedColor, MauiContext);
- });
- }
-
[Theory(DisplayName = "Padding Initializes Correctly")]
[InlineData(0, 0, 0, 0)]
[InlineData(1, 1, 1, 1)]
diff --git a/src/Core/tests/DeviceTests/Handlers/ImageButton/ImageButtonHandlerTests.cs b/src/Core/tests/DeviceTests/Handlers/ImageButton/ImageButtonHandlerTests.cs
index 2abfcdfbb71e..432acce0bfb9 100644
--- a/src/Core/tests/DeviceTests/Handlers/ImageButton/ImageButtonHandlerTests.cs
+++ b/src/Core/tests/DeviceTests/Handlers/ImageButton/ImageButtonHandlerTests.cs
@@ -33,31 +33,6 @@ public async Task ClickEventFires()
Assert.True(clicked);
}
- [Theory(DisplayName = "ImageSource Initializes Correctly")]
- [InlineData("red.png", "#FF0000")]
- [InlineData("green.png", "#00FF00")]
- [InlineData("black.png", "#000000")]
- public async Task ImageSourceInitializesCorrectly(string filename, string colorHex)
- {
- var imageButton = new ImageButtonStub
- {
- Background = new SolidPaintStub(Colors.Black),
- ImageSource = new FileImageSourceStub(filename),
- };
-
- var order = new List();
-
- await InvokeOnMainThreadAsync(async () =>
- {
- var handler = CreateHandler(imageButton);
-
- await AssertEventually(() => ImageSourceLoaded(handler));
-
- var expectedColor = Color.FromArgb(colorHex);
- await handler.PlatformView.AssertContainsColor(expectedColor, MauiContext);
- });
- }
-
[Fact(DisplayName = "LoadingCompleted event fires")]
public async Task LoadingCompletedEventFires()
{