【发布时间】:2012-01-03 16:26:46
【问题描述】:
如何设置 Visual Studio 2010 以使多行 lambda 函数看起来不难看,左侧有所有空白空间?
dataView.CellFormatting += (s, e) =>
{
if ((e.ColumnIndex == 1)&&((dataView.SelectedCells.Count == 1)))
{
var scope = Scope.Instance;
var row = dataView.Rows[e.RowIndex];
var variable = row.DataBoundItem as Variable;
if (scope.Variables.Contains(variable))
{
dataView[e.ColumnIndex, e.RowIndex].Style.BackColor =
scope.GetGraph(variable).Color;
}
else
{
dataView[e.ColumnIndex, e.RowIndex].Style.BackColor = Color.White;
}
}
};
【问题讨论】:
-
我无法想象你想说什么。也许一个示例 sn-p(之前和之后)会有所帮助。
-
我编辑了我的问题。这就是我的意思。
标签: c# visual-studio visual-studio-2010 lambda usability