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>
paket add DependencyPropertyGenerator --version 0.7.3
#r "nuget: DependencyPropertyGenerator, 0.7.3"
// Install DependencyPropertyGenerator as a Cake Addin
#addin nuget:?package=DependencyPropertyGenerator&version=0.7.3
// Install DependencyPropertyGenerator as a Cake Tool
#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 (2)
Showing the top 2 popular GitHub repositories that depend on DependencyPropertyGenerator:
Repository | Stars |
---|---|
JasonWei512/EnergyStarX
🔋 Improve your Windows 11 device's battery life. A WinUI 3 GUI for https://github.com/imbushuo/EnergyStar.
|
|
HavenDV/H.NotifyIcon
TrayIcon for WPF/WinUI/Uno/MAUI
|
Version | Downloads | Last updated |
---|---|---|
1.5.0-beta.1 | 1,574 | 1/16/2024 |
1.4.0 | 2,066 | 1/5/2024 |
1.4.0-alpha.3 | 274 | 12/4/2023 |
1.4.0-alpha.2 | 70 | 12/1/2023 |
1.4.0-alpha.1 | 58 | 11/30/2023 |
1.3.3 | 3,444 | 11/7/2023 |
1.3.2 | 1,937 | 9/23/2023 |
1.3.1 | 431 | 9/9/2023 |
1.3.0 | 584 | 9/1/2023 |
1.2.12 | 182 | 8/29/2023 |
1.2.11 | 117 | 8/29/2023 |
1.2.8 | 152 | 8/28/2023 |
1.2.7 | 154 | 8/27/2023 |
1.2.6 | 132 | 8/25/2023 |
1.2.5 | 2,210 | 3/24/2023 |
1.2.4 | 734 | 3/14/2023 |
1.2.3 | 624 | 3/11/2023 |
1.2.2 | 280 | 3/10/2023 |
1.2.1 | 235 | 3/9/2023 |
1.2.0 | 220 | 3/8/2023 |
1.1.7 | 221 | 3/6/2023 |
1.1.5 | 378 | 2/14/2023 |
1.1.4 | 389 | 2/2/2023 |
1.1.3 | 261 | 2/2/2023 |
1.1.2 | 597 | 1/28/2023 |
1.1.1 | 312 | 1/27/2023 |
1.1.0 | 282 | 1/27/2023 |
1.0.7 | 315 | 1/18/2023 |
1.0.6 | 421 | 1/9/2023 |
1.0.5 | 264 | 1/9/2023 |
1.0.3 | 2,512 | 8/26/2022 |
1.0.2 | 367 | 8/26/2022 |
1.0.1 | 423 | 8/23/2022 |
1.0.0 | 580 | 8/22/2022 |
0.53.0 | 613 | 8/13/2022 |
0.52.2 | 728 | 7/29/2022 |
0.52.1 | 414 | 7/29/2022 |
0.52.0 | 405 | 7/28/2022 |
0.51.1 | 416 | 7/28/2022 |
0.51.0 | 405 | 7/27/2022 |
0.50.1 | 415 | 7/26/2022 |
0.50.0 | 419 | 7/26/2022 |
0.49.0 | 369 | 7/25/2022 |
0.48.1 | 422 | 7/19/2022 |
0.48.0 | 426 | 7/19/2022 |
0.47.0 | 387 | 7/18/2022 |
0.46.0 | 429 | 7/18/2022 |
0.45.0 | 423 | 7/18/2022 |
0.44.0 | 401 | 7/18/2022 |
0.43.1 | 451 | 7/18/2022 |
0.43.0 | 414 | 7/18/2022 |
0.42.0 | 478 | 7/17/2022 |
0.41.0 | 450 | 7/17/2022 |
0.40.0 | 426 | 7/17/2022 |
0.39.0 | 438 | 7/16/2022 |
0.38.0 | 402 | 7/16/2022 |
0.37.0 | 426 | 7/13/2022 |
0.36.3 | 529 | 7/9/2022 |
0.36.2 | 392 | 7/9/2022 |
0.36.1 | 423 | 7/9/2022 |
0.36.0 | 411 | 7/9/2022 |
0.35.1 | 402 | 7/8/2022 |
0.35.0 | 427 | 7/8/2022 |
0.34.3 | 450 | 7/1/2022 |
0.34.2 | 409 | 7/1/2022 |
0.34.1 | 435 | 6/30/2022 |
0.34.0 | 380 | 6/30/2022 |
0.33.0 | 433 | 6/29/2022 |
0.32.1 | 464 | 6/24/2022 |
0.32.0 | 419 | 6/24/2022 |
0.31.0 | 435 | 6/24/2022 |
0.29.0 | 422 | 6/24/2022 |
0.28.1 | 418 | 6/24/2022 |
0.28.0 | 430 | 6/23/2022 |
0.27.5 | 459 | 6/23/2022 |
0.27.4 | 437 | 6/23/2022 |
0.27.3 | 432 | 6/23/2022 |
0.27.2 | 413 | 6/23/2022 |
0.27.1 | 421 | 6/23/2022 |
0.27.0 | 417 | 6/23/2022 |
0.26.1 | 402 | 6/23/2022 |
0.26.0 | 427 | 6/23/2022 |
0.25.0 | 434 | 6/22/2022 |
0.24.0 | 427 | 6/22/2022 |
0.23.0 | 443 | 6/22/2022 |
0.22.0 | 390 | 6/22/2022 |
0.21.1 | 403 | 6/22/2022 |
0.21.0 | 396 | 6/22/2022 |
0.20.0 | 395 | 6/22/2022 |
0.19.1 | 427 | 6/21/2022 |
0.19.0 | 428 | 6/21/2022 |
0.18.0 | 397 | 6/21/2022 |
0.16.5 | 412 | 6/20/2022 |
0.16.4 | 397 | 6/20/2022 |
0.16.2 | 381 | 6/20/2022 |
0.16.1 | 395 | 6/20/2022 |
0.16.0 | 414 | 6/20/2022 |
0.15.1 | 431 | 6/20/2022 |
0.15.0 | 430 | 6/20/2022 |
0.14.0 | 433 | 6/20/2022 |
0.12.0 | 435 | 6/20/2022 |
0.10.0 | 406 | 6/20/2022 |
0.9.0 | 400 | 6/20/2022 |
0.8.0 | 431 | 6/20/2022 |
0.7.3 | 427 | 6/19/2022 |
0.7.2 | 442 | 6/19/2022 |
0.7.1 | 403 | 6/19/2022 |
0.7.0 | 358 | 6/19/2022 |
0.6.0 | 403 | 6/19/2022 |
0.3.3 | 411 | 6/19/2022 |
0.3.2 | 433 | 6/19/2022 |
⭐ 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.