Can a Windows Forms control have a Time Time property?

I want the user of my control to be able to select the licensing method for the control. The choice comes from the enumeration, so they must choose one of the methods that I set out for them. This license must be selected before executing the code at runtime. Therefore, I want them to choose a value during development. In addition, I do not want this property to be writable at runtime if this can be avoided. Is there a way to make a property available only at design time?

+3
source share
1 answer

You can give design-time management behavior by creating a separate designer class for the control. Since control itself can only exist as an instance of your runtime, in fact you cannot have a direct property that is set only during development (where will it be stored?). However, designer classes are invoked and used by the designer, so you can encapsulate behavior there without execution.

+5
source

Source: https://habr.com/ru/post/1716269/


All Articles