2

I have a Dockable window control that I want to have several properties associated with it. Specifically a data source. I currently have to hard code an Image service or a file GDB at a specific path. I want to create a option that allows a user to choose between an Image Service via URL or a file GDB given a local .gdb file.

I found Property Page, and figured it would be my best best, but I feel like I'm missing something in the documentation that describes how to actually use it.

I've reviewed Creating property pages, and How to create property pages and property sheets and I've been able to open a property page with my custom property sheet, but now I dont understand how I'm supposed to 'use' the property page.

How do I properly utilize the PropertyPage to update custom properties in a custom Desktop Add in, or what else should I be using to accomplish this in ArcObjects?

I've considered having the options to change the data source on the Dockable window itself, but it already has a lot of controls and dont want to add confusion.

5
  • Have you considered using Application Settings?
    – Barbarossa
    Mar 31 '17 at 13:24
  • 1
    I have considered it, but wanted to have a UI element that was standard to ArcMap so I figured the Property Page seemed like the right option. If all else fails, I'll create a control that saves Application Settings and utilize those. Mar 31 '17 at 13:47
  • Your second link is broken. Additionally, questions asking for help with code should include a snippet of the code you've got that includes the part where you are stuck, and details of what you've tried.
    – Midavalo
    Mar 31 '17 at 14:14
  • I'm not necessary asking for code help per say. The first link describes what a Property Page/Sheet is, (which is what I believe I want), the 2nd link has a description of how what functions to include and how to open the Property Page/Sheet. But no where does it describe using those functions or what's the proper way to Apply or cancel the property changes. The template DesktopPropertyPage1 : UserControl, IComPropertyPage code from Visual Studio has the required functions, but how to I use them as intended isn't explained. A link to documentation would be sufficient. Mar 31 '17 at 15:23
  • I may have misunderstood the question, are you asking to store a URL\local path such that when arcmap is closed down it persists and then when you open it again and go to your dockable window it's available to the user and they can even change it? I thought Application settings are for exe not addins? I would have stored this in some sort of XML file and write that to a known location which the dockable windows is able to read and write from. Or you could explore the method of reading and writing to the registry?
    – Hornbydd
    Apr 1 '17 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.