Szerkesztés

Megosztás a következőn keresztül:


ColumnDefinitionCollection.IsReadOnly Property

Definition

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

Property Value

true if the collection is read-only; otherwise false. This property has no default value.

Implements

Examples

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

To view the complete sample, see How to: Manipulate Columns and Rows by Using ColumnDefinitionsCollections and RowDefinitionsCollections.

Applies to

See also