Rangel
Rangel

Reputation: 2683

Selection checkbox with triggers?

I have this control (see picture). I like when check one option in this control, using styles or with triggers other option enable or disable. This is valid or I have other option for do that? alt text http://img524.imageshack.us/img524/5819/combos.jpg

Upvotes: 0

Views: 201

Answers (1)

Kent Boogaart
Kent Boogaart

Reputation: 178650

Hard to say without seeing your XAML, but you could bind each CheckBox's IsChecked property to the same thing:

<CheckBox.IsChecked>
    <MultiBinding Converter="{StaticResource MyConverter}">
        <Binding Path="."/>
        <Binding Path="SelectedItem" RelativeSource="..."/>
    </MultiBinding>
</CheckBox.IsChecked>

The converter (IMultiValueConverter) would then determine whether the first value matches the selected value, and return true/false accordingly.

Upvotes: 1

Related Questions