New to Telerik UI for WPF? Download free 30-day trial

Events

This article contains basic information about the events available with RadLayoutControl and its components.

RadLayoutControl events

The layout control has the following event.

  • SelectionChanged: Occurs when the selection changes. The event arguments are of type LayoutControlSelectionChangedEventArgs and have the following properties:

    • NewItem: A property of type object that gets the selected item.
    • OldItem: A property of type object that gets the previously selected item.
    • AllowedActions: A property of type LayoutControlAllowedActions gets or sets the allowed operations for the selected item.

      You can use this property to forbid specific input device (mouse, touch) interactions as drag, resize and the manipulation actions available in the ManipulationPane.

      The property is an enum and it has the following values:

      • None: No actions will be available
      • Resize: Resize action will be available
      • Drag: Drag action will be available
      • ManipulationPaneActions: The manipulation pane will be available

      The default value of the AllowedActions property is Resize | Drag | ManipulationPaneActions, which means that all actions are available. If the property is set to None, all actions are forbidden and a lock icon will be displayed over the selected item.

      Example 1: Setting allowed actions

              private void LayoutControl_SelectionChanged(object sender, LayoutControlSelectionChangedEventArgs e) 
              { 
                  e.AllowedActions = LayoutControlAllowedActions.None;                         
              } 
      

      Figure 1: Locked item

      WPF RadLayoutControl Locked item

Save/Load layout events

RadLayoutControl and the layout groups expose several events which can be used to modify the saving and loading process of the layout. The available events are listed below.

  • ElementSaving
  • ElementSaved
  • ElementLoading
  • ElementLoaded

You can find more information about the events and customization of the layout saving/loading in the Save/Load Layout help article.

See Also

In this article