VSSDK-Extensibility-Samples/WPFDesigner_XML
WillBrown2000 f59cecb137 Upgraded extensibility documentation (#92)
* Updated new picture for ReadMe file.

* Updated Example.BuildProgressBar.png, Updated ReadMe file with correct references.

* Updated Example.CaretFishEye.png and Readme.md with current references

* Updated Example.CodeSweep.png and Readme.md with current references

* ReadMe.md updates and ComboBox.png update

* fixed typo

* Updated ReadMe.md references.

* Updated Example.CommandTargetRGB.png

* Updated references in Readme.md and Example.CompletionTooltipCustimzation.png.  Upgraded to make roundtripable.

* Fixed Typo in Readme.md

* Removed typo.

* Updated ReadMe.md and Example.DiffClassifier.png

* Updated Reame.md and Example.EditorWithToolBox

* Updated Readme.md and Example.SpelllingError.png

* fixed typo

* updated Example.HighlighWord.png and Readme.md

* Updated ReadMe.md and Example.IntraTextAdornment.png

* Updated Example.LightBulb.png and readme.md

* Updated Example.MSDN.png and Readme.md

* Updated Example.MenusAndCommands.png and ReadMe.md

* Fixed Typo

* Updated Example.Ook.png and Readme.md

* updated ReadMe.md

* Updated Example.OptionsPage1.png and Readme.md

* Updated Example.Package.png and readme.md

* Updated Example.Reference.Service.png and Readme.md

* Fixed Typo

* updated Example.RTDEvent.png and readme.md

* Fixed typo.

* Fixed Typo

* Fixed typo in png name

* updated Example.SingleFileGenerator.png and Readme.md

* updated Example.SingleFileGenerator.png

* Updated Example.SccProvider.png and readme.md

* Updated Example.SourceControlStatus.png and readme.md

* Fixed file locations

* Fixed typo

* Updated Readme.md and Example.ToDoClassification.png

* Fixed Typo

* Updated Readme.md

* Updated png and readme.md

* Fixed white space

* Corrected file location

* Updated Example.ToolWindow.png and Readme.md

* Fixed Typo

* Updated Readme.md

* Fixed white space
2017-06-06 16:00:53 -07:00
..
WPFDesigner_XML Updated Install Targets 2017-05-30 11:35:57 -07:00
Readme.md Upgraded extensibility documentation (#92) 2017-06-06 16:00:53 -07:00
WPFDesigner_XML.sln Designer sample 2015-07-21 13:16:27 -07:00

Readme.md

Designer View Over XML Editor Sample

Provides a WPF Editor when editing XML files that have the '.vstemplate' file extension in Visual Studio.

  • Technologies: Visual Studio 2017 SDK
  • Topics: Visual Studio Shell

Description

This sample demonstrates how to create an extension with a WPF-based Visual Designer for editing XML files with a specific schema (XSD) in coordination with the Visual Studio XML Editor. In this sample we implement a basic view for .vstemplate files.

Requirements

Visual Studio 2017

Get all samples

Clone the repo (How to):

git clone https://github.com/Microsoft/VSSDK-Extensibility-Samples.git

Run the sample

  1. To run the sample, hitF5 or choose theDebug > Start Debugging menu command. A new experimental instance of Visual Studio will launch.
  2. Once loaded, press theOpen File button. (Ctrl + O)
  3. Browse to the TestTemplates sub-directory within the solution and open a file with the '.vstemplate' file extension.
  4. A new tab opens with the contents of the file laid out in the fields of a WPF form
  5. Navigate to theView menu and click onCode.
  6. An additional tab opens with the contents of the file formatted by the XmlEditor

Project Files

  • AssemblyInfo.cs

This file contains assembly custom attributes.

  • VsTemplateDesignerPackage.cs

Registers the designer, via ProvideXmlEditorChooserDesignerView, as the preferred editor view for files with the .vstemplate extension and indicated schema .

  • EditorFactory.cs

Determines if the document to be edited already exists (was already opened in the Xml Editor view), rather than assuming it must be created; creates the designers EditorPane as the new Editor.

  • EditorPane.cs

Creates the sited designer control and associated XmlModel for the file and text buffer.

  • IViewModel.cs

Expresses the interface needed to bind the designer controls to the XmlSchema.

  • ViewModel.cs

Implements IViewModel and manages the events needed to synchronize data between the fields in the designer and the underlying XML document, which may also be seen in the XML Editor.

  • VsDesignerControl.xaml[.cs]

Implements the WPF controls expressing the designer interface and binds them to the ViewModel.

  • VsTemplateSchema.cs

XML schema file generated via xsd.exe vstemplate.xsd /classes /e /n:MyNameSpace.

Related topics