Ticket Q403714
Visible to All Users

Delay in Opening BarItem

created 13 years ago

Hello,

I'm Building a dynamic MenuBarItem in the StartUp operation, so it will be built when application finishes
starting up…

But it takes about 3-4 secs to be opened for the first time
Does it have a problem with me, or it's a performance issue in BarItems…?
and if it's, does it have a solution or a work around way?

Thanks in advance
Manar

Show previous comments (3)

    Hi Ted,
    Sorry for being late,
    I have modified the giving example, and here is the attached folders, I have attached your example with my modifications, and the folder that it works on,
    The folder has python dymmy files, put it anywhere you want, \
    and modify the ScriptPath in the Code to ScriptFolder location…
    Thanks a lot

      here is the script files

      DevExpress Support Team 13 years ago

        Hi Manar,
        Thank you for your project. I have reviewed and tested it on my side. Sub-menus were generated fast both for version 11.2 and 11.1. I have attached a video that demonstrates how your application works on my side.
        The performance issues can be caused by UIAutomation. Applications that use UIAutomation (e.g., Abbyy Lingvo) can definitely decrease performance of WPF applications. When enabled, the UIAutomation system handles a lot of events, whose amount is proportional to the capacity of the visual tree. This is the main cause of the performance decrease. Version v.11.2 provides a ClearAutomationEventsHelper class, which allows clearing UIAutomation events. The ClearAutomationEventsHelper.ClearAutomationEvents method should be called each time the visual tree has been changed. I have modified your project to demonstrate this approach in action. I call ClearAutomationEventsHelper.ClearAutomationEvents when the MeasureOverride function of the MainWindow is being executed. It may also be better to call this function during the layout update.
        We look forward to your feedback once you have had the opportunity to review the sample project.
        Thank you.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.