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

Font Size Increasing in Context Menu

5 Answers 327 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 16 Jul 2012, 09:56 PM
This is definitely odd, but it seems the font for my context menu in the RadRichTextBox is being change according to the font I select.  See the attached image for an example.

Thanks in advance,
Steve

5 Answers, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 19 Jul 2012, 12:18 PM
Hi Steve,

Thank you for letting us know about this problem. This is a known issue and it is added to our to-do list. Unfortunately, we can't tell if and when it will be fixed. We have created a public PITS issue, which you can use to follow our progress.
You can follow the PITS Issue by its ID: 11941
Public Url: http://www.telerik.com/support/pits.aspx#/public/silverlight/11941 

Please, excuse us for the inconvenience. Don't hesitate to contact us if you have other questions.

All the best,
Petya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Grigory
Top achievements
Rank 1
answered on 31 Jul 2014, 06:56 AM
Hello, I've got same issue with DevCraft Q2 2014 Release. And I can't find the PITS Issue you've mentioned. I'm using default context menu with spellchecking suggestions and several customized groups.

How can I change font size of context menu?

Here is the xaml of my control.

<telerik:RadRichTextBox x:Name="TextEditorRichTextBox"
             AcceptsReturn="True"
             AcceptsTab="False"
             BorderThickness="0"
             DocumentInheritsDefaultStyleSettings="True"
             FontSize="{na:Settings EditorFontSize,
                       ConverterKey=UseFontToDipConverter}"
             HorizontalScrollBarVisibility="Auto"
             IsContextMenuEnabled="True"
             IsReadOnly="{Binding Path=DataContext.IsTextReadOnly,
             RelativeSource={RelativeSource FindAncestor,
             AncestorType=views:DocumentView}}"
             IsSelectionMiniToolBarEnabled="False"
             IsSpellCheckingEnabled="{na:Settings IsSpellCheckingEnabled, Mode=OneWay}"
             LayoutMode="Flow"
             SelectionChanged="TextEditorRichTextBox_OnSelectionChanged"
             VerticalScrollBarVisibility="Visible" />



And here is customization of contextMenu:

....
     contextMenu.Showing += SetContextMenu;
}
 
private void SetContextMenu(object sender, Telerik.Windows.Controls.RichTextBoxUI.Menus.ContextMenuEventArgs e)
{
     var contextMenusToDelete = e.ContextMenuGroupCollection.Where(
                a => a.Type == ContextMenuGroupType.HyperlinkCommands ||
                a.Type == ContextMenuGroupType.TextEditCommands ||
                a.Type == ContextMenuGroupType.Custom).ToList();
 
     if (contextMenusToDelete.Any())
     {
           foreach (var ctxMenu in contextMenusToDelete)
           {
                e.ContextMenuGroupCollection.Remove(ctxMenu);
           }
      }
 
     var reformatCommand = FindResource("ReformatTextCommand") as RoutedCommand;
     var externalEditingCommand = FindResource("ExternalEditingCommand") as RoutedCommand;
 
     if (reformatCommand != null || externalEditingCommand != null)
     {
          var contextMenuGroup = new ContextMenuGroup(ContextMenuGroupType.Custom, "Ria Commands");
 
          if (reformatCommand != null)
          {
               var menuItem = new RadMenuItem();
               {
                    menuItem.Command = reformatCommand;
                };
 
                menuItem.Header = Strings.ReformatText;
 
                contextMenuGroup.Add(menuItem);
            }
 
            if (externalEditingCommand != null)
            {
                  var menuItem = new RadMenuItem();
                  menuItem.Command = externalEditingCommand;
                  menuItem.Header = Strings.LocalizedString0975;
 
                   contextMenuGroup.Add(menuItem);
             }
 
              e.ContextMenuGroupCollection.Add(contextMenuGroup);
       }
}



0
Petya
Telerik team
answered on 04 Aug 2014, 04:38 PM
Hi Grigory,

Upon further investigation it turns out there is not much we can do to fix the problem. At this point the best I can do is suggest the following two workarounds:
- Modify the Normal style in the repository of each document loaded in the control. You can read more on the topic in the Styles article.
- Use implicit styles in your project. This, in fact, adds other benefits to your project as you can read in the XAML Theming – Implicit Styles versus StyleManager blogpost.

I hope this helps.

Regards,
Petya
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
Harish
Top achievements
Rank 1
Veteran
answered on 04 May 2020, 10:45 AM

Hi,

I have attached a image were the text in first three context menu items is bigger than the others below, I am using office theme 2013 and I wanted to know if this issue can be solved, If yes then how. If not I wanted to know how could I get the default style(Font Family, weight etc) of normal items other than the first 3 and set their style to first 3 items. Will the font vary from theme to theme. I wanted to know if setting this default will cause it to look different when blue theme is applied.

0
Martin
Telerik team
answered on 07 May 2020, 06:42 AM

Hello Harish,

In order to deeper investigate the case, I would like to ask for more details on how to reproduce the described behavior (e.g. step-by-step walkthrough, binaries version, sample project, etc.). Any additional information would be highly appreciated.

Looking forward to hearing from you.

Regards,
Martin
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
RichTextBox
Asked by
Steve
Top achievements
Rank 1
Answers by
Petya
Telerik team
Grigory
Top achievements
Rank 1
Harish
Top achievements
Rank 1
Veteran
Martin
Telerik team
Share this question
or