Silverlight checkbox Command Binding

<CheckBox Grid.Column="0" Background="DarkGray" IsChecked="{Binding Visible, Mode=TwoWay}" Content="{Binding Name}">
                                <i:Interaction.Triggers>
                                    <i:EventTrigger EventName="Checked">
                                        <i:InvokeCommandAction Command="{Binding ElementName=LayoutRoot,Path=DataContext.DrawChartCommand}" CommandParameter="{Binding Content}"/>
                                    </i:EventTrigger>
                                    <i:EventTrigger EventName="UnChecked">
                                        <i:InvokeCommandAction Command="{Binding ElementName=LayoutRoot,Path=DataContext.RemoveChartCommand}" CommandParameter="{Binding Content}"/>
                                    </i:EventTrigger>
                                </i:Interaction.Triggers>
                            </CheckBox>
posted @ 2012-05-03 15:37  zhh  阅读(565)  评论(0编辑  收藏  举报