I just noticed a thing while working with EPiServer. I had this line in a view:
<h1>@Html.PropertyFor(x => x.CurrentPage.Name)</h1>
Howcome this is not editable in Edit mode? I can't change the name property. But if I use
<h1 class="arrow_down">@Html.PropertyFor(x => x.CurrentPage.PageName)</h1>
it is editable? Is the Name property some special property that should not be editable, and how is that set? I can't see any special attribute declared on it on PageData class.
This is a bug. It should be possible to do as your first example and get the name editable.
To workaround the bug, just do as you did in your second sample, and use PageName instead. The 'Name' property is backed by a PropertyString called PageName, so the fields are the same.
If you want to use the 'Name' property, you should be able to add an edit hint to work around the bug. Something like this:
ViewData.GetEditHints<MyPageViewModel, MyPage>().AddConnection(x => x.CurrentPage.Name, p => p.PageName);
EPiServer Development Team