This is a migrated thread and some comments may be shown as answers.

Null error on RadDocument, CTRL+N

1 Answer 43 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Apex asked on 05 Apr 2012, 09:45 PM
Dear Telerik;

Document.LayoutMode = DocumentLayoutMode.Paged
I am using CTRL+N shortcut for new document. 
I am getting a strange this error.

But, Document.LayoutMode = DocumentLayoutMode.Flow
No error.

System.NullReferenceException was unhandled
  Message=Object reference not set to an instance of an object.
       at Telerik.Windows.Documents.UI.DocumentPrintLayoutPresenter.GetFocusedPresenter() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\UI\DocumentPrintLayoutPresenter.cs:line 687
       at Telerik.Windows.Documents.UI.DocumentPrintLayoutPresenter.get_IsFocused() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\UI\DocumentPrintLayoutPresenter.cs:line 374
       at Telerik.Windows.Documents.UI.DocumentPrintLayoutPresenter.SetCaretBlinking(Boolean isBlinking) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\UI\DocumentPrintLayoutPresenter.cs:line 282
       at Telerik.Windows.Documents.UI.DocumentPresenterBase.<this_KeyDown>b__0() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\UI\DocumentPresenterBase.cs:line 652
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

Thank You.


1 Answer, 1 is accepted

Sort by
Iva Toteva
Telerik team
answered on 09 Apr 2012, 04:13 PM
Hi Apex,

Thank you for reporting this issue. We will review the current implementation in order to fix the problem.

In the meantime, you can workaround the issue by setting the command binding to the NewDocument command as follows:

<telerik:RadRichTextBox Grid.Row="1" Name="editor" >
        <KeyBinding Gesture="Ctrl+N" Command="telerikDocs:RichTextBoxCommands.NewDocument" />

Provided that you have declared the telerikDocs namespace like this:

Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Asked by
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question