VS 2008 Style Save button

VS 2008 Style Save button

Old forum URL: forums.lhotka.net/forums/t/6434.aspx


ajj3085 posted on Monday, February 16, 2009

Hi,

I'm using Infragistics controls and my own user controls.  I'm trying to put a Save button on a Ribbon, much like there's a save button on the toolbar in VS 2008.

In VS2008, the button is "linked" to the current tab.  I have the Infragistics DockManager setup so that I add my UserControl to a ContentPane, and the pane is then displayed as a tabbed document.

The trick now is that the Save button is bound to Command="ApplicationCommands.Save", but it doens't enable / disable with the current object.  It's just always disabled.

I'm not sure how to get this working properly.. any ideas?

I'm thinking I may have to hook to each pane's Loaded / Unloaded event and unbind / rebind something on the user control.  I'd prefer not to expose the DataProvider... maybe I can code my controls raise RoutedEvents, and expose something else to use for CommandTarget?

Thanks

Copyright (c) Marimer LLC