internal CopyObserver(Window owner, ClipboardChangedHandler callback) { this._callback = callback; this._handle = new WindowInteropHelper(owner).Handle; this._hwndSource = HwndSource.FromHwnd(this._handle); this._hwndSource.AddHook(MainWindowProc); }
/// <summary> /// Release managed source. Called when `Dispose(bool)` is called. /// </summary> private void ReleaseManagedSource() { this._callback = null; }