>>979
if (!(sender is StackPanel)) { e.Handled = true; return; }
これを先頭に追加してみたところ希望の動作になりました。
どうもありがとうございます。