Click here to Skip to main content
12,891,744 members (50,526 online)
Rate this:
Please Sign up or sign in to vote.
Hello guys, so I have two comboboxes:
<ComboBox Height="35" HorizontalAlignment="Left" Margin="343,67,0,0" Name="comboBox2" VerticalAlignment="Top" Width="273" SelectionChanged="comboBox2_SelectionChanged"    >
                <ComboBoxItem IsSelected="True" Content="Trial"  />
                <ComboBoxItem IsSelected="True" Content="Limited" />
                <ComboBoxItem IsSelected="True" Content="Pernament" />



<ComboBox Height="35" HorizontalAlignment="Left" Margin="343,125,0,0" Name="comboBox1" VerticalAlignment="Top" Width="273" SelectionChanged="comboBox1_SelectionChanged">
            <ComboBoxItem Content="3 Months" IsSelected="True" />
            <ComboBoxItem Content="6 Months" />
            <ComboBoxItem Content="12 Months" />
            <ComboBoxItem IsSelected="True" Content="-" />

I am trying to bind them for example if value of first box isn't Limited, second combo box should be disabled, and if Limited is selected in text box this date + months chosen must be displayed. Thanks for help in advance
Posted 16-Aug-12 22:23pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There is only onw thing to do in such a case, you will have to use an IValueConverter:
Data Binding Using IValueConverter in Silverlight[^]

You could bind the second combobox to isenabled and do the appropiate convertions from the selected values of the second one :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 17 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100