You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The crash that occurred when deriving MediaPlayerElement has been fixed in the latest version, however, the derived MediaPlayerElement still can't be used inside XAML trees.
Steps to reproduce the bug
Create a basic WinUI 3 with package support template using Visual Studio
Replace MainWindow.xaml.cs with the following
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
namespace App1
{
/// <summary>
/// An empty window that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainWindow : Window
{
public MainWindow()
{
this.InitializeComponent();
}
private void myButton_Click(object sender, RoutedEventArgs e)
{
myButton.Content = "Clicked"
}
}
public class Mpe: MediaPlayerElement
{
}
}
The following error will occur when running the app: WinRT originate error - 0x802B000A : 'Cannot add instance of type 'App1.Mpe' to a collection of type 'Microsoft.UI.Xaml.Controls.UIElementCollection'.
Expected behavior
It should be possible to add the derived MediaPlayerElement class inside an XAML tree
Screenshots
No response
NuGet package version
Windows App SDK 1.4.1: 1.4.230913002
Packaging type
Packaged (MSIX)
Windows version
Windows 10 version 22H2 (19045, 2022 Update)
IDE
Visual Studio 2022
Additional context
No response
The text was updated successfully, but these errors were encountered:
brabebhin
changed the title
Can't add derived MediaPlayerElement as Grid child
Can't add derived MediaPlayerElement in XAML
Oct 4, 2023
Describe the bug
The crash that occurred when deriving MediaPlayerElement has been fixed in the latest version, however, the derived MediaPlayerElement still can't be used inside XAML trees.
Steps to reproduce the bug
Expected behavior
It should be possible to add the derived MediaPlayerElement class inside an XAML tree
Screenshots
No response
NuGet package version
Windows App SDK 1.4.1: 1.4.230913002
Packaging type
Packaged (MSIX)
Windows version
Windows 10 version 22H2 (19045, 2022 Update)
IDE
Visual Studio 2022
Additional context
No response
The text was updated successfully, but these errors were encountered: