protected virtual void OnIsSelectedChanged(DependencyPropertyChangedEventArgs e) { if (_isSelectedReentrantFlag.CanEnter) { using (_isSelectedReentrantFlag.Enter()) { if (LayoutElement != null) { LayoutElement.IsSelected = (bool)e.NewValue; } } } }
protected override void OnVisibilityChanged() { if (_anchorable?.Root != null) { if (_visibilityReentrantFlag.CanEnter) { using (_visibilityReentrantFlag.Enter()) { if (Visibility == Visibility.Hidden) { _anchorable.Hide(false); } else if (Visibility == Visibility.Visible) { _anchorable.Show(); } } } } base.OnVisibilityChanged(); }
public int HookProc(int code, IntPtr wParam, IntPtr lParam) { if (code == Win32Helper.HcbtSetfocus) { FocusChanged?.Invoke(this, new FocusChangeEventArgs(wParam, lParam)); } else if (code == Win32Helper.HcbtActivate) { if (_insideActivateEvent.CanEnter) { using (_insideActivateEvent.Enter()) { //if (Activate != null) // Activate(this, new WindowActivateEventArgs(wParam)); } } } return(Win32Helper.CallNextHookEx(_windowHook, code, wParam, lParam)); }
public int HookProc(int code, IntPtr wParam, IntPtr lParam) { switch (code) { case 9: FocusChanged?.Invoke(this, new FocusChangeEventArgs(wParam, lParam)); break; case 5: if (_insideActivateEvent.CanEnter) { using (_insideActivateEvent.Enter()) { //if (Activate != null) // Activate(this, new WindowActivateEventArgs(wParam)); } } break; } return(User32.CallNextHookEx(_windowHook, code, wParam, lParam)); }
protected void FixChildrenDockLengths() { using (_fixingChildrenDockLengths.Enter()) OnFixChildrenDockLengths(); }