Closed sraboy closed 6 years ago
Aha, finally figured it out. If I can get it cleaned up, would you want a PR to add audio options and attribution text?
Yeah, definitely . It will be nice as a new feature :) When you get something ready to test, just do the PR.
On 21 Jan 2018 11:26 pm, "Steve Lavoie" notifications@github.com wrote:
Aha, finally figured it out. If I can get it cleaned up, would you want a PR to add audio options and attribution text?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mohabouje/WinToast/issues/25#issuecomment-359286964, or mute the thread https://github.com/notifications/unsubscribe-auth/AGhXmvAwknd2ochbAKIoHFFpmE2BdzpDks5tM7mfgaJpZM4Rl6Uz .
Let's review the PR and close this one then.
Do you know how to add new elements and or add attributes to an element? I cannot for the life of me figure that out.
I resorted to using
IXmlDocumentIO::LoadXml("[xmlhere]")
and itsComPtr::CopyTo([the IXmlDocument])
but that makes using all your helpers to set text/image impossible.For now, I've hacked in two new
WinToastTemplateType
values (CustomXmlText
andCustomXmlImageAndText
) but, if you know how to add new elements and attributes to existing elements, it would be a great feature add.Here's an example XML template I'm using:
Side note, if you do start messing with this, putting XML in the command-line arguments in VS' project settings results in single quotes being swapped for double quotes and an
xmlns
attribute being added to the first element once you hit "Apply". After it edits it, you have to manually escape the double quotes and leave in thexmlns
attribute.