Binding combobox

3 posts, 0 answers
  1. David
    David avatar
    11 posts
    Member since:
    Apr 2012

    Posted 12 Jun 2012 Link to this post

    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. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 13 Jun 2012 Link to this post

    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 >>

  3. DevCraft banner
  4. David
    David avatar
    11 posts
    Member since:
    Apr 2012

    Posted 27 Jul 2012 Link to this post

    Thank you
Back to Top