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