DependencyPropertyGenerator 0.7.1
See the version list below for details.
dotnet add package DependencyPropertyGenerator --version 0.7.1
NuGet\Install-Package DependencyPropertyGenerator -Version 0.7.1
<PackageReference Include="DependencyPropertyGenerator" Version="0.7.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
paket add DependencyPropertyGenerator --version 0.7.1
#r "nuget: DependencyPropertyGenerator, 0.7.1"
// Install DependencyPropertyGenerator as a Cake Addin
#addin nuget:?package=DependencyPropertyGenerator&version=0.7.1
// Install DependencyPropertyGenerator as a Cake Tool
#tool nuget:?package=DependencyPropertyGenerator&version=0.7.1
DependencyPropertyGenerator
Dependency property source generator for WPF/UWP/WinUI/Uno platforms.
Usage
using DependencyPropertyGenerator;
using System.Windows;
using System.Windows.Controls;
namespace H.Generators.IntegrationTests;
[DependencyProperty("IsSpinning", typeof(bool))]
[AttachedDependencyProperty("IsBubbleSource", typeof(bool), defaultValue: true, browsableForType: typeof(System.Windows.Controls.TreeView))]
public partial class MainWindow : Window
{
static partial void OnIsSpinningChanged(MainWindow sender, DependencyPropertyChangedEventArgs args)
{
}
static partial void OnIsBubbleSourceChanged(TreeView sender, DependencyPropertyChangedEventArgs args)
{
}
}
will generate:
//HintName: MainWindow_AttachedDependencyProperties.generated.cs
#nullable enable
namespace H.Ipc.Apps.Wpf
{
public partial class MainWindow
{
public static readonly global::System.Windows.DependencyProperty IsBubbleSourceProperty =
global::System.Windows.DependencyProperty.RegisterAttached(
name: "IsBubbleSource",
propertyType: typeof(bool),
ownerType: typeof(MainWindow),
defaultMetadata: new global::System.Windows.PropertyMetadata(
true,
static (sender, args) => OnIsBubbleSourceChanged((System.Windows.Controls.TreeView)sender, args)));
public static void SetIsBubbleSource(global::System.Windows.DependencyObject element, bool value)
{
element.SetValue(IsBubbleSourceProperty, value);
}
[global::System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.Controls.TreeView))]
public static bool GetIsBubbleSource(global::System.Windows.DependencyObject element)
{
return (bool)element.GetValue(IsBubbleSourceProperty);
}
static partial void OnIsBubbleSourceChanged(System.Windows.Controls.TreeView sender, global::System.Windows.DependencyPropertyChangedEventArgs args);
}
}
//HintName: MainWindow_DependencyProperties.generated.cs
#nullable enable
namespace H.Ipc.Apps.Wpf
{
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);
}
}
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,406 | 1/16/2024 |
1.4.0 | 1,342 | 1/5/2024 |
1.4.0-alpha.3 | 267 | 12/4/2023 |
1.4.0-alpha.2 | 70 | 12/1/2023 |
1.4.0-alpha.1 | 57 | 11/30/2023 |
1.3.3 | 3,276 | 11/7/2023 |
1.3.2 | 1,901 | 9/23/2023 |
1.3.1 | 428 | 9/9/2023 |
1.3.0 | 575 | 9/1/2023 |
1.2.12 | 180 | 8/29/2023 |
1.2.11 | 116 | 8/29/2023 |
1.2.8 | 151 | 8/28/2023 |
1.2.7 | 153 | 8/27/2023 |
1.2.6 | 131 | 8/25/2023 |
1.2.5 | 2,201 | 3/24/2023 |
1.2.4 | 733 | 3/14/2023 |
1.2.3 | 622 | 3/11/2023 |
1.2.2 | 279 | 3/10/2023 |
1.2.1 | 232 | 3/9/2023 |
1.2.0 | 219 | 3/8/2023 |
1.1.7 | 219 | 3/6/2023 |
1.1.5 | 376 | 2/14/2023 |
1.1.4 | 386 | 2/2/2023 |
1.1.3 | 258 | 2/2/2023 |
1.1.2 | 593 | 1/28/2023 |
1.1.1 | 309 | 1/27/2023 |
1.1.0 | 279 | 1/27/2023 |
1.0.7 | 313 | 1/18/2023 |
1.0.6 | 420 | 1/9/2023 |
1.0.5 | 263 | 1/9/2023 |
1.0.3 | 2,505 | 8/26/2022 |
1.0.2 | 366 | 8/26/2022 |
1.0.1 | 422 | 8/23/2022 |
1.0.0 | 579 | 8/22/2022 |
0.53.0 | 611 | 8/13/2022 |
0.52.2 | 718 | 7/29/2022 |
0.52.1 | 413 | 7/29/2022 |
0.52.0 | 404 | 7/28/2022 |
0.51.1 | 414 | 7/28/2022 |
0.51.0 | 404 | 7/27/2022 |
0.50.1 | 413 | 7/26/2022 |
0.50.0 | 418 | 7/26/2022 |
0.49.0 | 367 | 7/25/2022 |
0.48.1 | 420 | 7/19/2022 |
0.48.0 | 425 | 7/19/2022 |
0.47.0 | 385 | 7/18/2022 |
0.46.0 | 427 | 7/18/2022 |
0.45.0 | 421 | 7/18/2022 |
0.44.0 | 399 | 7/18/2022 |
0.43.1 | 449 | 7/18/2022 |
0.43.0 | 413 | 7/18/2022 |
0.42.0 | 476 | 7/17/2022 |
0.41.0 | 448 | 7/17/2022 |
0.40.0 | 424 | 7/17/2022 |
0.39.0 | 436 | 7/16/2022 |
0.38.0 | 400 | 7/16/2022 |
0.37.0 | 424 | 7/13/2022 |
0.36.3 | 525 | 7/9/2022 |
0.36.2 | 391 | 7/9/2022 |
0.36.1 | 422 | 7/9/2022 |
0.36.0 | 410 | 7/9/2022 |
0.35.1 | 400 | 7/8/2022 |
0.35.0 | 426 | 7/8/2022 |
0.34.3 | 448 | 7/1/2022 |
0.34.2 | 408 | 7/1/2022 |
0.34.1 | 433 | 6/30/2022 |
0.34.0 | 379 | 6/30/2022 |
0.33.0 | 431 | 6/29/2022 |
0.32.1 | 462 | 6/24/2022 |
0.32.0 | 418 | 6/24/2022 |
0.31.0 | 433 | 6/24/2022 |
0.29.0 | 420 | 6/24/2022 |
0.28.1 | 416 | 6/24/2022 |
0.28.0 | 429 | 6/23/2022 |
0.27.5 | 455 | 6/23/2022 |
0.27.4 | 436 | 6/23/2022 |
0.27.3 | 431 | 6/23/2022 |
0.27.2 | 412 | 6/23/2022 |
0.27.1 | 420 | 6/23/2022 |
0.27.0 | 416 | 6/23/2022 |
0.26.1 | 400 | 6/23/2022 |
0.26.0 | 426 | 6/23/2022 |
0.25.0 | 432 | 6/22/2022 |
0.24.0 | 425 | 6/22/2022 |
0.23.0 | 441 | 6/22/2022 |
0.22.0 | 388 | 6/22/2022 |
0.21.1 | 401 | 6/22/2022 |
0.21.0 | 395 | 6/22/2022 |
0.20.0 | 393 | 6/22/2022 |
0.19.1 | 425 | 6/21/2022 |
0.19.0 | 427 | 6/21/2022 |
0.18.0 | 395 | 6/21/2022 |
0.16.5 | 410 | 6/20/2022 |
0.16.4 | 396 | 6/20/2022 |
0.16.2 | 380 | 6/20/2022 |
0.16.1 | 394 | 6/20/2022 |
0.16.0 | 413 | 6/20/2022 |
0.15.1 | 429 | 6/20/2022 |
0.15.0 | 428 | 6/20/2022 |
0.14.0 | 431 | 6/20/2022 |
0.12.0 | 433 | 6/20/2022 |
0.10.0 | 404 | 6/20/2022 |
0.9.0 | 398 | 6/20/2022 |
0.8.0 | 429 | 6/20/2022 |
0.7.3 | 425 | 6/19/2022 |
0.7.2 | 439 | 6/19/2022 |
0.7.1 | 402 | 6/19/2022 |
0.7.0 | 357 | 6/19/2022 |
0.6.0 | 401 | 6/19/2022 |
0.3.3 | 409 | 6/19/2022 |
0.3.2 | 432 | 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:
Fixed unused generator reference.
Fixed versioning bug.
Added generate-build-number: false.
Fixed tests.
Fixed initial project settings.