LoginSignup
0
0

More than 1 year has passed since last update.

WPF ComboBox

Posted at

WPF ComboBoxのSelectionChangedイベントってSelectedIndexプロパティを指定してるとロード時にも選択が変更されたって表示されやがる(よく考えたら当然ではありますが)仕様みたいでWindowがロードされた時にも発火しちゃうのよね。
ユーザが明示的にコンボボックスを変更した時だけ発火させたかったのでいろいろ調べたらDropDownClosedイベントってのがあって、これだとマウス操作で意図的に項目変更しないと発火しないのでロード時の無駄発火が無くなったのは良いんだけど、キーボード操作でタブ移動して上下キーで選択項目切り替えても発火しないのが玉に瑕。まあこれは諦めることにしました(´・ω・`)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0