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

ShowDialog of FontPropertiesDialog crash

3 Answers 27 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Ema
Top achievements
Rank 1
Ema asked on 11 Mar 2014, 04:01 PM
Hi, I'm using RadRichTextBox of Telerik version 2013.3.1016.1050. I'm trying to visualize FontPropertiesDialog using context menu.
If I use the default context menu behavior the dialog doesn't appear, if I call explicitly the FontPropertiesDialog constructor:

 dialog.ShowDialog(new FontPropertiesDialogContext(new Action<StyleDefinition>((style) => SetFontValuesToTextBoxText(style)),
                AssociatedRichTextBox.Document.Style, AssociatedRichTextBox));

this code raise this error:

Message = Reference is not a valid visual DependencyObject.
StackTrace =    at System.Windows.Media.VisualTreeHelper.GetRelative(DependencyObject reference, RelativeKind relativeKind)
   at System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference)
   at Telerik.Windows.Controls.RichTextBoxUI.Dialogs.WindowHelper.GetParentWindow(RadRichTextBox radRichTextBox)
   at Telerik.Windows.Controls.RichTextBoxUI.Dialogs.RadRichTextBoxWindow.SetOwner(RadRichTextBox owner)
   at Telerik.Windows.Controls.RichTextBoxUI.Dialogs.FontPropertiesDialog.ShowDialogInternal(StyleDefinition defaultStyle, Action`1 applyCallback, RadRichTextBox owner)
   at Telerik.Windows.Controls.RichTextBoxUI.Dialogs.FontPropertiesDialog.ShowDialog(FontPropertiesDialogContext context)
   at Siemens.SimaticIT.ALT.Engineering.Controls.FontCommandExt.ExecuteOverride(Object parameter)
   at Telerik.Windows.Documents.RichTextBoxCommands.RichTextBoxCommandBase.Execute(Object parameter, Boolean focusCaret)

3 Answers, 1 is accepted

Sort by
0
Missing User
answered on 13 Mar 2014, 04:32 PM
Hi Ema,

Thank you for your interest in RadRichTextBox!

The most common reason for the dialogs not showing is because of missing needed DLL references.

Please, be aware that the default implementation of the dialogs is related to Telerik.Windows.Documents.RadRichTextBoxUI.dll and make sure all required references are added in your project. 

If you are still experiencing problems, would it be possible to create a sample working project and send it to us through a support ticket? This will be the fastest way to investigate the problem and try to provide a solution.

I hope this helps! Let me know how it goes.

Regards,
Yancho
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
0
Ema
Top achievements
Rank 1
answered on 21 Mar 2014, 02:50 PM
Hi,
I already hadded these libreries.
I sended you a prototype, when the RadRichTextBox is used over a
DataTemplate, with DataType binding, in a SourceItem control, the
FontPropertiesDialog cannot appear (only this dialog).

I cannot send you telerik dll files used, the zip is too large (and the png file is a zip file).

Using the old telerik version this dialog appear.
0
Missing User
answered on 26 Mar 2014, 11:28 AM
Hi Ema,

Thank you for the project!

We managed to reproduce this behavior. We investigated the cause of the issue and found that when RadRichTextBox is set in a DataTemplate, there are problems with the emergence of some dialogs. We logged the issue in our to-do list and we will do our best to fix it as soon as possible. At this point I could only suggest to not place RadRichTextBox in a data template.

The Telerik points in your account have been updated in appreciation of your involvement.

Please excuse us for the inconvenience. Let me know if you have other comments or questions.

Regards,
Yancho
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
RichTextBox
Asked by
Ema
Top achievements
Rank 1
Answers by
Missing User
Ema
Top achievements
Rank 1
Share this question
or