识别HierarchicalDataTemplate的祖先

时间:2015-08-13 12:13:36

标签: wpf

##嗨以下是我的代码,我想禁用“scriptCheckBox”复选框(所有项目),但据我知道我只能禁用一个复选框,请告诉我解决方案##

     <HierarchicalDataTemplate DataType="{x:Type my:TestScript}">
                    <StackPanel Orientation="Horizontal" x:Name="stackTestCase" Background="Transparent">
                        <Border x:Name="borderTestCase" BorderBrush="Transparent" BorderThickness="2" CornerRadius="4">
                            <StackPanel Orientation="Horizontal"  Background="Transparent" Margin="2,0">
                                <CheckBox x:Name="scriptCheckBox" IsChecked="{Binding Path=Selected, Mode=TwoWay}" HorizontalAlignment="Left" VerticalAlignment="Center" />

0 个答案:

没有答案