1
DependencyObject dep = (DependencyObject)e.OriginalSource;
while ((dep != null) && !(dep is DataGridRow))
{
dep = VisualTreeHelper.GetParent(dep);
}
if (dep != null && dep is DataGridRow)
{
DataGridRow row = (DataGridRow)dep;
row.Height = 35;
}
使用此代码选定行的高度已更改,但行内容高度未更改。如何以编程方式更改wpf DataGrid中选定行的行高?
你能解释更多 – 2011-06-13 06:06:11