I have a main menu toolbar, and I want to be notified when status of the menu items are changed.
I tried to subscribe to SubObjectPropChanged event, but it did not get notified when menu items change to Enabled to Disabled.
Is this the correct event that I should listen to?Thanks.
You can hook the PropertyChanged event on the UltraToolbarsManager with code similar to this:
private void ultraToolbarsManager1_PropertyChanged( object sender, Infragistics.Win.PropertyChangedEventArgs e ){ PropChangeInfo changeInfo = e.ChangeInfo.FindTrigger( null );
if ( changeInfo.PropId is PropertyIds && (PropertyIds)changeInfo.PropId == PropertyIds.Enabled ) { SharedProps sharedProps = changeInfo.Source as SharedProps;
if ( sharedProps != null ) { ToolBase toolWithEnabledStateChange = sharedProps.RootTool;
// Perform logic with tool whose enabled state has changed. // ... } }}