I could not get my chart to print. I narrowed it down to the Chart.UseEffects property. In the following, when UseEffects is false, the chart does not print. When UseEffects is true, the chart prints.
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using ChartFX.WPF;
class Program
{
[sTAThread]
static void Main(string[] args)
{
bool isPrintSuccessful = false;
Window w = new Window();
Chart c = new Chart() { UseEffects = isPrintSuccessful };
w.Content = c;
// ctrl-p to print
w.CommandBindings.Add(new CommandBinding(ApplicationCommands.Print, OnPrint));
new Application().Run(w);
}
static void OnPrint(object sender, EventArgs e)
{
PrintDialog dlg = new PrintDialog();
if (dlg.ShowDialog().Value)
dlg.PrintVisual(sender as Window, "My Chart");
}
}