Issues Binding with RadRibbonView

3 posts, 0 answers
  1. Dave
    Dave avatar
    29 posts
    Member since:
    Aug 2010

    Posted 28 Feb 2012 Link to this post

    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. Dave
    Dave avatar
    29 posts
    Member since:
    Aug 2010

    Posted 28 Feb 2012 Link to this post

    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.
  3. DevCraft banner
  4. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 02 Mar 2012 Link to this post

    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 >>
Back to Top