private void ForwardRegionContext(IRegionContextAware regionContextAware, object payload) { if (regionContextAware == null) { return; } if (regionContextAware.RegionContext.Value != payload) { regionContextAware.RegionContext.Value = payload; } }
private void RegisterRegionContextChanged(IRegionContextAware regionContextAware) { if (regionContextAware == null) { return; } regionContextAware.RegionContext.PropertyChanged += delegate { if (this.RegionContext.Value != regionContextAware.RegionContext.Value) { this.RegionContext.Value = regionContextAware.RegionContext.Value; } }; }
void OnRegionContextChanged_SetRegionContextToViews(object sender, System.ComponentModel.PropertyChangedEventArgs e) { if (e.PropertyName == "Context") { foreach (var view in this.Region.Views) { IRegionContextAware regionContextAware = view as IRegionContextAware; if (regionContextAware == null) { break; } if (regionContextAware.RegionContext.Value != this.Region.Context) { regionContextAware.RegionContext.Value = this.Region.Context; } } } }
private void RegisterRegionContextChanged(IRegionContextAware regionContextAware) { if (regionContextAware == null) return; regionContextAware.RegionContext.PropertyChanged += delegate { if (this.RegionContext.Value != regionContextAware.RegionContext.Value) { this.RegionContext.Value = regionContextAware.RegionContext.Value; } }; }
private void ForwardRegionContext(IRegionContextAware regionContextAware, object payload) { if (regionContextAware == null) return; if (regionContextAware.RegionContext.Value != payload) { regionContextAware.RegionContext.Value = payload; } }
private void OnViewAddedStartMonitoringViewForRegionContextChanges(IRegionContextAware regionContextAware) { regionContextAware.RegionContext.PropertyChanged += View_RegionContextChanged; }
private void OnViewRemovedStopMonitoringViewForContextChanges(IRegionContextAware regionContextAware) { regionContextAware.RegionContext.PropertyChanged -= View_RegionContextChanged; }