Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
945
SubObjectPropChanged event
posted

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. 

Parents
No Data
Reply
  • 44743
    posted

    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.
       // ...
      }
     }
    }

Children
No Data