We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Bars ordering (Parent form and childs)

Thread ID:

Created:

Updated:

Platform:

Replies:

133078 Oct 8,2017 11:44 PM Jun 1,2018 07:22 AM Windows Forms 3
loading
Tags: ChildFrameBarManager
Ayman Metwally
Asked On October 8, 2017 11:44 PM

Greetings.

How to force that bars related to parent form (which contains standard items) appears first and then child merged bars appears beside it?




Regards,
Ayman


Kannan R [Syncfusion]
Replied On October 12, 2017 06:03 AM

Hi Ayman 
 
Thank you for contacting Syncfusion support. 
 
Query  
Comments  
 
Parent Form Bar is not positioned in initial index and it is placed next to child bar item.   
 
By default Bar collection in MainFrameBarManager will be positioned first and then it will be followed by MDIChild. We have checked this behavior and can find the Parent Form Bar in initial position and MDI Child is loaded to next position.  
 
Screenshot  
  
  
  
So can you please confirm, if you have drag and drop it to another position or kindly explain how you have defined MDI Parent – Child structure? That will be helpful for us to analyze and provide prompt solution. If possible, kindly share us the sample.  
 
Sample: Syncfusion\EssentialStudio\[Installed Version]\Windows\Showcase\Diagram Builder\CS  
  
 
Is there any option to force Bar in required position?  
 
At present Bar will be displayed in initial position based on how you have added to MainFrameBarManager Bars Collection.   
 
For Example  
 
In this below example, mainMenuBar has been added to collection initially. So it is displayed in initial index and will be followed by standardToolbar.   
 
Code Snippet: [C#]  
  
  
this.mainFrameBarManager.Bars.Add(this.mainMenuBar);  
this.mainFrameBarManager.Bars.Add(this.standardToolbar);  
  
  
We will need to clear and re-add or re define all the Bars added to the collection and add required Bar in “0” index and update the index of all other Bars.   
 
Kindly check with above solution and let us know if it is helpful. 
 
Regards 
Kannan 


Ayman Metwally
Replied On May 31, 2018 09:16 AM

Hi Kannan,

First, I apologize for my very late reply. 

I'm still experiencing this issue. What I want to do is t fix the location of all bars (I don't care about user changes, I need them fixed all the time).

So, what steps do you recommend to get rid of this issue?

Regards,
Ayman

Venkateshwaran Ramdoss [Syncfusion]
Replied On June 1, 2018 07:22 AM

Hi Ayman, 
 
Thank you for your reply. 
 
The reported behavior is the auto persistence of the MainFrameBarManager. It will load the persisted ToolBars position when the application restarted.  This behavior can be disabled and the ToolsBar position can be fixed in same position at all the time by setting the AutoPersistCustomization as false and remove the LoadBarState(serializer) in the load method. 
 
Please find the code example in the below.  
 
Code example 
 
 
// remove the below LoadBarState codes from the Main form load method. 
 
if (File.Exists(@"..\..\persist.xml")) 
{ 
    AppStateSerializer serializer = new AppStateSerializer(SerializeMode.XMLFile, @"..\..\persist"); 
    this.mainFrameBarManager.LoadBarState(serializer); 
}                                                                                                     
 
 
this.mainFrameBarManager.AutoPersistCustomization = false; 
 
We have modified the sample for your reference and it can be downloaded from the below link. 
 
Sample: Diagram_Builder 
 
Output 
 
 
 
Please check the above solution and let us know if it is helpful. 
 
Regards, 
Venkateshwaran V.R. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;