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

Commit 9902e85

Browse files
committed
Last merge fixes please
1 parent c92690e commit 9902e85

File tree

1 file changed

+4
-3
lines changed
  • src/CommunityToolkit/Xamarin.CommunityToolkit/Views/Snackbar

1 file changed

+4
-3
lines changed

src/CommunityToolkit/Xamarin.CommunityToolkit/Views/Snackbar/SnackBar.uwp.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ class SnackBar
3535
return null;
3636
}
3737

38-
internal ValueTask Show(Forms.Page page, SnackBarOptions arguments)
38+
internal ValueTask Show(Forms.VisualElement visualElement, SnackBarOptions arguments)
3939
{
4040
var snackBarLayout = new SnackBarLayout(arguments);
41-
var pageControl = Platform.GetRenderer(page).ContainerElement.Parent;
42-
var grid = (Grid)(FindVisualChildByName<Border>(pageControl, "BottomCommandBarArea")?.Parent ?? throw new NullReferenceException());
41+
var pageControl = Platform.GetRenderer(visualElement).ContainerElement.Parent;
42+
var grid = (Grid)(FindVisualChildByName<Border>(pageControl, "BottomCommandBarArea")?.Parent ?? throw new NotSupportedException("Anchor Not Supported on UWP"));
43+
4344
var snackBarRow = new RowDefinition() { Height = GridLength.Auto };
4445
snackBarTimer = new DispatcherTimer { Interval = arguments.Duration };
4546
snackBarTimer.Tick += (sender, e) =>

0 commit comments

Comments
 (0)