Current filter:
                                You should refresh the page.
                                0
                                  • I use the default menu from the new project wizard. I save the layout to registry. When I restore the layout from registry the menu selection Paint Style no longer works. If I don't do the restore from registry the menu selection works as expected. How do I correct?

                                    Thanks

                                0

                                Hi Morris,

                                Thank you for contacting us. I'm afraid it is difficult to determine the cause of the issue based on this information. However, it seems that the layout saved in the registry has a style different from that one you're using in the Designer. Remove the saved layout and save it again.

                                If this won't help you, please send us a small project that illustrates the issue.

                                Thanks,
                                Gosha

                                0

                                This sample show the issue.

                                DevXTest.zip
                                0

                                Hi Morris,

                                Thank you for providing us with a sample project. Unfortunately, I still do not see how you are saving and restoring the BarManager layout. Would you please clarify in greater detail how to reproduce this issue, so that we can better understand it and find a solution?

                                I'm looking forward to your feedback.

                                Thank you,
                                Pavel.

                                0

                                uncomment this line in the form load event: Me.barManager.RestoreLayoutFromRegistry()

                                run the sample and move a bar.

                                re-run the sample and I think you see the bar stayed where you moved it to. Click the paint style button and you'll see it doesn't work.

                                comment out the line you just uncommented and re-run the sample. You'll see that paint style button does work.

                                0

                                Hi Morris,

                                I have double-checked the attached sample project and I do not see either the Form.Load event handler or buttons in bars. Please refer to the attached screenshots for more details. Probably, you have attached the wrong project. If so, please attach the sample project you are referring to, so that we can investigate this issue and find a solution.

                                I'm looking forward to your feedback.

                                Thank you,
                                Pavel.

                                dxSample.zip
                                0

                                Sorry. This one should be correct.

                                DevxBarTest.zip
                                0

                                Hi Morris,

                                Thank you for providing us with a sample project.

                                This behavior is not a bug. This issue is caused by the fact that the SkinHelper.InitSkinPopupMenu method does not assign unique IDs and Names to created items. For more details, please refer to the Restoring BarManager layout with run-time added items topic. To overcome this issue, I suggest you iterate through the mPaintStyle menu items and assign unique IDs and Names to them. I have updated your sample project to demonstrate this approach in action.

                                I hope that you will find this information useful. Please feel free to contact us in case of any further difficulty.

                                Thank you,
                                Pavel.

                                dxSample.ZIP
                                0

                                Thanks for the reply. This solution does not seem to get the child items of the BonusSkins menu selection. How would I do that.
                                Also when a selection is made I don't see a event that fires to record which menu selection has been made. I would like to save the selected sking to a setting.

                                Thanks

                                0

                                Hi Morris,

                                I have updated the sample project to demonstrate how to properly serialize BarSubItems in the Skins menu.

                                I would like to save the selected sking to a setting.

                                To accomplish this task, manually save the current LookAndFeel settings in the Form.FormClosing event handler and restore them in the Form.Load event handler:

                                	
                                [VB.NET]
                                Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Me.barManager.SaveLayoutToRegistry() Dim skinName As String = UserLookAndFeel.Default.SkinName File.WriteAllText("skin.cfg", skinName) End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Me.barManager.RegistryPath = "Hkey_Current_User/Software/vb and VBA Program Settings/PTC Inc/Plant Tag N Track/BarMenu" ' uncomment the line below to see the issue****************************************** Me.barManager.RestoreLayoutFromRegistry() If (File.Exists("skin.cfg")) Then UserLookAndFeel.Default.SkinName = File.ReadAllText("skin.cfg") End If End Sub

                                Thank you,
                                Pavel.

                                dxSample.ZIP
                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.