protected override void OnUnloaded()
        {
            this.DataContext = null;
            this.viewModel?.Dispose();
            this.viewModel = null;

            if (this.isCurrentClientCharacter)
            {
                ClientUpdateHelper.UpdateCallback -= this.Update;
            }
        }
Example #2
0
        protected override void OnLoaded()
        {
            this.DataContext
                  = this.viewModel
                  = new ViewModelCharacterOverlayControl(this.character,
                                                         () => this.RefreshVisualState(useTransitions: true));

            // switch instantly to the initial state
            // (e.g. a creature enters the scope during the night, there should be no visible->collapsed animation)
            this.RefreshVisualState(useTransitions: false);
        }
Example #3
0
 protected override void OnUnloaded()
 {
     this.DataContext = null;
     this.viewModel?.Dispose();
     this.viewModel = null;
 }
Example #4
0
 protected override void OnLoaded()
 {
     this.DataContext = this.viewModel = new ViewModelCharacterOverlayControl(this.character);
 }