0

I need to include in the generated xaml activity some additional information, something like identity information (a comment in document head), unfortunately moving from designer to code editor this information is lost due to the automatic regeneration of the xaml code.

It's important that this information is not visible on the designer (so, no Annotations or Activities can be used).

Our idea is to be able to intercept the serialization / de-serialization of Xaml through a Visual Studio extension, in order to sneak in a comment with internal information.

Tom
  • 302
  • 2
  • 5
  • 14
  • 2
    The solution is to find the person who created this requirement, calmly explain to them why they are stupid, then hit them in the head with something heavy and dense. –  Oct 07 '15 at 13:11

1 Answers1

0

I had success using events! such as the OnBeforeSave event from IVsRunningDocTableEvents3 interface.

In the Initialize method of the package

IVsRunningDocumentTable rdt = (IVsRunningDocumentTable)GetGlobalService(typeof(SVsRunningDocumentTable));
rdt.AdviseRunningDocTableEvents(new YourClassThatImplements(this), out cookie);

and just implement the interface.. ;)

Tom
  • 302
  • 2
  • 5
  • 14