CanMove Property - wesley7child/OuterPlugin GitHub Wiki
The CanMove
property can be set to false
on a LayoutDocument in order to lock a document in its current position in the layout. This means, The user should not be able drag and drop the document to a different position if CanMove = false
.
On way to do this is a custom implementation of the LayoutInitializer class using the BeforeInsertDocument method to setup this property:
public bool BeforeInsertDocument(LayoutRoot layout,
LayoutDocument documentToShow,
ILayoutContainer destinationContainer)
{
documentToShow.CanMove = false;
return false;
}