Click here to Skip to main content
12,294,042 members (65,611 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"    >
            <ComboBox.Items>
 
                <ComboBoxItem IsSelected="True" Content="Trial"  />
                <ComboBoxItem IsSelected="True" Content="Limited" />
                <ComboBoxItem IsSelected="True" Content="Pernament" />
 

 

                </ComboBox.Items>
        </ComboBox>


and
<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="-" />
        </ComboBox>


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
 
good
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 Smile | :)
  Permalink  

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.160525.2 | Last Updated 17 Aug 2012
Copyright © CodeProject, 1999-2016
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