DependencyPropertyGenerator 0.7.3
See the version list below for details.
dotnet add package DependencyPropertyGenerator --version 0.7.3
NuGet\Install-Package DependencyPropertyGenerator -Version 0.7.3
<PackageReference Include="DependencyPropertyGenerator" Version="0.7.3"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="DependencyPropertyGenerator" Version="0.7.3" />
<PackageReference Include="DependencyPropertyGenerator"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add DependencyPropertyGenerator --version 0.7.3
#r "nuget: DependencyPropertyGenerator, 0.7.3"
#:package DependencyPropertyGenerator@0.7.3
#addin nuget:?package=DependencyPropertyGenerator&version=0.7.3
#tool nuget:?package=DependencyPropertyGenerator&version=0.7.3
DependencyPropertyGenerator
Dependency property source generator for WPF/UWP/WinUI/Uno platforms.
Install
Install-Package DependencyPropertyGenerator // Generator
Install-Package DependencyPropertyGenerator.Core // Attributes
Usage
using DependencyPropertyGenerator;
using System.Windows;
using System.Windows.Controls;
namespace H.Generators.IntegrationTests;
[DependencyProperty("IsSpinning", typeof(bool))]
public partial class MainWindow : Window
{
static partial void OnIsSpinningChanged(MainWindow sender, DependencyPropertyChangedEventArgs args)
{
}
}
[AttachedDependencyProperty("SelectedItem", typeof(object), browsableForType: typeof(System.Windows.Controls.TreeView))]
public static partial class TreeViewExtensions
{
static partial void OnSelectedItemChanged(TreeView sender, DependencyPropertyChangedEventArgs args)
{
}
}
will generate:
//HintName: MainWindow_DependencyProperties.generated.cs
#nullable enable
namespace H.Generators.IntegrationTests
{
public partial class MainWindow
{
public static readonly global::System.Windows.DependencyProperty IsSpinningProperty =
global::System.Windows.DependencyProperty.Register(
name: "IsSpinning",
propertyType: typeof(bool),
ownerType: typeof(MainWindow),
typeMetadata: new global::System.Windows.PropertyMetadata(
default(bool),
static (sender, args) => OnIsSpinningChanged((MainWindow)sender, args)));
public bool IsSpinning
{
get => (bool)GetValue(IsSpinningProperty);
set => SetValue(IsSpinningProperty, value);
}
static partial void OnIsSpinningChanged(MainWindow sender, global::System.Windows.DependencyPropertyChangedEventArgs args);
}
}
//HintName: TreeViewExtensions_AttachedDependencyProperties.generated.cs
#nullable enable
namespace H.Generators.IntegrationTests
{
public static partial class TreeViewExtensions
{
public static readonly global::System.Windows.DependencyProperty SelectedItemProperty =
global::System.Windows.DependencyProperty.RegisterAttached(
name: "SelectedItem",
propertyType: typeof(object),
ownerType: typeof(TreeViewExtensions),
defaultMetadata: new global::System.Windows.PropertyMetadata(
typeof(System.Windows.Controls.TreeView),
static (sender, args) => OnSelectedItemChanged((System.Windows.Controls.TreeView)sender, args)));
public static void SetSelectedItem(global::System.Windows.DependencyObject element, object value)
{
element.SetValue(SelectedItemProperty, value);
}
[global::System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.Controls.TreeView))]
public static object GetSelectedItem(global::System.Windows.DependencyObject element)
{
return (object)element.GetValue(SelectedItemProperty);
}
static partial void OnSelectedItemChanged(System.Windows.Controls.TreeView sender, global::System.Windows.DependencyPropertyChangedEventArgs args);
}
}
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (6)
Showing the top 6 popular GitHub repositories that depend on DependencyPropertyGenerator:
| Repository | Stars |
|---|---|
|
helix-toolkit/helix-toolkit
Helix Toolkit is a collection of 3D components for .NET.
|
|
|
GoldenPotato137/PotatoVN
一款Visual Novel管理软件
|
|
|
JasonWei512/EnergyStarX
🔋 Improve your Windows 11 device's battery life. A WinUI 3 GUI for https://github.com/imbushuo/EnergyStar.
|
|
|
IviriusCommunity/Rebound
WinUI rewrite project of Windows 11 system apps.
|
|
|
HavenDV/H.NotifyIcon
TrayIcon for WPF/WinUI/Uno/MAUI
|
|
|
NeilMacMullen/kusto-loco
C# KQL query engine with flexible I/O layers and visualization
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.5.0 | 13,477 | 1/12/2025 |
| 1.5.0-beta.2 | 2,306 | 7/23/2024 |
| 1.5.0-beta.1 | 2,583 | 1/16/2024 |
| 1.4.0 | 12,798 | 1/5/2024 |
| 1.4.0-alpha.3 | 330 | 12/4/2023 |
| 1.4.0-alpha.2 | 114 | 12/1/2023 |
| 1.4.0-alpha.1 | 101 | 11/30/2023 |
| 1.3.3 | 3,689 | 11/7/2023 |
| 1.3.2 | 2,286 | 9/23/2023 |
| 1.3.1 | 550 | 9/9/2023 |
| 1.3.0 | 807 | 9/1/2023 |
| 1.2.12 | 279 | 8/29/2023 |
| 1.2.11 | 209 | 8/29/2023 |
| 1.2.8 | 248 | 8/28/2023 |
| 1.2.7 | 279 | 8/27/2023 |
| 1.2.6 | 226 | 8/25/2023 |
| 1.2.5 | 2,394 | 3/24/2023 |
| 1.2.4 | 880 | 3/14/2023 |
| 1.2.3 | 759 | 3/11/2023 |
| 1.2.2 | 431 | 3/10/2023 |
| 1.2.1 | 401 | 3/9/2023 |
| 1.2.0 | 370 | 3/8/2023 |
| 1.1.7 | 352 | 3/6/2023 |
| 1.1.5 | 511 | 2/14/2023 |
| 1.1.4 | 516 | 2/2/2023 |
| 1.1.3 | 408 | 2/2/2023 |
| 1.1.2 | 759 | 1/28/2023 |
| 1.1.1 | 458 | 1/27/2023 |
| 1.1.0 | 434 | 1/27/2023 |
| 1.0.7 | 467 | 1/18/2023 |
| 1.0.6 | 558 | 1/9/2023 |
| 1.0.5 | 390 | 1/9/2023 |
| 1.0.3 | 2,710 | 8/26/2022 |
| 1.0.2 | 516 | 8/26/2022 |
| 1.0.1 | 602 | 8/23/2022 |
| 1.0.0 | 764 | 8/22/2022 |
| 0.53.0 | 784 | 8/13/2022 |
| 0.52.2 | 915 | 7/29/2022 |
| 0.52.1 | 592 | 7/29/2022 |
| 0.52.0 | 578 | 7/28/2022 |
| 0.51.1 | 581 | 7/28/2022 |
| 0.51.0 | 551 | 7/27/2022 |
| 0.50.1 | 588 | 7/26/2022 |
| 0.50.0 | 565 | 7/26/2022 |
| 0.49.0 | 529 | 7/25/2022 |
| 0.48.1 | 566 | 7/19/2022 |
| 0.48.0 | 594 | 7/19/2022 |
| 0.47.0 | 542 | 7/18/2022 |
| 0.46.0 | 600 | 7/18/2022 |
| 0.45.0 | 592 | 7/18/2022 |
| 0.44.0 | 566 | 7/18/2022 |
| 0.43.1 | 597 | 7/18/2022 |
| 0.43.0 | 584 | 7/18/2022 |
| 0.42.0 | 644 | 7/17/2022 |
| 0.41.0 | 616 | 7/17/2022 |
| 0.40.0 | 596 | 7/17/2022 |
| 0.39.0 | 587 | 7/16/2022 |
| 0.38.0 | 548 | 7/16/2022 |
| 0.37.0 | 600 | 7/13/2022 |
| 0.36.3 | 692 | 7/9/2022 |
| 0.36.2 | 541 | 7/9/2022 |
| 0.36.1 | 570 | 7/9/2022 |
| 0.36.0 | 559 | 7/9/2022 |
| 0.35.1 | 576 | 7/8/2022 |
| 0.35.0 | 602 | 7/8/2022 |
| 0.34.3 | 626 | 7/1/2022 |
| 0.34.2 | 559 | 7/1/2022 |
| 0.34.1 | 625 | 6/30/2022 |
| 0.34.0 | 546 | 6/30/2022 |
| 0.33.0 | 599 | 6/29/2022 |
| 0.32.1 | 635 | 6/24/2022 |
| 0.32.0 | 562 | 6/24/2022 |
| 0.31.0 | 600 | 6/24/2022 |
| 0.29.0 | 601 | 6/24/2022 |
| 0.28.1 | 566 | 6/24/2022 |
| 0.28.0 | 582 | 6/23/2022 |
| 0.27.5 | 628 | 6/23/2022 |
| 0.27.4 | 599 | 6/23/2022 |
| 0.27.3 | 582 | 6/23/2022 |
| 0.27.2 | 559 | 6/23/2022 |
| 0.27.1 | 590 | 6/23/2022 |
| 0.27.0 | 566 | 6/23/2022 |
| 0.26.1 | 561 | 6/23/2022 |
| 0.26.0 | 610 | 6/23/2022 |
| 0.25.0 | 584 | 6/22/2022 |
| 0.24.0 | 604 | 6/22/2022 |
| 0.23.0 | 588 | 6/22/2022 |
| 0.22.0 | 531 | 6/22/2022 |
| 0.21.1 | 552 | 6/22/2022 |
| 0.21.0 | 576 | 6/22/2022 |
| 0.20.0 | 536 | 6/22/2022 |
| 0.19.1 | 580 | 6/21/2022 |
| 0.19.0 | 613 | 6/21/2022 |
| 0.18.0 | 576 | 6/21/2022 |
| 0.16.5 | 599 | 6/20/2022 |
| 0.16.4 | 577 | 6/20/2022 |
| 0.16.2 | 526 | 6/20/2022 |
| 0.16.1 | 579 | 6/20/2022 |
| 0.16.0 | 568 | 6/20/2022 |
| 0.15.1 | 595 | 6/20/2022 |
| 0.15.0 | 595 | 6/20/2022 |
| 0.14.0 | 600 | 6/20/2022 |
| 0.12.0 | 582 | 6/20/2022 |
| 0.10.0 | 556 | 6/20/2022 |
| 0.9.0 | 548 | 6/20/2022 |
| 0.8.0 | 605 | 6/20/2022 |
| 0.7.3 | 605 | 6/19/2022 |
| 0.7.2 | 596 | 6/19/2022 |
| 0.7.1 | 572 | 6/19/2022 |
| 0.7.0 | 567 | 6/19/2022 |
| 0.6.0 | 571 | 6/19/2022 |
| 0.3.3 | 575 | 6/19/2022 |
| 0.3.2 | 623 | 6/19/2022 |
| 0.0.0-beta.274 | 133 | 8/19/2024 |
| 0.0.0-beta.273 | 110 | 8/19/2024 |
| 0.0.0-beta.272 | 91 | 8/12/2024 |
| 0.0.0-beta.271 | 92 | 8/5/2024 |
| 0.0.0-beta.270 | 100 | 7/29/2024 |
| 0.0.0-beta.269 | 122 | 7/23/2024 |
⭐ Last 10 features:
Added Attached property BrowsableForType support.
Added default values support.
Added property changed callback support.
Added AttachedDependencyProperty support.
Released first version with WPF and DependencyAttrubute support.
Initial commit.
🐞 Last 10 bug fixes:
Added missing AllowMultiple to attributes.
Fixed some Attached properties bugs.
Fixed unused generator reference.
Fixed versioning bug.
Added generate-build-number: false.
Fixed tests.
Fixed initial project settings.