LoginSignup
4
4

More than 5 years have passed since last update.

【WPF】各コントロールの依存関係プロパティのデフォルト設定表(BindingModeやデフォルト値など)

Posted at

WPFコントロールの主要プロパティのバインディングのデフォルト設定を記載してます。
Reference Sourceより抜粋

コントロール プロパティ (*1)BindingMode(BindsTwoWayByDefault) UpdateSourceTrigger デフォルト値
TextBox Text BindsTwoWayByDefault LostFocus
Label Content false - null
Button Content false - null
CheckBox IsChecked BindsTwoWayByDefault PropertyChanged false
RadioButton IsChecked BindsTwoWayByDefault PropertyChanged false
ComboBox SelectedIndex BindsTwoWayByDefault PropertyChanged -1
ComboBox SelectedItem BindsTwoWayByDefault PropertyChanged null
ComboBox SelectedItems BindsTwoWayByDefault PropertyChanged null
ListBox SelectedIndex BindsTwoWayByDefault PropertyChanged -1
ListBox SelectedItem BindsTwoWayByDefault PropertyChanged null
ListBox SelectedValue BindsTwoWayByDefault PropertyChanged null
ListView SelectedIndex BindsTwoWayByDefault PropertyChanged -1
ListView SelectedItem BindsTwoWayByDefault PropertyChanged null
ListView SelectedValue BindsTwoWayByDefault PropertyChanged null
TabControl SelectedIndex BindsTwoWayByDefault PropertyChanged -1
TabControl SelectedItem BindsTwoWayByDefault PropertyChanged null
TabControl SelectedValue BindsTwoWayByDefault PropertyChanged null
DataGrid SelectedIndex BindsTwoWayByDefault PropertyChanged -1
DataGrid SelectedItem BindsTwoWayByDefault PropertyChanged null
DataGrid SelectedValue BindsTwoWayByDefault PropertyChanged null
DataGrid CurrentItem false PropertyChanged null
DataGrid CurrentColumn false PropertyChanged null
DataGrid CurrentCell false PropertyChanged Unset

*1
BindsTwoWayByDefaultTwoWay, falseの場合は、Defaultが採用され、OneWayもしくはOneTimeが適応されます。詳しくはこちら
Binding Mode

4
4
1

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
4
4