ImageAdornerUi not visible

3 posts, 0 answers
  1. John
    John avatar
    14 posts
    Member since:
    Jul 2019

    Posted 11 Apr Link to this post

    Hi,

    I'm battling with an issue where the ImageAdornerUi is not visible when viewing in a WPF window in a VSTO project.  I can create a standalone WPF app and the adorner is visible, but in the VSTO project with the same code, it's not.  I'm assuming that this is a resource resolution issue, but I coming up short on finding the actual problem. 

    I'm attaching two images that show the difference between the two project types, and also have a bare bones VSTO (Excel) project that I can send if that would be helpful.

    I don't believe this is just an issue with ImageAdornerUi as other UI elements such as the Insert Hyperlink and Font dialogs also fail to appear.

    Are you able to shed any light on what I'm doing wrong here please?

    Many thanks

    John

  2. Tanya
    Admin
    Tanya avatar
    901 posts

    Posted 15 Apr Link to this post

    Hi John,

    It seems like you are using the implicit styling mechanism and the NoXaml binaries to apply the desired theming to the control. This approach requires some of the resources to be merged on application level. To better describe, the windows and popups that the users can open from RadRichTextBox are loaded on a visual tree different than the one of the control. That said, these additional windows don't have access to the resources of RadRichTextBox and its parent window.

    Is there any particular reason for using the NoXaml assemblies? If you don't need to implement specific style customizations, I would suggest you use the StyleManager to apply the desired theme.

    Regards,
    Tanya
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
  3. John
    John avatar
    14 posts
    Member since:
    Jul 2019

    Posted 17 Apr in reply to Tanya Link to this post

    Hello Tanya,

    Thanks very much for your reply.  That has helped track this down.

    I'm using the NoXaml binaries on the basis of the smaller size, but I think I've discovered my problem, which is the having no application object in the hosted VSTO environment.  I was just trying to reference a global merged resource dictionary, but have since wrapped this in an Application (in xaml) object and am newing this up in the ThisAddIn startup method as per the approaches in a Dr.Wpf article and an SO answer:

    http://drwpf.com/blog/2007/10/05/managing-application-resources-when-wpf-is-hosted/

    https://stackoverflow.com/questions/50363992/excel-vsto-use-resourcedictionary-which-is-in-separate-assembly

    So with the creation of the Application object and merging the xaml resources in its dictionary I'm now getting the image adorner and hyperlink dialog etc.

    Thanks again for your help.

    John

Back to Top