Message to "Reset Profile" after adding new field

0
0

Hi.

I have created a Form (Window) with many controls in it, all dropped in FlowLayoutPanels so they get properly rearranged depending on the current Profile. Then I set a Phone profile and changed some of the controls positions, this way it would be properly shown to the user when the application is run in Phones. Worked perfectly. Now, I had to add a new field to one of the Panels, which I did. However, after this, when I choose the Phone profile in the VS Editor, I get a message with the title “Reset Profile” and the message “Collection was modified; enumeration operation may not execute”. Does that mean that once we create a Profile there is no way to add new controls to them without starting editing the other profiles from scratch?!

Thanks in advance.

Ivan

  • You must to post comments
0
0

Hi Luca.

Just to let you know, I have a feeling there is more to take care about the ResponsiveProfiles functionality. Now, I have had all my controls Locations changed to the same as the Phone profile, after I repositioned some of them in the Phone profile. Once I finished editing the controls and clicked back to the Default Profile, I had that same message I mentioned in my original post and the form wouldn’t open anymore. So, I closed VS and opened it again just to see that all my controls in the Defaut Profile were in the wrong locations, basically as they were in the Phone profile after I repositioned them there. Right now it is a bit scary. I will make sure I save a copy of the forms before I do any editing on a different profile.

  • Luca (ITG)
    It’s a very difficult functionality. Especially when switching and anchoring and docking are involved. It’s meant to be used to adapt some controls, probably not the entire screen. If you can send a sample that more or less replicates your most complex screen I can try to reproduce.
  • Ivan Borges
    I see. I will try to reproduce on a sample, hope I can accomplish this. Yes, my form is getting a bit complex but it is far from being the most complex I will see ahead. This one is basically made of a TabControl first, then the TabPages have FlowLayoutPanels docked Top, which have controls inside them, and sometimes other panels, so I can reposition them properly if the form is used in a cell phone. The results once saved OK are perfect and the people I am showing to are loving it. I wouldn’t like to avoid this functionality, so I will have to find a way to edit the forms carefully. And you are right, there is a lot of anchoring, docking, etc. involved, but maybe the problem is not in the complexity of this, but on why another profile, in this case the Default one, is getting its controls Locations saved by the values of yet another profile.
  • Luca (ITG)
    I think we found the issue. It happens if you run the app with the designer open and the current profile is not the Default. In that case the designer in VS recreates the components and the values that were stored for the Default are wiped out so after running if you switch batch the Default gets corrupted with the profile that was selected.
  • Ivan Borges
    Great catch, Luca! I indeed run the app while the editor was showing the form. I try not to, I’ve faced problems with other tools on this as well, but sometimes it happens. Thanks for sharing.
  • You must to post comments
0
0

Thanks for the reply, Luca!

Yep, I added it to the Default Profile. I was right now checking this new field (ResponsibleProfiles) property and noticed there are 2 entries for it for the Phone profile, which is odd. I will delete one of them and see if it fix it.

  • Ivan Borges
    By the way, I have a feeling of what might have happened. Instead of dropping a new control from the Toolbox, I Copied and Pasted one already present in the form.
  • You must to post comments
0
0

Controls have to be added to the default profile and are present in all profiles. you can hide them. It’s like the localization feature. I’ll check why it doesn’t show the correct message.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.