Questions about the new ribbon

Posted by: wknauf on 6 August 2019, 12:44 am EST

    • Post Options:
    • Link

    Posted 6 August 2019, 12:44 am EST - Updated 3 October 2022, 2:40 pm EST

    Hi C1,

    just did a quick test of the new C1Ribbon component.

    Questions:

    a) are there plans for a tool to upgrade an existing C1Ribbon component to the new ribbon? At least the changes to image handling are not compatible, so it will not help to just replace a reference.

    b) when editing the “IconSet” and adding a “C1BitmapIcon”, a message is shown “Icon size should be set before adding to collection. Parameter name: C1Icon.Size” => this message is annoying if it is shown every time an icon is added.

    c) after setting a C1BitmapIcon.Source (by picking a file from a local resource), the “Size” properties are not auto populated => see screenshot “empty_size.png”.

    Attached sample shows this - just edit “ribbonButton1” and add the file “document_add_32.png” to the IconSet.

    RibbonTest.zip

    d) there seem to be some resource leak: add a 32 pixel image to the “ribbonButton1” IconSet and click “OK” in the IconSet editor. Then, open the IconSet editor again and remove the 32 pixel image. Edit the IconSet of this button again and try to add the 32 pixel image from the project resources again => it will not work, with strange error messages…

    Depending on the steps, different errors will happen, this is just one way…

    Best regards

    Wolfgang

  • Posted 6 August 2019, 12:46 am EST

    d) we have an old support issue open about DPI awareness. Is this fixed with the new ribbon? https://supportone.componentone.com/home/casedetail/191075

  • Posted 6 August 2019, 8:10 pm EST - Updated 3 October 2022, 2:40 pm EST

    Hi Wolfgang,

    a). Yes, but I haven’t ETA for this request and I don’t think that before we finish all the new features.

    b-c). It’s designer for betta version. We’ll add new designer in the 19v3 release.

    d). Memory leak: Thank you for this report, we’ll check this case.

    e). DPI: we’ll work with DPI issues for 19v3 release.

    Some new features like a IconSet resolve some of them. The IconSet tries to use icon with suitable DPI size (you can add 64px or 128px bitmaps) or you can use vector icons.

    Thanks for the feedback, if you have other questions or requests, please ask them.


    Best Regards,

    Konstantin Pletnev

  • Posted 7 August 2019, 6:46 pm EST

    Hi Konstantin,

    thanks for the feedback.

    About migration of the old ribbon: the old RibbonButton has properties “SmallImage” and “LargeImage”. To make an upgrade to the new ribbon easier, it would be great if those properties were also available in the new control. They might modify the “IconSet” internally and set the corresponding 16/32 pixel images.

    A conversion tool which just upgrades the “InitializeComponent” code will not help us. We have a lot of ribbon button symbols which have standard icons, and so we set “SmallImage”/“LargeImage” in constructor based on an image list defined in our central tools assembly.

    Best regards

    Wolfgang

  • Posted 11 August 2019, 8:27 pm EST

    Hi Wolfgang,

    Are you use constructor of the RibbonButton(string text, Image smallImage, Image largeImage)? This API is available in the new Ribbon.

    I’ll discuss the SmallImage/LargeImage properties issue with the dev team.


    Best Regards,

    Konstantin Pletnev

  • Posted 11 August 2019, 11:40 pm EST

    Hi Konstantin,

    nope, we build the ribbon in InitializeComponent using the designer and don’t set images for our “standard” buttons.

    Later, e.g. in the constructor of the form, we set “SmallImage” und “LargeImage” properties.

    Best regards

    Wolfgang

  • Posted 13 August 2019, 8:18 pm EST

    Hi Wolfgang,

    Ok, we’ll add this properties, but they’ll have attributes: EditorBrowsableState.Never and DesignerSerializationVisibility.Hidden. Not sure about “obsolete”.


    Best Regards,

    Konstantin Pletnev

  • Posted 14 August 2019, 6:12 pm EST

    Better not “obsolete” - we might have 100 calls to it :wink:

    Best regards

    Wolfgang

  • Posted 14 August 2019, 10:17 pm EST

    Hi Folks,

    I too have played around with the new ribbon and have a suggestion. To me, using vector graphics is the cleanest way to handle different dpi environments. No multiple size image objects are required. Rather than using a simple vector path to define the graphic, why not use a SVG file? There are some great, free SVG editors out there (I use Inkscape). SVG files can contain multiple paths, though, and using the new control, I have to manually combine them to create a vector path.

    It would seem to me, all controls that use graphics should eventually have a svg property, then scaling graphics would be as easy as choosing a size, rather than having separate small and large image properties.

    -Kingman

  • Posted 18 August 2019, 11:48 pm EST

    Hello Kingman,

    Thank you for sharing your viewpoints and making the suggestions. I have forwarded them to the concerned team.

    I will get back to you, if they need any further clarification.

    Best wishes,

    Ruchir

  • Posted 19 August 2019, 12:37 am EST - Updated 3 October 2022, 2:41 pm EST

    Hello Kingman,

    The C1PathIcon works with a svg data content (like the Path from WPF), this is default vector icons for ribbon:

    If you have several paths with different colors, you can use the C1CompositeIcon [eta v3 release]. Example with two C1PathIcon:

    I understand your desire for this to work out of the box, I’ll discuss with the team the ability to read svg files. This feature will be useful for new icons designer.


    Best Regards,

    Konstantin Pletnev

  • Posted 19 August 2019, 12:40 am EST

    Hi Wolfgang,

    Ok, I’ll remove the ‘obsolete’ attribute.


    Best Regards,

    Konstantin Pletnev

  • Posted 21 November 2019, 2:22 am EST

    Hi C1,

    just did a quick test with the new “C1.Win.Ribbon” component in .393. It seems you removed the “VisualStyle”. Could you confirm this?

    Are C1Themes the only way to theme the new ribbon? Luckily, we already support C1Themes, so we would only have to remove the old VisualStyles.

    Best regards

    Wolfgang

  • Posted 21 November 2019, 11:11 pm EST

    The scaling / dpi awareness does not seem to work - even with .NET framework 4.8, which introduced new scaling process - see https://docs.microsoft.com/en-US/dotnet/framework/winforms/high-dpi-support-in-windows-forms

    You find samples and more details in support issue 191075

    Best regards

    Wolfgang

  • Posted 27 November 2019, 12:48 am EST

    Hi Wolfgang,

    Yes, you’re correct VisualStyles are not supported in new Ribbon and this is by design.

    Regarding the high DPI concern, I have updated the developer with your findings [ID: 394548] and shall get back to you with some information soon.

    Regards,

    Ruchir

  • Posted 10 August 2020, 10:44 pm EST

    Hello,

    Issue has been fixed in the latest version of C1:

    http://prerelease.componentone.com/dotnet452/c1winform/2020-t2/C1WinForms-452_4.5.20202.438.zip

    Thanks,

    Mohit

  • Posted 12 August 2020, 6:58 pm EST

    Hi Mohit,

    the DPI awareness issue (support ticket 191075) is not fixed with .438, my sample is still broken.

    According to the readme, there was only a change related to high dpi icons.

    Best regards

    Wolfgang

  • Posted 13 August 2020, 3:44 pm EST

    Hi Wolfgang,

    With respect to the ticket: 191075, I have replied there for the original issue.

    Thanks,

Need extra support?

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

Learn More

Forum Channels