diff --git a/samples/XCT.Sample/Pages/Base/BasePage.cs b/samples/XCT.Sample/Pages/Base/BasePage.cs index 046b74066..fc558e1ec 100644 --- a/samples/XCT.Sample/Pages/Base/BasePage.cs +++ b/samples/XCT.Sample/Pages/Base/BasePage.cs @@ -33,7 +33,6 @@ Forms.Page PreparePage(SectionModel model) var page = (BasePage)Activator.CreateInstance(model.Type); page.Title = model.Title; page.DetailColor = model.Color; - page.SetAppThemeColor(BackgroundColorProperty, Color.White, Color.Black); return page; } } diff --git a/src/CommunityToolkit/Xamarin.CommunityToolkit/Views/DrawingView/Service/DrawingViewService.macos.cs b/src/CommunityToolkit/Xamarin.CommunityToolkit/Views/DrawingView/Service/DrawingViewService.macos.cs index e2b8f4608..586ed8450 100644 --- a/src/CommunityToolkit/Xamarin.CommunityToolkit/Views/DrawingView/Service/DrawingViewService.macos.cs +++ b/src/CommunityToolkit/Xamarin.CommunityToolkit/Views/DrawingView/Service/DrawingViewService.macos.cs @@ -89,7 +89,8 @@ public static Stream GetImageStream(IList? points, context.AddLines(points.Select(p => new CGPoint(p.X - minPointX, p.Y - minPointY)).ToArray()); context.StrokePath(); - using var cgImage = context.ToImage() ?? throw new InvalidOperationException(); + + using var cgImage = context.ToImage() ?? throw new InvalidOperationException("Image Cannot be null"); NSImage image = new(cgImage, imageSize); return image; @@ -130,7 +131,7 @@ public static Stream GetImageStream(IList? points, context.StrokePath(); - using var cgImage = context.ToImage() ?? throw new InvalidOperationException(); + using var cgImage = context.ToImage() ?? throw new InvalidOperationException("Image Cannot Be Null"); NSImage image = new(cgImage, imageSize); return image;