2

I have a UserControl that has to read a string (an URL) from a file At Design Time. So I made a VSPackage that exposes a Menu Command in the Visual Studio IDE; clicking on the command the user will be able to provide the URL via a WPF window and save this value to a file pressing Ok.

The UserControl reads the file on the ControlLoaded event and gets the URL property. Now...if the user changes the URL value again using the VSPackage Window, how can I intercept this property change? Is there a way to access VSPackage properties from UserControl code?

Thanks

rPulvi
  • 946
  • 8
  • 33
  • There are better ways to extend design-time functionality of of a `WPF` control or component, instead of creating an extension for such purpose: https://msdn.microsoft.com/en-us/library/bb546938(v=vs.90).aspx – Matze Jul 17 '15 at 15:18
  • Yes, I agree but in this case I have to set a "project" setting; all the controls of a certain type will automatically read this setting. I cannot set each object with the same parameter. – rPulvi Jul 17 '15 at 15:25

0 Answers0