Unwanted Tab

2 posts, 0 answers
  1. Alan
    Alan avatar
    32 posts
    Member since:
    Jan 2011

    Posted 19 Feb 2013 Link to this post

    For Telerik WPF controls 2012.3.1129.45 I am getting an unwanted tab button (see attached screenshot) using the  XAML below.

    Any suggestions on how to make this unwanted tab disappear?

    Thank you,
    Alan
    <telerik:RadRichTextBoxRibbonUI Grid.Row="0"
                                                Width="340"
                                                Margin="5 0 0 0"
                                                TitleBarVisibility="Collapsed"
                                                ApplicationButtonVisibility="Collapsed"
                                                HorizontalAlignment="Left"
                                                HorizontalContentAlignment="Left"
                                                DataContext="{Binding Commands, ElementName=radRichTextBox}"
                                                VerticalAlignment="Top">
                    
                    <telerik:RadRichTextBoxRibbonUI.Resources>
                        <telerik:FontFamiliesProvider x:Key="FontFamiliesProvider"/>
                    </telerik:RadRichTextBoxRibbonUI.Resources>
                
                    <telerik:RadRibbonTab>
                        <telerik:RadRibbonGroup Header="Clipboard">
                            <telerik:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="0" Variant="Medium"/>
                            </telerik:RadRibbonGroup.Variants>
                            <StackPanel>
                                <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Cut the selection and put it on the Clipboard." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding CutCommand}" Size="Medium" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/cut.png" Text="Cut" telerik:ScreenTip.Title="Cut"/>
                                <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Copy the selection and put it on the Clipboard." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding CopyCommand}" Size="Medium" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/copy.png" Text="Copy" telerik:ScreenTip.Title="Copy"/>
                                <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Paste the contents of the Clipboard." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding PasteCommand}" Size="Medium" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/paste.png" Text="Paste" telerik:ScreenTip.Title="Paste"/>
                            </StackPanel>
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup DialogLauncherVisibility="Visible" telerik:ScreenTip.Description="Show the font dialog box." Header="Font" telerik:ScreenTip.Icon="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/FontDialog.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowFontPropertiesDialogCommand}" telerik:ScreenTip.Title="Font">
                            <telerik:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="4" Variant="Medium"/>
                                <telerik:GroupVariant Priority="6" Variant="Small"/>
                                <telerik:GroupVariant Priority="7" Variant="Collapsed"/>
                            </telerik:RadRibbonGroup.Variants>
                            <telerik:RadOrderedWrapPanel>
                                <StackPanel Orientation="Horizontal">
                                    <telerik:RadRibbonComboBox telerik:RadComboBox.CanAutocompleteSelectItems="False" telerik:RadComboBox.CanKeyboardNavigationSelectItems="False" telerik:RadComboBox.CommandParameter="{Binding SelectedValue, RelativeSource={RelativeSource Self}}" telerik:ScreenTip.Description="Change the font family." Height="21" telerik:RadComboBox.IsReadOnly="True" ItemsSource="{Binding RegisteredFonts, Source={StaticResource FontFamiliesProvider}}" telerik:RadComboBox.OpenDropDownOnFocus="True" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeFontFamilyCommand}" telerik:ScreenTip.Title="Font" Width="132"/>
                                    <telerik:RadRibbonComboBox telerik:RadComboBox.CanAutocompleteSelectItems="False" telerik:RadComboBox.CanKeyboardNavigationSelectItems="False" telerik:RadComboBox.CommandParameter="{Binding SelectedItem.Tag, RelativeSource={RelativeSource Self}}" telerik:ScreenTip.Description="Change the font size." Height="21" telerik:RadComboBox.IsEditable="True" telerik:RadComboBox.IsReadOnly="True" IsTextSearchEnabled="False" telerik:RadComboBox.OpenDropDownOnFocus="True" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeFontSizeCommand}" telerik:ScreenTip.Title="Font Size" Width="45">
                                        <telerik:RadRibbonComboBoxItem Tag="10.67">
                                            <System:Double>8</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="12">
                                            <System:Double>9</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="13.34">
                                            <System:Double>10</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="14.67">
                                            <System:Double>11</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="16">
                                            <System:Double>12</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="18.67">
                                            <System:Double>14</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="21.33">
                                            <System:Double>16</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="24">
                                            <System:Double>18</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="26.67">
                                            <System:Double>20</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="29.33">
                                            <System:Double>22</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="32">
                                            <System:Double>24</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="34.67">
                                            <System:Double>26</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="37.33">
                                            <System:Double>28</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="48">
                                            <System:Double>36</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="64">
                                            <System:Double>48</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                        <telerik:RadRibbonComboBoxItem Tag="96">
                                            <System:Double>72</System:Double>
                                        </telerik:RadRibbonComboBoxItem>
                                    </telerik:RadRibbonComboBox>
                                </StackPanel>
                                <telerik:RadButtonGroup>
                                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Increase the font size." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding IncrementFontSizeCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/font-increasesize.png" telerik:ScreenTip.Title="Grow Font"/>
                                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Decrease the font size." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding DecrementFontSizeCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/font-decreasesize.png" telerik:ScreenTip.Title="Shrink Font"/>
                                </telerik:RadButtonGroup>
                                <telerik:RadButtonGroup>
                                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Clear all the formatting from the selection, leaving only the plain text." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ClearFormattingCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/ClearFormatting16.png" telerik:ScreenTip.Title="Clear Formatting"/>
                                </telerik:RadButtonGroup>
                                <telerik:RadButtonGroup>
                                    <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Make the selected text bold." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleBoldCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/bold.png" telerik:ScreenTip.Title="Bold"/>
                                    <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Italicize the selected text." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleItalicCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/italic.png" telerik:ScreenTip.Title="Italic"/>
                                    <telerik:RadRibbonSplitButton telerik:ScreenTip.Description="Underline the selected text." telerik:RadSplitButton.IsToggle="True" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleUnderlineCommand}" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/underline.png" telerik:ScreenTip.Title="Underline">
                                        <telerik:RadSplitButton.DropDownContent>
                                            <telerik:RadGallery ItemWidth="156" ItemHeight="26" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeUnderlineDecorationCommand}" ViewportHeight="210" ViewportWidth="157">
                                                <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline1.png" Tag="Line"/>
                                                <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline2.png" Tag="DoubleLine"/>
                                                <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline3.png" Tag="ThickLine"/>
                                                <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline4.png" Tag="DottedLine"/>
                                                <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline5.png" Tag="DashedLine"/>
                                                <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline6.png" Tag="DotDashedLine"/>
                                                <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline7.png" Tag="DotDotDashedLine"/>
                                                <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline8.png" Tag="Wave"/>
                                            </telerik:RadGallery>
                                        </telerik:RadSplitButton.DropDownContent>
                                    </telerik:RadRibbonSplitButton>
                                    <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Draw a line through the middle of the selected text." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleStrikethroughCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/Strikethrough16.png" telerik:ScreenTip.Title="Strikethrough"/>
                                    <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Create small letters below the text baseline." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleSubscriptCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/subscript.png" telerik:ScreenTip.Title="Subscript"/>
                                    <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Create small text above the line of text." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleSuperscriptCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/superscript.png" telerik:ScreenTip.Title="Superscript"/>
                                </telerik:RadButtonGroup>
                                <telerik:RadButtonGroup>
                                    <telerik:HighlightColorPicker AutomaticColor="Transparent" BorderThickness="0" telerik:ScreenTip.Description="Make text look like it was marked with a highlighter pen." Height="Auto" Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/highlight.png" NoColorText="No color" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeFontHighlightColorCommand}" SelectedColor="Yellow" telerik:ScreenTip.Title="Text Highlight Color"/>
                                    <telerik:HighlightColorPicker BorderThickness="0" telerik:ScreenTip.Description="Change the text color." Height="Auto" Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/FontForeColor.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeFontForeColorCommand}" SelectedColor="Red" telerik:ScreenTip.Title="Font Color"/>
                                </telerik:RadButtonGroup>
                            </telerik:RadOrderedWrapPanel>
                        </telerik:RadRibbonGroup>
                        
                    </telerik:RadRibbonTab>
                
                </telerik:RadRichTextBoxRibbonUI>
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 22 Feb 2013 Link to this post

    Hello Alan,

     You can use the HeaderVisibility property of the RadRibbontab:

    <telerik:RadRichTextBoxRibbonUI.Resources>
                  <telerik:FontFamiliesProvider x:Key="FontFamiliesProvider"/>
              </telerik:RadRichTextBoxRibbonUI.Resources>
           
              <telerik:RadRibbonTab HeaderVisibility="Collapsed">
                  <telerik:RadRibbonGroup Header="Clipboard">
                      <telerik:RadRibbonGroup.Variants>
                          <telerik:GroupVariant Priority="0" Variant="Medium"/>
    Please let us know if this is suitable for you.

    Kind regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top