Select to view content in your preferred language

IContentsView3 in ArcGIS10

2200
4
08-20-2010 01:16 AM
EvaDienske
Deactivated User
Hi all,

Just upgraded an application with a custom IContentsView2 implementation to ArcGIS10. The contentsview is now implementing IContentsView3.

Not sure why when I base my contentsview on IContentsView3 only, I have to implement IContentsView AND IContentsView2 AND IContentsView3 which mostly have the same methods and properties... At the moment in my implementation, all methods do exactly the same thing, I guess this is correct!

In any case, setting the Visible property no longer works (I want to remove the contentsview when a custom extension is switched off). The property goes like this (visible being a member variable of my custom contentsview class):

        bool IContentsView3.Visible
        {
            get
            {
                return visible;
            }
            set
            {
                visible = value;
            }
        }

Quite simple and this used to work in 9.3.1 (with IContentsView2). Now it doesn't: the contentsview is always visible, even when its Visible property is false.

Have I missed something new?
Regards, Eva
0 Kudos
4 Replies
DaleShearer
Frequent Contributor
Hi Eva, I first want to say that I do not have an answer for your question, sorry about that.  In reading your question you an ahead of me in implementing IContentsView in ArcGis 10.  I do have a question though, I am coverting over to ArcGis 10 and I have not figured out how IContentsView is implemented.  In 9.3 ContentsView was registered in ArcGISCategoryRegistration (I am working on add-ins in ArcGis 10, no Com stuff), now, what kicks off, fires off, starts, recognizes the contentsview when the application is started so that I have access to the table of contents.

Thank you for your time, Dale,
0 Kudos
EvaDienske
Deactivated User
Hi Dale,

For addins you can create an add-in component class of type Dockable Window but not of type ContentsView, if you want to create a custom ContentsView you'll probably have to use a com-registered class like in 9.3 except that it needs to implement IContentsView3. If you're working with Addins you're familiar with the ArcMap.Application oject, since this is an IApplication it should allow you to find existing ContentsViews including the TOC through the MxDocument object. But I'm guessing a bit - not that much experience with add-ins.

Eva

PS haven't managed to solve the Visibility issue yet, though. Still wondering if this is a bug.
0 Kudos
ErikMcCurdy
New Contributor
I'm having trouble when adding a custom ContentsView with "IContentsViewEdit.AddContentsView" method under ArcGIS 10. My extension throws a "System.NotImplementedException". It was working fine under ArcGIS 9.3. My custom contents view is now also implementing IContentsView3 and all the methods have an implementation.

If anybody has any ideas, I'd be much obliged.

Erik
0 Kudos
CarlTremblay
Emerging Contributor
Hi Erik,
          I got the same problem on ArcObjects 10 "System.NotImplementedException" when implementing IContentsView3. Did you find the solution ? Thank you verry much ...


I'm having trouble when adding a custom ContentsView with "IContentsViewEdit.AddContentsView" method under ArcGIS 10. My extension throws a "System.NotImplementedException". It was working fine under ArcGIS 9.3. My custom contents view is now also implementing IContentsView3 and all the methods have an implementation.

If anybody has any ideas, I'd be much obliged.

Erik
0 Kudos