VB "WPF My extension" generator.
Generates Visual Basic's My Namespace extension for Windows Presentation Foundation.
The generator writes the WPF specific part of My extension by default. For generating all members, please enable Windows Forms (Edit project file, add <UseWindowsForms>true</UseWindowsForms> to <PropertyGroup>), then reload the project.
Visual Studio 17.8 or later
Visual Studio 16.9 or later
- Generate My.Application
- Generate My.Windows
- Generate My.Computer (Windows Forms required)
- Generate My.User (Windows Forms required)
- Generate My.Log (Windows Forms required)
- Generate My.Application.Info (Windows Forms required)
The source generator project. Build this project before using the sample project.
Sample project of WPF and Windows Forms. Requires to reopen Visual Studio after building the source generator project.
Sample project of WPF. Requires to reopen Visual Studio after building the source generator project.
- Install Nukepayload2.SourceGenerators.MyWpfExtension
- Version 1.x only: If you are using .NET 5 or earlier, edit your project file. In the
<ProjectReference>element, addOutputItemType="Analyzer" ReferenceOutputAssembly="False". Add<IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation>to<PropertyGroup>element.
- Add the source generator project to your solution.
- Build the source generator project.
- Select your WPF project, and add project reference to the source generator.
- Version 1.x only: Edit your project file. In the
<ProjectReference>element, addOutputItemType="Analyzer" ReferenceOutputAssembly="False". Add<IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation>to<PropertyGroup>element. - Reload the solution.
- Version 1.x only: WPF windows with the same name and different namespace is unsupported.