Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

How Do I Derive Content Type and File Extension from existing ones.

$
0
0

I am creating an extension to the visual studio html editor to help provide some intelligence around data binding syntax for an MVVM library. In order to differentiate between a standard html file and one with the mvvm usages I want to create new extension (.mvvmhtm). I am defining a new content type using the MEF exports below. However when I do this and create a file with the extension .mvvmhtm I loose many of the features of the html editor including intellisense, and the tool tox. Is there a way to keep the exact same features of the .htm extension but apply them to the new .mvvmhtm extension? Thanks.

        [Export]
        [Name("mvvmhtml")]
        [BaseDefinition("html")]
        internal static ContentTypeDefinition MvvmHtmlTypeDefinition;

        [Export]
        [FileExtension(".mvvmhtm")]
        [ContentType("mvvmhtml")]
        internal static FileExtensionToContentTypeDefinition MvvmHtmlFileExtensionDefinition;



Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>