private static void OnCopyBitsBehaviorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
HwndHost hwndHost = d as HwndHost;
if (hwndHost != null) {
CopyBitsBehavior newValue = (CopyBitsBehavior)e.NewValue;
if (newValue != CopyBitsBehavior.Default) {
AddWndProcUsage(hwndHost);
} else {
RemoveWndProcUsage(hwndHost);
}
}
}