PropertyGrid.SelectedObject 屬性

定義

取得或設定物件,方格中正顯示該物件的屬性。Gets or sets the object for which the grid displays properties.

public:
 property System::Object ^ SelectedObject { System::Object ^ get(); void set(System::Object ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.PropertyGrid/SelectedObjectConverter))]
public object SelectedObject { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.PropertyGrid/SelectedObjectConverter))>]
member this.SelectedObject : obj with get, set
Public Property SelectedObject As Object

屬性值

Object

物件清單的第一個物件。The first object in the object list. 如果目前並未選取任何物件,將傳回 nullIf there is no currently selected object the return is null.

屬性

備註

SelectedObject屬性會將單一物件設定為要流覽的方格。The SelectedObject property sets a single object into the grid to be browsed. 如果流覽多個物件,這個屬性會傳回清單中的第一個物件。If multiple objects are being browsed, this property returns the first one in the list. 如果未選取任何物件, null 則會傳回。If no objects are selected, null is returned.

適用於