This is a migrated thread and some comments may be shown as answers.

Binding combobox

2 Answers 85 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 12 Jun 2012, 04:53 PM
Hello. I have a combo:
<telerik:RadRibbonComboBox x:Name="uxrCombo_Zoom" Width="Auto" Height="30"                                   
                                 SelectionChanged="uxrCombo_Zoom_SelectionChanged"
                                                       SelectedIndex="0"
                                                       >
                                <telerik:RadRibbonComboBoxItem Content="200%" />                                
                                <telerik:RadRibbonComboBoxItem Content="180%"/>                                
                                <telerik:RadRibbonComboBoxItem Content="160%"/>                                
                                <telerik:RadRibbonComboBoxItem Content="140%"/>                      
                                <telerik:RadRibbonComboBoxItem Content="120%"/>                                
                                <telerik:RadRibbonComboBoxItem Content="100%" />                                
                                <telerik:RadRibbonComboBoxItem Content="80%"/>                                
                                <telerik:RadRibbonComboBoxItem Content="60%"/>                                
                                <telerik:RadRibbonComboBoxItem Content="40%"/>                                
                                <telerik:RadRibbonComboBoxItem Content="20%"/>
                                <telerik:RadRibbonComboBoxItem Content="0%"/>
                                
                                
                            </telerik:RadRibbonComboBox>


And i have a slider with a txt, the txt have the same content, 20%...

I need when change de slider, do a binding to the text to select the content of the combo.How could i do this?

This is the code for the slider and text
<telerik:RadSlider x:Name="uxsl_zoom"
                                                       Orientation="Vertical"                                                       
                                                       HorizontalAlignment="Right"
                                                       ValueChanged="uxsl_zoom_ValueChanged"
                                                       Maximum="10"                                                       
                                                       Value="5"   
                                                       VerticalContentAlignment="Stretch"
                                                         IsSnapToTickEnabled="True"
                                                       TickFrequency="1"
                                                       Margin="5 5 0 5"
                                                       TickPlacement="TopLeft"
                                                           Grid.Row="0"
                                                           Grid.Column="1"/>
                                    <TextBox x:Name="uxtxt_zoom" IsReadOnly="True"
                                             Text="{Binding ElementName=uxsl_zoom,Path=Value,Converter={StaticResource rtcZoomConverter}}"
                                             Height="20" Grid.Column="1" Grid.Row="1"
                                             Style="{StaticResource zoomStyle}"
                                             />

2 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 13 Jun 2012, 11:27 AM
Hello David,

Please find attached a simple project which demonstrates how to implement the task. It uses RadComboBox but the technique is the same for RadRibbonComboBox..

Greetings,
Vlado
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
David
Top achievements
Rank 1
answered on 27 Jul 2012, 07:41 AM
Thank you
Tags
ComboBox
Asked by
David
Top achievements
Rank 1
Answers by
Vladi
Telerik team
David
Top achievements
Rank 1
Share this question
or