Yes, really good, thank you very much, Ming!
Is there a way to use RibbonContextualTabGroupItemsControl.cs without copying and overriding all relating ribbon-source-classes?
I followed again the approach overriding the ribbon style to avoid this extensive work and was finally successful
There is a trigger that handles the IsMinimized-property of the ribbon:
<Trigger Property="IsMinimized" Value="True">
<Setter Property="Content" TargetName="mainItemsPresenterHost" Value="{x:Null}"/>
<Setter Property="Visibility" TargetName="mainItemsPresenterHost" Value="Collapsed"/>
<Setter Property="Content" TargetName="popupItemsPresenterHost" Value="{Binding ElementName=groupsBorder}"/>
<Setter Property="BorderThickness" TargetName="BackgroundBorder" Value="0,0,0,1"/>
</Trigger>
The content of mainItemsPresenterHost-control is a border named 'groupsBorder' that contains all ribbon tabs. When the IsMinimized-property changes to true, this border is moved to the popup presenter named 'popupItemsPresenterHost'.
An other trigger handles the IsDropDownOpen-property:
<Trigger Property="IsDropDownOpen" Value="True">
<Setter Property="BorderThickness" TargetName="BackgroundBorder" Value="0"/>
/Trigger>
I changed both trigger as follows:
<Trigger Property="IsMinimized" Value="True">
<!--<Setter Property="Content" TargetName="mainItemsPresenterHost" Value="{x:Null}"/>-->
<!--<Setter Property="Visibility" TargetName="mainItemsPresenterHost" Value="Collapsed"/>-->
<Setter Property="Height" TargetName="mainItemsPresenterHost" Value="0"/>
<!--<Setter Property="Content" TargetName="popupItemsPresenterHost" Value="{Binding ElementName=groupsBorder}"/>-->
<Setter Property="BorderThickness" TargetName="BackgroundBorder" Value="0,0,0,1"/>
</Trigger>
<Trigger Property="IsDropDownOpen" Value="True">
<Setter Property="BorderThickness" TargetName="BackgroundBorder" Value="0,0,0,1"/>
<Setter Property="Content" TargetName="mainItemsPresenterHost" Value="{x:Null}"/>
<Setter Property="Content" TargetName="popupItemsPresenterHost" Value="{Binding ElementName=groupsBorder}"/>
</Trigger>
Note that i have replaced the setter of the Visibility-property of the mainItemsPresenterHost-control with the Height-property and set it to '0'.