I need to determine if document is empty, even if the document was just created in other parts of the code. The code below throws the exception. If the commented lines are uncommented then the exception is not thrown. I could work around the problem also by carrying a flag to tell me if document was just created (and not call GetStatisticsInfo in that case). Is this exception a bug? Is there a smarter or more elegant way to determine if document is empty?
var d =
new
RadDocument();
//var p = new Telerik.WinForms.Documents.FormatProviders.Rtf.RtfFormatProvider();
//d = p.Import(p.Export(d));
var s = d.GetStatisticsInfo();