Problem with binding RadRichTextBoxRibbonBarUI

2 posts, 0 answers
  1. Miriam
    Miriam avatar
    4 posts
    Member since:
    Apr 2012

    Posted 30 Apr 2012 Link to this post

    i want to create a RadRichTextBox with a RadRichTextBoxRibbonBarUI and i use the following code.
    <telerik:RadRichTextBoxRibbonBarUI ApplicationName="Editor" telerik:StyleManager.Theme="Windows7" Name="radRichTextBoxRibbonUI" Grid.RowSpan="2" DataContext="{Binding ElementName=editor}">
        <telerik:RadRibbonTab Header="Home">
                    <telerik:RadRibbonGroup Header="Clipboard" >
                            <telerik:RadRibbonButton Text="Cut" Size="Medium"
                                     telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=CutCommand}"/>
    <telerik:RadRichTextBox x:Name="editor" AllowDrop="True" Drop="editor_Drop" telerik:StyleManager.Theme="Windows7"  Grid.Row="1" Margin="12,9,21,12" />

    But when i press the cut button nothing happen.
    What do i wrong?

  2. Andrew
    Andrew avatar
    140 posts

    Posted 02 May 2012 Link to this post

    Hello Miriam,

    You can try setting the DataContext as follows:

    DataContext="{Binding ElementName=editor, Path=Commands}">

    All the best,
    the Telerik team

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

Back to Top