I am porting a WPF app into WinRT. The old app had a part where it would take something like an Image, MediaElement, a Xaml Page, etc; cast it as a UIElement; and then the recieving class would use VisualBrush to render it onto a button.
Unfortunately WinRT has no VisualBrush. I've tried setting content to UIElement etc. I also read about RenderTargetBitmap, however I don't think it would work since I also have video content.
Is there any way to make a control that accepts a UIElement and renders it correctly?
Depending on what you want achieve, you can just set your UIElement in the Button.Content property.
The Button.Content property can accept any UIElement.
For example, you can do the following:
MainPage.xaml
Page2.xaml
Or from the code behind:
MainPage.xaml.cs