ColumnDefinitionCollection.IsReadOnly ColumnDefinitionCollection.IsReadOnly ColumnDefinitionCollection.IsReadOnly ColumnDefinitionCollection.IsReadOnly Property

定義

取得值,這個值表示 ColumnDefinitionCollection 是否為唯讀。Gets a value that indicates whether a ColumnDefinitionCollection is read-only.

public:
 property bool IsReadOnly { bool get(); };
public bool IsReadOnly { get; }
member this.IsReadOnly : bool
Public ReadOnly Property IsReadOnly As Boolean

屬性值

如果此集合是唯讀,則為 true;否則為 falsetrue if the collection is read-only; otherwise false. 此屬性沒有預設值。This property has no default value.

實作

範例

下列範例示範如何取得的值IsReadOnly屬性。The following example demonstrates how to get the value of the IsReadOnly property.

private void colReadOnly(object sender, RoutedEventArgs e)
{
    tp4.Text = "RowDefinitionsCollection IsReadOnly?: " + grid1.RowDefinitions.IsReadOnly.ToString();
    tp5.Text = "ColumnDefinitionsCollection IsReadOnly?: " + grid1.ColumnDefinitions.IsReadOnly.ToString();
}
Private Sub colReadOnly(ByVal sender As Object, ByVal e As RoutedEventArgs)
    tp4.Text = "RowDefinitionsCollection IsReadOnly?: " + grid1.RowDefinitions.IsReadOnly.ToString()
    tp5.Text = "ColumnDefinitionsCollection IsReadOnly?: " + grid1.ColumnDefinitions.IsReadOnly.ToString()
End Sub

若要檢視完整的範例,請參閱如何: 操作資料行及資料列使用 ColumnDefinitionsCollections 和 rowdefinitionscollections 管理To view the complete sample, see How to: Manipulate Columns and Rows by Using ColumnDefinitionsCollections and RowDefinitionsCollections.

適用於

另請參閱