I have associated a certain xml-based file-type of mine (.xmlentity) to my app (.net) and I would like to have different icons based on content (root element name) of these files.
<note xmlns="mynamespace"></note>
should have one kind of icon and
<notebook xmlns="mynamespace"></notebook>
should have another.
Is this possible somehow without having different file-extensions?
Its okey if its only working on Windows 7.
You are looking for Icon Handler. It is implemented as a shell extension. Unfortunately, MSDN does not give any icon-handler-specific sample code, but at least this article describes requirements for such shell extension. This article also can be useful: Creating Shell Extension Handlers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With