After the application has completed, why are the runtime values ​​displayed in design mode?

I have a custom descendant DataGridViewComboBoxColumn with the following property value Itemsset in design mode:

    Itema
    Itemb
    Itemc

At runtime, I change this property Itemsas follows (example):

for (int i = 0; i < Items.Count; i++) {
    Items(i) = Convert.ToString(Items(i)) + " CHANGED";
}

After I close the form and return to development mode, I can see the property value set to

    ItemA CHANGED
    ItemB CHANGED
    ItemC CHANGED

I would not believe that this is possible, but this is what I get. After 5 starts, I see that each element has a suffix CHANGED CHANGED CHANGED CHANGED CHANGED.

, , Paint DataGridViewComboBoxCell. ( , , Items.Count = 0).

+4
1

, .

. , , .

, , , , .

, , Visual Studio. , , , , .

, - , , . , , , .

, , :

bool designMode = (LicenseManager.UsageMode == LicenseUsageMode.Designtime);

. : Control.

+2

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


All Articles