C#/WPF
[WPF] ComboBox Command Binding 하기
kjun.kr
2022. 4. 15. 17:33
728x90
728x170
xaml 단에 아래 처럼 선언하고
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
<ComboBox ItemsSource="{Binding Datas}" SelectedItem="{Binding SelectedData}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding DataCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</ComboBox>
728x90
그리드형