Bars ordering (Parent form and childs)
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
SIGN IN To post a reply.
3 Replies
KR
Kannan R
Syncfusion Team
October 12, 2017 10:03 AM UTC
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#]
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
AM
Ayman Metwally
May 31, 2018 01:16 PM UTC
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
VR
Venkateshwaran Ramdoss
Syncfusion Team
June 1, 2018 11:22 AM UTC
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.
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
AM Ayman Metwally
- Oct 9, 2017 03:44 AM UTC
- Jun 1, 2018 11:22 AM UTC