Skip to main content

Regions

A region is a placeholder in the application UI into which modules are injected.

You can mark a control as a region using any of the following approaches.

  • Set the UIRegion.Region attached property.

    <TabControl dxmvvm:UIRegion.Region="RegionA" .../>
    
  • Attach the UIRegion behavior to the control.

    <TabControl>
        <dxmvvm:Interaction.Behaviors>
            <dxmvvm:UIRegion RegionName="RegionA"/>
        </dxmvvm:Interaction.Behaviors>
    </TabControl>
    

Once the control is marked as a region, modules are injected into this control from the ModuleManager.

ModuleManager.DefaultManager.RegisterOrInjectOrNavigate(
    regionName: "RegionA", 
    module: new Module(
        key: "Module1",
        viewModelFactory: () => new Module1ViewModel(),
        viewType: typeof(Module1View)
));
See Also