Skip to content

CanMove Property

Dirkster99 edited this page Mar 13, 2020 · 3 revisions

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;
}

Demo Projects

Controls

Layout Models

Interfaces

Class Designs

Bugs

Manual Tests

Clone this wiki locally