bsmith@logostech.net

IActiveViewEvents_ContentsChanged not always firing

Discussion created by bsmith@logostech.net on Jun 4, 2012
Hi All,

I have the following code fragment...

        IActiveViewEvents_Event activeViewEvents = m_doc.ActiveView as IActiveViewEvents_Event;

        activeViewEvents.ContentsChanged += new IActiveViewEvents_ContentsChangedEventHandler(activeViewEvents_ContentsChanged);

        void activeViewEvents_ContentsChanged()
        {
            MessageBox.Show("inside activeViewEvents_ContentsChanged");
        }

I am only getting to the MessageBox occasionally when I rename my Table of Contents values or change the Table of Contents visibility.  (I have a break point there also, and am getting to the breakpoint and the messagebox the same number of times.)  

Has anyone else seen anything like this?

Thanks,
Bryan

Outcomes