Hi,
I want to create a resource dictionary (stackpanel) item for an item that must be shown in different tabs in my ribbonbar.
In the following example I used a contentcontrol as container.
Is this the right way or is there a better ribbon container to use??
2nd problem i encounter is that when I add another contentcontrol with the same staticresource i get the logicalchild is already connected to a different element error. So I am not able to load 2 resources...[Modified at 09/03/2010 02:31 AM]
I want to create a resource dictionary (stackpanel) item for an item that must be shown in different tabs in my ribbonbar.
In the following example I used a contentcontrol as container.
Is this the right way or is there a better ribbon container to use??
2nd problem i encounter is that when I add another contentcontrol with the same staticresource i get the logicalchild is already connected to a different element error. So I am not able to load 2 resources...
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<ribbon:StackPanel x:Key="PP" ItemVariantBehavior="MediumThenSmallWhenSmall">
<ribbon:PopupButton Label="Popup">
<ribbon:Menu>
<ribbon:Button Label="Item 1"></ribbon:Button>
<ribbon:Button Label="Item 2"></ribbon:Button>
</ribbon:Menu>
</ribbon:PopupButton>
<ribbon:Button Label="aaa" />
<ribbon:Button Label="bbb" />
</ribbon:StackPanel>
</Window.Resources>
<Grid>
<ribbon:Ribbon>
<ribbon:Tab>
<ribbon:Group>
<ContentControl Content="{StaticResource PP}"></ContentControl>
<ribbon:Separator></ribbon:Separator>
<ribbon:Button Label="new btn"></ribbon:Button>
</ribbon:Group>
</ribbon:Tab>
</ribbon:Ribbon>
</Grid>
</Window>