Control.IsDisposed Свойство
Определение
Возвращает значение, указывающее, был ли удален элемент управления.Gets a value indicating whether the control has been disposed of.
public:
property bool IsDisposed { bool get(); };
[System.ComponentModel.Browsable(false)]
public bool IsDisposed { get; }
member this.IsDisposed : bool
Public ReadOnly Property IsDisposed As Boolean
Значение свойства
Значение true
, если элемент был удален; в противном случае — значение false
.true
if the control has been disposed of; otherwise, false
.
- Атрибуты
Комментарии
Когда это свойство возвращает true
, элемент управления удаляется и на него нельзя ссылаться как на допустимый элемент управления Windows.When this property returns true
, the control is disposed of and can no longer be referenced as a valid Windows control. Хотя экземпляр элемента управления удаляется, он по-прежнему сохраняется в памяти до тех пор, пока он не будет удален из памяти с помощью сборки мусора.Even though the instance of a control is disposed of, it is still maintained in memory until it is removed from memory through garbage collection. При удалении элемента управления нельзя вызвать его метод RecreateHandle.When a control is disposed, you cannot call its RecreateHandle method.