Hello,
We're using the RadRichTextBox control with the Windows8 Theme.
And it's possible to insert an image in the text but as soon as the user tries to select this image to resize it, the application crashes:
An unhandled exception of type 'System.NullReferenceException' occurred in PresentationFramework.dll
At first I thought we were doing something wrong, so I've tried to recreate the problem in one the the sample projects.
By doing so I've noticed that this problem occurs only when using the Windows8 Theme. Changing the theme to Windows7 for example makes the issue disappear. But this is not an actual solution for us, because we'd like to be able to use the Windows8 theme too.
I've attached a screenshot of the exception details. I apologise for it being in Dutch but I believe it still to be of use here.
It says that the resource key RadButtonStyle is missing. I'd like to point out again that this seems to only occur with the Windows8 theme.
To recreate the problem you can use the SaveAndSaveAs_WPF sample project and just set the theme of the RadRichTextBox control to Windows8.
You can just take a screenshot and paste it in the RadRichTextBox, when you try to resize this image the NullReferenceException should be thrown.
Below is an example of the adjusted MainWindow.xaml:
<
Window
x:Class
=
"SaveAndSaveAs_WPF.MainWindow"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
Title
=
"MainWindow"
Height
=
"350"
Width
=
"525"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"0"
>
<
telerik:RadButton
Content
=
"New"
Click
=
"NewDocumentButton_Click"
Padding
=
"25,5"
Margin
=
"5"
/>
<
telerik:RadButton
Content
=
"Open"
Click
=
"OpenButton_Click"
Padding
=
"25,5"
Margin
=
"5"
/>
<
telerik:RadButton
Content
=
"Save"
Click
=
"SaveButton_Click"
Margin
=
"5"
Padding
=
"25,5"
/>
<
telerik:RadButton
Content
=
"Save As"
Click
=
"SaveAsButton_Click"
Margin
=
"5"
Padding
=
"25,5"
/>
</
StackPanel
>
<
telerik:DocumentRuler
Grid.Row
=
"1"
>
<
telerik:RadRichTextBox
telerik:Analytics.Name
=
"rtb"
x:Name
=
"radRichTextBox"
IsSpellCheckingEnabled
=
"False"
LayoutMode
=
"Paged"
AllowDrop
=
"True"
>
<
telerik:RadRichTextBox.Style
>
<
Style
TargetType
=
"telerik:RadRichTextBox"
>
<
Setter
Property
=
"telerik:StyleManager.Theme"
Value
=
"Windows8"
/>
</
Style
>
</
telerik:RadRichTextBox.Style
>
</
telerik:RadRichTextBox
>
</
telerik:DocumentRuler
>
</
Grid
>
</
Window
>
Is there anything we could to in order to bypass this problem and still use the Windows8 theme?