
System: .NET 3.5, Windows Vista, 64-bit
If you run the above window as given the PopupButton is disabled as expected; all child buttons cannot execute so the parent should not be enabled.
However, uncomment the Separator and the PopupButton becomes enabled. This is _always_ true, regardless of the state of any children and incorrect.
<Window x:Class="WpfApplication3.Window1"
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="Window1" WindowState="Maximized">
<Window.Resources>
<ribbon:RibbonCommand x:Key="ChangeAlignmentCommand" Label="CommandLabel"/>
</Window.Resources>
<Window.CommandBindings>
<CommandBinding Command="{StaticResource ChangeAlignmentCommand}" CanExecute="CommandBinding_CanExecute"/>
</Window.CommandBindings>
<ribbon:Ribbon>
<ribbon:Tab>
<ribbon:Group>
<ribbon:PopupButton Label="{Binding RelativeSource={RelativeSource Self}, Path=IsEnabled}">
<ribbon:Menu>
<ribbon:Button Command="{StaticResource ChangeAlignmentCommand}" CommandParameter="Left" Label="Left"/>
<!--<ribbon:Separator/>-->
<ribbon:Button Command="{StaticResource ChangeAlignmentCommand}" CommandParameter="Top" Label="Top"/>
</ribbon:Menu>
</ribbon:PopupButton>
</ribbon:Group>
</ribbon:Tab>
</ribbon:Ribbon>
</Window>
private void CommandBinding_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = false;
}
However, uncomment the Separator and the PopupButton becomes enabled. This is _always_ true, regardless of the state of any children and incorrect.