PrintSettings dialog crash if Printer's SourceName is empty.
Workarround: Enumerate printers and set a name for empty Source Names.
class MyPrintSettingDialog : PrintSettingsDialog
{
public MyPrintSettingDialog(RadPrintDocument document):base(document)
{ }
public MyPrintSettingDialog():base()
{ }
protected override void LoadSettings()
{
PrinterSettings.PaperSourceCollection paperSourceCollection = this.PrintDocument.PrinterSettings.PaperSources;
int index = 0;
while (index < paperSourceCollection.Count)
{
if (string.IsNullOrEmpty(paperSourceCollection[index].SourceName) || paperSourceCollection[index].SourceName == "-1")
{
paperSourceCollection[index].SourceName = "NONEMPTY NAME";
}
index++;
}
base.LoadSettings();
}
}