System: .NET 3.5, Windows Vista, 64-bit
The ScreenTip never appears on the button if the ScreenTipDescription is not set if using RibbonCommandUIManager.Register.
Moreover even if the description is set, the Input Binding does not show up in the header automatically like it does if I use a RibbonCommand.
RibbonCommandUIProvider provider = new RibbonCommandUIProvider("New", null as string, null as string);
RibbonCommandUIManager.Register(FindResource("NewCommand") as ICommand, provider);
private void CommandBinding_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = true;
}
<ribbon:RibbonWindow.Resources>
<RoutedUICommand x:Key="NewCommand" Text="New"/>
</ribbon:RibbonWindow.Resources>
<ribbon:RibbonWindow.InputBindings>
<KeyBinding Command="{StaticResource NewCommand}" Gesture="CTRL+N"/>
</ribbon:RibbonWindow.InputBindings>
<ribbon:RibbonWindow.CommandBindings>
<CommandBinding Command="{StaticResource NewCommand}" CanExecute="CommandBinding_CanExecute" Executed="CommandBinding_Executed"/>
</ribbon:RibbonWindow.CommandBindings>
<ribbon:Ribbon>
<ribbon:Ribbon.ApplicationMenu>
<ribbon:ApplicationMenu>
<ribbon:Button Command="{StaticResource NewCommand}"/>
</ribbon:ApplicationMenu>
</ribbon:Ribbon.ApplicationMenu>
</ribbon:Ribbon>
Moreover even if the description is set, the Input Binding does not show up in the header automatically like it does if I use a RibbonCommand.