void control_Unloaded(object sender, RoutedEventArgs e)
        {
            currentProfilingTaskCancellation.Cancel();

            // Explicitly remove references to allow the Win2D controls to get garbage collected.
            CpuGraphCanvas.RemoveFromVisualTree();
            GpuGraphCanvas.RemoveFromVisualTree();
            CpuGraphCanvas = null;
            GpuGraphCanvas = null;
        }
 void InvalidateGraphs()
 {
     CpuGraphCanvas.Invalidate();
     GpuGraphCanvas.Invalidate();
 }