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

OnAttach() protected method

Override this method to perform the logic after the behavior has been attached.
protected OnAttach ( ) : void
return void
        protected override void OnAttach()
        {
            if (this.HostControl != null)
            {
                // Sync values initially. 
                SynchronizeRegionContext();

                // Now register for events to keep them in sync
                this.HostControlRegionContext.PropertyChanged += this.RegionContextObservableObject_PropertyChanged;
                this.Region.PropertyChanged += this.Region_PropertyChanged;
            }
        }