0

I have a user control and i can drag the user control to form1 designer for example and then see some properties and change the properties settings :

ui button

on the right is example of what i want it to look like. the bottom white with the text Click Me should be a button that i can press either before running the program or at run time and when clicking on it to save some properties values in the user control.

This is a link for the user control code :

How to animate dots in UserControl Paint event?

so each time i'm dragging the user control to form1 designer in the properties window i will have a ui button that i can press on and save the user control settings like the interval value or the dot color or dotActivecolor and then when i will drag the user control over again it will be loaded with the saved values.

if a button is too complicated maybe to add another property in the user control code type bool and if the flag is true it will save automatic any changes to the user control properties and if the flag is false it will not save.

jhon last
  • 109
  • 6
  • That's not how it works. If I remember correctly, you can add links to the Properties window, although I can;t recall how it's done off the top of my head (might be XML tags), but they aren't going to magically change the class itself. – John Sep 25 '22 at 03:55
  • Just checked and, for a `DataGridView`, there are links at the bottom of the Properties window for "Edit Columns..." and "Add Column...", which are the same as you get if you click the smart tag at the top-right of the control itself. I haven't read anything on that for a long time so I can;t recall how they are added but, again, those actions only relate to that instance of the class, not the class itself. You'd need to change the source code of the class to change the default property values. At least, I've not heard of anything that would do this in my 20 years of .NET experience. – John Sep 25 '22 at 04:00

0 Answers0