Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit f866708

Browse files
GUOLDEVpictosAndreiMisiukevichTheCodeTraveler
committed
[Bug] [XCT.Sample] Fixed ContentPages BackgroundColor (#1595)
* Removed SetAppThemeColor * Move `BasePage` to `Pages` folder * Handle Null Dereferences introduced in .NET 6 Co-authored-by: Pedro Jesus <[email protected]> Co-authored-by: Andrei <[email protected]> Co-authored-by: Brandon Minnick <[email protected]>
1 parent 529b72d commit f866708

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

samples/XCT.Sample/Pages/Base/BasePage.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Forms.Page PreparePage(SectionModel model)
3333
var page = (BasePage)Activator.CreateInstance(model.Type);
3434
page.Title = model.Title;
3535
page.DetailColor = model.Color;
36-
page.SetAppThemeColor(BackgroundColorProperty, Color.White, Color.Black);
3736
return page;
3837
}
3938
}

src/CommunityToolkit/Xamarin.CommunityToolkit/Views/DrawingView/Service/DrawingViewService.macos.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ public static Stream GetImageStream(IList<Point>? points,
8989

9090
context.AddLines(points.Select(p => new CGPoint(p.X - minPointX, p.Y - minPointY)).ToArray());
9191
context.StrokePath();
92-
using var cgImage = context.ToImage() ?? throw new InvalidOperationException();
92+
93+
using var cgImage = context.ToImage() ?? throw new InvalidOperationException("Image Cannot be null");
9394
NSImage image = new(cgImage, imageSize);
9495

9596
return image;
@@ -130,7 +131,7 @@ public static Stream GetImageStream(IList<Point>? points,
130131

131132
context.StrokePath();
132133

133-
using var cgImage = context.ToImage() ?? throw new InvalidOperationException();
134+
using var cgImage = context.ToImage() ?? throw new InvalidOperationException("Image Cannot Be Null");
134135
NSImage image = new(cgImage, imageSize);
135136

136137
return image;

0 commit comments

Comments
 (0)