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

Page Orientation

3 Answers 106 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Bastian Kraehmer
Top achievements
Rank 1
Bastian Kraehmer asked on 23 Nov 2011, 11:11 AM
Hello,

I have an RichTextBox with ad RichTextBoxRibbonUI.
I implemented the "Orientation" - DropDownButton similar to the Silverlight Demo (http://demos.telerik.com/silverlight/#RichTextBox/TelerikEditor) like this:

<Controls:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding Path=ChangePageOrientationCommand}" LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientation.png" Controls:ScreenTip.Description="Switch the pages between portrait and landscape layouts." Controls:ScreenTip.Title="Page Orientation" Size="Medium" Text="Orientation">
                                    <Controls:RadRibbonDropDownButton.DropDownContent>
                                        <Controls:RadGallery ItemHeight="54" ItemWidth="109" RichTextBoxUI:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangePageOrientationCommand}" ViewportHeight="216" ViewportWidth="110">
                                            <Controls:RadGalleryItem HorizontalContentAlignment="Left" Tag="Portrait">
                                                <StackPanel Orientation="Horizontal">
                                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientationPortrait.png" Stretch="None" />
                                                    <TextBlock FontWeight="Bold" Text="Portrait" VerticalAlignment="Center" />
                                                </StackPanel>
                                            </Controls:RadGalleryItem>
                                            <Controls:RadGalleryItem HorizontalContentAlignment="Left" Tag="Rotate90">
                                                <StackPanel Orientation="Horizontal">
                                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientationLandscape.png" Stretch="None" />
                                                    <TextBlock FontWeight="Bold" Text="Landscape" VerticalAlignment="Center" />
                                                </StackPanel>
                                            </Controls:RadGalleryItem>
                                            <Controls:RadGalleryItem HorizontalContentAlignment="Left" Tag="Rotate180">
                                                <StackPanel Orientation="Horizontal">
                                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientationRotate180.png" Stretch="None" />
                                                    <TextBlock FontWeight="Bold" Text="Rotate 180" VerticalAlignment="Center" />
                                                </StackPanel>
                                            </Controls:RadGalleryItem>
                                            <Controls:RadGalleryItem HorizontalContentAlignment="Left" Tag="Rotate270">
                                                <StackPanel Orientation="Horizontal">
                                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientationRotate270.png" Stretch="None" />
                                                    <TextBlock FontWeight="Bold" Text="Rotate 270" VerticalAlignment="Center" />
                                                </StackPanel>
                                            </Controls:RadGalleryItem>
                                        </Controls:RadGallery>
                                    </Controls:RadRibbonDropDownButton.DropDownContent>
                                </Controls:RadRibbonDropDownButton>

The problem is that the Button is always disabled.
Is there any condition which prevents the button to be enabled?

Regards,

Bastian Kraehmer

3 Answers, 1 is accepted

Sort by
0
Accepted
Iva Toteva
Telerik team
answered on 25 Nov 2011, 05:51 PM
Hi Bastian Kraehmer,

Having set the attached property RichTextBoxUI:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangePageOrientationCommand}", the button must be disabled when the CanExecute of the command returns false.

The only condition that makes the CanExecute of ChangePageOrientationCommand return false is if the rich text box is used in read-only mode.

Please find attached a demo project which uses the code from your snippet and works as expected. If you are not able to resolve the issue in your project, please attache a demo of yours in the support ticket you opened, so that we can assist you further.

Best wishes,
Iva Toteva
the Telerik team

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

0
tarun
Top achievements
Rank 1
answered on 19 Sep 2018, 10:14 AM
I have did the same thing for page orientation,But its not working.So anything is there appart from this code.
0
Peshito
Telerik team
answered on 21 Sep 2018, 01:42 PM
Hello tarun,

It does not become clear what might be the cause of the issue. You can see a working SDK demo where the page orientation has been properly here - Telerik Editor.

Regards,
Peshito
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
RichTextBox
Asked by
Bastian Kraehmer
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
tarun
Top achievements
Rank 1
Peshito
Telerik team
Share this question
or