void Region_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == RegionContextPropertyName)
{
if (RegionManager.GetRegionContext(this.HostControl) != this.Region.Context)
{
// Setting this Dependency Property will automatically also change the HostControlRegionContext.Value
// (see RegionManager.OnRegionContextChanged())
RegionManager.SetRegionContext(this.hostControl, this.Region.Context);
}
}
}