In WinUI 3, CaptureElement is replaced by MediaPlayerElement, like in the MS sample : https://github.com/microsoft/Windows-Camera/tree/master/Samples/MediaCaptureWinUI3
You can also read frames as explained at https://learn.microsoft.com/en-us/windows/apps/develop/camera/process-media-frames-with-mediaframereader