共用方式為


RowDefinitionCollection.IsReadOnly 屬性

定義

取得值,這個值表示 RowDefinitionCollection 是否為唯讀。

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

屬性值

如果此集合是唯讀,則為 true;否則為 false。 此屬性沒有預設值。

實作

範例

下列範例示範如何取得 屬性的值 IsReadOnly

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

若要檢視完整的範例,請參閱 如何:使用 ColumnDefinitionsCollectionsCollections 和 RowDefinitionsCollections 運算元據行和資料列

適用於

另請參閱