DataGrid.AreRowDetailsFrozen Property
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Gets or sets a value that indicates whether the row details sections remain fixed at the width of the display area or can scroll horizontally.
Namespace: System.Windows.Controls
Assembly: System.Windows.Controls.Data (in System.Windows.Controls.Data.dll)
Syntax
'Declaration
Public Property AreRowDetailsFrozen As Boolean
public bool AreRowDetailsFrozen { get; set; }
<sdk:DataGrid AreRowDetailsFrozen="bool"/>
Property Value
Type: System.Boolean
true if the row details sections are prevented from scrolling horizontally; otherwise, false. The default is false.
Remarks
Dependency property identifier field: AreRowDetailsFrozenProperty
Set this property to true to make sure that the contents of the row details sections are never scrolled out of view horizontally.
Examples
The following code example demonstrates how to set the AreRowDetailsFrozen property in code. This example is part of a larger example available in the How to: Display and Configure Row Details in the DataGrid Control topic.
' Freeze the row details if the check box is checked.
Private Sub cbFreezeRowDetails_Changed(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
Dim cb As CheckBox = sender
If Me.dataGrid1 IsNot Nothing Then
Me.dataGrid1.AreRowDetailsFrozen = cb.IsChecked
End If
End Sub
// Freeze the row details if the check box is checked.
private void cbFreezeRowDetails_Changed(object sender, RoutedEventArgs e)
{
CheckBox cb = sender as CheckBox;
if (this.dataGrid1 != null)
this.dataGrid1.AreRowDetailsFrozen = (bool)cb.IsChecked;
}
Version Information
Silverlight
Supported in: 5, 4, 3
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
See Also