本帖最后由 gqqnb 于 2011-12-25 14:27:26 编辑

解决方案 »

  1.   

    学习来了http://kb.cnblogs.com/a/1428743/
      

  2.   

    这时使用触发器的好场景。用触发器将ComboBoxItem.IsEnabled绑定到IpInfo.Enabled。
    <ComboBox ItemTemplate="{StaticResource IpInfoTemplate}" 
              ItemsSource="{Binding Source={x:Static WpfApplication1:App.IpInfoList}, Mode=OneWay}">
        <ComboBox.ItemContainerStyle>
            <Style TargetType="{x:Type ComboBoxItem}">
                <Setter Property="IsEnabled" Value="{Binding Enabled}"/>
            </Style>
        </ComboBox.ItemContainerStyle>
    </ComboBox>