Only first letter of ContextualTabGroup label is displayed

Dec 10, 2008 at 10:31 PM
Only first letter of ContextualTabGroup label is displayed. The same thing happens to the windows title.

 

 

<r:Ribbon.ContextualTabGroups>

 

 

 

<r:RibbonContextualTabGroup Label="Editor">

 

 

 

<r:RibbonTab Label="Editor">

 

 

 

<r:RibbonGroup Name="Insert">

 

 

 

<r:RibbonButton Command="{StaticResource InsertRectangleCommand}"></r:RibbonButton>

 

 

 

</r:RibbonGroup>

 

 

 

</r:RibbonTab>

 

 

 

</r:RibbonContextualTabGroup>

 

 

 

</r:Ribbon.ContextualTabGroups>

Is there a property I need to set?

 

Dec 10, 2008 at 10:33 PM
Setting the width does work, but is there a way to set the width automatically depending on the text?
Coordinator
Dec 11, 2008 at 7:10 PM
This should work automatically.  Could you send a screenshot and also a repro if you can?  This sounds like it could be by design or it could potentially a bug.  Some things which might be factors include:
- Are you using RibbonWindow or Window?
- What is the width of your window?  Does this continue to repro if you make the window wider or smaller?
- What is the title on your window?  How long is it?
- How many tabs are on your Ribbon?

Thanks!
Samantha
Dec 11, 2008 at 7:42 PM
There are three problems demonstated.

Running under Windows XP SP3

The background of the main window is blue (title background colour?)

When you click on the button to show the contextual tabs, only the first letter of the two titles are shown.

Not sure how to upload a bitmap of source code.

Thanks,

John McCauley


<

 

r:RibbonWindow x:Class="WpfApplicationProblem.Window1"

 

 

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

 

 

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

 

 

xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"

 

 

Title="Window1" Height="350" Width="566">

 

 

 

<StackPanel>

 

 

 

<r:Ribbon Title="Demonstates a problem with the ribbon control" x:Name="ribbon" >

 

 

 

<r:Ribbon.Resources>

 

 

 

<r:RibbonCommand x:Key="AppCommands.Cut" x:Name="commandCut"

 

 

LabelTitle="Cut"

 

 

ToolTipTitle="Cut"

 

 

ToolTipDescription="Cut selection to the Clipboard." />

 

 

 

<r:RibbonCommand x:Key="AppCommands.Copy" x:Name="commandCopy"

 

 

LabelTitle="Copy"

 

 

ToolTipTitle="Copy"

 

 

ToolTipDescription="Copy selection to the Clipboard." />

 

 

 

<r:RibbonCommand x:Key="AppCommands.Paste" x:Name="commandPaste"

 

 

LabelTitle="Paste"

 

 

ToolTipTitle="Paste"

 

 

ToolTipDescription="Paste contents from Clipboard." />

 

 

 

<r:RibbonCommand x:Key="InsertRectangleCommand" x:Name="InsertRectangleCommand"

 

 

LabelTitle="InsertRectangleCommand"

 

 

ToolTipTitle="InsertRectangleCommand"

 

 

ToolTipDescription="InsertRectangleCommand" />

 

 

 

</r:Ribbon.Resources>

 

 

 

<r:Ribbon.ContextualTabGroups>

 

 

 

<r:RibbonContextualTabGroup Label="Editor" x:Name="editorGroup">

 

 

 

<r:RibbonTab Label="Editor" x:Name="editorTab">

 

 

 

<r:RibbonGroup Name="Insert">

 

 

 

<r:RibbonButton Command="{StaticResource InsertRectangleCommand}"></r:RibbonButton>

 

 

 

</r:RibbonGroup>

 

 

 

</r:RibbonTab>

 

 

 

</r:RibbonContextualTabGroup>

 

 

 

</r:Ribbon.ContextualTabGroups>

 

 

 

<r:RibbonTab Label="Home" x:Name="home">

 

 

 

<r:RibbonGroup x:Name="clipboard">

 

 

 

<r:RibbonGroup.GroupSizeDefinitions>

 

 

 

<r:RibbonGroupSizeDefinitionCollection>

 

 

 

<r:RibbonGroupSizeDefinition>

 

 

 

<r:RibbonControlSizeDefinition ImageSize="Large"

 

 

IsLabelVisible="True"/>

 

 

 

<r:RibbonControlSizeDefinition ImageSize="Small"

 

 

IsLabelVisible="True"/>

 

 

 

<r:RibbonControlSizeDefinition ImageSize="Small"

 

 

IsLabelVisible="True"/>

 

 

 

<r:RibbonControlSizeDefinition ImageSize="Small"

 

 

IsLabelVisible="True"/>

 

 

 

</r:RibbonGroupSizeDefinition>

 

 

 

</r:RibbonGroupSizeDefinitionCollection>

 

 

 

</r:RibbonGroup.GroupSizeDefinitions>

 

 

 

<r:RibbonButton x:Name="paste" Command="{StaticResource AppCommands.Paste}"/>

 

 

 

<r:RibbonButton x:Name="cut" Command="{StaticResource AppCommands.Cut}"/>

 

 

 

<r:RibbonButton x:Name="copy" Command="{StaticResource AppCommands.Copy}"/>

 

 

 

</r:RibbonGroup>

 

 

 

</r:RibbonTab>

 

 

 

</r:Ribbon>

 

 

 

<Button Click="Button_Click" x:Name="button">Show/Hide contextual tabs</Button>

 

 

 

</StackPanel>

 

</

 

r:RibbonWindow>

-------------------------------------------------------------------------------------------------------------------------------------------

 

namespace

 

WpfApplicationProblem

 

{

 

/// <summary>

 

 

 

 

 

/// Interaction logic for Window1.xaml

 

 

 

 

 

/// </summary>

 

 

 

 

 

public partial class Window1 : RibbonWindow

 

 

 

 

{

 

public Window1()

 

{

InitializeComponent();

}

 

private void Button_Click(object sender, RoutedEventArgs e)

 

{

 

this.editorGroup.IsActive = !this.editorGroup.IsActive;

 

 

if (this.editorGroup.IsActive)

 

 

this.ribbon.SelectedTab = this.editorTab;

 

}

}

}

 

Coordinator
Dec 11, 2008 at 9:59 PM

Hi John,

Thanks for sending that - I'm able to repro the problem and I believe it is a bug.  I've filed a bug in our database and we will take a look at fixing this issue in V1.  In the meantime, please stick with the workaround you found of setting the width.  Thank you for reporting this!

Samantha