Quick access tool bars buttons don't appear until tab change

Ribbon for WPF Forum

Posted 12 years ago by Brad Daszynski
Version: 1.0.0347
Avatar
I am clearing and adding items to the quick access toolbar at runtime after a button is clicked. They do not appear in the quick access toolbar until I change to another tab. Is this a known issue and is there a workaround? Thanks.

[Modified at 08/29/2007 01:41 PM]

[Modified at 08/29/2007 02:00 PM]

Comments (3)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
It should be working. Can you either give code that we can insert into our sample project or email us a simple project that shows this? Thanks!


Actipro Software Support

Posted 12 years ago by Brad Daszynski
Avatar
public class QuickAccessCommand
{
private ImageSource _imageSource;
private ICommand _command;

public ImageSource ImageSource
{
get { return _imageSource; }
set { _imageSource = value; }
}

public ICommand Command
{
get { return _command; }
set { _command = value; }
}
}

...
...
...

private void OnChangeQuickAccessButtonClick( object source, RoutedEventArgs e )
{
this.ribbon.QuickAccessToolBarItems.Clear();

foreach( MyCommand myCommand in this.CustomizeQuickAccessToolBarWindow.UserSelectedCommands )
{
RibbonControls.Button toolBarButton = new RibbonControls.Button( quickAccessCommand.Command );
toolBarButton.ImageSourceSmall = myCommand.ImageSource;
this.ribbon.QuickAccessToolBarItems.Add( toolBarButton );
}
}


"UserSelectedCommands" is of type ObservableCollection<MyCommand>

[Modified at 08/30/2007 07:30 AM]
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Are you sure you're running the latest maintenance release? If I add this code into the sample's fileNewCommand_Execute, it works fine:
RibbonControls.Button toolBarButton = new RibbonControls.Button(System.Windows.Input.ApplicationCommands.Save); 
this.ribbon.QuickAccessToolBarItems.Add( toolBarButton );
If you still see a problem after ensuring you are on the latest maintenance release, please send over a tiny sample project that shows the issue. Thanks.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.