WpfHosting 0.3.2
dotnet add package WpfHosting --version 0.3.2
NuGet\Install-Package WpfHosting -Version 0.3.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WpfHosting" Version="0.3.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WpfHosting" Version="0.3.2" />
<PackageReference Include="WpfHosting" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WpfHosting --version 0.3.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: WpfHosting, 0.3.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package WpfHosting@0.3.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=WpfHosting&version=0.3.2
#tool nuget:?package=WpfHosting&version=0.3.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
WpfHosting
Library for building WPF applications using Generic Host.
説明
A library for building WPF applications using Generic Host (Host.CreateEmptyApplicationBuilder
).
Installation
NuGet (Stable Release)
dotnet add package WpfHosting
Azure Artifacts (Development Builds)
dotnet add package WpfHosting -s https://pkgs.dev.azure.com/finphie/Main/_packaging/DotNet/nuget/v3/index.json
Usage
Create App.xaml
and App.xaml.cs
and write the following:
<Application x:Class="WpfHosting.Sample.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
</Application>
using System.Windows;
public sealed partial class App : Application
{
public App() => InitializeComponent();
}
Create MainWindow.xaml
and MainWindow.xaml.cs
and write the following:
<Window x:Class="WpfHosting.Sample.Views.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="WpfHosting.Sample" Height="450" Width="800">
</Window>
using System.Windows;
public sealed partial class MainWindow : Window
{
public MainWindow(MainWindowViewModel viewModel)
{
InitializeComponent();
DataContext = viewModel;
}
}
Create Program.cs
and write the following:
using WpfHosting;
var builder = WpfApp.CreateBuilder<App, MainWindow>();
var app = builder.Build();
app.Run();
Supported Frameworks
- .NET 9
- .NET 8
Author
finphie
License
MIT
Credits
This project uses the following libraries, etc.
Analyzers
- DocumentationAnalyzers
- IDisposableAnalyzers
- Microsoft.CodeAnalysis.NetAnalyzers
- Microsoft.VisualStudio.Threading.Analyzers
- Roslynator.Analyzers
- Roslynator.Formatting.Analyzers
- StyleCop.Analyzers
Others
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net9.0-windows7.0 is compatible. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0-windows7.0
- Microsoft.Extensions.Hosting (>= 9.0.4)
-
net9.0-windows7.0
- Microsoft.Extensions.Hosting (>= 9.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.