Question about "C1.Win.C1RibbonPreview.C1RibbonPreview" and "C1FlexViewer"

Originally Posted 27 February 2017, 5:39 am EST

  • Originally Posted 27 February 2017, 5:39 am EST

    Hi C1,

    I just discovered "C1.Win.C1RibbonPreview.C1RibbonPreview" and have few questions about it. First of all: it is probably just for C1Report and thus somehow "obsolete"? At least I did not manage to display a PDF file using "C1.Win.C1Document.C1PdfDocumentSource".
    If this is true, the replacement would be probably the "C1.Win.FlexViewer.C1FlexViewer" control? But my questions below apply to the latter, too.

    In the moment, we use a modified "C1dView" sample in our app, and if we migrate to FlexReport, this might be interesting.

    a) We need our application menu and a few other standard ribbon tabs in the preview ribbon. The reason: if the user closes all other ribbon forms, and a print preview form is the last open form, the user should be able to open any other form of our application.
    It seems that for "C1RibbonPreview" it is impossible to add additional ribbon tabs or an application menu?

    b) the icon set of the old "C1dView" sample matched our applications icon set. But the yellowish icons of "C1RibbonPreview" and the grayish icons of FlexViewer don't match. Is there any chance that you provide multi icon sets in the preview component so that one can switch to the one best matching?

    We currently still use the old "C1Report" stuff, but we might migrate to "FlexReport" in the future.

    Best regards

  • Reply

    Hi Wolfgang,
    a) For adding new ribbon tab(s) in C1FlexViewer and C1RibbonPreview use the below code snippet:

    //flex viewer
    c1FlexViewer1.Ribbon.HideTabHeaderRow = false;
    c1FlexViewer1.Ribbon.Tabs.Add(new C1.Win.C1Ribbon.RibbonTab("Tab 1"));

    //Ribbon preview
    c1RibbonPreview1.Ribbon.HideTabHeaderRow = false;
    c1RibbonPreview1.Ribbon.Tabs.Add(new C1.Win.C1Ribbon.RibbonTab("Tab 1"));

    b) As of now there is no planning to add multi icon sets in the preview component. However, you can change these icons as per your requirement(s) as:

    //Change images in flex viewer
    c1FlexViewer1.RibbonElements.Print.LargeImage = imgLarge;
    c1FlexViewer1.RibbonElements.Print.SmallImage = imgSmall;

    //change images in ribbon preview
    c1RibbonPreview1.RibbonElements.Print.LargeImage = imgLarge;
    c1RibbonPreview1.RibbonElements.Print.SmallImage = imgSmall;

  • Marked as Answer


    Thanks for the reply.

    I made the error to just look at the designer, but if modification is possible at runtime, this is perfect and matches our existing C1dView integration.

    Best regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels