Skip to content

Commit 13d2e55

Browse files
committed
Remove Closed method for popup in MediaElement Page in Sample app. This fixes CommunityToolkit#1869
1 parent d6774fc commit 13d2e55

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

samples/CommunityToolkit.Maui.Sample/Pages/Views/MediaElement/MediaElementPage.xaml.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,13 @@ void DisplayPopup(object sender, EventArgs e)
250250
{
251251
Source = MediaSource.FromResource("AppleVideo.mp4"),
252252
HeightRequest = 600,
253-
WidthRequest = 600,
253+
WidthRequest = 900,
254254
ShouldAutoPlay = true,
255255
ShouldShowPlaybackControls = true,
256256
};
257257
var popup = new Popup
258258
{
259+
Size = new Size(900, 600),
259260
VerticalOptions = LayoutAlignment.Center,
260261
HorizontalOptions = LayoutAlignment.Center,
261262
Content = new StackLayout
@@ -266,12 +267,6 @@ void DisplayPopup(object sender, EventArgs e)
266267
}
267268
}
268269
};
269-
270270
this.ShowPopup(popup);
271-
popup.Closed += (s, e) =>
272-
{
273-
popupMediaElement.Stop();
274-
popupMediaElement.Handler?.DisconnectHandler();
275-
};
276271
}
277272
}

0 commit comments

Comments
 (0)