5 Answers, 1 is accepted
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
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
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
Thanks Tanya,
That confirmed what I suspected. Removing the static resources did the trick.
Marc