我有一个只包含Html助手对象的Razor文件(.cshtml),如下所示:
@Html.BeginTableHeader(
Html.OverviewHeader(property: "state", width: "78px", cssClass: "public light-grey"),
Html.OverviewHeader("Title", "title", "", "light-grey"),
Html.OverviewHeader("Name", "name", "", "light-grey"))
@Html.BeginTableBody(
Html.OverviewBodyText("title"), Html.OverviewBodyText("name"))
当我尝试将一些格式化样式应用于代码时,所有Htmlhelpers将换行到一行
@Html.BeginTableHeader(Html.OverviewHeader(property: "state", width:"78px",cssClass: "public light-grey"), Html.OverviewHeader("Title", "title", "", "light-grey"), Html.OverviewHeader("Name", "name", "", "light-grey"))
@Html.BeginTableBody(Html.OverviewBodyText("title"),Html.OverviewBodyText("name"))
我该如何避免这种情况? 在Resharper中,因为我不熟悉Razor文件的格式化功能,只需调整编辑器,当我为C#定义一些格式化风格时,就会发生这种变化。