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

Hide LayoutModeSelectorName on the RadRichTextBoxStatusBar

5 Answers 86 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 29 Apr 2014, 10:47 PM
I have searched high an low and cannot figure out how to Hide the LayoutModeSelectorName  on the  RadRichTextBoxStatusBar.  I do not want my users switching to a different word layout in my application, how can I do this?

Thanks

5 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 30 Apr 2014, 08:36 AM
Hello Alan,

You can edit the LayoutModeSelector's template to achieve a different look of the control than the default one. In order you want to remove the LayoutModeSelector control from the RadRichTextBoxStatusBar, you should remove that control from the RadRichTextBoxStatusBar's control template.

For your convenience, I've attached a project which illustrates how to do both of the above described control template changes. The changes are made in App.xaml file and a 'NOTE:' comment precedes every change.

Please note, that NoXAML assemblies are used in the project. I'm recommending this approach when you are applying a theme on the controls. You can read more about implicit styles here.

In order you are using XAML assemblies in your application, you can use the same edited styles which are used in the sent project as well.

Regards,
Todor
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Alan
Top achievements
Rank 1
answered on 01 May 2014, 04:58 AM
Thank you very much Todor, that did exactly what I wanted it to do and I was successful in putting the change in my new product :)
0
Marc
Top achievements
Rank 1
answered on 12 Sep 2017, 09:11 PM

Hi,

I tried using this solution with Visual Studio 2015 and the 2017 Q2 version of the WPF controls and I am getting this error: 'The resource "RadRichTextBoxStatusBarStyle" could not be resolved.' on this line:

 

        <Style TargetType="telerikControlsRTBUI:RadRichTextBoxStatusBar" BasedOn="{StaticResource RadRichTextBoxStatusBarStyle}">

 

I have these two lines in my .xaml file:

 

        xmlns:telerikControlsRTBUI="clr-namespace:Telerik.Windows.Controls.RichTextBoxUI;assembly=Telerik.Windows.Controls.RichTextBoxUI"
        xmlns:telerikControlsRTBUIStatusBar="clr-namespace:Telerik.Windows.Controls.RichTextBoxUI.StatusBar;assembly=Telerik.Windows.Controls.RichTextBoxUI"

 

I am using the version of the WPF controls with embedded .xaml so I am not specifying the merged dictionaries.  Can this code be used with the embedded .xaml controls?  Or can it only be used with the NoXAML assemblies?

Marc

0
Tanya
Telerik team
answered on 15 Sep 2017, 10:44 AM
Hi Marc,

Yes, you can use the customization when using the XAML binaries as well. You will need to remove the static resources referring the styles or copy the styles from the corresponding NoXaml style.

Another option I can suggest you is to define your custom style and apply it to the status bar of RadRichTextBox:
<Style x:Key="MyStatusBarStyle" TargetType="telerik:RadRichTextBoxStatusBar">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="telerik:RadRichTextBoxStatusBar">
                <Border BorderThickness="{TemplateBinding BorderThickness}"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}">
                    <Grid x:Name="LayoutRoot" VerticalAlignment="Center" HorizontalAlignment="Right">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <telerikControlsRTBUIStatusBar:ZoomController x:Name="zoomController" Grid.Column="1" Margin="0 0 6 0"/>
                    </Grid>
                </Border>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

Hope this is helpful.

Regards,
Tanya
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
Marc
Top achievements
Rank 1
answered on 15 Sep 2017, 03:35 PM

Thanks Tanya,

That confirmed what I suspected.  Removing the static resources did the trick.

Marc

Tags
RichTextBox
Asked by
Alan
Top achievements
Rank 1
Answers by
Todor
Telerik team
Alan
Top achievements
Rank 1
Marc
Top achievements
Rank 1
Tanya
Telerik team
Share this question
or