ShowDialog of FontPropertiesDialog crash

4 posts, 0 answers
  1. Ema
    Ema avatar
    3 posts
    Member since:
    Nov 2013

    Posted 11 Mar 2014 Link to this post

    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)
  2. Yancho
    Admin
    Yancho avatar
    72 posts

    Posted 13 Mar 2014 Link to this post

    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.

     
  3. DevCraft banner
  4. Ema
    Ema avatar
    3 posts
    Member since:
    Nov 2013

    Posted 21 Mar 2014 in reply to Yancho Link to this post

    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.
  5. Yancho
    Admin
    Yancho avatar
    72 posts

    Posted 26 Mar 2014 Link to this post

    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.

     
Back to Top