private void SetupText(ICanvasResourceCreator resourceCreator)
{
textCommandList = new CanvasCommandList(resourceCreator);
using (var ds = textCommandList.CreateDrawingSession())
{
ds.Clear(Colors.Transparent);
ds.DrawText(
"Windows.UI.Composition",
0,
0,
Colors.White,
new Microsoft.Graphics.Canvas.Text.CanvasTextFormat
{
FontFamily = "Segoe UI",
FontSize = 20,
HorizontalAlignment = CanvasHorizontalAlignment.Center,
VerticalAlignment = CanvasVerticalAlignment.Top
});
}
// Hook up the command list to the inputs of the flame effect graph.
morphology.Source = textCommandList;
composite.Sources[1] = textCommandList;
}