本文整理匯總了C#中System.Windows.Controls.DataGridColumn.IsFrozen屬性的典型用法代碼示例。如果您正苦於以下問題:C# DataGridColumn.IsFrozen屬性的具體用法?C# DataGridColumn.IsFrozen怎麽用?C# DataGridColumn.IsFrozen使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。
在下文中一共展示了DataGridColumn.IsFrozen屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Window1
public partial class Window1 : Window
{
public static RoutedUICommand FreezeColumnCommand = new RoutedUICommand();
public Window1()
{
InitializeComponent();
//GetData connects to the database and returns the data in a table.
AdventureWorksLT2008DataSet.SalesOrderDetailDataTable dt = GetData();
DG1.DataContext = dt;
}
示例2: CommandBinding_Executed
private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
{
//Get the column header that started the command and move that column left to freeze it.
System.Windows.Controls.Primitives.DataGridColumnHeader header = (System.Windows.Controls.Primitives.DataGridColumnHeader)e.OriginalSource;
if (header.Column.IsFrozen ==true)
{
return;
}
else
{
header.Column.DisplayIndex = DG1.FrozenColumnCount;
DG1.FrozenColumnCount++;
}
}
}