Files
PTConverter.Plugin/README.md
Kevin Krüger 3b5590d8a2 -> Readme added
2022-06-01 14:24:15 +02:00

29 lines
904 B
Markdown

# How it works
1. Create new Class-Library for .NetFramework 4.7.2 or higher in Visual Studio.
2. Open Nuget-Manager and install "PTConverter.Plugin"
3. Add "PluginInfo.cs" and implement the interface "IPlugin".
4. Create a XAML user control with the dimensions 450 x 800.
5. Implement the "IPage" interface in your user control.
```csharp
public string GetCategory() => "YourPluginPageName";
public UserControl GetPage() => new YourUserControl();
public string GetUnderCategory() => null; // null = Single Page
public string GetUnderCategory() => "UnderPage"; // The main page has an underpage
public IPage Page => this;
```
6. Register your site in "PluginInfo.cs"
```csharp
public IEnumerable<IPage> RegisterPages => new List<IPage>()
{
{ new YourUserControl() }
};
```
7. Pack your library as DLL in the "plugins" folder of the application.
8. Done.