RowDefinitionCollection.IsReadOnly RowDefinitionCollection.IsReadOnly RowDefinitionCollection.IsReadOnly RowDefinitionCollection.IsReadOnly Property

定義

取得值,這個值表示 RowDefinitionCollection 是否為唯讀。Gets a value that indicates whether a RowDefinitionCollection 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.

適用於

另請參閱