Back to Devexpress

Regions

wpf-118616-mvvm-framework-mif-regions.md

latest825 B
Original Source

Regions

  • Jun 07, 2019

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.

  • Attach the UIRegion behavior to the control.

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

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

See Also

UIRegionBase

UIRegion