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

Problem with binding RadRichTextBoxRibbonBarUI

1 Answer 60 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Miriam
Top achievements
Rank 1
Miriam asked on 30 Apr 2012, 10:06 AM
Hi
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"
                                 SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/cut.png"
                                 telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=CutCommand}"/>
                        </telerik:RadRibbonGroup>
    </telerik:RadRibbonTab>
<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?


Miriam

1 Answer, 1 is accepted

Sort by
0
Andrew
Telerik team
answered on 02 May 2012, 09:40 AM
Hello Miriam,

You can try setting the DataContext as follows:

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

All the best,
Andrew
the Telerik team

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

Tags
RichTextBox
Asked by
Miriam
Top achievements
Rank 1
Answers by
Andrew
Telerik team
Share this question
or