ContextMenu Language and Copy of Pictures

4 posts, 1 answers
  1. Benedikt
    Benedikt avatar
    36 posts
    Member since:
    Feb 2018

    Posted 09 Jan Link to this post

    Hey,

    I am currently implementing a RadPDFViewer in my WPF application.

    I managed to change the Tooltip Text of the RadPdfViewerToolBar, but I also want to change the Language of the elemnts in the ContextMenu, because my users are not that well with english.

    Is there any hidden way I am missing?

     

    Second I have a problem with the copy functionality. It is only possible to copy text. Or at least I find no way to copy the pictures.

     

    Greetings

    Benedikt

  2. Martin
    Admin
    Martin avatar
    74 posts

    Posted 13 Jan Link to this post

    Hi Benedikt,

    You can change the language appearance by adding localization keys in the XAML. You can make this by expanding the code of the toolbar as demonstrated in the Customizing the Default UI help section. Please, check our GitHub example demonstrating how you can localize RadPdfViewer's UI.

    We have an item logged in our backlog to provide localization for the RadPdfViewerToolBar: PdfViewer: Provide localization for RadPdfViewerToolBar. You can cast your vote for the implementation as well as subscribe to the task by clicking the Follow button so you can receive updates about status changes.

    As for the copying images, currently, the PdfViewer only supports copying of text-only. We have a feature request logged in our backlog to provide support of copying rich-text format and images: Add rich-text format to clipboard on copy. I am sorry to tell you there is no workaround at the moment, but you can cast your vote for the implementation as well as subscribe to the task by clicking the Follow button so you can receive updates about status changes.

    Regards,
    Martin
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Benedikt
    Benedikt avatar
    36 posts
    Member since:
    Feb 2018

    Posted 14 Jan in reply to Martin Link to this post

    Hi Martin,

    thanks for the links.

    With the localization, I have the problem I'm not able to localize the Context-Menu Items.

    In the Help for WinForms there are some resource keys for the COntext-Menu. https://docs.telerik.com/devtools/winforms/controls/pdfviewer/localization
    These are missing in WPF. So are they not changable there?
    The Search-Popup Localization changes with the resx, but not the Contextmenu itself.
    I tried around a bit with keys like FixedDocumentViewers_ContextMenu_SelectAll or FixedDocumentViewers_SelectAll, without success.

    It's sad, that images aren't able to copy, but well, I have to deal with it.

  4. Answer
    Martin
    Admin
    Martin avatar
    74 posts

    Posted 16 Jan Link to this post

    Hello Benedikt,

    The documentation about the Localization in WPF can be found in the Localization help article.

    In order to achieve the desired functionality, you can create custom implementation of the LocalizationManager following Overriding the LocalizationManager's GetStringOverride() method example:

    public class CustomLocalizationManager : LocalizationManager 
    { 
    	public override string GetStringOverride(string key) 
    	{ 
    		switch( key ) 
    		{ 
    		case "CustomKey": 
    			return "Lorem ipsum"; 
    		...
    		}	
    	}
    }

    , where the key will be the custom implemented LocalizableResourceExtension (currently, the RadPdfViewerToolBar doesn't provide build-in localization keys because this functionality is still not developed):

    <telerik:RadButton Content="{telerik:LocalizableResource Key=CustomKey}" Click="..." /> 

    I am attaching a sample project demonstrating this functionality.

    Regards,
    Martin
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top