protected override void DisposeViewModel() { this.viewModelMapping = null; base.DisposeViewModel(); this.clientInputContext.Stop(); this.clientInputContext = null; if (Instance == this) { Instance = null; } }
public ViewModelRebindKeyWindow( ViewModelButtonMappingControl viewModelMapping, bool isSecondaryKey, Action onClose) { this.viewModelMapping = viewModelMapping; this.buttonToRebind = viewModelMapping.Button; this.onClose = onClose; this.isSecondaryKey = isSecondaryKey; // ReSharper disable once CanExtractXamlLocalizableStringCSharp this.clientInputContext = ClientInputContext.Start("Key binding") .HandleAll(this.InputCallback); Instance = this; }