Validation prior to opening backstage view

Posted by: agulik on 20 September 2023, 8:00 pm EST

  • Posted 20 September 2023, 8:00 pm EST

    I have a VB.NET winforms application using C1Ribbon and C1BackStageView. Suppose the backstage view is closed and the user clicks the tab to open the backstage view. Is there any way to perform validation prior to opening the backstage view?

    Something like:

    Home tab clicked to open backstage view

    If (validation passes) then

    Open the backstage view

    else

    Do not open the backstage view

    end if

    I can’t seem to to figure it out via C1BackstageView.DropDown or any other of the C1Ribbon events.

    Thanks,

    Andrew

  • Posted 21 September 2023, 3:41 am EST

    Hi Andrew,

    You can achieve your requirement by using the MouseDown event of the C1Ribbon. In the event handler, you can check if the mouse is clicked on the “Application menu button” and if so, set the C1BackstageView.DroppedDown property on the basis of your validation.

    Please see the attached sample project showing a simple implementation of the same. In the project, the validation results are determined by the checked state of the checkbox.

    Attachment: RibbonBackstageView.zip

    Best Regards,

    Kartik

Need extra support?

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

Learn More

Forum Channels