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

Issues Binding with RadRibbonView

2 Answers 102 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dave
Top achievements
Rank 1
Dave asked on 29 Feb 2012, 01:04 AM
We just recently migrated to the RadRibbonView and are having some data binding issues with our text box controls: Here's an example:
<StackPanel Orientation="Vertical">
        <telerik:RadRibbonView ApplicationButtonImageSource="AppIcon.png" Title="Microsoft Word" x:Name="ribbonView">
            <telerik:RadRibbonTab Header="Home">
                <telerik:RadRibbonGroup Header="Test">
                    <telerik:RadRibbonButton Click="SaveButton_Click" Content="Save" Size="Large"></telerik:RadRibbonButton>
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
            <telerik:RadRibbonTab Header="View" />
        </telerik:RadRibbonView>
        <StackPanel Orientation="Horizontal">
            <TextBlock>Test binding: </TextBlock>
            <TextBox Text="{Binding Path=InputText, Mode=TwoWay}" MinWidth="400"></TextBox>
            <TextBox x:Name="txtOutput"></TextBox>
        </StackPanel>
    </StackPanel>

With this XAML, a user can type into the Text Box, which binds to the InputText property. If they type into the text box and immediately hit "Save", the text box lost focus event never fires, which means the binding does not get updated.

Is this a bug or intentional (RadRibbonBar never had this issue)? Either way, I need to figure out a way to get this to bind properly without having to use a different update trigger such as ontextchanged.

2 Answers, 1 is accepted

Sort by
0
Dave
Top achievements
Rank 1
answered on 29 Feb 2012, 02:22 AM
Think I figured this one out. It looks to be a difference in the implementation of RadRibbonButton. Once I set IsTabStop to "True", it now loses focus and fires the binding correctly.
0
Tina Stancheva
Telerik team
answered on 02 Mar 2012, 01:03 PM
Hi Dave,

The RadRibbonButtons are designed not to take the focus out of the other elements. And setting their IsTabStop property to True is the way to change this default behavior.

Let us know if you have any other issues or questions.

All the best,
Tina Stancheva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
RibbonView and RibbonWindow
Asked by
Dave
Top achievements
Rank 1
Answers by
Dave
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or