Microsoft.Practices.Prism.Regions.Behaviors.SyncRegionContextWithHostBehavior.SynchronizeRegionContext C# (CSharp) Method

SynchronizeRegionContext() private method

private SynchronizeRegionContext ( ) : void
return void
        private void SynchronizeRegionContext()
        {
            // Forward this value to the Region
            if (this.Region.Context != this.HostControlRegionContext.Value)
            {
                this.Region.Context = this.HostControlRegionContext.Value;
            }

            // Also make sure the region's DependencyProperty was changed (this can occur if the value
            // was changed only on the HostControlRegionContext)
            if (RegionManager.GetRegionContext(this.HostControl) != this.HostControlRegionContext.Value)
            {
                RegionManager.SetRegionContext(this.HostControl, this.HostControlRegionContext.Value);
            }
        }
    }